Skip to content

Commit 87d1a8d

Browse files
feat: retreat stops attack + show when ennemy retreats (openfrontio#209)
1 parent 04833ca commit 87d1a8d

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/client/graphics/layers/EventsDisplay.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ export class EventsDisplay extends LitElement implements Layer {
419419
) as PlayerView
420420
)?.name()}
421421
</button>
422+
${attack.retreating ? "(retreating...)" : ""}
422423
`,
423424
)}
424425
</td>

src/core/execution/AttackExecution.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ export class AttackExecution implements Execution {
185185
return;
186186
}
187187

188+
if (this.attack.retreating()) {
189+
return;
190+
}
191+
188192
if (!this.attack.isActive()) {
189193
this.active = false;
190194
return;

0 commit comments

Comments
 (0)