namespace Turbo.Plugins.LightningMod { using System.Linq; using Turbo.Plugins.glq; public class CrusaderIronSkinPlugin : AbstractSkillHandler, ISkillHandler { public CrusaderIronSkinPlugin() : base(CastType.BuffSkill, CastPhase.AutoCast, CastPhase.Collect, CastPhase.Move, CastPhase.Attack) { Enabled = false; } public override void Load(IController hud) { base.Load(hud); AssignedSnoPower = Hud.Sno.SnoPowers.Crusader_IronSkin; CreateCastRule()//其他符文 .IfInTown().ThenNoCastElseContinue() .IfCastingIdentify().ThenNoCastElseContinue() .IfCastingPortal().ThenNoCastElseContinue() .IfOnCooldown().ThenNoCastElseContinue() .IfCanCastBuff().ThenContinueElseNoCast() .IfCanCastSimple().ThenContinueElseNoCast() .IfTrue(ctx => ctx.Skill.Rune == 3).ThenNoCastElseContinue() .IfSpecificBuffIsActive(Hud.Sno.SnoPowers.Crusader_SteedCharge).ThenNoCastElseContinue()//骑马时 .IfEnoughMonstersNearby(ctx => 100, ctx => 1).ThenContinueElseNoCast() .IfSpecificBuffIsActive(Hud.Sno.SnoPowers.Crusader_IronSkin, 0).ThenNoCastElseContinue() .IfTrue(ctx => ctx.Hud.Avoidance.CurrentValue).ThenCastElseContinue() .IfTrue(ctx => ctx.Skill.Player.AvoidablesInRange.Any(x => x.AvoidableDefinition.InstantDeath)).ThenCastElseContinue() .IfHealthWarning(60, 80).ThenCastElseContinue() .IfTrue(ctx => (ctx.Skill.Player.Stats.CooldownReduction >= 0.5 || ctx.Hud.Game.Me.Powers.BuffIsActive(402459))).ThenContinueElseNoCast()//CDR大于50或带了黄道 .IfSpecificBuffIsAboutToExpire(Hud.Sno.SnoPowers.Crusader_IronSkin, 0, 50, 200).ThenCastElseContinue() ; CreateCastRule()//反伤之肤 .IfInTown().ThenNoCastElseContinue() .IfCastingIdentify().ThenNoCastElseContinue() .IfCastingPortal().ThenNoCastElseContinue() .IfOnCooldown().ThenNoCastElseContinue() .IfCanCastBuff().ThenContinueElseNoCast() .IfCanCastSimple().ThenContinueElseNoCast() .IfTrue(ctx => ctx.Skill.Rune == 3).ThenContinueElseNoCast() .IfEnoughMonstersNearby(ctx => 30, ctx => 1).ThenContinueElseNoCast() .IfTrue(ctx => { return ctx.Skill.Player.Powers.BuffIsActive(ctx.Hud.Sno.SnoPowers.ConventionOfElements.Sno) &&//元素戒指 ctx.Skill.Player.GetSetItemCount(220113) >= 2 &&//幻魔 ctx.Skill.Player.GetSetItemCount(580748) >= 6 &&//阿克汗 PublicClassPlugin.IsElementReady(hud, 3, ctx.Skill.Player, 6)//物理爆发前3秒 ; } ).ThenCastElseContinue() ; } } }