public override async Task <bool> UseAbilityThree(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(HoM_ManaPay, HoM_CD)) { return(false); } MP -= HoM_ManaPay; HoM_CD = HoM_DefaultCD; var HeroContainer = Sender.CreateMessageContainer(); var EnemyContainer = target.Sender.CreateMessageContainer(); if (GetRandomNumber(1, 100) > HoM_CriticalChance) { HeroContainer.Add(lang => lang.CriticalHit); EnemyContainer.Add(lang => lang.TheEnemyDealtCriticalDamageToYou); target.GetDamage(HoM_Damage * 2.0f); } else { target.GetDamage(HoM_Damage); } HeroContainer.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameThree)); EnemyContainer.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameThree)); await HeroContainer.SendAsync(); await EnemyContainer.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> UseAbilityTwo(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(SlithereenCrushManaPay, SlithereenCrushCD)) { return(false); } if (!await CheckImmuneToMagic(target)) { return(false); } MP -= SlithereenCrushManaPay; SlithereenCrushCD = SlithereenCrushDefaultCD; target.GetDamage(SlithereenCrushDamage - target.Armor); target.StunCounter += SlithereenCrushStunDuration; var hCon = Sender.CreateMessageContainer(); var eCon = target.Sender.CreateMessageContainer(); hCon.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameTwo)); eCon.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameTwo)); hCon.Add(lang => lang.YouStunnedEnemy); eCon.Add(lang => lang.TheEnemyStunnedYou); 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); }
public override async Task <bool> UseAbilityTwo(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(DragonTailManaPay, DragonTailCD)) { return(false); } MP -= DragonTailManaPay; DragonTailCD = DragonTailDefaultCD; if (!target.HasImmuneToMagic) { target.GetDamage(DragonTailDamage - target.Armor); } target.StunCounter += DragonTailStunDuration; var hCon = Sender.CreateMessageContainer(); var eCon = target.Sender.CreateMessageContainer(); hCon.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameTwo)); eCon.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameTwo)); hCon.Add(lang => lang.YouStunnedEnemy); eCon.Add(lang => lang.TheEnemyStunnedYou); await hCon.SendAsync(); await eCon.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) { 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) <= CriticalHitChance) { damage *= CriticalHitMultiplier; attakerMessages.Add(lang => $"{lang.CriticalHit}!"); excepterMessages.Add(lang => lang.TheEnemyDealtCriticalDamageToYou); } if (FurySwipesCurrentAdditionalDamage + FurySwipesDamagePerHit <= FurySwipesDamageLimit) { FurySwipesCurrentAdditionalDamage += FurySwipesDamagePerHit; damage += FurySwipesCurrentAdditionalDamage; } else { damage += 100.0f; FurySwipesCurrentAdditionalDamage = 0.0f; } 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> UseAbilityThree(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(EotS_ManaPay, EotS_CD)) { return(false); } MP -= EotS_ManaPay; EotS_Activated = true; target.GetDamage(EotS_FirstDamage - target.Armor); target.LoosenArmor(EotS_ArmorPenetrateFirst, 1); hero_target = target; await Sender.SendAsync(lang => lang.GetMessageYouActivated(AbiNameThree)); await target.Sender.SendAsync(lang => lang.GetMessageEnemyActivated(AbiNameThree)); return(true); }
public override async Task <bool> UseAbilityOne(IHero target) { if (!await CheckSilence()) { return(false); } if (!await CheckManaAndCD(MistCoilManaPay, MistCoilCD)) { return(false); } float power = MistCoilPower - target.Armor; target.GetDamage(power); HP += power; MistCoilCD = MistCoilDefaultCD; MP -= MistCoilManaPay; 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(MG_ManaPay, MG_CD)) { return(false); } int count = 0; float damage = 0.0f; for (int i = 0; i < 5; i++) { if (GetRandomNumber(1, 101) <= MG_Chance) { damage += MG_Damage - target.Armor; count++; } } target.GetDamage(damage); MG_CD = MG_DefaultCD; MP -= MG_ManaPay; var hCon = Sender.CreateMessageContainer(); var eCon = target.Sender.CreateMessageContainer(); hCon.Add(lang => lang.GetMessageYouHaveUsedAbility(AbiNameTwo)); eCon.Add(lang => lang.GetMessageEnemyHasUsedAbility(AbiNameTwo)); hCon.Add(lang => $"{lang.CountOfHits}: {count}."); eCon.Add(lang => $"{lang.CountOfHits}: {count}."); hCon.Add(lang => $"{lang.DamageString}: {damage}."); eCon.Add(lang => $"{lang.DamageString}: {damage}."); await hCon.SendAsync(); await eCon.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); }