Ejemplo n.º 1
0
        public override Hit Attack()
        {
            var skill = this.engagedItem as ISkill;
            int power = HitCalculator.DynamicDamageCalculator(skill);

            return(new Hit(power, skill.AttackType));
        }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 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));
     }
 }
Ejemplo n.º 4
0
        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));
            }
        }
Ejemplo n.º 5
0
 public override Hit Attack()
 {
     return(new Hit(HitCalculator.DynamicDamageCalculator(this.mentalAttack), this.mentalAttack.AttackType));
 }