Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. function()
  2. --Stats
  3. local versa = (100 + GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE)) / 100
  4. local atkPow = UnitAttackPower("Player");
  5.  
  6. --IP expected amount per cast
  7. local IPCastCap = 18.6 * atkPow * versa;
  8.  
  9. --Indomitable
  10. local indom = select(4,GetTalentInfo(5,3,1));
  11. if (indom) then
  12. IPCastCap = 1.25 * IPCastCap;
  13. end
  14. local IPMaxPossible = 3 * IPCastCap;
  15.  
  16. --Never Surrender
  17. local NS = select(4,GetTalentInfo(5,2,1));
  18. if (NS) then
  19. local currentHP = UnitHealth("Player");
  20. local maxHP = UnitHealthMax("Player");
  21. local healthBasedIncrease = (maxHP-currentHP)/maxHP * 0.9 + 1;
  22. IPCastCap = IPCastCap * healthBasedIncrease;
  23. IPMaxPossible = IPMaxPossible * 1.9;
  24. end
  25.  
  26. --Vengeance: Ignore Pain
  27. local vengeanceID = select(11,UnitBuff("Player", "Vengeance: Ignore Pain"))
  28. local vengCostMultiplier = 1;
  29. if (vengeanceID)then
  30. vengCostMultiplier = 0.65;
  31. end
  32.  
  33. --Vengeance Focused Rage
  34.  
  35. --Dragon Scales
  36. local dragonScalesMultiplier = 1;
  37. local dragonSkinMultiplier = 1.06; --Cannot get data sadly, fixed 6%, change accordingly
  38. local dragonScaleID = select(11, UnitBuff("Player", "Dragon Scales"));
  39. if (dragonScaleID) then
  40. dragonScalesMultiplier = 1.4
  41. end
  42.  
  43. IPCastCap = IPCastCap * dragonScalesMultiplier * dragonSkinMultiplier;
  44.  
  45. --Current Shield Amount
  46. _,_,_,_,_,_,_,_,_,_, IPID,_,_,_,_,_,IPCurrentAmount = UnitBuff("Player", "Ignore Pain");
  47. if(IPID) then
  48. IPCurrentAmount = IPCurrentAmount /0.9;
  49. else
  50. IPCurrentAmount = 0;
  51. end
  52.  
  53. aura_env.currentIP = format("%i",IPCurrentAmount);
  54.  
  55. --Predicted Shield Amount
  56. local availableRage = min(UnitPower("Player"),60 * vengCostMultiplier);
  57. local maxSpendableRagePerCast = 60 * vengCostMultiplier;
  58. local shieldPercent = availableRage / maxSpendableRagePerCast;
  59. local predictedShield = shieldPercent * IPCastCap;
  60. local stringPrediction = format("%i", predictedShield);
  61. if (predictedShield >= IPCastCap-1)then
  62. stringPrediction = "CAP";
  63. end
  64.  
  65. aura_env.predictedIP = stringPrediction;
  66.  
  67. return min((IPCurrentAmount+predictedShield), IPMaxPossible),IPMaxPossible,true
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement