have nukes cause more damage

This commit is contained in:
Evan
2025-02-18 19:59:06 -08:00
parent 33cb3a7d0a
commit c4aaa619af
+1 -6
View File
@@ -126,18 +126,13 @@ export class NukeExecution implements Execution {
return (d <= magnitude.inner || rand.chance(2)) && d <= magnitude.outer;
});
const ratio = Object.fromEntries(
this.mg
.players()
.map((p) => [p.id(), (p.troops() + p.workers()) / p.numTilesOwned()]),
);
const attacked = new Map<Player, number>();
for (const tile of toDestroy) {
const owner = this.mg.owner(tile);
if (owner.isPlayer()) {
const mp = this.mg.player(owner.id());
mp.relinquish(tile);
mp.removeTroops(2 * ratio[mp.id()]);
mp.removeTroops((5 * mp.population()) / mp.numTilesOwned());
if (!attacked.has(mp)) {
attacked.set(mp, 0);
}