getEventDescription gets retreating state instead of snapshot

This commit is contained in:
Rj Manhas
2025-11-11 17:33:23 -07:00
parent 94966b6761
commit be4c66077f
+3 -1
View File
@@ -821,7 +821,9 @@ export class EventsDisplay extends LitElement implements Layer {
): string | DirectiveResult<typeof UnsafeHTMLDirective> {
// Add "(retreating)" for boat attacks when the boat is retreating
if (event.type === MessageType.NAVAL_INVASION_INBOUND && event.unitView) {
if (event.unitView.retreating()) {
// Get the current unit view to check retreating state dynamically
const currentUnitView = this.game.unit(event.unitView.id());
if (currentUnitView && currentUnitView.retreating()) {
const baseDescription = event.description;
const retreatingText = ` (${translateText("events_display.retreating")})`;
if (event.unsafeDescription) {