namespace Turbo.Plugins.LightningMod { using System.Linq; public class WitchDoctorZombieDogsPlugin2 : AbstractSkillHandler, ISkillHandler { public WitchDoctorZombieDogsPlugin2() : base(CastType.BuffSkill, CastPhase.AutoCast, CastPhase.UseWpStart, CastPhase.Attack, CastPhase.AttackIdle) { Enabled = true; } public override void Load(IController hud) { base.Load(hud); AssignedSnoPower = Hud.Sno.SnoPowers.WitchDoctor_SummonZombieDog; CreateCastRule() .IfCastingIdentify().ThenNoCastElseContinue() .IfCastingPortal().ThenNoCastElseContinue() .IfOnCooldown().ThenNoCastElseContinue() .IfCanCastBuff().ThenContinueElseNoCast() .IfCanCastSimple().ThenContinueElseNoCast() .IfTrue(ctx => { var count = Hud.Game.Actors.Count(actor => actor.SnoActor.Sno == ActorSnoEnum._wd_zombiedogrune_fire || actor.SnoActor.Sno == ActorSnoEnum._wd_zombiedogrune_healthglobe || actor.SnoActor.Sno == ActorSnoEnum._wd_zombiedogrune_healthlink || actor.SnoActor.Sno == ActorSnoEnum._wd_zombiedogrune_lifesteal || actor.SnoActor.Sno == ActorSnoEnum._wd_zombiedogrune_poison || actor.SnoActor.Sno == ActorSnoEnum._wd_zombiedog); if (count >= 1) return false; if ((count >= 1) && ctx.Skill.Player.Powers.BuffIsActive(Hud.Sno.SnoPowers.TheTallMansFinger.Sno)) return false; return true; }).ThenCastElseContinue(); } } }