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 2:03 pm

sector mines and defenses

Post by Rim Greaper » Wed Feb 28, 2018 2:12 pm

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!

User avatar
TheMightyDude
Site Admin
Posts: 247
Joined: Thu Apr 17, 2014 9:15 am

Re: sector mines and defenses

Post by TheMightyDude » Wed Feb 28, 2018 7:56 pm

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