Calculating damage per second that can stack and have stack limit, with variety of durations

40 Views Asked by At

Lets say, a plane attack a ship once every 12.80 seconds, each attack throw 6 bombs, and each bomb have 25% chance of giving the ship 1 stack of fire. When the ship get 1 stack of fire, it will deal 180.50 fire damage per second to the ship for 15 seconds. One ship can only get maximum amount 3 stacks of fire at a time, and the fire stack duration do not refresh to the new one until the old one is gone. How to calculate the total fire damage the plane did to the ship in 5 minutes? (just the fire damage)

More simpler:
time for 1 atk = 12.80 seconds
bombs per atk = 6 bombs
1 fire stack chance per bomb = 25%
1 fire stack damage per second = 180.50 fire dmg
1 fire stack duration = 15 seconds
max fire stack = 3 fire stack
each fire stack duration do not refresh to the new one, until the old one is gone.

Question:
The total fire damage being dealt in 5 minutes?

Each atk give 1.5 fire stack, so 1st attack will give 1 stack, 2nd attack will give 2 stacks. my problem is calculating this while applying that 3 stacks limit rule. how can I calculate this? (just the fire damage)

1

There are 1 best solutions below

0
On BEST ANSWER

With 6 bombs and a 25% chance for each to give fire damage, 1.5 bombs should cause fire damage in each bombing run. This will be rounded up to 2. The second run at least one should hit, giving the ship the maximum of 3 fire stacks. Between the second and third attacks, the first two fires will go out. This will create a period of 10.6 seconds where there is only one fire on the ship (10.6 is found by 15-12.8=2.2, 12.8-2.2=10.6). Likewise, between the third and fourth runs there will be a period of 10.6 seconds where there are two fires on the ship. Assuming 2 hits are scored whenever possible (best case) and knowing there are 300 seconds in 5 minutes, this cycle will repeat 11 times. That is, for the first 12.8 seconds 185(2) damage will be done per second, and after that the above mentioned cycle will begin.

This cycle will consist of 2.2 seconds of 185(3) damage per second, followed by 10.6 seconds of 185 damage per second. This will be followed by 2.2 seconds of 185(3) damage per second, then 10.6 seconds of 185(2) damage per second.

So, total damage so far is:

$$(12.8*185*2)+11((4.4*185*3)+(10.6*185*2)+(10.6*185)) = 96311$$

This only accounts for 296.6 seconds, leaving 3.4 more. Starting from the top of the cycle but not finishing it, this will create 2.2 seconds of 185(3) damage per second followed by 1.2 seconds of 185 damage per second. This will add 1443 more damage, for a total of 97754 over 5 minutes.