mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 10:08:11 +00:00
sam has 100% chance to hit atom bomb
This commit is contained in:
@@ -105,7 +105,10 @@ export class SAMLauncherExecution implements Execution {
|
||||
if (this.target && !this.sam.isCooldown() && !this.target.targetedBySAM()) {
|
||||
this.sam.setCooldown(true);
|
||||
const random = this.pseudoRandom.next();
|
||||
const hit = random < this.mg.config().samHittingChance();
|
||||
let hit = true;
|
||||
if (this.target.type() != UnitType.AtomBomb) {
|
||||
hit = random < this.mg.config().samHittingChance();
|
||||
}
|
||||
if (!hit) {
|
||||
this.mg.displayMessage(
|
||||
`Missile failed to intercept ${this.target.type()}`,
|
||||
|
||||
Reference in New Issue
Block a user