fix boat bug

This commit is contained in:
evanpelle
2024-08-12 17:05:02 -07:00
parent a4799a3c21
commit fc562533e1
5 changed files with 15 additions and 5 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import {pastelTheme} from "./PastelTheme";
export const defaultConfig = new class implements Config {
player(): PlayerConfig {
throw new Error("Method not implemented.");
return defaultPlayerConfig
}
ticksPerTurn(): number {
@@ -49,7 +49,7 @@ export const defaultPlayerConfig = new class implements PlayerConfig {
const ratio = 1 - player.troops() / max
toAdd *= ratio * ratio * ratio
toAdd = Math.max(2, toAdd)
return Math.min(player.troops(), max)
return Math.min(player.troops() + toAdd, max)
}
attackLogic(attack: Player, defender: Player | TerraNullius): number {