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); }
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> 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> UseAbilityThree(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } if (!await CheckManaAndCD(KL_ManaPay, KL_CD)) { return(false); } MP -= KL_ManaPay; KL_CD = KL_DefaultCD; float damage = target.CompileMagicDamage(GetRandomNumber(100, 1001)); target.GetDamage(damage); HP += damage; var H_Container = Sender.CreateMessageContainer(); var E_Container = target.Sender.CreateMessageContainer(); H_Container.Add(lang => lang.GetMessageYouHaveUsedAbility(AbinameThree)); E_Container.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbinameThree)); H_Container.Add(lang => $"{lang.DamageString}: {damage}."); E_Container.Add(lang => $"{lang.DamageString}: {damage}."); await H_Container.SendAsync(); await E_Container.SendAsync(); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(BreatheFireManaPay, BreatheFireCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } MP -= BreatheFireManaPay; BreatheFireCD = BreatheFireDefaultCD; target.GetDamage(target.CompileMagicDamage(BreatheFireDamage)); WeakAttack(BreatheFireLoseDamageDuration, (target.DPS / 100.0f * BreatheFireLoseDamagePercent), target); var hCon = Sender.CreateMessageContainer(); var eCon = target.Sender.CreateMessageContainer(); hCon.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); eCon.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); hCon.Add(lang => lang.YouHaveWeakenedTheEnemy); eCon.Add(lang => lang.TheEnemyHasWeakenedYou); await hCon.SendAsync(); await eCon.SendAsync(); return(true); }
private async Task <bool> ThrowUnstableConcoction(IHero enemyHero, IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckImmuneToMagic(target) && target != this) { return(false); } var attakerMessages = Sender.CreateMessageContainer(); attakerMessages.Add(lang => lang.ALCHEMIST_YouHaveThrownUC); var enemyMessages = enemyHero.Sender.CreateMessageContainer(); enemyMessages.Add(lang => lang.ALCHEMIST_TheEnemyHasThrownUC); UnstableConcoctionActivated = false; UnstableConcoctionCD = UnstableConcoctionDefaultCD; if (base.GetRandomNumber(1, 100) > 15) { target.GetDamage(target.CompileMagicDamage(UnstableConcoctionDamage)); target.StunCounter += UnstableConcoctionCounter; attakerMessages.Add(lang => lang.ALCHEMIST_UC_HasExploded); enemyMessages.Add(lang => lang.ALCHEMIST_UC_HasExploded); if (target == this) { attakerMessages.Add(lang => lang.YouStunnedYourself); enemyMessages.Add(lang => lang.TheEnemyHasStunnedItself); } else { attakerMessages.Add(lang => lang.YouStunnedEnemy); enemyMessages.Add(lang => lang.TheEnemyStunnedYou); } } else { attakerMessages.Add(lang => lang.YouMissedTheEnemy); enemyMessages.Add(lang => lang.TheEnemyMissedYou); } await attakerMessages.SendAsync(); await enemyMessages.SendAsync(); UnstableConcoctionCounter = 0; hero_target = null; return(true); }
public override async Task <bool> Attack(IHero target) { if (!target.HasImmuneToMagic) { AdditionalDamage = target.CompileMagicDamage(AdditionalDamage); InitPassiveAbilities(); } else { AdditionalDamage = 0.0f; } return(await base.Attack(target)); }
public override async Task <bool> Attack(IHero target) { float damage = 0.0f; var attakerMessages = Sender.CreateMessageContainer(); var excepterMessages = target.Sender.CreateMessageContainer(); if (GetRandomNumber(1, 101) >= target.MissChance) { damage += this.DPS + this.AdditionalDamage; damage -= target.Armor; if (GetRandomNumber(1, 101) <= StunHitChance) { target.StunCounter++; damage += StunDamage; attakerMessages.Add(lang => $"{lang.StunningHit}!"); excepterMessages.Add(lang => $"{lang.TheEnemyStunnedYou}"); } if (GetRandomNumber(1, 101) <= ElectricalHitChance) { damage += target.CompileMagicDamage(ElectricalHitDamage); attakerMessages.Add(lang => $"{AbiNamePassive}!"); excepterMessages.Add(lang => $"{AbiNamePassive}!"); } if (GetRandomNumber(1, 101) <= CriticalHitChance) { damage *= CriticalHitMultiplier; attakerMessages.Add(lang => $"{lang.CriticalHit}!"); excepterMessages.Add(lang => lang.TheEnemyDealtCriticalDamageToYou); } attakerMessages.Add(lang => lang.GetAttackedMessageForAttacker(Convert.ToInt32(damage))); excepterMessages.Add(lang => lang.GetAttackedMessageForExcepter(Convert.ToInt32(damage))); } else { attakerMessages.Add(lang => lang.YouMissedTheEnemy); excepterMessages.Add(lang => lang.TheEnemyMissedYou); } target.GetDamage(damage); HP += (damage / 100 * HpStealPercent) + HpStealAdditional; await attakerMessages.SendAsync(); await excepterMessages.SendAsync(); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(TimeWalkManaPay, TimeWalkCD)) { return(false); } HP = PreviousHP; MP -= TimeWalkManaPay; TimeWalkCD = TimeWalkDefaultCD; if (!target.HasImmuneToMagic) { target.GetDamage(target.CompileMagicDamage(TimeWalkDamage)); } await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(PlasmaFieldManaPay, PlasmaFieldCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } MP -= PlasmaFieldManaPay; PlasmaFieldCD = PlasmaFieldDefaultCD; target.GetDamage(target.CompileMagicDamage(PlasmaFieldDamage)); await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); return(true); }
public override async Task <bool> UseAbilityThree(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } if (!await CheckManaAndCD(AssassinateManaPay, AssassinateCD)) { return(false); } target.GetDamage(target.CompileMagicDamage(AssassinateDamage)); MP -= AssassinateManaPay; AssassinateCD = AssassinateDefaultCD; 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 (!await CheckManaAndCD(EarthshokManaPay, EarthshokCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } MP -= EarthshokManaPay; EarthshokCD = EarthshokDefaultCD; target.GetDamage(target.CompileMagicDamage(EarthshokDamage)); target.LoosenArmor(EarthshokArmorPenetrate, EarthshokDuration); await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameOne)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameOne)); return(true); }
public override async Task <bool> UseAbilityTwo(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(LastWordManaPay, LastWordCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } MP -= LastWordManaPay; LastWordCD = LastWordDefaultCD; target.GetDamage(target.CompileMagicDamage(LastWordDamage)); Silence(LastWordSilenceDuration, target); await Sender.SendAsync(lang => lang.GetMessageYouHaveUsedAbility(AbiNameTwo)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameTwo)); return(true); }