Advertisement
elasticpwnz

Untitled

Dec 26th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1.     public double absorbToSummon(double damage)
  2.     {
  3.         double transferToSummonDam = calcStat(Stats.TRANSFER_TO_SUMMON_DAMAGE_PERCENT, 0.);
  4.         if(transferToSummonDam > 0.)
  5.         {
  6.             Summon summon = getPet();
  7.             double transferDamage = damage * transferToSummonDam * 0.01;
  8.  
  9.             if(summon == null || summon.isDead() || !summon.isSummon())
  10.                 return damage;
  11.  
  12.             if(summon.isInRangeZ(this, 900) && summon.getCurrentHp() > transferDamage)
  13.             {
  14.                 damage -= transferDamage;
  15.                 summon.reduceCurrentHp(transferDamage, summon, null, true, false, false, false, true, false, true);
  16.             }
  17.         }
  18.         return damage;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement