diff options
Diffstat (limited to 'battle/ai/items.asm')
-rw-r--r-- | battle/ai/items.asm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/battle/ai/items.asm b/battle/ai/items.asm index 46f04bf65..42bc3deb6 100644 --- a/battle/ai/items.asm +++ b/battle/ai/items.asm @@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000 and a ret nz - callba Function3e8d1 + callba CheckSubstatus_RechargeChargedRampageBideRollout ret nz ld a, [PlayerSubStatus5] @@ -24,6 +24,7 @@ AI_SwitchOrTryItem: ; 38000 ld a, [InBattleTowerBattle] ; Load always the first TrainerClass for BattleTower-Trainers and a jr nz, .ok + ld a, [TrainerClass] dec a ld bc, 7 @@ -787,17 +788,17 @@ Function38511: ; 38511 ; 3851e Function3851e: ; 3851e - ld [hMultiplier], a + ld [hDivisor], a ld hl, EnemyMonMaxHP ld a, [hli] - ld [hProduct], a + ld [hDividend + 0], a ld a, [hl] - ld [hMultiplicand], a + ld [hDividend + 1], a ld b, $2 call Divide - ld a, [$ffb6] + ld a, [hQuotient + 2] ld c, a - ld a, [$ffb5] + ld a, [hQuotient + 1] ld b, a ld hl, EnemyMonHP + 1 ld a, [hld] |