ok magnetic detonator duds...here's my idea:
- have a set % chance that every torpedo with magnetic detonator can be a dud (let's say we set it at 10% failure rate)
- when game says magnetic impact happened get a random number. If this random number falls within the % chance of magnetic failure then get another random number. Scale this random number to fall within 0.0 to 1.0 value. Multiply this scaled random number by the magnetic detonator range defined in torpedoes .sim file. Let's say scaled magnetic detonator random value is 0.63, magnetic detonator range is 2m. 2 * 0.63 = 1.26m. Recheck for magnetic detonator collision with new magnetic detonator range. If check fails to show collision do not detonate. If check says collision still happened:
- do an impact angle check like impact torpedoes do. If the angle is 90 to x degrees (torpedo passing at right angle to ship's course) get a random number. If this random number is greater than some preset value then torpedo is allowed to detonate. If not, torpedo continue on it's merry way. We could define many ranges for this magnetic impact angle check.
What do you think?
|