KoKuToru / ws-probability-calculator

weiß schwarz probability calculator
https://kokutoru.github.io/ws-probability-calculator/
GNU General Public License v2.0
0 stars 0 forks source link

Error when a conditional "damage" is combined with "burn" #2

Open Nokob opened 23 hours ago

Nokob commented 23 hours ago

I sometimes use "mill, if no cx damage" to simulate stacking clean cards on top before doing damage, but it sometimes causes an error for some deckstates

For example, this setup (simulating 4 burn 3s with a known clean card on top) produces the error condition `idx >= 0 && idx < count` @./utils/state.hpp:47 failed!:

mill 2
  if not cx
    damage 3
repeat 3
  burn 3

https://kokutoru.github.io/ws-probability-calculator/?*oIHmSg4u2R2fhiOwEoU8Fat4dRdgszu9XcL4YYTp4UHUKOv_.L-0gIOz9o4tiPA1Et68UG2Kclr3Of*f4f4

But changing it to repeat 2 doesn't produce the error

KoKuToru commented 18 hours ago

very interessting, this is a bounds check.. that fails..\ at a quick glance, i can't see what wrong.. \ because i always iterate from 0 to count.. \ so idx should always be idx >= 0 && idx < count :face_with_diagonal_mouth: but thats why i added this assertions..\ maybe i am using the wrong count or idx somewhere..

i will need to debug this one..

because it happens at small deck sizes image

it might have something todo with reshuffle..