Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.44 KB | None | 0 0
  1. namespace Turbo.Plugins.LightningMod
  2. {
  3.     public class WizardExplosiveBlastPlugin : AbstractSkillHandler, ISkillHandler
  4.     {
  5.         public WizardExplosiveBlastPlugin()
  6.             : base(CastType.SimpleSkill, CastPhase.AutoCast, CastPhase.UseWpStart, CastPhase.Move, CastPhase.Attack, CastPhase.AttackIdle)
  7.         {
  8.         }
  9.  
  10.         public override void Load(IController hud)
  11.         {
  12.             base.Load(hud);
  13.             AssignedSnoPower = Hud.Sno.SnoPowers.Wizard_ExplosiveBlast;
  14.  
  15.             CreateCastRule()
  16.                 .IfCanCastSkill(350, 500, 500) // mandatory, to prevent accidentally pressing the skill icon too many times in a row in case the game state (cooldown, monsters, etc) is not updated after the previous cast yet
  17.                 .IfInTown().ThenNoCastElseContinue()
  18.                 .IfCastingIdentify().ThenNoCastElseContinue()
  19.                 .IfCastingTownPortal().ThenNoCastElseContinue()
  20.                 .IfOnCooldown().ThenNoCastElseContinue()
  21.                 .IfPrimaryResourceIsEnough(50, ctx => 20).ThenContinueElseNoCast()
  22.                 .IfTrue(ctx => ctx.Skill.Player.Powers.UsedWizardPowers.Archon == null && ctx.Skill.RemainingBuffTime() < 120).ThenContinueElseNoCast()
  23.                 .IfEnoughMonstersNearby(ctx => ctx.Skill.Rune == 1 ? 18 : 12, ctx => 2).ThenCastElseContinue()
  24.                 .IfEliteOrBossIsNearby(ctx => ctx.Skill.Rune == 1 ? 18 : 12).ThenCastElseContinue();
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement