From 3137611ab35ad2e5fdff1dbd0e2dcc25e553d7a5 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Mon, 25 Nov 2024 19:13:15 -0800 Subject: [PATCH] make nukes destroy more troops --- src/core/execution/NukeExecution.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/execution/NukeExecution.ts b/src/core/execution/NukeExecution.ts index 9a729991a..4adb5adec 100644 --- a/src/core/execution/NukeExecution.ts +++ b/src/core/execution/NukeExecution.ts @@ -70,16 +70,15 @@ export class NukeExecution implements Execution { }) const ratio = Object.fromEntries( - this.mg.players().map(p => [p.id(), p.troops() / p.numTilesOwned()]) + this.mg.players().map(p => [p.id(), (p.troops() + p.workers()) / p.numTilesOwned()]) ) - const others = new Set() for (const tile of toDestroy) { const owner = tile.owner() if (owner.isPlayer()) { const mp = this.mg.player(owner.id()) mp.relinquish(tile) - mp.removeTroops(ratio[mp.id()]) + mp.removeTroops(2 * ratio[mp.id()]) others.add(mp) } }