Better comments for enemy health percentage code

This commit is contained in:
Rangi
2022-01-10 21:25:43 -05:00
parent 418c70a8af
commit 0ffdb65210

View File

@@ -7637,7 +7637,7 @@ SendOutMonText:
ld hl, GoMonText ld hl, GoMonText
jr z, .skip_to_textbox jr z, .skip_to_textbox
; compute enemy helth remaining as a percentage ; compute enemy health remaining as a percentage
xor a xor a
ldh [hMultiplicand + 0], a ldh [hMultiplicand + 0], a
ld hl, wEnemyMonHP ld hl, wEnemyMonHP
@@ -7712,10 +7712,10 @@ WithdrawMonText:
.WithdrawMonText: .WithdrawMonText:
text_far _BattleMonNickCommaText text_far _BattleMonNickCommaText
text_asm text_asm
; Print text to withdraw mon ; Depending on the HP lost since the enemy mon was sent out, the game prints a different text
; depending on HP the message is different
push de push de
push bc push bc
; compute enemy health lost as a percentage
ld hl, wEnemyMonHP + 1 ld hl, wEnemyMonHP + 1
ld de, wEnemyHPAtTimeOfPlayerSwitch + 1 ld de, wEnemyHPAtTimeOfPlayerSwitch + 1
ld b, [hl] ld b, [hl]