Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Generate quick light red translucid flash when step on damaged terrain. #1389
Problem: When stepping in damaged terrain and there's more than 0 damage, there's no flash indicating it.
Solution: Put that flash after trial and error getting the exact color, power and time. Also, no need to invoke the damage function to the party when the damage is 0.
I just tested one corner case:
The easiest way to fix this would be adding a "bool lethal" (like in Game_Interpreter ChangeHP command e.g.) as a new argument to ApplyDamage and when false it is capped to 1 HP.
I also found a bug in ApplyDamage:
The SetHp() call must be changed to ChangeHp(-damage) because only ChangeHp handles the 0 HP case correctly...