Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(trigger)
- local MS_cooldownEndSoon = trigger[1]; -- less than 1.5s cooldown left on MS
- local CS_onCooldown = trigger[2]; -- less than 3s cooldown left on CS
- local targetHealthAbove20 = trigger[3]; -- target health is above 20%
- local execPrecisionStacks = select(4, UnitDebuff("target", "Точность палача"));
- if(execPrecisionStacks == nil) then execPrecisionStacks = 0 end;
- local shatteredDefenses = select(4, UnitBuff("player", "Брешь в защите")) ~= nil;
- local ayalasExecuteBuff = select(4, UnitBuff("player", "Каменное сердце")) ~= nil;
- -- if ms is on cd, don't check anything
- if(not MS_cooldownEndSoon) then return false; end;
- -- not an execute phase
- if(targetHealthAbove20) then
- -- ring proc and CS is available - we don't MS
- if (ayalasExecuteBuff and (not CS_onCooldown or shatteredDefenses)) then return false; end;
- -- CS is available soon - we don't MS
- if (not CS_onCooldown) then return false; end;
- -- target has exec precision stacks and no SD - we don't MS
- if (execPrecisionStacks > 0 and not shatteredDefenses) then return false; end;
- else
- -- exec phase, no precision stacks
- if (execPrecisionStacks < 2) then return false; end;
- -- exec phase, 2 precision stacks but no SD yet
- if (execPrecisionStacks==2 and not shatteredDefenses) then return false; end;
- end
- return true;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement