create territoryBound, have player execution check units for capture

fix bug where PortExecution tries to get random element from empty list and crashes
This commit is contained in:
evanpelle
2024-11-17 19:56:54 -08:00
parent 371a33b406
commit 108fad8096
7 changed files with 50 additions and 25 deletions
+11 -5
View File
@@ -12,26 +12,32 @@ export class DefaultConfig implements Config {
case UnitType.TransportShip:
return {
cost: 0,
territoryBound: false
}
case UnitType.Destroyer:
return {
cost: 100_000
cost: 100_000,
territoryBound: false
}
case UnitType.Port:
return {
cost: 300_000
cost: 300_000,
territoryBound: true
}
case UnitType.Nuke:
return {
cost: 1_000_000
cost: 1_000_000,
territoryBound: false
}
case UnitType.TradeShip:
return {
cost: 0
cost: 0,
territoryBound: false
}
case UnitType.MissileSilo:
return {
cost: 1_000_000
cost: 1_000_000,
territoryBound: true
}
default:
assertNever(type)