/// <summary> /// Inflict damage to both the Hero and Enemy depending on the result of the DamageTable /// </summary> /// <param name="strenghDifference"></param> /// <param name="enemy"></param> /// <returns></returns> private bool ResolveDamage(int strenghDifference, Enemy enemy) { int RandomD10 = DiceRoll.D10Roll(); enemy.TakeDamage(DamageTable.enemyDamageTaken(strenghDifference, RandomD10)); try { this.TakeDamage(DamageTable.heroDamageTaken(strenghDifference, RandomD10)); } catch (YouAreDeadException) { throw; } if (enemy.ActualHitPoint <= 0) { return(true); } return(false); }
private int RandBaseAgility() { int minimumValue = 10; return(minimumValue + DiceRoll.D10Roll()); }
private int RandMaxHitPoint() { int minimumValue = 20; return(minimumValue + DiceRoll.D10Roll()); }