aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/battle_transitions.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2026-01-17 22:38:33 -0600
committerdannye <33dannye@gmail.com>2026-01-17 22:38:33 -0600
commitbc2354dd6626ce28bb9561547ed2107cfa56c18e (patch)
tree5902d4c3389253c76b7c3351e0d7dfecb551c28d /engine/battle/battle_transitions.asm
parentIdentify characters in `_OakSpeechText2B` and `Printer_GetMonStats.IDNo` (#144) (diff)
parentUse macros for `WildMonEncounterSlotChances` (#562) (diff)
downloadpokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.gz
pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.xz
pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/battle/battle_transitions.asm')
-rw-r--r--engine/battle/battle_transitions.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index 8a340bf7..cd0af180 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -14,7 +14,7 @@ BattleTransition:
ldh a, [hSpriteIndex] ; enemy trainer sprite index (0 if wild battle)
ld c, a
ld b, 0
- ld de, $10
+ ld de, SPRITESTATEDATA1_LENGTH
.loop1
ld a, [hl]
cp $ff
@@ -35,13 +35,13 @@ BattleTransition:
jr z, .skip2 ; skip clearing the block if the enemy trainer is using it
push hl
push bc
- ld bc, $10
+ ld bc, OBJ_SIZE * 4
xor a
call FillMemory
pop bc
pop hl
.skip2
- ld de, $10
+ ld de, OBJ_SIZE * 4
add hl, de
dec c
jr nz, .loop2
@@ -104,11 +104,11 @@ GetBattleTransitionID_CompareLevels:
ld a, [hli]
or [hl]
jr nz, .notFainted
- ld de, wPartyMon2 - (wPartyMon1 + 1)
+ ld de, PARTYMON_STRUCT_LENGTH - 1
add hl, de
jr .faintedLoop
.notFainted
- ld de, wPartyMon1Level - (wPartyMon1HP + 1)
+ ld de, MON_LEVEL - (MON_HP + 1)
add hl, de
ld a, [hl]
add $3