diff options
Diffstat (limited to 'engine/search.asm')
-rwxr-xr-x | engine/search.asm | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/engine/search.asm b/engine/search.asm index 495d4cc5e..6c18f3e3d 100755 --- a/engine/search.asm +++ b/engine/search.asm @@ -1,66 +1,66 @@ Special_BeastsCheck: ; 0x4a6e8 ; Check if the player owns all three legendary beasts. ; They must exist in either party or PC, and have the player's OT and ID. -; Return the result in ScriptVar. +; Return the result in wScriptVar. ld a, RAIKOU - ld [ScriptVar], a + ld [wScriptVar], a call CheckOwnMonAnywhere jr nc, .notexist ld a, ENTEI - ld [ScriptVar], a + ld [wScriptVar], a call CheckOwnMonAnywhere jr nc, .notexist ld a, SUICUNE - ld [ScriptVar], a + ld [wScriptVar], a call CheckOwnMonAnywhere jr nc, .notexist ; they exist ld a, 1 - ld [ScriptVar], a + ld [wScriptVar], a ret .notexist xor a - ld [ScriptVar], a + ld [wScriptVar], a ret Special_MonCheck: ; 0x4a711 -; Check if the player owns any monsters of the species in ScriptVar. -; Return the result in ScriptVar. +; Check if the player owns any monsters of the species in wScriptVar. +; Return the result in wScriptVar. call CheckOwnMonAnywhere jr c, .exists ; doesn't exist xor a - ld [ScriptVar], a + ld [wScriptVar], a ret .exists ld a, 1 - ld [ScriptVar], a + ld [wScriptVar], a ret CheckOwnMonAnywhere: ; 0x4a721 -; Check if the player owns any monsters of the species in ScriptVar. +; Check if the player owns any monsters of the species in wScriptVar. ; It must exist in either party or PC, and have the player's OT and ID. ; If there are no monsters in the party, ; the player must not own any yet. - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld d, a ld e, 0 - ld hl, PartyMon1Species - ld bc, PartyMonOT + ld hl, wPartyMon1Species + ld bc, wPartyMonOT ; Run CheckOwnMon on each Pokémon in the party. .partymon @@ -185,7 +185,7 @@ CheckOwnMon: ; 0x4a7ba ; inputs: ; hl, pointer to PartyMonNSpecies ; bc, pointer to PartyMonNOT -; ScriptVar should contain the species we're looking for +; wScriptVar should contain the species we're looking for ; outputs: ; sets carry if monster matches species, ID, and OT name. @@ -197,7 +197,7 @@ CheckOwnMon: ; 0x4a7ba ld e, c ; check species - ld a, [ScriptVar] ; species we're looking for + ld a, [wScriptVar] ; species we're looking for ld b, [hl] ; species we have cp b jr nz, .notfound ; species doesn't match @@ -205,11 +205,11 @@ CheckOwnMon: ; 0x4a7ba ; check ID number ld bc, MON_ID add hl, bc ; now hl points to ID number - ld a, [PlayerID] + ld a, [wPlayerID] cp [hl] jr nz, .notfound ; ID doesn't match inc hl - ld a, [PlayerID + 1] + ld a, [wPlayerID + 1] cp [hl] jr nz, .notfound ; ID doesn't match @@ -217,7 +217,7 @@ CheckOwnMon: ; 0x4a7ba ; This only checks five characters, which is fine for the Japanese version, ; but in the English version the player name is 7 characters, so this is wrong. - ld hl, PlayerName + ld hl, wPlayerName rept NAME_LENGTH_JAPANESE +- 2 ; should be PLAYER_NAME_LENGTH +- 2 ld a, [de] |