Make land unit attack mobility cost consistent with march cost:
(att_mobcost): New. (ask_olist, take_move_in_mob): Use it. Attacking land units can now use roads and suffer the newly taken penalty. No difference in most cases, because the penalty commonly cancels the road bonus. (get_mob_support, calc_mobcost, ask_move_in_off): Use it. No functional change now; ensures that military's attack mobility cost will stay consistent with move cost. (MOB_NONE): Unused, remove. (sector_mcost): Simplify.
This commit is contained in:
parent
bcd35e15fb
commit
2e693275f1
3 changed files with 55 additions and 32 deletions
|
@ -164,7 +164,7 @@ extern int sctoff(coord x, coord y);
|
|||
|
||||
extern struct dchrstr dchr[SCT_MAXDEF + 1];
|
||||
extern struct dchrstr bigcity_dchr;
|
||||
#define IS_BIG_CITY(sect) (dchr[(sect)].d_pkg == UPKG)
|
||||
#define IS_BIG_CITY(type) (dchr[(type)].d_pkg == UPKG)
|
||||
|
||||
/* Minimal efficiency of sectors that can be knocked down (bridges) */
|
||||
#define SCT_MINEFF 20
|
||||
|
@ -178,10 +178,9 @@ extern struct dchrstr bigcity_dchr;
|
|||
#define MIN_MOBCOST 0.001 /* lowest cost a sector can have to move into */
|
||||
#define FORTEFF 5 /* forts must be 5% efficient to fire. */
|
||||
|
||||
#define MOB_NONE 0
|
||||
#define MOB_MOVE 1
|
||||
#define MOB_MARCH 2
|
||||
#define MOB_RAIL 3
|
||||
#define MOB_MOVE 0
|
||||
#define MOB_MARCH 1
|
||||
#define MOB_RAIL 2
|
||||
|
||||
#define INT_ROAD 0
|
||||
#define INT_RAIL 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue