Post by Boaster on Feb 18, 2009 8:19:04 GMT -6
I discovered something interesting just a moment ago. With my knowledge of the game script ever growing and with my efforts to sort data so it's more easy for me to understand, I discovered something interesting about the (Ranged) Attack value of an attacker in combat.
Recently, I added to health_factor for defender and attacker, which will have a subtle influence on the attacker's (ranged) attack and the defender's armor, based on their respective health percentage. This wasn't necessary, but it would add an additional "simple" complexity to damage calculations.
Anyway, to the point. I discovered that a unit's (Ranged) Attack value is modified by a "Hit Table." The Hit Table is an array composed of 40 integers.
/hittable[-6 -5 -5 -4 -4 -3 -3 -3 -2 -2 -2 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 3 3 3 4 4 5 5 6]
If you recall how backstab works, a random 0 to 39 value is rolled to determine if backstab is successful. When a backstab is successful for a Thief, it receives a significant bonus to his/her ability to perform a Critical Strike. Non-Thieves also roll a random 0 to 39 (which is a range of 40 values, but starts at zero) to determine a(n) (Ranged) Attack value modifier.
Simply put, there is a 1 in 40 chance the unit's (Ranged) Attack value will have a -6 penalty. Also, there is a 1 in 40 chance the unit's (Ranged) Attack value will have a +6 bonus.
Additionally, the facing of the target has an effect on the 0 to 39 roll. The same as the "backstab bonus" the Thief gets, which is dependent on which direction the defender is facing, in relation to the missile launched/attacker.
When the defender is facing the attacker, no additional bonus to hit the defender is given. However, when the defender is turned away, a bonus to the hit roll is given.
So in actuality, in combat this is what your attacker's (Ranged) Attack value can look like.
If your Attacker's Attack value is 20.
At 100%+ Health: 14 to 29 Attack
+0 to 3 bonus from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At 66-99% Health: 14 to 27 Attack
+0 to 1 bonus from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At 33-65% Health: 14 to 26 Attack
No penalty or bonus from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At 0-32% Health: 13 to 25 Attack
-1 to 0 penalty from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At it's best, a unit's attack can be +9 of it's original value. At it's worst, a unit's attack can be -7 of it's original value.
I hope this helped you learn something.
Recently, I added to health_factor for defender and attacker, which will have a subtle influence on the attacker's (ranged) attack and the defender's armor, based on their respective health percentage. This wasn't necessary, but it would add an additional "simple" complexity to damage calculations.
Anyway, to the point. I discovered that a unit's (Ranged) Attack value is modified by a "Hit Table." The Hit Table is an array composed of 40 integers.
/hittable[-6 -5 -5 -4 -4 -3 -3 -3 -2 -2 -2 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 3 3 3 4 4 5 5 6]
If you recall how backstab works, a random 0 to 39 value is rolled to determine if backstab is successful. When a backstab is successful for a Thief, it receives a significant bonus to his/her ability to perform a Critical Strike. Non-Thieves also roll a random 0 to 39 (which is a range of 40 values, but starts at zero) to determine a(n) (Ranged) Attack value modifier.
Simply put, there is a 1 in 40 chance the unit's (Ranged) Attack value will have a -6 penalty. Also, there is a 1 in 40 chance the unit's (Ranged) Attack value will have a +6 bonus.
Additionally, the facing of the target has an effect on the 0 to 39 roll. The same as the "backstab bonus" the Thief gets, which is dependent on which direction the defender is facing, in relation to the missile launched/attacker.
When the defender is facing the attacker, no additional bonus to hit the defender is given. However, when the defender is turned away, a bonus to the hit roll is given.
So in actuality, in combat this is what your attacker's (Ranged) Attack value can look like.
If your Attacker's Attack value is 20.
At 100%+ Health: 14 to 29 Attack
+0 to 3 bonus from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At 66-99% Health: 14 to 27 Attack
+0 to 1 bonus from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At 33-65% Health: 14 to 26 Attack
No penalty or bonus from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At 0-32% Health: 13 to 25 Attack
-1 to 0 penalty from Health Factor.
-6 max penalty from Hit Table.
+6 max bonus from Hit Table.
At it's best, a unit's attack can be +9 of it's original value. At it's worst, a unit's attack can be -7 of it's original value.
I hope this helped you learn something.