namespace Turbo.Plugins.LightningMod { public class NecCommandSkeletonsPlugin : AbstractSkillHandler, ISkillHandler { public NecCommandSkeletonsPlugin() : base(CastType.SimpleSkill, CastPhase.AutoCast, CastPhase.UseWpStart, CastPhase.Move, CastPhase.Attack, CastPhase.AttackIdle) { Enabled = true; } public override void Load(IController hud) { base.Load(hud); AssignedSnoPower = Hud.Sno.SnoPowers.Necromancer_CommandSkeletons; CreateCastRule() .IfCanCastSkill(100, 150, 1000).ThenContinueElseNoCast() .IfInTown().ThenNoCastElseContinue() .IfCastingIdentify().ThenNoCastElseContinue() .IfCastingPortal().ThenNoCastElseContinue() .IfPrimaryResourceAmountIsAbove(ctx => 50).ThenContinueElseNoCast() .IfTrue(ctx => { var monster = Hud.Game.SelectedMonster2; return monster?.Rarity == ActorRarity.Boss; }).ThenContinueElseNoCast() .IfTrue(ctx => { return Hud.Game.Me.Powers.UsedLegendaryPowers.BloodsongMail.Active ? !Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.Necromancer_CommandSkeletons.Sno) && Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.Necromancer_LandOfTheDead.Sno) : !Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.Necromancer_CommandSkeletons.Sno); }).ThenCastElseContinue() ; } } }