aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/trainer_ai.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/trainer_ai.asm')
-rw-r--r--engine/battle/trainer_ai.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 7081fdfd..d97ee076 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -578,7 +578,7 @@ AISwitchIfEnoughMons:
inc d
.Fainted
push bc
- ld bc, wEnemyMon2 - wEnemyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
dec c
@@ -592,16 +592,16 @@ AISwitchIfEnoughMons:
SwitchEnemyMon:
-; prepare to withdraw the active monster: copy hp, number, and status to roster
+; prepare to withdraw the active monster: copy HP, party pos, and status to roster
ld a, [wEnemyMonPartyPos]
ld hl, wEnemyMon1HP
- ld bc, wEnemyMon2 - wEnemyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld d, h
ld e, l
ld hl, wEnemyMonHP
- ld bc, 4
+ ld bc, MON_STATUS + 1 - MON_HP ; also copies party pos in-between HP and status
call CopyData
ld hl, AIBattleWithdrawText
@@ -635,7 +635,7 @@ AICureStatus:
; cures the status of enemy's active pokemon
ld a, [wEnemyMonPartyPos]
ld hl, wEnemyMon1Status
- ld bc, wEnemyMon2 - wEnemyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
xor a
ld [hl], a ; clear status in enemy team roster