So I've reconsidered the core ideas of how my isb uptime should work. I am still assuming a simulation of 1.000.000 casts with n warlocks, h percent hit and c percent crit.
The bold italics stuff below will be turned into code.
So basically we start with x = 1 and do a while loop:
x =1
while (x <= 1000000) {
Now comes the first cast sequence for n warlocks:
y = 1
while (y <= n) {
Here each warlock casts once then the next cast sequence for all n warlocks will start.
What I think should happen within this block, is described in the numbers 1-5 below.
increase y by 1
}
increase x by 1
}
------------------------------------------------
1. The debuff lasts 12 seconds. 12/2,5 cast time = 4,8. That means we can do 4 (4*2,5s cast time=10s) casts that reach the target within the 12 seconds.
n warlocks can do n*4 casts within the 12 seconds. If the number of casts = n*4, it means every lock has cast 4 times and the debuff is gone due to the time limit.
if (casts = 4*number of warlocks casting) -> debuff = 0
2. If the SB hits or not does not matter, because it was one out of the 4 casts which can effectively reach the target within the 12,5s.
after every cast -> casts +1
3. When the debuff is there, it mean it's up, so the uptime increases by 1
if (debuff > 0) uptime +1
4. If a shadow bolt hits the target, one debuff charge will be taken away.
if (random(1,100) <= hit) -> debuff -1
5. Since the debuff seems to get a chance to apply, regardless if the shadow bolt hits or not, each cast there will be a check for the debuff to apply (charges will be set to 4). Also the number of casts will be set to 0.
if (random(1,100) <= crit) {
if (random(1,100) <= hit) -> debuffs = 4, casts = 0
}
------------------------------------------------
So basically these are my thoughts for the simulation. Do you have any ideas what I could add or if I have forgot something?