Fix RIVAL1's first pokemon not having a held item - pret/pokecrystal GitHub Wiki
RIVAL1
's first Pokémon not having a held item
Fix RIVAL1
in this generation is hardcoded so that his first Pokémon never utilizes the held item it gets. This can easily confound new hackers, but is simple to fix.
Go to engine/battle/core.asm
and delete the following lines:
InitEnemyTrainer:
ld [wTrainerClass], a
farcall StubbedTrainerRankings_TrainerBattles
xor a
ld [wTempEnemyMonSpecies], a
callfar GetTrainerAttributes
callfar ReadTrainerParty
- ; RIVAL1's first mon has no held item
- ld a, [wTrainerClass]
- cp RIVAL1
- jr nz, .ok
- xor a
- ld [wOTPartyMon1Item], a
-
-.ok
ld de, vTiles2
callfar GetTrainerPic
...
This block checks if the opposing trainer is RIVAL1
, and if so, changes the value of their first Pokémon's held item to 0, meaning no item. Why exactly Game Freak did this when RIVAL1
's parties don't actually have any held items is unclear, but we can just delete the code to let him use held items like any other trainer.