Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Turbo.Plugins.LightningMod
- {
- public class WizardExplosiveBlastPlugin : AbstractSkillHandler, ISkillHandler
- {
- public WizardExplosiveBlastPlugin()
- : base(CastType.SimpleSkill, CastPhase.AutoCast, CastPhase.UseWpStart, CastPhase.Move, CastPhase.Attack, CastPhase.AttackIdle)
- {
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- AssignedSnoPower = Hud.Sno.SnoPowers.Wizard_ExplosiveBlast;
- CreateCastRule()
- .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
- .IfInTown().ThenNoCastElseContinue()
- .IfCastingIdentify().ThenNoCastElseContinue()
- .IfCastingTownPortal().ThenNoCastElseContinue()
- .IfOnCooldown().ThenNoCastElseContinue()
- .IfPrimaryResourceIsEnough(50, ctx => 20).ThenContinueElseNoCast()
- .IfTrue(ctx => ctx.Skill.Player.Powers.UsedWizardPowers.Archon == null && ctx.Skill.RemainingBuffTime() < 120).ThenContinueElseNoCast()
- .IfEnoughMonstersNearby(ctx => ctx.Skill.Rune == 1 ? 18 : 12, ctx => 2).ThenCastElseContinue()
- .IfEliteOrBossIsNearby(ctx => ctx.Skill.Rune == 1 ? 18 : 12).ThenCastElseContinue();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement