Author | Problem with formula |
>>If "Attack" (A) of the attacking stack is bigger than "Defence" (D) of the defending stack, then
Damage = N * RND(min, max) * [1 + 0,05 (A-D) ] * [1 - 3*Y/100]
>>If (A) is smaller than (D), then
Damage = N * RND(min, max) * [1 - 3*Y/100] / [1 + 0,05*(D-A)]
What is 0,05 in this formula |
It's just 0.05, a co-efficient multiplier of the |(A-D)| multiplicand |
It means that the difference between A and D counts only 5% in the damage the attacking stack does. |
please give me an example |
please help me with this formula |
example:
xbow(10 att) do 100 damage to imps(3 def)
if xbow have 20 att, they will do 100+50%=150damage to imps with 3 def
if xbow have 10 att and imps have 8def, they do 100-25%=75damage |
I wonder if this formula creator knows that multiplication is counted first, then division and lastly the plus and minus. Unless there are parenthesis (numbers in parenthesis must be calculated first).
I haven't studied the formula, but I have a feeling that there are parenthesises missing. |
for Jouchi:
I'm fairly sure formula creators know basic math. |
[Post deleted by moderator MasterTI // Spelling -_-] |
[Post deleted by moderator MasterTI // and again] |
for Jouchi:
Its actually division then multiplication.
Brackets, Order, Division, Multiplication, Addition, Subtraction |
Division and Multiplication have the same priority. Whatever goes first is applied first. Likewise Addition and Subtraction.
But Division and Multiplication do precede Addition and Substraction unless brackets are used to force order.
Thus, 2 * 3 / 4 = 6/4 = 1.5
but, 2 / 3 * 4 = (2/3)*4 = 8/3
However, in the first example, it actually doesn't matter which one you do first. That's why in 3*Y/100, you don't need any bracket; (3*Y)/100 = 3*(Y/100).
The formulas above for Damage are written correctly. |