mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Use more constants in scripts
This commit is contained in:
parent
b23085f526
commit
d83aefb30a
@ -290,7 +290,8 @@ NUM_HMS = const_value - HM01
|
||||
add_mt ICE_BEAM
|
||||
NUM_TM_HM_TUTOR = __enum__ +- 1
|
||||
|
||||
ITEM_FROM_MEM EQU $ff
|
||||
USE_SCRIPT_VAR EQU $00
|
||||
ITEM_FROM_MEM EQU $ff
|
||||
|
||||
; leftovers from red
|
||||
SAFARI_BALL EQU $08 ; MOON_STONE
|
||||
|
@ -3,6 +3,40 @@ PLAYER EQU 0
|
||||
LAST_TALKED EQU -2
|
||||
|
||||
|
||||
; memory constants
|
||||
const_def
|
||||
const MEM_BUFFER_0 ; use StringBuffer3
|
||||
const MEM_BUFFER_1 ; use StringBuffer4
|
||||
const MEM_BUFFER_2 ; use StringBuffer5
|
||||
NUM_MEM_BUFFERS EQU const_value
|
||||
|
||||
|
||||
; checkmoney/takemoney accounts
|
||||
const_def
|
||||
const YOUR_MONEY ; 0
|
||||
const MOMS_MONEY ; 1
|
||||
|
||||
; checkmoney/checkcoins return values
|
||||
const_def
|
||||
const HAVE_MORE ; 0
|
||||
const HAVE_AMOUNT ; 1
|
||||
const HAVE_LESS ; 2
|
||||
|
||||
; checkpokeitem return values
|
||||
const_def
|
||||
const POKEMAIL_WRONG_MAIL ; 0
|
||||
const POKEMAIL_CORRECT ; 1
|
||||
const POKEMAIL_REFUSED ; 2
|
||||
const POKEMAIL_NO_MAIL ; 3
|
||||
const POKEMAIL_LAST_MON ; 4
|
||||
|
||||
; askforphonenumber return values
|
||||
const_def
|
||||
const PHONE_CONTACT_GOT ; 0
|
||||
const PHONE_CONTACTS_FULL ; 1
|
||||
const PHONE_CONTACT_REFUSED ; 2
|
||||
|
||||
|
||||
; GetVarAction arguments (see engine/variables.asm)
|
||||
const_def
|
||||
const VAR_STRINGBUFFER2 ; 00
|
||||
@ -80,6 +114,7 @@ NUM_PLAYER_EVENTS EQU const_value
|
||||
const OBJECTTYPE_6
|
||||
|
||||
|
||||
; showemote arguments
|
||||
; Emotes indexes (see data/sprites/emotes.asm)
|
||||
const_def
|
||||
const EMOTE_SHOCK ; 0
|
||||
@ -97,8 +132,8 @@ NUM_PLAYER_EVENTS EQU const_value
|
||||
EMOTE_MEM EQU -1
|
||||
|
||||
|
||||
; fruittree arguments
|
||||
; FruitTreeItems indexes (see data/items/fruit_trees.asm)
|
||||
; used by fruittree command
|
||||
const_value set 1
|
||||
const FRUITTREE_ROUTE_29 ; 01
|
||||
const FRUITTREE_ROUTE_30_1 ; 02
|
||||
@ -133,8 +168,18 @@ const_value set 1
|
||||
NUM_FRUIT_TREES EQU const_value +- 1
|
||||
|
||||
|
||||
; describedecoration arguments
|
||||
; DescribeDecoration.JumpTable indexes (see engine/decorations.asm)
|
||||
const_def
|
||||
const DECODESC_POSTER ; 0
|
||||
const DECODESC_LEFT_DOLL ; 1
|
||||
const DECODESC_RIGHT_DOLL ; 2
|
||||
const DECODESC_BIG_DOLL ; 3
|
||||
const DECODESC_CONSOLE ; 4
|
||||
|
||||
|
||||
; elevfloor macro values
|
||||
; ElevatorFloorNames indexes (see data/elevator_floors.asm)
|
||||
; used by elevfloor macro
|
||||
const_def
|
||||
const FLOOR_B4F
|
||||
const FLOOR_B3F
|
||||
@ -167,6 +212,40 @@ CMDQUEUE_CAPACITY EQU 4
|
||||
CMDQUEUE_STONETABLE EQU 2
|
||||
|
||||
|
||||
; SpecialGameboyCheck return values
|
||||
const_def
|
||||
const GBCHECK_GB ; 0
|
||||
const GBCHECK_SGB ; 1
|
||||
const GBCHECK_CGB ; 2
|
||||
|
||||
; Special_CheckMagikarpLength return values
|
||||
const_def
|
||||
const MAGIKARPLENGTH_NOT_MAGIKARP ; 0
|
||||
const MAGIKARPLENGTH_REFUSED ; 1
|
||||
const MAGIKARPLENGTH_TOO_SHORT ; 2
|
||||
const MAGIKARPLENGTH_BEAT_RECORD ; 3
|
||||
|
||||
; SpecialReturnShuckle return values
|
||||
const_def
|
||||
const SHUCKIE_WRONG_MON ; 0
|
||||
const SHUCKIE_REFUSED ; 1
|
||||
const SHUCKIE_RETURNED ; 2
|
||||
const SHUCKIE_HAPPY ; 3
|
||||
const SHUCKIE_FAINTED ; 4
|
||||
|
||||
; CheckPartyFullAfterContest return values
|
||||
const_def
|
||||
const BUGCONTEST_CAUGHT_MON ; 0
|
||||
const BUGCONTEST_BOXED_MON ; 1
|
||||
const BUGCONTEST_NO_CATCH ; 2
|
||||
|
||||
; used by HealMachineAnim
|
||||
; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm)
|
||||
const_def
|
||||
const HEALMACHINE_POKECENTER ; 0
|
||||
const HEALMACHINE_ELMS_LAB ; 1
|
||||
const HEALMACHINE_HALL_OF_FAME ; 2
|
||||
|
||||
; used by Special_UnownPuzzle
|
||||
; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm)
|
||||
const_def
|
||||
@ -183,3 +262,9 @@ NUM_UNOWN_PUZZLES EQU const_value
|
||||
const UNOWNWORDS_LIGHT ; 1
|
||||
const UNOWNWORDS_WATER ; 2
|
||||
const UNOWNWORDS_HO_OH ; 3
|
||||
|
||||
; used by Special_MoveTutor
|
||||
const_value set 1
|
||||
const MOVETUTOR_FLAMETHROWER ; 1
|
||||
const MOVETUTOR_THUNDERBOLT ; 2
|
||||
const MOVETUTOR_ICE_BEAM ; 3
|
||||
|
@ -133,7 +133,7 @@ Defined in [macros/scripts/events.asm](/macros/scripts/events.asm) and [engine/s
|
||||
|
||||
## `$3E`: `readcoins` *memory*
|
||||
|
||||
## `$3F`: `RAM2MEM` *memory*
|
||||
## `$3F`: `vartomem` *memory*
|
||||
|
||||
## `$40`: `pokenamemem` *mon_id*, *memory*
|
||||
|
||||
@ -151,7 +151,7 @@ Defined in [macros/scripts/events.asm](/macros/scripts/events.asm) and [engine/s
|
||||
|
||||
## `$47`: `opentext`
|
||||
|
||||
## `$48`: `refreshscreen` *dummy*
|
||||
## `$48`: `refreshscreen` [*dummy*=0]
|
||||
|
||||
## `$49`: `closetext`
|
||||
|
||||
|
@ -81,7 +81,7 @@ CheckPartyFullAfterContest: ; 4d9e5
|
||||
ld [hl], a
|
||||
xor a
|
||||
ld [wContestMon], a
|
||||
and a
|
||||
and a ; BUGCONTEST_CAUGHT_MON
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
@ -142,12 +142,12 @@ CheckPartyFullAfterContest: ; 4d9e5
|
||||
call CloseSRAM
|
||||
xor a
|
||||
ld [wContestMon], a
|
||||
ld a, $1
|
||||
ld a, BUGCONTEST_BOXED_MON
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.DidntCatchAnything: ; 4db35
|
||||
ld a, $2
|
||||
ld a, BUGCONTEST_NO_CATCH
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
|
@ -1061,12 +1061,13 @@ INCLUDE "data/decorations/decorations.asm"
|
||||
|
||||
DescribeDecoration:: ; 26f59
|
||||
ld a, b
|
||||
ld hl, JumpTable_DecorationDesc
|
||||
ld hl, .JumpTable
|
||||
rst JumpTable
|
||||
ret
|
||||
; 26f5f
|
||||
|
||||
JumpTable_DecorationDesc: ; 26f5f
|
||||
.JumpTable: ; 26f5f
|
||||
; entries correspond to DECODESC_* constants
|
||||
dw DecorationDesc_Poster
|
||||
dw DecorationDesc_LeftOrnament
|
||||
dw DecorationDesc_RightOrnament
|
||||
|
@ -465,14 +465,14 @@ Special_DayCareManOutside: ; 16936
|
||||
|
||||
.Load0:
|
||||
call PrintText
|
||||
xor a
|
||||
xor a ; FALSE
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.PartyFull:
|
||||
ld hl, .PartyFullText
|
||||
call PrintText
|
||||
ld a, $1
|
||||
ld a, TRUE
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; 16993
|
||||
|
@ -2,7 +2,7 @@ FruitTreeScript:: ; 44000
|
||||
callasm GetCurTreeFruit
|
||||
opentext
|
||||
copybytetovar CurFruit
|
||||
itemtotext $0, $0
|
||||
itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0
|
||||
writetext FruitBearingTreeText
|
||||
buttonsound
|
||||
callasm TryResetFruitTrees
|
||||
|
@ -21,7 +21,7 @@ CheckFirstMonIsEgg: ; 71ac
|
||||
ld a, [PartySpecies]
|
||||
ld [wd265], a
|
||||
cp EGG
|
||||
ld a, $1
|
||||
ld a, 1
|
||||
jr z, .egg
|
||||
xor a
|
||||
|
||||
|
@ -47,6 +47,7 @@ HealMachineAnim: ; 12324
|
||||
; 12365
|
||||
|
||||
.Pointers: ; 12365
|
||||
; entries correspond to HEALMACHINE_* constants
|
||||
dw .Pokecenter
|
||||
dw .ElmLab
|
||||
dw .HallOfFame
|
||||
|
@ -76,7 +76,7 @@ Kurt_SelectApricorn: ; 88055
|
||||
jr nz, .done
|
||||
|
||||
.nope
|
||||
xor a
|
||||
xor a ; FALSE
|
||||
|
||||
.done
|
||||
ld c, a
|
||||
|
@ -52,22 +52,22 @@ Special_CheckMagikarpLength: ; fbb32
|
||||
ld hl, PartyMonOT
|
||||
call SkipNames
|
||||
call CopyBytes
|
||||
ld a, 3
|
||||
ld a, MAGIKARPLENGTH_BEAT_RECORD
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.not_long_enough
|
||||
ld a, 2
|
||||
ld a, MAGIKARPLENGTH_TOO_SHORT
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.declined
|
||||
ld a, 1
|
||||
ld a, MAGIKARPLENGTH_REFUSED
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.not_magikarp
|
||||
xor a
|
||||
xor a ; MAGIKARPLENGTH_NOT_MAGIKARP
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; fbba9
|
||||
|
@ -13,7 +13,7 @@ RepelWoreOffScript:: ; 0x13619
|
||||
HiddenItemScript:: ; 0x13625
|
||||
opentext
|
||||
copybytetovar EngineBuffer3
|
||||
itemtotext 0, 0
|
||||
itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0
|
||||
writetext .found_text
|
||||
giveitem ITEM_FROM_MEM
|
||||
iffalse .bag_full
|
||||
|
@ -22,7 +22,7 @@ Special_MoveTutor: ; 4925b
|
||||
.enter_loop
|
||||
call CheckCanLearnMoveTutorMove
|
||||
jr nc, .loop
|
||||
xor a
|
||||
xor a ; FALSE
|
||||
ld [ScriptVar], a
|
||||
jr .quit
|
||||
|
||||
@ -35,10 +35,11 @@ Special_MoveTutor: ; 4925b
|
||||
|
||||
.GetMoveTutorMove: ; 492a5
|
||||
ld a, [ScriptVar]
|
||||
cp 1
|
||||
cp MOVETUTOR_FLAMETHROWER
|
||||
jr z, .flamethrower
|
||||
cp 2
|
||||
cp MOVETUTOR_THUNDERBOLT
|
||||
jr z, .thunderbolt
|
||||
; MOVETUTOR_ICE_BEAM
|
||||
ld a, ICE_BEAM
|
||||
ret
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
MANIA_OT_ID EQU 00518
|
||||
|
||||
SpecialGiveShuckle: ; 7305
|
||||
|
||||
; Adding to the party.
|
||||
@ -32,9 +34,9 @@ SpecialGiveShuckle: ; 7305
|
||||
; OT ID.
|
||||
ld hl, PartyMon1ID
|
||||
call AddNTimes
|
||||
ld a, $2
|
||||
ld a, HIGH(MANIA_OT_ID)
|
||||
ld [hli], a
|
||||
ld [hl], $6
|
||||
ld [hl], LOW(MANIA_OT_ID)
|
||||
|
||||
; Nickname.
|
||||
ld a, [PartyCount]
|
||||
@ -54,8 +56,7 @@ SpecialGiveShuckle: ; 7305
|
||||
|
||||
; Engine flag for this event.
|
||||
ld hl, wDailyFlags
|
||||
set 5, [hl]
|
||||
; setflag ENGINE_SHUCKLE_GIVEN
|
||||
set 5, [hl] ; ENGINE_SHUCKLE_GIVEN
|
||||
ld a, 1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
@ -85,10 +86,10 @@ SpecialReturnShuckle: ; 737e
|
||||
|
||||
; OT ID
|
||||
ld a, [hli]
|
||||
cp HIGH(00518)
|
||||
cp HIGH(MANIA_OT_ID)
|
||||
jr nz, .DontReturn
|
||||
ld a, [hl]
|
||||
cp LOW(00518)
|
||||
cp LOW(MANIA_OT_ID)
|
||||
jr nz, .DontReturn
|
||||
|
||||
; OT
|
||||
@ -115,28 +116,28 @@ SpecialReturnShuckle: ; 737e
|
||||
call AddNTimes
|
||||
ld a, [hl]
|
||||
cp 150
|
||||
ld a, $3
|
||||
ld a, SHUCKIE_HAPPY
|
||||
jr nc, .HappyToStayWithYou
|
||||
xor a ; take from pc
|
||||
ld [wPokemonWithdrawDepositParameter], a
|
||||
callfar RemoveMonFromPartyOrBox
|
||||
ld a, $2
|
||||
ld a, SHUCKIE_RETURNED
|
||||
.HappyToStayWithYou:
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.refused
|
||||
ld a, $1
|
||||
ld a, SHUCKIE_REFUSED
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.DontReturn:
|
||||
xor a
|
||||
xor a ; SHUCKIE_WRONG_MON
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.fainted
|
||||
ld a, $4
|
||||
ld a, SHUCKIE_FAINTED
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
|
@ -113,7 +113,7 @@ PokecenterNurseScript:
|
||||
pause 10
|
||||
special HealParty
|
||||
playmusic MUSIC_NONE
|
||||
writebyte 0 ; Machine is at a Pokemon Center
|
||||
writebyte HEALMACHINE_POKECENTER
|
||||
special HealMachineAnim
|
||||
pause 30
|
||||
special RestartMapMusic
|
||||
@ -251,25 +251,25 @@ DayToTextScript:
|
||||
if_equal THURSDAY, .Thursday
|
||||
if_equal FRIDAY, .Friday
|
||||
if_equal SATURDAY, .Saturday
|
||||
stringtotext .SundayText, 0
|
||||
stringtotext .SundayText, MEM_BUFFER_0
|
||||
end
|
||||
.Monday:
|
||||
stringtotext .MondayText, 0
|
||||
stringtotext .MondayText, MEM_BUFFER_0
|
||||
end
|
||||
.Tuesday:
|
||||
stringtotext .TuesdayText, 0
|
||||
stringtotext .TuesdayText, MEM_BUFFER_0
|
||||
end
|
||||
.Wednesday:
|
||||
stringtotext .WednesdayText, 0
|
||||
stringtotext .WednesdayText, MEM_BUFFER_0
|
||||
end
|
||||
.Thursday:
|
||||
stringtotext .ThursdayText, 0
|
||||
stringtotext .ThursdayText, MEM_BUFFER_0
|
||||
end
|
||||
.Friday:
|
||||
stringtotext .FridayText, 0
|
||||
stringtotext .FridayText, MEM_BUFFER_0
|
||||
end
|
||||
.Saturday:
|
||||
stringtotext .SaturdayText, 0
|
||||
stringtotext .SaturdayText, MEM_BUFFER_0
|
||||
end
|
||||
.SundayText:
|
||||
db "SUNDAY@"
|
||||
@ -298,7 +298,7 @@ RadioTowerRocketsScript:
|
||||
clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
|
||||
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
|
||||
specialphonecall SPECIALCALL_WEIRDBROADCAST
|
||||
setmapscene MAHOGANY_TOWN, $1
|
||||
setmapscene MAHOGANY_TOWN, 1
|
||||
end
|
||||
|
||||
BugContestResultsWarpScript:
|
||||
@ -307,7 +307,7 @@ BugContestResultsWarpScript:
|
||||
setevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
|
||||
clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
|
||||
setevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
|
||||
warp ROUTE_36_NATIONAL_PARK_GATE, $0, $4
|
||||
warp ROUTE_36_NATIONAL_PARK_GATE, 0, 4
|
||||
applymovement PLAYER, Movement_ContestResults_WalkAfterWarp
|
||||
|
||||
BugContestResultsScript:
|
||||
@ -321,7 +321,7 @@ BugContestResultsScript:
|
||||
farwritetext ContestResults_ReadyToJudgeText
|
||||
waitbutton
|
||||
special BugContestJudging
|
||||
RAM2MEM $0
|
||||
vartomem MEM_BUFFER_0
|
||||
if_equal 1, BugContestResults_FirstPlace
|
||||
if_equal 2, BugContestResults_SecondPlace
|
||||
if_equal 3, BugContestResults_ThirdPlace
|
||||
@ -349,14 +349,15 @@ BugContestResults_FinishUp
|
||||
special ContestReturnMons
|
||||
BugContestResults_DidNotLeaveMons
|
||||
special CheckPartyFullAfterContest
|
||||
if_equal $0, BugContestResults_CleanUp
|
||||
if_equal $2, BugContestResults_CleanUp
|
||||
if_equal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp
|
||||
if_equal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp
|
||||
; BUGCONTEST_BOXED_MON
|
||||
farwritetext ContestResults_PartyFullText
|
||||
waitbutton
|
||||
BugContestResults_CleanUp
|
||||
closetext
|
||||
setscene $0
|
||||
setmapscene ROUTE_35_NATIONAL_PARK_GATE, $0
|
||||
setscene 0
|
||||
setmapscene ROUTE_35_NATIONAL_PARK_GATE, 0
|
||||
setevent EVENT_BUG_CATCHING_CONTESTANT_1A
|
||||
setevent EVENT_BUG_CATCHING_CONTESTANT_2A
|
||||
setevent EVENT_BUG_CATCHING_CONTESTANT_3A
|
||||
@ -384,7 +385,7 @@ BugContestResults_CleanUp
|
||||
|
||||
BugContestResults_FirstPlace ; 0xbc31e
|
||||
setevent EVENT_GAVE_KURT_APRICORNS
|
||||
itemtotext SUN_STONE, $1
|
||||
itemtotext SUN_STONE, MEM_BUFFER_1
|
||||
farwritetext ContestResults_PlayerWonAPrizeText
|
||||
waitbutton
|
||||
verbosegiveitem SUN_STONE
|
||||
@ -393,7 +394,7 @@ BugContestResults_FirstPlace ; 0xbc31e
|
||||
; 0xbc332
|
||||
|
||||
BugContestResults_SecondPlace ; 0xbc332
|
||||
itemtotext EVERSTONE, $1
|
||||
itemtotext EVERSTONE, MEM_BUFFER_1
|
||||
farwritetext ContestResults_PlayerWonAPrizeText
|
||||
waitbutton
|
||||
verbosegiveitem EVERSTONE
|
||||
@ -402,7 +403,7 @@ BugContestResults_SecondPlace ; 0xbc332
|
||||
; 0xbc343
|
||||
|
||||
BugContestResults_ThirdPlace ; 0xbc343
|
||||
itemtotext GOLD_BERRY, $1
|
||||
itemtotext GOLD_BERRY, MEM_BUFFER_1
|
||||
farwritetext ContestResults_PlayerWonAPrizeText
|
||||
waitbutton
|
||||
verbosegiveitem GOLD_BERRY
|
||||
@ -1759,7 +1760,7 @@ RematchGiftFScript:
|
||||
end
|
||||
|
||||
GymStatue1Script:
|
||||
mapnametotext $0
|
||||
mapnametotext MEM_BUFFER_0
|
||||
opentext
|
||||
farwritetext GymStatue_CityGymText
|
||||
waitbutton
|
||||
@ -1767,7 +1768,7 @@ GymStatue1Script:
|
||||
end
|
||||
|
||||
GymStatue2Script:
|
||||
mapnametotext $0
|
||||
mapnametotext MEM_BUFFER_0
|
||||
opentext
|
||||
farwritetext GymStatue_CityGymText
|
||||
buttonsound
|
||||
@ -1813,18 +1814,18 @@ CoinVendor_IntroScript: ; 0xbcde0
|
||||
loadmenudata .MenuDataHeader
|
||||
verticalmenu
|
||||
closewindow
|
||||
if_equal $1, .Buy50
|
||||
if_equal $2, .Buy500
|
||||
if_equal 1, .Buy50
|
||||
if_equal 2, .Buy500
|
||||
jump .Cancel
|
||||
; 0xbcdf7
|
||||
|
||||
.Buy50: ; 0xbcdf7
|
||||
checkcoins MAX_COINS - 50
|
||||
if_equal $0, .CoinCaseFull
|
||||
checkmoney $0, 1000
|
||||
if_equal $2, .NotEnoughMoney
|
||||
if_equal HAVE_MORE, .CoinCaseFull
|
||||
checkmoney YOUR_MONEY, 1000
|
||||
if_equal HAVE_LESS, .NotEnoughMoney
|
||||
givecoins 50
|
||||
takemoney $0, 1000
|
||||
takemoney YOUR_MONEY, 1000
|
||||
waitsfx
|
||||
playsound SFX_TRANSACTION
|
||||
farwritetext CoinVendor_Buy50CoinsText
|
||||
@ -1834,11 +1835,11 @@ CoinVendor_IntroScript: ; 0xbcde0
|
||||
|
||||
.Buy500: ; 0xbce1b
|
||||
checkcoins MAX_COINS - 500
|
||||
if_equal $0, .CoinCaseFull
|
||||
checkmoney $0, 10000
|
||||
if_equal $2, .NotEnoughMoney
|
||||
if_equal HAVE_MORE, .CoinCaseFull
|
||||
checkmoney YOUR_MONEY, 10000
|
||||
if_equal HAVE_LESS, .NotEnoughMoney
|
||||
givecoins 500
|
||||
takemoney $0, 10000
|
||||
takemoney YOUR_MONEY, 10000
|
||||
waitsfx
|
||||
playsound SFX_TRANSACTION
|
||||
farwritetext CoinVendor_Buy500CoinsText
|
||||
|
@ -4,7 +4,7 @@ Script_BattleWhiteout:: ; 0x124c1
|
||||
; 0x124c8
|
||||
|
||||
Script_OverworldWhiteout:: ; 0x124c8
|
||||
refreshscreen $0
|
||||
refreshscreen
|
||||
callasm OverworldBGMap
|
||||
|
||||
Script_Whiteout: ; 0x124ce
|
||||
|
@ -128,7 +128,7 @@ CheckPokeItem:: ; 44654
|
||||
push bc
|
||||
push de
|
||||
farcall SelectMonFromParty
|
||||
ld a, $2
|
||||
ld a, POKEMAIL_REFUSED
|
||||
jr c, .pop_return
|
||||
|
||||
ld a, [CurPartyMon]
|
||||
@ -137,7 +137,7 @@ CheckPokeItem:: ; 44654
|
||||
call AddNTimes
|
||||
ld d, [hl]
|
||||
farcall ItemIsMail
|
||||
ld a, $3
|
||||
ld a, POKEMAIL_NO_MAIL
|
||||
jr nc, .pop_return
|
||||
|
||||
ld a, BANK(sPartyMail)
|
||||
@ -162,7 +162,7 @@ CheckPokeItem:: ; 44654
|
||||
cp "@"
|
||||
jr z, .done
|
||||
cp c
|
||||
ld a, $0
|
||||
ld a, POKEMAIL_WRONG_MAIL
|
||||
jr nz, .close_sram_return
|
||||
inc hl
|
||||
inc de
|
||||
@ -173,12 +173,12 @@ CheckPokeItem:: ; 44654
|
||||
|
||||
.done
|
||||
farcall CheckCurPartyMonFainted
|
||||
ld a, $4
|
||||
ld a, POKEMAIL_LAST_MON
|
||||
jr c, .close_sram_return
|
||||
xor a
|
||||
ld [wPokemonWithdrawDepositParameter], a
|
||||
farcall RemoveMonFromPartyOrBox
|
||||
ld a, $1
|
||||
ld a, POKEMAIL_CORRECT
|
||||
|
||||
.close_sram_return
|
||||
call CloseSRAM
|
||||
|
@ -437,7 +437,7 @@ WrongNumber: ; 90233
|
||||
; 90241
|
||||
|
||||
Script_ReceivePhoneCall: ; 0x90241
|
||||
refreshscreen $0
|
||||
refreshscreen
|
||||
callasm RingTwice_StartCall
|
||||
ptcall wPhoneScriptPointer
|
||||
waitbutton
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -128,7 +128,7 @@ ScriptCommandTable:
|
||||
dw Script_warp ; 3c
|
||||
dw Script_readmoney ; 3d
|
||||
dw Script_readcoins ; 3e
|
||||
dw Script_RAM2MEM ; 3f
|
||||
dw Script_vartomem ; 3f
|
||||
dw Script_pokenamemem ; 40
|
||||
dw Script_itemtotext ; 41
|
||||
dw Script_mapnametotext ; 42
|
||||
@ -728,14 +728,14 @@ Script_askforphonenumber:
|
||||
ld c, a
|
||||
farcall AddPhoneNumber
|
||||
jr c, .phonefull
|
||||
xor a
|
||||
xor a ; PHONE_CONTACT_GOT
|
||||
jr .done
|
||||
.phonefull
|
||||
ld a, 1
|
||||
ld a, PHONE_CONTACTS_FULL
|
||||
jr .done
|
||||
.refused
|
||||
call GetScriptByte
|
||||
ld a, 2
|
||||
ld a, PHONE_CONTACT_REFUSED
|
||||
.done
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
@ -1880,7 +1880,7 @@ Script_checkver:
|
||||
|
||||
Script_pokenamemem:
|
||||
; script command 0x40
|
||||
; parameters: pokemon (0 to use ScriptVar), memory
|
||||
; parameters: pokemon (0 aka USE_SCRIPT_VAR to use ScriptVar), memory
|
||||
|
||||
call GetScriptByte
|
||||
and a
|
||||
@ -1893,7 +1893,7 @@ Script_pokenamemem:
|
||||
|
||||
ConvertMemToText:
|
||||
call GetScriptByte
|
||||
cp 3
|
||||
cp NUM_MEM_BUFFERS
|
||||
jr c, .ok
|
||||
xor a
|
||||
.ok
|
||||
@ -1907,10 +1907,10 @@ CopyConvertedText:
|
||||
|
||||
Script_itemtotext:
|
||||
; script command 0x41
|
||||
; parameters: item (0 to use ScriptVar), memory
|
||||
; parameters: item (0 aka USE_SCRIPT_VAR to use ScriptVar), memory
|
||||
|
||||
call GetScriptByte
|
||||
and a
|
||||
and a ; USE_SCRIPT_VAR
|
||||
jr nz, .ok
|
||||
ld a, [ScriptVar]
|
||||
.ok
|
||||
@ -1999,7 +1999,7 @@ Script_readcoins:
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
|
||||
Script_RAM2MEM:
|
||||
Script_vartomem:
|
||||
; script command 0x3f
|
||||
; parameters: memory
|
||||
|
||||
@ -2150,15 +2150,15 @@ Script_checkmoney:
|
||||
farcall CompareMoney
|
||||
|
||||
CompareMoneyAction:
|
||||
jr c, .two
|
||||
jr z, .one
|
||||
ld a, 0
|
||||
jr c, .less
|
||||
jr z, .exact
|
||||
ld a, HAVE_MORE
|
||||
jr .done
|
||||
.one
|
||||
ld a, 1
|
||||
.exact
|
||||
ld a, HAVE_AMOUNT
|
||||
jr .done
|
||||
.two
|
||||
ld a, 2
|
||||
.less
|
||||
ld a, HAVE_LESS
|
||||
.done
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
@ -2166,9 +2166,9 @@ CompareMoneyAction:
|
||||
GetMoneyAccount:
|
||||
call GetScriptByte
|
||||
and a
|
||||
ld de, Money
|
||||
ld de, Money ; YOUR_MONEY
|
||||
ret z
|
||||
ld de, wMomsMoney
|
||||
ld de, wMomsMoney ; MOMS_MONEY
|
||||
ret
|
||||
|
||||
LoadMoneyAmountToMem:
|
||||
@ -2431,7 +2431,7 @@ Script_checkflag:
|
||||
ld e, a
|
||||
call GetScriptByte
|
||||
ld d, a
|
||||
ld b, 2 ; check
|
||||
ld b, CHECK_FLAG
|
||||
call _EngineFlagAction
|
||||
ld a, c
|
||||
and a
|
||||
@ -2667,7 +2667,7 @@ Script_loadbytec2cf:
|
||||
ld [wc2cf], a
|
||||
ret
|
||||
|
||||
ld c, c ; XXX
|
||||
db $49 ; XXX
|
||||
|
||||
Script_closetext:
|
||||
; script command 0x49
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user