Sam anti nuke missile launcher (#176)

now with better name

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
Readixyee
2025-03-09 13:25:51 -07:00
committed by GitHub
co-authored by evanpelle
parent fe9a73c967
commit 84951fed9f
10 changed files with 313 additions and 0 deletions
+19
View File
@@ -159,6 +159,11 @@ export class DefaultConfig implements Config {
territoryBound: false,
damage: 250,
};
case UnitType.SAMMissile:
return {
cost: () => 0,
territoryBound: false,
};
case UnitType.Port:
return {
cost: (p: Player) =>
@@ -225,6 +230,20 @@ export class DefaultConfig implements Config {
territoryBound: true,
constructionDuration: this.instantBuild() ? 0 : 5 * 10,
};
case UnitType.SAMLauncher:
return {
cost: (p: Player) =>
p.type() == PlayerType.Human && this.infiniteGold()
? 0
: Math.min(
1_000_000,
(p.unitsIncludingConstruction(UnitType.SAMLauncher).length +
1) *
1_000_000,
),
territoryBound: true,
constructionDuration: this.instantBuild() ? 0 : 10 * 10,
};
case UnitType.City:
return {
cost: (p: Player) =>