sam can't touch mirv (only mirv warhead) (#259)

This commit is contained in:
Ilan Schemoul
2025-03-16 03:32:45 +01:00
committed by GitHub
parent 8cd8d5bf60
commit 46889077f0
+6 -1
View File
@@ -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;
}