diff --git a/src/core/execution/nation/NationUtils.ts b/src/core/execution/nation/NationUtils.ts index a63c959f8..684b69d98 100644 --- a/src/core/execution/nation/NationUtils.ts +++ b/src/core/execution/nation/NationUtils.ts @@ -41,7 +41,7 @@ function randTerritoryTile( } } - if (p.numTilesOwned() <= 100) { + if (p.numTilesOwned() > 0 && p.numTilesOwned() <= 100) { return random.randElement(Array.from(p.tiles())); } diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index 05a90d1a6..40e92b13c 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -144,7 +144,7 @@ export class PlayerImpl implements Player { traitorRemainingTicks: this.getTraitorRemainingTicks(), targets: this.targets().map((p) => p.smallID()), outgoingEmojis: this.outgoingEmojis(), - outgoingAttacks: this._outgoingAttacks.map((a) => { + outgoingAttacks: this.outgoingAttacks().map((a) => { return { attackerID: a.attacker().smallID(), targetID: a.target().smallID(), @@ -153,7 +153,7 @@ export class PlayerImpl implements Player { retreating: a.retreating(), } satisfies AttackUpdate; }), - incomingAttacks: this._incomingAttacks.map((a) => { + incomingAttacks: this.incomingAttacks().map((a) => { return { attackerID: a.attacker().smallID(), targetID: a.target().smallID(), @@ -1381,7 +1381,7 @@ export class PlayerImpl implements Player { return this._outgoingAttacks; } incomingAttacks(): Attack[] { - return this._incomingAttacks; + return this._incomingAttacks.filter((a) => a.attacker().isAlive()); } public isImmune(): boolean {