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
Aretisia: Tenebris Dominus
Step into the world of Aretisia and save the future to come.
Status | Released |
Author | Ema Pex |
Genre | Role Playing, Adventure |
Tags | 2D, Fantasy, Narrative, Singleplayer, Turn-Based Combat |
Languages | English |
Accessibility | Configurable controls |
More posts
- Surprise, the full game is out!2 days ago
- Demo 2 is out!Jul 13, 2023
- Demo 2 ChangelogJun 06, 2023
- Closing in on Demo 2Jun 02, 2023
- Update on Demo 2May 19, 2023
- Demo 2 will be BIG.Apr 26, 2023
- Demo 1 now available!Apr 13, 2023
- Progress on Demo 1Apr 04, 2023
- Release CycleMar 16, 2023
- Going BackwardsFeb 25, 2023
Leave a comment
Log in with itch.io to leave a comment.