# War Metal Number Stuff

On this page is trivia and explanations related to the math behind some parts of War Metal. I'll add more when I think of it.

### Attack/Defence Power Boosts

Boosts to Atk/Def Power Boosts (as can be seen in units like Goliath, Cassandra, and Old Hammer) combine by multiplying on the previous Atk/Def Power. For example, if you start with 1,000,000 attack power and get boosted 25% by Cassandra, you would have 1,000,000*1.25=1,250,000 attack power. If you were further boosted 25% by Goliath, you would have 1,250,000*1.25=1,562,500 attack power. Adding boosts can be continued indefinitely, although you atk/def power can never increase by over 100% (e.g. if you start with 1,000,000 attack power, you can never have over 2,000,000 attack power); this cap is 200% of your power before the battle, reinforcements have no effect on it.

Attack boosts are applied as soon as the ability procs. For example, reinforcing a Frontline Warrior and then having a Goliath proc ((power + 700)*1.25 + 50) will result in a different final power to having a Goliath proc and then reinforcing a Frontline Warrior (power*1.25 + 700 + 50).

It is important to note that attack/def power boosts have no effect against epic bosses as the combination of your base stats (atk+def) is used to determine your base damage, not your atk/def power.

### Attack/Defence Power Reduction

Atk/Def Power reductions are applied only to the boosted power. For example, if you started with 1,000,000 attack power and got a 25% boost from Cassandra bringing you to 1,250,000, a 25% reduction from Zander will result in an attack power of 1,000,000+(1,250,000-1,000,000)*(1-0.25) = 1,187,500. A further 25% reduction would use the 1,187,500 when determining the reduced attack power. From this it can be seen that a 25% reduction is not equivalent to a 25% boost, and that while boosts gain effectiveness the more you use, reductions decrease in effectiveness in larger numbers.

### Unit Damage Boosts

When a unit procs to do damage, a random value within it's damage range will be chosen. This number is then multiplied by your accumulated damage boosts for each of it's classes (general [e.g. Commander], type 1 [e.g. Robotic], type 2, and possibly in future there will be boosts that effect only a specific unit). For example, if your Righteous Structure procs for 7 damage and you have a 30% boost from Artemis, and a 25% boost from Opak, the final damage will be 7*(1+0.3+0.25)=11 [rounded]. Boosts to the same class are added together, for example a 50% boost and a 25% boost will result in a 75% boost. This is most evident when observing the Sentinel Cannons in Sentinel Undying; their base damage is 10-30 and if you let all 12 whips boost them by 50% each, their range will be 70-210 (700% of the base damage range).

Rallies (e.g. Equalizer) and Reductions (e.g. Photon Shield Generator) are added after the damage multipliers are applied. It can be seen that rallies can cause damageless procs (e.g. Juggernaut's Rend) to appear in the combat log, however, these have no effect on the total damage. A 0 damage proc rallied is still counted as 0 damage (test with Equalizer and APC to see for yourself).

### Base Damage

Base damage is the damage you see in the combat log before the total damages. The maximum value it can achieve is determined by the defender's level (although is a always 30 for low level players). Epic bosses also have a hidden level value that determines the maximum base damage, although they use the combination of your atk+def attributes rather than your atk/def power when calculating base damage. When determining the base damage, the max damage is divided by a certain number (with a little random variance) to arrive at a equilibrium value, then the ratio of the attacker power over the defender power is fed into a logarithm to determine how much each player's base damage moves away from this equilibrium value. I won't bother to provide specifics, but you should just remember that because the formula is based on a logarithm, the higher your base damage is the harder it is to increase it. For example, the best case for high level epics like Jotun is ~100 attributes for 1 extra dps; but if you have close to the Jotun's own stats you will need over 200 attributes for a 1 dps gain. This is demonstrated in the following image showing how much base damage you will average depending on how many PvP stats you have in a Jotun:

### Rounding

The rounding that occurs when arriving at your final damage after boosts are applied is just a regular 'round to nearest number' approach, in the case of x.5, the number is rounded to the nearest odd. It is demonstrated that the rounding is only applied after all boosts and reductions are done in cases where a unit with very low damage is boosted and then reduced to 0. e.g. Ion Stryker procs for 1, is boosted by 50% by Nimbus to 1.5, and then reduced by 1 for each Colossus and PSG; rather than showing 'reduced by 2' as expected, it will show 'reduced by 1.5'.

### XP

The experience required to reach a specific level is determined by the formula 50*((level-10)*(level-9)/2)+500. This formula is different for low levels (< level 50).

### Healing

The cash required to reach a heal 1 Health is equal to: 10*yourLevel. So to fully heal from 1 Health, you would need: 10*yourLevel*(yourHealth-1).