Advance Wars 2 and Dual Strike fundamentally use the same calculations for rolling dice.

The RNG affects a lot of things, but the most obvious one is damage variance in the game. This is pretty obvious when you see a 55% attack between Infantry Vs Infantry for example, and some will take 5HP Damage, while others will take 6HP damage. Each unit works with 10 HP on what is equivalently a decimal scale, so the highest unit HP is 10.0 HP (10), while the lowest is 0.1 HP (1).

So, an attack that inflicts 55% on an attack, at its simplest will inflict 5.5 damage at minimum. Each standard CO has a basic luck of 10, which means that the attack can inflict 5.5 to 6.4 damage, so 5HP to 6HP of damage inflicted.

But why, 6.4 (+0.9) instead of 6.5? - this is to do with how the game calculates the value for a luck range.

The game takes an input of a random number (this is a 32-bit value, so a random value from 0 to 4294967295), then takes the luck range and calculates the

**remainder**of this value. So for a luck range of 10, the potential remainder value will be a value of 0 to 9. For a luck range of 15, the potential remainder values range from 0 to 14.

So for that 55% attack, the inflicted damage will range from 55% to 64% with a standard CO. This is before any other changes, like defence, terrain etc.

In terms of calculating more complex values, the order of operations is as follows:

1. Base Damage

2. Multiply Firepower Bonuses/Penalties

3. Add Luck Rolls

4. Multiply by HP Scaling

5. Multiply Target Defence Bonuses/Penalties (CO Defence + Terrain Defence)

So this means a few things:

1. A CO's Firepower does not affect the range of luck on a target.

2. A Unit's HP scales the luck range on a target.

3. Higher defence means less luck damage taken by a target.

For example, Using AW2 Max's Tank Vs. AW2 Sturm's Tank on Plains:

1. Base Damage: 55%

2. Max's Firepower Bonus: +20%, Damage: 66%

3. Max has a standard luck range, so Damage: 66% to 75%

4. Units are at full HP, so Damage: 66% to 75%

5. Sturm's Defence is +20%, Sturm's Terrain Defence is +10% for a total of +30% Defence. Final Damage is 46% to 52%.

For COs with non-standard luck ranges, the same rules still apply. For example, AWDS Nell's Infantry Vs AWDS Kanbei's Infantry on a City:

1. Base Damage: 55%

2. No bonus firepower D2D: 55%

3. Nell has a luck range of 20, Damage: 55% to 74%

4. Units are at full HP, so 55% to 74%

5. Kanbei's Defence is +20%, City is +30% for a total of +50%. Final Damage is 27% to 37%. So, Nell will inflict 2-3 HP damage to the target.

For a more extreme example: AWDS Nell using Lady Luck, with the Luck Skill and with a Tag Partner of Rachel Vs Kanbei's Infantry on a City:

1. Base Damage: 55%

2. Nell Has SCOP: 60%

3. Lady Luck has a luck range of 100, Luck adds 10 and a 3-Star tag with Rachel adds 15 for a total of 125. Damage: 60% to 184%

4. Full HP, still 60% to 184%

5. Kanbei's Defence on a City is +50%. Final Damage is 30% to 92%, So Nell can inflict between 3 and 9 HP of damage to the target.

For COs who have bad luck (Flak, Sonja and Jugger), there is an extra random roll for the damage. The bad luck is rolled separately to the good luck and the results are added together. This has the result of bell curving the results a bit around the centre of their values, making the extremities less likely. e.g. for AW2 Flak to roll maximum damage, he has to roll a +14 Good Luck and a -0 Bad Luck.

For an example: AW2 Flak Vs. AW2 Andy on a Road, Infantry vs. Infantry

1. Base Damage: 55%

2. No Firepower Bonuses: 55%

3. Flak has 15 Luck and 10 Bad luck. Damage: 46% to 69%

4. Full HP, still 46% to 69%

5. Andy has no defence, so the luck roll is unchanged. Final Damage is 46% to 69%, Flak can inflict between 4 HP and 6 HP damage to the target.

And a couple of more complex examples: Jugger using Overclock Vs. Von Bolt on Plains, Infantry vs. Infantry, Both Infantry are at 6 HP

1. Base Damage: 55%

2. Jugger has COP, +10%: Damage: 60%

3. Overclock has 55 Luck and 25 Bad luck, Damage: 36% to 114%

4. The Infantry has 6 HP, so 21% to 68%

5. Von Bolt has +10% Defence, Plains give 6% (6 HP) for +16%, Final Damage: 17% to 57%. Jugger's infantry can inflict 1 HP to 5 HP.

AWDS Sonja using Counter Break Vs Grimm on a Headquarters

1. Base Damage: 55%

2. Sonja has SCOP, +10% damage: Damage: 60%

3. Sonja has 10 Luck and 5 Bad Luck, Damage: 56% to 69%

4. Both units are at full health, 56% to 69%

5. Grimm has -20% defence, HQ vs Counter Break gives +10% (4* - 3* ) for a total of -10%. Final Damage: 61% to 75%. Sonja's infantry can do 6-7 HP of damage.

The standard ranges for luck are as follows:

Standard CO Base: +10

Luck Skill: +10

One-Star Tag Team: +5

Two-Star Tag Team: +10

Three Star Tag Team: +15

Stats for COs who have altered luck rolls:

(AW2/AWDS)

+20

+60

+100

+40

(AW2)

+10, -10

(AWDS)

+10, -5

(AW2)

+15, -10

+40,-20

+80,-30

(AWDS)

+25,-10

+50,-20

+90,-40

+30,-15

+55,-25

+95,-45

Anyone have any obvious suggestions for something that would improve this?