summaryrefslogtreecommitdiff
path: root/engine/battle/ai/items.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-10-30 12:26:03 -0400
committerGitHub <noreply@github.com>2020-10-30 12:26:03 -0400
commit7a42f1790ae1e9e357593879bd38c6596dcb03da (patch)
treedbf4ee19995364f15a3b3f98925f606c50598334 /engine/battle/ai/items.asm
parenta2b6befd7d12b2ad8bb97979a10519500dcdd870 (diff)
parent1092983bde65bbf1a27eeabbfbceec1f278a4831 (diff)
Merge pull request #776 from Rangi42/unreferenced
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'engine/battle/ai/items.asm')
-rw-r--r--engine/battle/ai/items.asm12
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm
index 4de82d153..62adaca77 100644
--- a/engine/battle/ai/items.asm
+++ b/engine/battle/ai/items.asm
@@ -20,8 +20,9 @@ AI_SwitchOrTryItem:
and a
jr nz, DontSwitch
+ ; always load the first trainer class in wTrainerClass for Battle Tower trainers
ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH
- ld a, [wInBattleTowerBattle] ; always load the first trainer class in wTrainerClass for BattleTower-Trainers
+ ld a, [wInBattleTowerBattle]
and a
jr nz, .ok
@@ -29,6 +30,7 @@ AI_SwitchOrTryItem:
dec a
ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes
+
.ok
bit SWITCH_OFTEN_F, [hl]
jp nz, SwitchOften
@@ -145,13 +147,13 @@ SwitchSometimes:
ld [wEnemySwitchMonIndex], a
jp AI_TrySwitch
-CheckSubstatusCantRun:
+CheckSubstatusCantRun: ; unreferenced
ld a, [wEnemySubStatus5]
bit SUBSTATUS_CANT_RUN, a
ret
AI_TryItem:
- ; items are not allowed in the BattleTower
+ ; items are not allowed in the Battle Tower
ld a, [wInBattleTowerBattle]
and a
ret nz
@@ -213,7 +215,7 @@ AI_TryItem:
inc hl
jr c, .loop
-.used_item
+; used item
xor a
ld [de], a
inc a
@@ -259,7 +261,7 @@ AI_TryItem:
cp e
jr nc, .yes
-.no
+.no ; unreferenced
and a
ret