Battle rules
Last updated
Last updated
In SpartaDEX, there are clashes between the player's army and the barbarians. At the moment, this scenario is only possible when a player attacks a Barbarian camp, but in the future it is planned to introduce barbarian raids on playerโs Polis.
The outcome of the fight is calculated algorithmically based on several variables:
ฮฑ - numerical superiority factor, i.e. the ratio of the number of attacker's units to the number of defender's units;
AOA - Armyโs Offensive Ability (calculated on the basis of unit statistics and a random morale coefficient ranging from -30% to +30%);
ADF - Army Diversification Factor - depends on the variety of types of units in the army (the greater the variety, the greater the army's power). For barbarians, this coefficient is always 1.25;
Based on these coefficients, the following is calculated:
TPA - the Total Power of Army (for attacker and defender)
TPA = AOA * ฮฑ * ADF
The formula for the outcome of the battle is:
W = AOAattacker * ฮฑ * ADFattacker - AOAdefender * ADFdefender
Unit survivability:
The one who lost the battle loses all his units. The winner only loses part of them. The number of surviving units is calculated from the formula:
L[%] = |W| / TPAwinner
L% of the winner's strongest units survive.