namespace Turbo.Plugins.LightningMod { public class NecBoneArmorPlugin : AbstractSkillHandler, ISkillHandler { public int SpareResource { get; set; } public NecBoneArmorPlugin() : base(CastType.BuffSkill, CastPhase.AutoCast, CastPhase.Attack, CastPhase.AttackIdle) { Enabled = true; } public override void Load(IController hud) { base.Load(hud); AssignedSnoPower = Hud.Sno.SnoPowers.Necromancer_BoneArmor; CreateCastRule() .IfInTown().ThenNoCastElseContinue() .IfCastingIdentify().ThenNoCastElseContinue() .IfCastingPortal().ThenNoCastElseContinue() .IfOnCooldown().ThenNoCastElseContinue() .IfCanCastBuff().ThenContinueElseNoCast() .IfCanCastSimple().ThenContinueElseNoCast() .IfTrue(ctx => ctx.Skill.Rune == 1 || ctx.Skill.Rune == 3).ThenNoCastElseContinue() .IfEnoughMonstersNearby(ctx => 30, ctx => ctx.Hud.Game.Me.Powers.BuffIsActive(476686, 0) ? 2 : 1).ThenCastElseContinue() // ; } } }