Low health alarm documentation

RenaKunisaki
This commit is contained in:
U-Daniel-PC\Daniel 2015-03-12 10:49:35 -04:00
parent 25f0b7abcd
commit 1c2a1076cb
9 changed files with 71 additions and 52 deletions

View file

@ -45,7 +45,7 @@ EndOfBattle: ; 137aa (4:77aa)
predef EvolutionAfterBattle
.resetVariables
xor a
ld [wd083], a
ld [wLowHealthAlarm], a ;disable low health alarm
ld [wc02a], a
ld [W_ISINBATTLE], a
ld [W_BATTLETYPE], a

View file

@ -947,7 +947,7 @@ EnemyMonFaintedText: ; 0x3c63e
Func_3c643: ; 3c643 (f:4643)
xor a
ld [wd083], a
ld [wLowHealthAlarm], a ;disable low health alarm
ld [wc02a], a
inc a
ld [wccf6], a
@ -1089,15 +1089,15 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
predef FlagActionPredef ; clear gain exp flag for fainted mon
ld hl, W_ENEMYBATTSTATUS1
res 2, [hl] ; reset "attacking multiple times" flag
ld a, [wd083]
ld a, [wLowHealthAlarm]
bit 7, a ; skip sound flag (red bar (?))
jr z, .skipWaitForSound
ld a, $ff
ld [wd083], a
ld [wLowHealthAlarm], a ;disable low health alarm
call WaitForSoundToFinish
.skipWaitForSound
; bug? if the player mon faints while the enemy mon is using bide,
; the accumulated damage is overwritten. xxx what values can [wd083] have here?
; the accumulated damage is overwritten. xxx what values can [wLowHealthAlarm] have here?
ld hl, wEnemyBideAccumulatedDamage
ld [hli], a
ld [hl], a
@ -1934,16 +1934,16 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
cp $2
jr z, .asm_3cde6
.asm_3cdd9
ld hl, wd083
bit 7, [hl]
ld hl, wLowHealthAlarm
bit 7, [hl] ;low health alarm enabled?
ld [hl], $0
ret z
xor a
ld [wc02a], a
ret
.asm_3cde6
ld hl, wd083
set 7, [hl]
ld hl, wLowHealthAlarm
set 7, [hl] ;enable low health alarm
ret
DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)