From c890ae1507e7b6a85575c53faef6bf79808181df Mon Sep 17 00:00:00 2001 From: Ilan Schemoul Date: Sat, 29 Mar 2025 01:37:47 +0100 Subject: [PATCH] feat: message to explain debuff to traitors (#351) --- src/client/graphics/layers/EventsDisplay.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/EventsDisplay.ts b/src/client/graphics/layers/EventsDisplay.ts index 287375da9..ac4d505b0 100644 --- a/src/client/graphics/layers/EventsDisplay.ts +++ b/src/client/graphics/layers/EventsDisplay.ts @@ -261,8 +261,13 @@ export class EventsDisplay extends LitElement implements Layer { const traitor = this.game.playerBySmallID(update.traitorID) as PlayerView; if (!betrayed.isTraitor() && traitor === myPlayer) { + const malusPercent = Math.round( + (1 - this.game.config().traitorDefenseDebuff()) * 100, + ); this.addEvent({ - description: `You broke your alliance with ${betrayed.name()}, making you a TRAITOR`, + description: + `You broke your alliance with ${betrayed.name()}, making you a TRAITOR ` + + `(${malusPercent}% defense debuff)`, type: MessageType.ERROR, highlight: true, createdAt: this.game.ticks(),