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()
}
+6 -9
View File
@@ -23,16 +23,13 @@ export class DevConfig extends DefaultConfig {
// return 100
}
unitInfo(type: UnitType): UnitInfo {
const info = super.unitInfo(type)
const oldCost = info.cost
info.cost = (p: Player) => oldCost(p) / 10000
return info
}
// unitInfo(type: UnitType): UnitInfo {
// const info = super.unitInfo(type)
// const oldCost = info.cost
// info.cost = (p: Player) => oldCost(p) / 10000
// return info
// }
percentageTilesOwnedToWin(): number {
return 95
}
// tradeShipSpawnRate(): number {
// return 10
// }