summaryrefslogtreecommitdiff
path: root/engine/battle/ai/items.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/ai/items.asm')
-rw-r--r--engine/battle/ai/items.asm9
1 files changed, 8 insertions, 1 deletions
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm
index 8bd45ea4f..480d1ef60 100644
--- a/engine/battle/ai/items.asm
+++ b/engine/battle/ai/items.asm
@@ -758,7 +758,14 @@ EnemyUsedDireHit:
ld a, DIRE_HIT
jp PrintText_UsedItemOn_AND_AIUpdateHUD
-Function3851e: ; unreferenced
+AICheckEnemyFractionMaxHP: ; unreferenced
+; Input: a = divisor
+; Work: bc = [wEnemyMonMaxHP] / a
+; Work: de = [wEnemyMonHP]
+; Output:
+; - c, nz if [wEnemyMonHP] > [wEnemyMonMaxHP] / a
+; - nc, z if [wEnemyMonHP] = [wEnemyMonMaxHP] / a
+; - nc, nz if [wEnemyMonHP] < [wEnemyMonMaxHP] / a
ldh [hDivisor], a
ld hl, wEnemyMonMaxHP
ld a, [hli]