Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function()
- --Stats
- local versa = (100 + GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE)) / 100
- local atkPow = UnitAttackPower("Player");
- --IP expected amount per cast
- local IPCastCap = 18.6 * atkPow * versa;
- --Indomitable
- local indom = select(4,GetTalentInfo(5,3,1));
- if (indom) then
- IPCastCap = 1.25 * IPCastCap;
- end
- local IPMaxPossible = 3 * IPCastCap;
- --Never Surrender
- local NS = select(4,GetTalentInfo(5,2,1));
- if (NS) then
- local currentHP = UnitHealth("Player");
- local maxHP = UnitHealthMax("Player");
- local healthBasedIncrease = (maxHP-currentHP)/maxHP * 0.9 + 1;
- IPCastCap = IPCastCap * healthBasedIncrease;
- IPMaxPossible = IPMaxPossible * 1.9;
- end
- --Vengeance: Ignore Pain
- local vengeanceID = select(11,UnitBuff("Player", "Vengeance: Ignore Pain"))
- local vengCostMultiplier = 1;
- if (vengeanceID)then
- vengCostMultiplier = 0.65;
- end
- --Vengeance Focused Rage
- --Dragon Scales
- local dragonScalesMultiplier = 1;
- local dragonSkinMultiplier = 1.06; --Cannot get data sadly, fixed 6%, change accordingly
- local dragonScaleID = select(11, UnitBuff("Player", "Dragon Scales"));
- if (dragonScaleID) then
- dragonScalesMultiplier = 1.4
- end
- IPCastCap = IPCastCap * dragonScalesMultiplier * dragonSkinMultiplier;
- --Current Shield Amount
- _,_,_,_,_,_,_,_,_,_, IPID,_,_,_,_,_,IPCurrentAmount = UnitBuff("Player", "Ignore Pain");
- if(IPID) then
- IPCurrentAmount = IPCurrentAmount /0.9;
- else
- IPCurrentAmount = 0;
- end
- aura_env.currentIP = format("%i",IPCurrentAmount);
- --Predicted Shield Amount
- local availableRage = min(UnitPower("Player"),60 * vengCostMultiplier);
- local maxSpendableRagePerCast = 60 * vengCostMultiplier;
- local shieldPercent = availableRage / maxSpendableRagePerCast;
- local predictedShield = shieldPercent * IPCastCap;
- local stringPrediction = format("%i", predictedShield);
- if (predictedShield >= IPCastCap-1)then
- stringPrediction = "CAP";
- end
- aura_env.predictedIP = stringPrediction;
- return min((IPCurrentAmount+predictedShield), IPMaxPossible),IPMaxPossible,true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement