When determining the outcome of an attack the main factors in the calculation are the Attack and Defense rating of the attacker and their target, either Melee or Ranged based on the attack type. There are other factors that influence the calculation including two tables shown below, the Morale Table and the Efficiency Table.
When an attack is performed the simulation will determine the Attack multiplier using the attacker’s morale value and the morale table below. Then it will apply that multiplier to the Attacker’s Attack before comparing it to the target’s Defense, resulting in a value that will be used in the Efficiency table to determine the chances of each outcome. I’ll give an example, let’s say the attacker has the following values: Attack=100, Morale=4000, Damage=50 and the target has the following values: Defense=50, Armor=80. Using the Morale table we will determine the Attack multiplier to be 1.7, and therefore the efficiency comparison will be: 100*1.7 = 170; 170/50 = 3.4. We can then look up this value in the Efficiency Table to determine the following chances: Miss: 0, Graze: 8, Hit: 33, Crit: 93. A random number is chosen between 0 and 100, and the outcome of the attack is based on the result. So if the random value is greater than or equal to 0 and less than 8 than the attack misses, if it is >=8 and <33 then the attack grazes, if it is >=33 and <93 then the attack hits, and if it is >=93 and <=100 then the attack is a critical hit. The target’s HP loss will then be calculated based on the result as follows:
Miss: HP Loss=0
Graze: HP Loss= Damage – Armor
Hit: HP Loss= Damage – Armor/4
Crit: HP Loss= Damage – Armor/8, with a minimum damage amount about equal to Damage/10
So, for the scenario above we have the highest chance of landing a Hit. If the attack is a hit then the target’s HP loss in this scenario would be: 50-80/4 = 50-20 = 30 HP loss! The next most likely outcome is a Graze which would result in: 50-80 = -30, or ZERO HP loss since we won’t let HP loss be a negative number.
Just to show an example of how variables like morale can affect the tide of battle, let’s use the same variables above but say some disastrous event just severely damaged the morale of the attacker, reducing it to -1000. Our variables would have the following values: Attacker.. Attack=100, Morale=-1000, Damage=50; Defender.. Defense=50, Armor=80. Using the Morale table our Attack multiplier will be 0.6, and our efficiency would then be: 0.6*100/50 = 60/50 = 1.2. Using the Efficiency table we find the chances for each outcome to be: 0, 25, 50, 97 (1.2 is greater than 1 but less than 1.5 so we use the chances found with the Efficiency >1). Therefore we have a 25% chance to miss, 25% chance to graze, 47% chance to hit, and a 3% chance at a critical hit.
When an attack is performed the simulation will determine the Attack multiplier using the attacker’s morale value and the morale table below. Then it will apply that multiplier to the Attacker’s Attack before comparing it to the target’s Defense, resulting in a value that will be used in the Efficiency table to determine the chances of each outcome. I’ll give an example, let’s say the attacker has the following values: Attack=100, Morale=4000, Damage=50 and the target has the following values: Defense=50, Armor=80. Using the Morale table we will determine the Attack multiplier to be 1.7, and therefore the efficiency comparison will be: 100*1.7 = 170; 170/50 = 3.4. We can then look up this value in the Efficiency Table to determine the following chances: Miss: 0, Graze: 8, Hit: 33, Crit: 93. A random number is chosen between 0 and 100, and the outcome of the attack is based on the result. So if the random value is greater than or equal to 0 and less than 8 than the attack misses, if it is >=8 and <33 then the attack grazes, if it is >=33 and <93 then the attack hits, and if it is >=93 and <=100 then the attack is a critical hit. The target’s HP loss will then be calculated based on the result as follows:
Miss: HP Loss=0
Graze: HP Loss= Damage – Armor
Hit: HP Loss= Damage – Armor/4
Crit: HP Loss= Damage – Armor/8, with a minimum damage amount about equal to Damage/10
So, for the scenario above we have the highest chance of landing a Hit. If the attack is a hit then the target’s HP loss in this scenario would be: 50-80/4 = 50-20 = 30 HP loss! The next most likely outcome is a Graze which would result in: 50-80 = -30, or ZERO HP loss since we won’t let HP loss be a negative number.
Just to show an example of how variables like morale can affect the tide of battle, let’s use the same variables above but say some disastrous event just severely damaged the morale of the attacker, reducing it to -1000. Our variables would have the following values: Attacker.. Attack=100, Morale=-1000, Damage=50; Defender.. Defense=50, Armor=80. Using the Morale table our Attack multiplier will be 0.6, and our efficiency would then be: 0.6*100/50 = 60/50 = 1.2. Using the Efficiency table we find the chances for each outcome to be: 0, 25, 50, 97 (1.2 is greater than 1 but less than 1.5 so we use the chances found with the Efficiency >1). Therefore we have a 25% chance to miss, 25% chance to graze, 47% chance to hit, and a 3% chance at a critical hit.