Page 1 of 1

sector mines and defenses

Posted: Wed Feb 28, 2018 14:12 UTC
by Rim Greaper
So guys, what determines how many mines a player hits when they enter a sector?

I'm pretty sure that the code makes a determination based on your cloak level about whether they hit any mines at all. I guess this is put up against the sector owner's sensor level. Is it similar to scanning, where the results are a percentage based on the difference between the 2 players sensor and cloak levels?

thanks!

Re: sector mines and defenses

Posted: Wed Feb 28, 2018 19:56 UTC
by TheMightyDude
The players Ship Cloak level has nothing to do with hitting mines, the cloak is used with fighter sector defences only.

The following code is how it works out how many mines hit you.

Code: Select all

// calculate the percentage between 5 and 100% of mines to hit ship.
$pren = (mt_rand (5, 100)/100);

// calculate the actual amount of mines to hit ship.
$roll = round ($pren * $total_sector_mines - 1) + 1;
 
So if $total_sector_mines = 5 Mil and $pren = 0.65 (65%), then $roll would = 3.25Mil mines will hit ship.

TBH, I think it should be the larger you are the more mines you should hit, but that's how it calculates it.