#Global Hooks
$Simulation:
[
--Get all weapons
for i=1,mn.getNumWeapons() do
weapon = mn.getWeaponByIndex(i)
weapontype = weapon.Class.Name
--Select only mines
if weapontype == "Helios" then
weaponlife = weapon.LifeLeft
--Select only those mines that have been activated (time activation)
if weaponlife < 25 then
weaponteam = weapon.Team
--Start building distance array
for m=1,mn.getNumShips() do
ship = mn.getShipByIndex(m)
shipteam = ship.Team
weaponposition = weapon.Position
shipposition = ship.Position
shipdistance = weaponposition:getDistance(shipposition)
if shipteam ~= weaponteam and shipdistance < 1000 then
weapon.LifeLeft = 0
end
end
end
end
end
]
#End