bugs [Free Enterprise Wiki]

Site Tools


[currently this is just scratch space for the technical details of misc. bugs]

Asura Cure4 Bug

If Cure4 would restore between 16,384 and 32,767 HP (or in the rarer case, between 49,152 and 65,535 hp), it does not restore any health at all.

If it would restore between 32,768 and 49,151 HP, it restores 32,768 HP less than expected1).

Technical Details

Damage and healing are stored as a 16-bit word, but the top two bits are used as flags for RESTORE2) and MISS3), respectively, so the actual damage/healing value uses only 14 bits4).

The Cure4 routine does not check if the value is too high, so rather than capping the value at 16,383, it overflows, setting the MISS flag to 15). As a result, a number will be displayed, but Asura's HP will not change.

TODO: Does this also affect casting single target Cure4 on monsters? Seems like it should.

TODO: Confirm that the amount displayed is her current health mod 16,384 (aka the bottom 14 bits)


In most spots where Asura has more than 16,383 health, she won't be able to heal with Cure4 once that much damage has been done to her.

At the Elements spot, she will be able to heal again after she's taken 32,768 damage, but her Cure4 will not heal herself past this “checkpoint”. e.g., if she's taken 33,000 damage, her Cure4 will heal for 232, and another Cure4 will heal for 0.

Keep in mind that Cure3 will always work normally. A Cure3 bringing her to below 16,384 damage will allow a subsequent Cure4 to fully heal her.

her current HP mod 16,384
set to 1 if the “damage” done is actually healing
set to 1 if the attack missed or only affects MP
which can store any number from 0 to 16,383
unless the value is between 32,768 and 49,151
bugs.txt · Last modified: 2022/06/03 00:26 by wylem