bugfix: bomb launch was recorded before the MIRV was constructed, causing it to increase in price before it could be built

This commit is contained in:
evanpelle
2025-12-16 12:31:00 -08:00
parent 058bb44273
commit 9edf0349cb
+1 -3
View File
@@ -45,9 +45,6 @@ export class MirvExecution implements Execution {
this.targetPlayer = this.mg.owner(this.dst);
this.speed = this.mg.config().defaultNukeSpeed();
// Record stats
this.mg.stats().bombLaunch(this.player, this.targetPlayer, UnitType.MIRV);
// Betrayal on launch
if (this.targetPlayer.isPlayer()) {
const alliance = this.player.allianceWith(this.targetPlayer);
@@ -71,6 +68,7 @@ export class MirvExecution implements Execution {
this.nuke = this.player.buildUnit(UnitType.MIRV, spawn, {
targetTile: this.dst,
});
this.mg.stats().bombLaunch(this.player, this.targetPlayer, UnitType.MIRV);
const x = Math.floor(
(this.mg.x(this.dst) + this.mg.x(this.mg.x(this.nuke.tile()))) / 2,
);