public override Hit Attack() { var skill = this.engagedItem as ISkill; int power = HitCalculator.DynamicDamageCalculator(skill); return(new Hit(power, skill.AttackType)); }
/// <summary> /// Initializes a new instance of the <see cref="Arena"/> class. /// </summary> /// <param name="name">The battle name</param> /// <param name="fightRules">Fighting rules for damage calculator</param> /// <param name="ninja">Our ninja</param> /// <param name="creature">Enemy to fight with the ninja</param> public Arena(string name, FightRulesEnum fightRules, Ninja ninja, Evil creature) : base(name) { this.fightRules = fightRules; this.creature = creature; this.ninja = ninja; HitCalculator.SetFightRusles(fightRules); }
public override Hit Attack() { if (Randomizer.Rand.Next(2) == 1) { return(new Hit(HitCalculator.DynamicDamageCalculator(this.forceAttack), this.forceAttack.AttackType)); } else { return(new Hit(HitCalculator.DynamicDamageCalculator(this.mentalAttack), this.mentalAttack.AttackType)); } }
public virtual void Attack(IItem item, Creature attackedCreature) { var power = this.UseItem(item) as IAttack; if (power == null) { return(0); } else { return(HitCalculator.DynamicDamageCalculator(power)); } }
public override Hit Attack() { return(new Hit(HitCalculator.DynamicDamageCalculator(this.mentalAttack), this.mentalAttack.AttackType)); }