diff --git a/src/core/execution/MIRVExecution.ts b/src/core/execution/MIRVExecution.ts index 87638fe7b..d0c1218c3 100644 --- a/src/core/execution/MIRVExecution.ts +++ b/src/core/execution/MIRVExecution.ts @@ -8,6 +8,7 @@ import { Unit, UnitType, TerraNullius, + MessageType, } from "../game/Game"; import { PathFinder } from "../pathfinding/PathFinding"; import { PathFindResultType } from "../pathfinding/AStar"; @@ -70,6 +71,12 @@ export class MirvExecution implements Execution { ); const y = Math.max(0, this.mg.y(this.dst) - 500) + 50; this.separateDst = this.mg.ref(x, y); + + this.mg.displayMessage( + `⚠️⚠️⚠️ ${this.player.name()} - MIRV INBOUND ⚠️⚠️⚠️`, + MessageType.ERROR, + this.targetPlayer.id(), + ); } for (let i = 0; i < 4; i++) { diff --git a/src/core/execution/NukeExecution.ts b/src/core/execution/NukeExecution.ts index 5f2906120..83bc53c14 100644 --- a/src/core/execution/NukeExecution.ts +++ b/src/core/execution/NukeExecution.ts @@ -7,6 +7,7 @@ import { Unit, UnitType, TerraNullius, + MessageType, } from "../game/Game"; import { PseudoRandom } from "../PseudoRandom"; import { consolex } from "../Consolex"; @@ -57,6 +58,23 @@ export class NukeExecution implements Execution { return; } this.nuke = this.player.buildUnit(this.type, 0, spawn); + if (this.mg.hasOwner(this.dst)) { + const target = this.mg.owner(this.dst) as Player; + if (this.type == UnitType.AtomBomb) { + this.mg.displayMessage( + `${this.player.name()} - atom bomb inbound`, + MessageType.ERROR, + target.id(), + ); + } + if (this.type == UnitType.HydrogenBomb) { + this.mg.displayMessage( + `${this.player.name()} - hydrogen bomb inbound`, + MessageType.ERROR, + target.id(), + ); + } + } } if (this.waitTicks > 0) { this.waitTicks--;