mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 01:18:55 +00:00
cannot nuke teammates
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user