From 5334cd4e9fa930b21ba09f194fa6b78ec9d32f47 Mon Sep 17 00:00:00 2001 From: Evan Date: Sat, 23 Nov 2024 20:00:21 -0800 Subject: [PATCH] nukes don't destroy other nukes --- src/core/execution/NukeExecution.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/execution/NukeExecution.ts b/src/core/execution/NukeExecution.ts index 5e5845352..441b58505 100644 --- a/src/core/execution/NukeExecution.ts +++ b/src/core/execution/NukeExecution.ts @@ -84,8 +84,10 @@ export class NukeExecution implements Execution { } } for (const unit of this.mg.units()) { - if (euclideanDist(this.cell, unit.tile().cell()) < magnitude.outer) { - unit.delete() + if (unit.type() != UnitType.AtomBomb && unit.type() != UnitType.HydrogenBomb) { + if (euclideanDist(this.cell, unit.tile().cell()) < magnitude.outer) { + unit.delete() + } } } // this.mg.units()