private void PlayerWakesUp(IPlayableCharacter player) { _log("Player wakes up..."); player.Walk(_dice.Roll(50)); _log("Player found some weapons and clothes."); _player.IncreaseHealth(_playerEquipmentRule.StartHealth); _player.IncreaseStrength(_playerEquipmentRule.StartStrength); player.WalkWithChanceOfStrengthIncrease(_dice, 50); }
public static void WalkWithChanceOfStrengthIncrease(this IPlayableCharacter player, IDice dice, int sides) { var meters = dice.Roll(sides); player.Walk(meters); if (meters % 3 == 0) { player.IncreaseStrength(dice.Roll(5)); } }