Deep Dungeon II: Yuushi no Monshou Enemy Recovery Bugfix In DD2, the kusa no tsuyu, or Vegetable soup can be eaten by either the player or enemies to recover HP. However, the code to restore the enemy's HP will in most cases restore full HP. The code suggests that is a bug. So, this patch will fix the behavior. ----------------- APPLICATION NOTES ----------------- THIS PATCH IS FOR THE JAPANESE VERSION OF THE GAME. The upcoming English patch will include the fix, as well as an un-fix in case some purists out there want to play the game as is. This patch is designed for an .fds image WITHOUT a fwNES header. (total filesize 131,000 bytes) If your file has a header, use a hex editor and delete the first 16 bytes. For the IPS version of the patch, use Lunar IPS to apply it. For the UPS version (which can patch and un-patch), use tsukuyomi (from byuu.org). -------------- THE BUGGY CODE -------------- Here's the original code to increase the enemy's current HP: LDA $50 ;random value CLC ADC $A447 ;add to low byte STA $A447 ;store to low byte LDA $A448 ADC #$00 STA $A448 ;store high byte CMP $A44A ;compare to max, high BCC FillHPtoMax ;BUG! Carry is clear if Current High < Max High ;below code is run if Current High >= Max High BNE End ;branch to end if Current High > Max High ;below code is run if Current High == Max High LDA $A447 ;current low CMP $A449 ;compare to max low BNE FillHPtoMax ;BUG! Since the high bytes have been determined equal, now we'll fill if the low bytes aren't as well? End: JMP $74AD ;exit the routine FillHPtoMax: LDA $A449 ;max low STA $A447 ;current low LDA $A44A ;max high STA $A448 ;current high JMP $74AD ;exit the routine -------------- THE FIXED CODE -------------- Branches corrected. LDA $50 ;random value CLC ADC $A447 ;add to low byte STA $A447 ;store to low byte LDA $A448 ADC #$00 STA $A448 ;store high byte CMP $A44A ;compare to max, high BEQ CompareLowBytes ;high bytes equal, so we'll need to check the low bytes BCC End ;CORRECTED! Branch out of the routine if current high < max high ;below code is run if Current High == Max High CheckLowBytes: LDA $A447 ;current low CMP $A449 ;compare to max low BCS FillHPtoMax ;CORRECTED! Branch to HP fill routine if current low > max low End: JMP $74AD ;exit the routine FillHPtoMax: LDA $A449 ;max low STA $A447 ;current low LDA $A44A ;max high STA $A448 ;current high JMP $74AD ;exit the routine