namespace Turbo.Plugins.LightningMod { public class CrusaderProvokePlugin : AbstractSkillHandler, ISkillHandler { public CrusaderProvokePlugin() : base(CastType.SimpleSkill, CastPhase.AutoCast, CastPhase.Collect, CastPhase.Move, CastPhase.Attack) { Enabled = false; } public override void Load(IController hud) { base.Load(hud); AssignedSnoPower = Hud.Sno.SnoPowers.Crusader_Provoke; CreateCastRule() .IfInTown().ThenNoCastElseContinue() .IfCastingIdentify().ThenNoCastElseContinue() .IfCastingPortal().ThenNoCastElseContinue() .IfOnCooldown().ThenNoCastElseContinue() //.IfCanCastBuff().ThenContinueElseNoCast() .IfCanCastSimple().ThenContinueElseNoCast() .IfSpecificBuffIsActive(Hud.Sno.SnoPowers.Crusader_SteedCharge).ThenNoCastElseContinue()//ÆïÂíʱ .IfEnoughMonstersNearby(ctx => 100, ctx => 1).ThenContinueElseNoCast() .IfTrue(ctx => ctx.Skill.Player.Stats.CooldownReduction >= 0.5).ThenCastElseContinue() .IfTrue(ctx => { var v = (1 - (30 + 5 * ctx.Skill.Player.Density.GetDensity(10)) / ctx.Skill.Player.Stats.ResourceMaxWrath) * 100; return (ctx.Skill.Player.Stats.ResourcePctWrath <= (v > 0 ? v : 10)); }).ThenCastElseContinue() .IfHealthWarning(70,80).ThenCastElseContinue() ; } } }