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); }
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); }
public override double GetAttack() { // returns the raw damage return(this.AttackPoints * ((double)Chance.GetPercent() / 100)); }
public override double GetDeffence() { // returns the value to reduce the attack with return(this.ArmorPoints * ((double)Chance.GetPercent() / 100)); }