Advertisement
maurobaraldi

Uniwar Damage Formula

Sep 30th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. Many players have asked for this so here it is!
  2.  
  3. First, the variables:
  4.  
  5. A = Attack strength of the attacking unit
  6. Ta = Terrain modifier for the attacking unit
  7. D = Defense strength of the defending unit
  8. Td = Terrain modifer for the defending unit
  9. B = Gang up bonus
  10. H = The attacking unit's health points.
  11.  
  12. Next, the formula:
  13. p = 0.05 * (((A + Ta) - (D + Td)) + B) + 0.5
  14. if p < 0 then p = 0
  15. if p > 1 then p = 1
  16.  
  17. This is how to figure out the damage:
  18. 1. Pick one unit to be the attacker and the other to be the defender.
  19. 2. Use the formula above to obtain p.
  20. 3. Take H and multiply by 6. This is the number of random numbers (r) generated between 0 and 1. For every r < p a hit is counted.
  21. 4. The total number of hits divided by 6 is the number of damage the defending unit will receive.
  22. 5. Switch roles between the units (attacker becomes the defender and vice versa).
  23. 6. Use the same formula above.
  24. 7. Once both units have attacked the damage points are calculated into their health points.
  25.  
  26. I will use a quick example:
  27. Underling vs Marauder both on Plains
  28. If you use the formula you see that the Underling has a 30% probability of dealing damage for each of its health points whereas the Marauder has a 75% probability of dealing damage for each of its health points.
  29.  
  30. If the Underling were on a Mountain though, the numbers change to 40% for the Underling and 55% for the Marauder.
  31.  
  32. That's it!
  33.  
  34. The UniWar Team
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement