More costly (start at 1.5M), increase cost cap (4.5M), biggest timeout
(5s->10s), much lower chance to stop hydrogen (70%->10%), triple
construction time (10s->30s) otherwise it's trivial to build a SAM right
before a nuke hits
This commit is contained in:
Ilan Schemoul
2025-03-16 02:22:14 +01:00
committed by GitHub
parent 364387578b
commit b2d9bb670a
3 changed files with 17 additions and 5 deletions
+3 -3
View File
@@ -261,13 +261,13 @@ export class DefaultConfig implements Config {
p.type() == PlayerType.Human && this.infiniteGold()
? 0
: Math.min(
1_000_000,
1_500_000 * 3,
(p.unitsIncludingConstruction(UnitType.SAMLauncher).length +
1) *
1_000_000,
1_500_000,
),
territoryBound: true,
constructionDuration: this.instantBuild() ? 0 : 10 * 10,
constructionDuration: this.instantBuild() ? 0 : 30 * 10,
};
case UnitType.City:
return {
+1 -1
View File
@@ -22,7 +22,7 @@ export class SAMLauncherExecution implements Execution {
private searchRange = 100;
private missileAttackRate = 50;
private missileAttackRate = 100; // 10 seconds
private lastMissileAttack = 0;
private pseudoRandom: PseudoRandom;
+13 -1
View File
@@ -24,7 +24,9 @@ export class SAMMissileExecution implements Execution {
private mg: Game,
private pseudoRandom: number,
private speed: number = 6,
// Regular atom bomb or warhead of MIRV
private hittingChance: number = 0.75,
private hittingChanceHydrogen: number = 0.1,
) {}
init(mg: Game, ticks: number): void {
@@ -61,7 +63,17 @@ export class SAMMissileExecution implements Execution {
switch (result.type) {
case PathFindResultType.Completed:
this.active = false;
if (this.pseudoRandom < this.hittingChance) {
let hit = false;
if (
this.target.type() == UnitType.HydrogenBomb &&
this.pseudoRandom < this.hittingChanceHydrogen
) {
hit = true;
} else if (this.pseudoRandom < this.hittingChance) {
hit = true;
}
if (hit) {
this.target.delete();
this.mg.displayMessage(