From 46889077f034a75d4b3f581f8237f3e918cbe4c3 Mon Sep 17 00:00:00 2001 From: Ilan Schemoul Date: Sun, 16 Mar 2025 03:32:45 +0100 Subject: [PATCH] sam can't touch mirv (only mirv warhead) (#259) --- src/core/execution/SAMMissileExecution.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/execution/SAMMissileExecution.ts b/src/core/execution/SAMMissileExecution.ts index 218f755f1..10252b552 100644 --- a/src/core/execution/SAMMissileExecution.ts +++ b/src/core/execution/SAMMissileExecution.ts @@ -69,7 +69,12 @@ export class SAMMissileExecution implements Execution { this.pseudoRandom < this.hittingChanceHydrogen ) { hit = true; - } else if (this.pseudoRandom < this.hittingChance) { + } else if ( + [UnitType.MIRVWarhead, UnitType.AtomBomb].includes( + this.target.type(), + ) && + this.pseudoRandom < this.hittingChance + ) { hit = true; }