From c1f99c6bacefdccbbc69995d530321edc817555a Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Thu, 31 Jul 2025 22:29:07 -0400 Subject: [PATCH] Betray on MIRV launch (#1668) ## Description: Betray on MIRV launch, instead of on separate. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [ ] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [ ] I have read and accepted the CLA agreement (only required once). --- src/core/execution/MIRVExecution.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/core/execution/MIRVExecution.ts b/src/core/execution/MIRVExecution.ts index 6b2b66a23..9a6075b68 100644 --- a/src/core/execution/MIRVExecution.ts +++ b/src/core/execution/MIRVExecution.ts @@ -47,6 +47,17 @@ export class MirvExecution implements Execution { // 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); + if (alliance !== null) { + this.player.breakAlliance(alliance); + } + if (this.targetPlayer !== this.player) { + this.targetPlayer.updateRelation(this.player, -100); + } + } } tick(ticks: number): void { @@ -118,15 +129,6 @@ export class MirvExecution implements Execution { ), ); } - if (this.targetPlayer.isPlayer()) { - const alliance = this.player.allianceWith(this.targetPlayer); - if (alliance !== null) { - this.player.breakAlliance(alliance); - } - if (this.targetPlayer !== this.player) { - this.targetPlayer.updateRelation(this.player, -100); - } - } this.nuke.delete(false); }