mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 23:55:24 +13:00
Misc clean up and small improvements
This commit is contained in:
parent
e8dd755e18
commit
459b5bd615
25 changed files with 326 additions and 160 deletions
|
|
@ -2618,7 +2618,7 @@ PlayApplyingAttackSound:
|
|||
; play a different sound depending if move is not very effective, neutral, or super-effective
|
||||
; don't play any sound at all if move is ineffective
|
||||
call WaitForSoundToFinish
|
||||
ld a, [wDamageMultipliers] ; effectiveness
|
||||
ld a, [wDamageMultipliers]
|
||||
and $7f
|
||||
ret z
|
||||
cp 10
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@ EndLowHealthAlarm:
|
|||
; This function is called when the player has the won the battle. It turns off
|
||||
; the low health alarm and prevents it from reactivating until the next battle.
|
||||
xor a
|
||||
ld [wDanger], a ; turn off low health alarm
|
||||
ld [wLowHealthAlarm], a ; turn off low health alarm
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
inc a
|
||||
ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating
|
||||
|
|
@ -1008,11 +1008,11 @@ RemoveFaintedPlayerMon:
|
|||
predef FlagActionPredef ; clear gain exp flag for fainted mon
|
||||
ld hl, wEnemyBattleStatus1
|
||||
res 2, [hl] ; reset "attacking multiple times" flag
|
||||
ld a, [wDanger]
|
||||
ld a, [wLowHealthAlarm]
|
||||
bit 7, a ; skip sound flag (red bar (?))
|
||||
jr z, .skipWaitForSound
|
||||
ld a, $ff
|
||||
ld [wDanger], a ;disable low health alarm
|
||||
ld [wLowHealthAlarm], a ;disable low health alarm
|
||||
call WaitForSoundToFinish
|
||||
.skipWaitForSound
|
||||
; a is 0, so this zeroes the enemy's accumulated damage.
|
||||
|
|
@ -1859,7 +1859,7 @@ DrawPlayerHUDAndHPBar:
|
|||
cp HP_BAR_RED
|
||||
jr z, .setLowHealthAlarm
|
||||
.fainted
|
||||
ld hl, wDanger
|
||||
ld hl, wLowHealthAlarm
|
||||
bit 7, [hl] ;low health alarm enabled?
|
||||
ld [hl], $0
|
||||
ret z
|
||||
|
|
@ -1867,7 +1867,7 @@ DrawPlayerHUDAndHPBar:
|
|||
ld [wChannelSoundIDs + Ch5], a
|
||||
ret
|
||||
.setLowHealthAlarm
|
||||
ld hl, wDanger
|
||||
ld hl, wLowHealthAlarm
|
||||
set 7, [hl] ;enable low health alarm
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ EndOfBattle:
|
|||
predef EvolutionAfterBattle
|
||||
.resetVariables
|
||||
xor a
|
||||
ld [wDanger], a ;disable low health alarm
|
||||
ld [wLowHealthAlarm], a ;disable low health alarm
|
||||
ld [wChannelSoundIDs + Ch5], a
|
||||
ld [wIsInBattle], a
|
||||
ld [wBattleType], a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue