make hard & impossible more difficult

This commit is contained in:
Evan
2024-12-30 13:21:46 -08:00
parent f4c98318b6
commit e9d9fe1d98
3 changed files with 53 additions and 27 deletions
+13
View File
@@ -288,6 +288,19 @@ export class DefaultConfig implements Config {
if (player.type() == PlayerType.Bot) {
toAdd *= .7
}
let difficultyMultiplier = 1
switch (this._gameConfig.difficulty) {
case Difficulty.Easy:
case Difficulty.Medium:
difficultyMultiplier = 1
case Difficulty.Hard:
difficultyMultiplier = 1.2
case Difficulty.Impossible:
difficultyMultiplier = 1.5
}
if (player.type() == PlayerType.FakeHuman) {
toAdd *= difficultyMultiplier
}
return Math.min(player.population() + toAdd, max) - player.population()
}