Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 3rd, 2020 225 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getdmg(weapon, leek, leek2)
  2. {
  3.     var tp;
  4.     if(leek == me)
  5.         tp = my_tp;
  6.     else if (leek == enemy)
  7.         tp = enemy_tp;
  8.     var cost = getWeaponCost(weapon);
  9.     var hasweapon = getWeapon(leek) == weapon;
  10.     var dmg = 0;
  11.     var effects = getWeaponEffects(weapon);
  12.     var dmg_min = effects[0][1] * (1 + getStrength(leek)/ 100);
  13.     var prevented = 0;
  14.     var armor = getAbsoluteShield(leek2);
  15.    
  16.     while(tp >= cost)
  17.     {
  18.         dmg = dmg + dmg_min;
  19.         prevented = prevented + armor;
  20.         tp = tp - cost;
  21.     }
  22.    
  23.     dmg = dmg - prevented;
  24.     if (dmg < 0)
  25.         dmg = 0;
  26.     return (dmg);
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top