Cadet II/Prox extra
|
The mechanics of prox damage
| For the Obscenely Interested |
Lifetime
Minefields 'activate' one second after they're deployed. However, the server sets the 'start time' of a minefield to 3 seconds after the 'drop mines' button is pressed.
This is important because the lifetime of a mine is therefore unaffected by this 3 second delay.
Therefore, if ICE lists the lifetime of a mine a 17 seconds, you'll really see it in game for 20 seconds, and it will be able to deal damage for the last 16 of those seconds.
So to put that another way, minefields activate after 4 seconds (something all vets know from experience), but the time that a minefield deals damage is it's lifetime - 1.0 second.
Deployment
A minefield's initial position is offset differently if you are sitting still or moving.
The code for this is
If you're sitting still ( your velocity^2 < 1.0 ):
[Code]Mines appear ( mineRadius + shipRadius + 5.0 ) m opposite your current facing.[/Code]
If you're moving ( velocity^2 >= 1.0 ):
[Code]Mines appear ( mineRadius + shipRadius + 5.0 ) m opposite your current velocity vector.[/Code]
Damage
The minefield code is actually far less confusing than one would initially think.
At the core of the mine code is the following formula.
[Code]Damage = ( 1 - exp( -Amount / Max Endurance ) ) * Current Endurance
where: Amount = timeInMines * shipSpeed^2 * minePower * shipRadius^2 / ( 5000.0 * mineRadius )[/Code]
And then the minefield's current endurance is effectively reduced by 'damage' However the first time a ship goes through a minefield. [Code]Current Endurance == Max Endurance.[/Code] And you can prove that b * ( 1 - exp( -a/b ) = approximately.
So while roundoff error introduces some inaccuracies. You can think of Max Endurance of a minefield as the amount of damage that it can dish out. And it will dish out damage at a rate of [Code]shipSpeed^2 * minePower * shipRadius^2 / ( 5000.0 * mineRadius ) hp per second.[/Code]
Pulling an example from the Community core:
Prox Mine 1:
Radius: 100m
Power: 400
Endurance: 2000
A general fighter:
Radius: ~15m
Speed: 80mps (not boosting)
The game seems to update in maximums of 0.25s increments. Since a non-boosting ship won't clear the mines in that time, if a ship hits the leading edge of the minefield. The damage they would take would be roughly:
[Code](0.25 * 80^2 * 400 * 15^2) / (5000 * 100) = 144000000 / 500000 = 288
exp( -288/2000 ) = 0.865887748
( 1 - 0.8658 ) * 2000 = 268.4[/Code]
Which is effectively 1073.6 dps. The estimated damage would have been 80^2 * 400 * 15^2 / (5000 * 100), which is 1152 hp/s
Anyway, exact minefield damage is somewhat nebulous, but since damage rates raise on the square of speed and radius. It's clear that the bigger (or faster) they are, the harder they fall.