19th of July, 2019


Hey. Remember when I talked about how Sudden Death works? I just realised that I did the formula wrong. At 100% health it has a 50% chance to instantly kill. Whoops.

As to why it's wrong, it's simple:
The comparator was the wrong way around and the random value was too large for the values to compare to. For 100% health the calculation was
(100/2) > Random(1,100)
when it should've been
(100/2) < Random(1,50)

Just for a bit more explanation (mostly to help myself understand what went wrong a little better), the calculation before was:
50 is more than a random number between 1 and 100
and after:
50 is less than a random number between 1 and 50

And to explain why this works properly now:
At 1% HP the calculation was 1 is more than a random number between 1 and 100 (this would literally never trigger)
The calculation is now 1 is less than a random number between 1 and 50 (this will trigger and will trigger more often)

I'm so glad I caught this because Sudden Death is a skill that gives me headaches to work with. In my defence for this really silly mistake, the earlier versions of SD actually DID compare the base health %, not the % divided by 2 so comparing it to 100 actually made sense.

okay on reflection the skill is doubly broken and now seems to just murder everything. why is math hard.

It's because I'm for some reason also calculating the inverse percentage, so it's turning 100% health into 0% and completely fucking up the amazing fix I just made for the problem that apparently didn't exist (or did?). Easy fix, I can just remove the part where it subtracts the percentage from 100. Removing the part where it inverted the percentage should also make the event that runs the calculations more efficient, since it doesn't have to run through so many operations to do it.

Thank god this is fixed.

Get Aretisia: Tenebris Dominus

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.