Military Madness/Combat

Combat is resolved by comparing the attack rating of one unit and the defensive rating of the other. The higher the number, the greater chance of success. The units clash in an animated combat sequence. Most of them may become damaged, other units may be destroyed, and yet a few may remain unscathed.

Following the application of combat, units are awarded the appropriate experience, and some (like the Rabbit) may have additional movement.

Combat calculation
A unit's Attack Power and Defense Ability are generated by multiplying the intrinsic combat power (Base-unit-Attack or Base-unit-Defense) by the relative health of the unit (Strength-level).


 * Attack Power   = Strength-level x Base-unit-Attack  (BuA)
 * Defense Ability = Strength-level x Base-unit-Defense (BuD)

Throughout the game, Strength-level will change as units sustain damage or regain strength from factory visits. For the purpose of calculating combat values however, strength-level is a given value and BuA and BuD are modified by experience, support/surround, and terrain modifiers.

Strength-level is a whole-number anywhere between 1 through 8. Level-1 represents a severely weakened unit that is very close to being destroyed. Level-8 represents a unit at full strength.

BuA and BuD can also be described as combat power per unit of strength. The initial value is specific to each unit.

During the animated combat sequence, the BuA and BuD are modified in four steps, which ultimately generates the final Attack Power and Defense Ability values. The combat calculator flashes four numbers, one for each step in the BuA and BuD modification scheme.
 * 1) The calculator initially displays Attack Power and Defense Ability that has been modified for experience.  It then passes experience-modified BuA & BuD to step 2.
 * 2) The calculator further adjusts BuA & BuD for surround effects and recalculates combat values.  It then passes cumulatively modified BuA & BuD to step 3.
 * 3) The calculator further adjusts BuA & BuD for support effects and recalculates combat values.  It then passes cumulatively modified BuA & BuD to step 4.
 * 4) The calculator further adjusts BuD for terrain effect and recalculates Defense Ability.  The output of this calculation equals the final combat values.

All modified values are rounded down prior to being passed from one step to the next. BuA & BuD must always be whole numbers, i.e. no decimals. This is especially important because some modifications may be so slight, that they fail to influence either the Attack Power or the Defensive Ability at all.

Experience effect
When the attacker destroys the defender, the attacker gains 2 experience. When the attacker damages, but does not destroy, the defender, both gain 1 experience. When the attacker fails to damage the defender, the defender gains 2 experience.

Surround effects
In direct (i.e. range 1) combat, if all six hexes adjacent to the defender are either adjacent to or occupied by enemy units, then the defender is surrounded and has both its attack and defense cut by 50%.

Surround does not apply to ranged combat (e.g. artillery strikes).

Support effects
In direct combat, the attacker gets a bonus to attack power (only) for each allied unit adjacent to the defending unit. The defender gets a bonus to defense power (only) for each allied unit adjacent to the attacker.

The support effect is equal to 50% of the relevant base stat (i.e. not modified by experience) of each ally adjacent to the enemy unit. The total defense power of the defender after support effect is capped at double its own initial defense power (after experience bonus, but before terrain bonus is applied). (Author is unsure of the 2x value of the cap; this needs to be verified).

Support does not apply to ranged combat.

Terrain effect

 * Terrain of 5% = + 5% BuD
 * Terrain of 20% = +20% BuD
 * Terrain of 30% = +30% BuD
 * Terrain of 40% = +40% BuD

Note: if terrain effect does not move the BuD by minimum of one whole number, the defender gains no defensive bonus.