public override async Task <bool> Invoke(double manaPercentFloor = 10) { if (Self.Self.Mana.Percent > manaPercentFloor.EvaluateAsPercentage()) { return(false); } var didMageInvoke = false; if (_mageInvokeOrb != null) { didMageInvoke = await SpellCommands.CastAetheredSpell(Self, _mageInvokeOrb, _mageInvokeStatus); } if (didMageInvoke) { InvokeStatus.ResetStatusCooldown(); return(true); } var didInvoke = await SpellCommands.CastAetheredSpell(Self, InvokeSpell, InvokeStatus, true); if (didInvoke) { _mageInvokeStatus?.ResetStatusCooldown(); } return(didInvoke); }
public static async Task <bool> CastStatus(TkClient caster, TkClient target, BuffStatus status, KeySpell statusEffectSpell) { if (status.IsActive || !await CastStatus(caster, target.Self.Uid, target.Self.Name, statusEffectSpell)) { return(false); } status.ResetStatusCooldown(); return(true); }
public static async Task <bool> CastAetheredSpell( TkClient caster, KeySpell spell, BuffStatus status, bool isLowCostSpell = false) { if (status.IsActive) { return(false); } var didCastSpell = await CastSpell(caster, spell, isLowCostSpell); if (didCastSpell) { status.ResetStatusCooldown(); } return(didCastSpell); }
public static async Task <bool> CastAetheredTargetableSpell( TkClient caster, KeySpell spell, BuffStatus status, uint targetUid, string targetName, bool isLowCostSpell = false) { if (status.IsActive) { return(false); } var didCastSpell = await CastTargetableSpell(caster, spell, targetUid, targetName, isLowCostSpell); if (didCastSpell) { status.ResetStatusCooldown(); } return(didCastSpell); }