diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index bcd7cbec1..8ad7f7fee 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -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 { diff --git a/src/core/execution/SAMLauncherExecution.ts b/src/core/execution/SAMLauncherExecution.ts index c5403e292..cbf2f583a 100644 --- a/src/core/execution/SAMLauncherExecution.ts +++ b/src/core/execution/SAMLauncherExecution.ts @@ -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; diff --git a/src/core/execution/SAMMissileExecution.ts b/src/core/execution/SAMMissileExecution.ts index df7d22682..218f755f1 100644 --- a/src/core/execution/SAMMissileExecution.ts +++ b/src/core/execution/SAMMissileExecution.ts @@ -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(