Example #1
0
        public override double GetDeffence()
        { // returns the value to reduce the attack with
            ArmorPoints = ArmorPoints * ((double)Chance.GetPercent() / 100);
            double chanceForSpecial = Chance.GetPercentForSpecial();

            if (chanceForSpecial > 0 && 31 > chanceForSpecial)
            { // 30% chance to block the attack
                Console.WriteLine("Block!");
                return(10000);
            }
            return(ArmorPoints);
        }
Example #2
0
        public override double GetAttack()
        { // returns the raw damage
            AttackPoints = this.AttackPoints * ((double)Chance.GetPercent() / 100);
            double chance = Chance.GetPercentForSpecial();

            if (chance > 0 && 31 > chance)
            { // 30% chance to cause 300% damage
                Console.WriteLine("Critical !");
                return(AttackPoints * 3);
            }
            return(AttackPoints);
        }
Example #3
0
 public override double GetAttack()
 { // returns the raw damage
     return(this.AttackPoints * ((double)Chance.GetPercent() / 100));
 }
Example #4
0
 public override double GetDeffence()
 { // returns the value to reduce the attack with
     return(this.ArmorPoints * ((double)Chance.GetPercent() / 100));
 }