mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 14:41:35 +00:00
feat: message to explain debuff to traitors (#351)
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user