From 5f364adc332eb6399cc1dec4bf29234a3eeb89a6 Mon Sep 17 00:00:00 2001 From: Evan Date: Sat, 5 Apr 2025 21:49:53 -0700 Subject: [PATCH] cannot nuke teammates --- src/core/game/PlayerImpl.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index d4757274f..ba647f77e 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -768,6 +768,12 @@ export class PlayerImpl implements Player { } nukeSpawn(tile: TileRef): TileRef | false { + const owner = this.mg.owner(tile); + if (owner.isPlayer()) { + if (this.isOnSameTeam(owner)) { + return false; + } + } // only get missilesilos that are not on cooldown const spawns = this.units(UnitType.MissileSilo) .map((u) => u as Unit)