mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-28 15:07:53 +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;
|
const traitor = this.game.playerBySmallID(update.traitorID) as PlayerView;
|
||||||
|
|
||||||
if (!betrayed.isTraitor() && traitor === myPlayer) {
|
if (!betrayed.isTraitor() && traitor === myPlayer) {
|
||||||
|
const malusPercent = Math.round(
|
||||||
|
(1 - this.game.config().traitorDefenseDebuff()) * 100,
|
||||||
|
);
|
||||||
this.addEvent({
|
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,
|
type: MessageType.ERROR,
|
||||||
highlight: true,
|
highlight: true,
|
||||||
createdAt: this.game.ticks(),
|
createdAt: this.game.ticks(),
|
||||||
|
|||||||
Reference in New Issue
Block a user