public void ExecuteAgressiveAction(Hero player, Hero enemy) { SwordmasterWarrior playerOnTurn = (SwordmasterWarrior)player; player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.MirrorImageCooldown); if (playerOnTurn.CriticalStrike) { bool isCrit = CriticalChecker.CheckForCrit(player); if (isCrit) { CriticalPrinter.PrintCritical(player); enemy.TakeDamage(this.Damage); } } enemy.TakeDamage(this.Damage); }
public void ExecuteAgressiveAction(Hero player, Hero enemy) { var isCritical = CriticalChecker.CheckForCrit(player); if (isCritical) { CriticalPrinter.PrintCritical(player); } var isBerserk = HeroTypeChecker.CheckForPassive(player); if (isBerserk) { if (!isCritical) { enemy.TakeDamage(this.Damage * 2); } else { enemy.GainArmor(this.Damage * 3); } BerserkerWarrior warrior = (BerserkerWarrior)player; warrior.PassiveDuration--; if (warrior.PassiveDuration <= 0) { warrior.IsBerserk = false; } } else { enemy.TakeDamage(this.Damage); } if (isCritical) { enemy.TakeDamage(this.Damage); } Warrior playerOnTurn = (Warrior)player; playerOnTurn.GetRageOnHit(); }
public void ExecuteAgressiveAction(Hero player, Hero enemy) { var isCrit = CriticalChecker.CheckForCrit(player); BerserkerWarrior playerOnTurn = (BerserkerWarrior)player; player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.WildAxesCooldown); if (playerOnTurn.IsBerserk) { if (isCrit) { enemy.TakeDamage(this.Damage * 4); CriticalPrinter.PrintCritical(player); } else { enemy.TakeDamage(this.Damage * 2); } playerOnTurn.PassiveDuration--; if (playerOnTurn.PassiveDuration <= 0) { playerOnTurn.IsBerserk = false; } } else { if (isCrit) { enemy.TakeDamage(this.Damage * 2); CriticalPrinter.PrintCritical(player); } else { enemy.TakeDamage(this.Damage); } } }