sector mines and defenses

Do you need help playing, have ideas for the game or just want to talk about what's going on in the game? This is the place.

Post Reply
Rim Greaper
Posts: 2
Joined: Wed Feb 28, 2018 14:03 UTC

sector mines and defenses

Post by Rim Greaper » Wed Feb 28, 2018 14:12 UTC

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?


User avatar
Site Admin
Posts: 295
Joined: Thu Apr 17, 2014 09:15 UTC

Re: sector mines and defenses

Post by TheMightyDude » Wed Feb 28, 2018 19:56 UTC

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.
TheMightyDude::Blacknova Development.
Development Blog Twitter Twitch

Post Reply