From b488bcea682dc07935cda8f897cf0965450e11f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Jurkovi=C4=87?= Date: Sun, 2 Mar 2025 22:45:00 +0100 Subject: [PATCH] naval invasion alert added --- src/core/execution/TransportShipExecution.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/execution/TransportShipExecution.ts b/src/core/execution/TransportShipExecution.ts index 7f9f6e682..0f9055c4c 100644 --- a/src/core/execution/TransportShipExecution.ts +++ b/src/core/execution/TransportShipExecution.ts @@ -69,6 +69,15 @@ export class TransportShipExecution implements Execution { this.attacker = mg.player(this.attackerID); + // Notify the target player about the incoming naval invasion + if (this.targetID && this.targetID !== mg.terraNullius().id()) { + mg.displayMessage( + `Naval invasion incoming from ${this.attacker.displayName()}`, + MessageType.WARN, + this.targetID, + ); + } + if ( this.attacker.units(UnitType.TransportShip).length >= mg.config().boatMaxNumber()