public int GetDamage(IRandomSource source) { int result = 0; for (int i = 0; i < _diceNumber; ++i) { result += 1 + source.GetRandom() % _damageDie; } return(result); }
public bool DetermineHit(Creature source, Creature target) { var roll = _randomSource.GetRandom(); if (roll == 20) { return(true); } if (roll == 1) { return(false); } return(roll + GetAttackBonus(source) >= target.GetAc()); }