Guest User

Untitled

a guest
Apr 2nd, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. Uncapped multiplier:
  2.  
  3. <Damage Formula>
  4. // This is the damage formula used for the skill.
  5. value = a.atk * 2;
  6. // Get the HP difference between the target and attacker.
  7. var difference = b.hp - a.hp;
  8. // Check if the HP difference is greater than 0.
  9. if (difference > 0) {
  10. // Get the value per 50 HP difference and round down.
  11. difference = Math.floor(difference / 50);
  12. // Add 10% bonus rate per difference.
  13. var rate = 1.00 + 0.10 * difference;
  14. // Apply the bonus rate to the calculated base damage.
  15. value *= rate;
  16. }
  17. </Damage Formula>
  18.  
  19. Capped multiplier of 150%.
  20.  
  21. <Damage Formula>
  22. // This is the damage formula used for the skill.
  23. value = a.atk * 2;
  24. // Get the HP difference between the target and attacker.
  25. var difference = b.hp - a.hp;
  26. // Check if the HP difference is greater than 0.
  27. if (difference > 0) {
  28. // Get the value per 50 HP difference and round down.
  29. difference = Math.floor(difference / 50);
  30. // Add 10% bonus rate per difference.
  31. var rate = 1.00 + 0.10 * difference;
  32. // Set a maximum bonus rate of 150%.
  33. rate = Math.min(1.50, rate);
  34. // Apply the bonus rate to the calculated base damage.
  35. value *= rate;
  36. }
  37. </Damage Formula>
  38.  
  39. Happy Giant Slaying!
Advertisement
Add Comment
Please, Sign In to add comment