public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(ArcaneCurseManaPay, ArcaneCurseCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } MP -= ArcaneCurseManaPay; ArcaneCurseCD = ArcaneCurseDefaultCD; target.GetDamageByDebuffs(target.CompileMagicDamage(ArcaneCurseDamage), ArcaneCurseDuration); var HeroContainer = Sender.CreateMessageContainer(); var EnemyContainter = target.Sender.CreateMessageContainer(); if (GetRandomNumber(1, 100) <= ArcaneCurseSilenceChance) { Silence(ArcaneCurseSilenceDuration, target); HeroContainer.Add(lang => lang.EnemyIsSilenced); EnemyContainter.Add(lang => lang.YouAreSilenced); } HeroContainer.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); EnemyContainter.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); await HeroContainer.SendAsync(); await EnemyContainter.SendAsync(); return(true); }
public override async Task <bool> UseAbilityThree(IHero target) { if (!await CheckSilence()) { return(false); } if (BladeFuryActivated) { await Sender.SendAsync(lang => lang.GetMessageYouCantUseAbilityWhileAnotherWorks (AbiNameOne)); return(false); } if (!await CheckManaAndCD(OmnislashManaPay, OmnislashCD)) { return(false); } OmnislashCD = OmnislashDefaultCD; MP -= OmnislashManaPay; target.GetDamageByDebuffs(OmnislashDamage - target.Armor, OmnislashDuration); await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameThree)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameThree)); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (BladeFuryActivated) { await Sender.SendAsync(lang => lang.AbilityIsAlreadyActivated); return(false); } if (!await CheckManaAndCD(BladeFuryManaPay, BladeFuryCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } BladeFuryActivated = true; BladeFuryCD = BladeFuryDefaultCD; MP -= BladeFuryManaPay; target.GetDamageByDebuffs(target.CompileMagicDamage(BladeFuryDamage), BladeFuryDuration); AddImmuneToMagic(BladeFuryDuration); await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne) + "\n" + lang.YouHaveImmuneToMagic); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne) + "\n" + lang.EnemyHasImmuneToMagic); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } if (!await CheckManaAndCD(ShrapnelManaPay, ShrapnelCD)) { return(false); } hero_target = target; MP -= ShrapnelManaPay; ShrapnelCD = ShrapnelDefaultCD; target.GetDamageByDebuffs(target.CompileMagicDamage(ShrapnelDamagePerStep), ShrapnelDuration); WeakAttack(ShrapnelDuration, ShrapnelAttackWeakening, target); var hCon = Sender.CreateMessageContainer(); var eCon = target.Sender.CreateMessageContainer(); hCon.Add(lang => lang.YouHaveWeakenedTheEnemy); eCon.Add(lang => lang.TheEnemyHasWeakenedYou); hCon.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); eCon.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); await hCon.SendAsync(); await eCon.SendAsync(); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } if (!await CheckManaAndCD(WB_ManaPay, WB_CD)) { return(false); } WB_CD = WB_DefaultCD; MP -= WB_ManaPay; target.GetDamage(target.CompileMagicDamage(WB_Damage)); target.GetDamageByDebuffs(target.CompileMagicDamage(WB_DamagePerStep), WB_Duration); target.StunCounter += WB_Duration; await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); return(true); }
override public async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(AcidSprayManaPay, AcidSprayCD)) { return(false); } if (!target.HasImmuneToMagic) { target.LoosenArmor(AcidSprayArmorPenetrate, AcidSprayDuration); } target.GetDamageByDebuffs(AcidSprayDamage - target.Armor, AcidSprayDuration); MP -= AcidSprayManaPay; AcidSprayCD = AcidSprayDefaultCD; await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); return(true); }