Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts: # audio/engine.asm # constants/gfx_constants.asm # constants/map_data_constants.asm # constants/pokemon_data_constants.asm # constants/sprite_constants.asm # constants/wram_constants.asm # data/maps/data.asm # engine/battle/ai/scoring.asm # engine/battle/core.asm # engine/battle/effect_commands.asm # engine/battle/misc.asm # engine/battle_anims/getpokeballwobble.asm # engine/breeding.asm # engine/buy_sell_toss.asm # engine/decorations.asm # engine/events/battle_tower/battle_tower.asm # engine/events/battle_tower/rules.asm # engine/events/buena.asm # engine/events/bug_contest/contest_2.asm # engine/events/daycare.asm # engine/events/dratini.asm # engine/events/halloffame.asm # engine/events/happiness_egg.asm # engine/events/kurt.asm # engine/events/lucky_number.asm # engine/events/magnet_train.asm # engine/events/overworld.asm # engine/events/pokerus/pokerus.asm # engine/events/print_unown.asm # engine/events/print_unown_2.asm # engine/events/unown_walls.asm # engine/item_effects.asm # engine/link.asm # engine/mon_menu.asm # engine/player_object.asm # engine/routines/playslowcry.asm # engine/scripting.asm # engine/search.asm # engine/search2.asm # engine/specials.asm # engine/start_menu.asm # engine/timeset.asm # home/battle_vars.asm # home/map.asm # maps/GoldenrodUndergroundSwitchRoomEntrances.asm # maps/IlexForest.asm # maps/KrissHouse2F.asm # maps/Route39Barn.asm # mobile/mobile_12_2.asm # mobile/mobile_40.asm # mobile/mobile_5f.asm # wram.asm
This commit is contained in:
@@ -1,66 +1,66 @@
|
||||
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
|
||||
|
||||
|
||||
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 Pokémon 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]
|
||||
|
Reference in New Issue
Block a user