mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
More Battle Tower map script constants, fewer raw hex values
This commit is contained in:
parent
2ab60fa8a4
commit
eb3102200f
@ -1,4 +1,13 @@
|
||||
; BattleTowerAction arguments (see mobile/battle_tower_5c.asm)
|
||||
BATTLETOWER_NROFPKMNS EQU 3
|
||||
BATTLETOWER_NROFTRAINERS EQU 7
|
||||
|
||||
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
|
||||
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
|
||||
|
||||
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||
|
||||
; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
|
||||
const_def
|
||||
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
|
||||
const BATTLETOWERACTION_SET_EXPLANATION_READ
|
||||
@ -33,22 +42,20 @@
|
||||
const BATTLETOWERACTION_CHOOSEREWARD ; save options
|
||||
const BATTLETOWERACTION_SAVEOPTIONS
|
||||
|
||||
; sBattleTowerChallengeState
|
||||
; BattleTowerAction return values
|
||||
; - from BATTLETOWERACTION_CHECKMOBILEEVENT
|
||||
MOBILE_EVENT_OBJECT_GS_BALL EQU $b
|
||||
|
||||
; BattleTowerText arguments (see engine/events/battle_tower/trainer_text.asm)
|
||||
const_value set 1
|
||||
const BATTLETOWERTEXT_INTRO
|
||||
const BATTLETOWERTEXT_WIN_TEXT
|
||||
const BATTLETOWERTEXT_LOSS_TEXT
|
||||
|
||||
; sBattleTowerChallengeState values
|
||||
const_def
|
||||
const BATTLETOWER_NO_CHALLENGE
|
||||
const BATTLETOWER_SAVED_AND_LEFT
|
||||
const BATTLETOWER_CHALLENGE_IN_PROGESS
|
||||
const BATTLETOWER_WON_CHALLENGE
|
||||
const BATTLETOWER_RECEIVED_REWARD
|
||||
|
||||
BATTLETOWER_NROFPKMNS EQU 3
|
||||
BATTLETOWER_NROFTRAINERS EQU 7
|
||||
|
||||
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
|
||||
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
|
||||
|
||||
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||
|
||||
; return value from BattleTowerAction(BATTLETOWERACTION_CHECKMOBILEEVENT)
|
||||
MOBILE_EVENT_OBJECT_GS_BALL EQU $b
|
||||
|
@ -240,14 +240,14 @@ CMDQUEUE_STONETABLE EQU 2
|
||||
const BUGCONTEST_BOXED_MON ; 1
|
||||
const BUGCONTEST_NO_CATCH ; 2
|
||||
|
||||
; used by HealMachineAnim
|
||||
; HealMachineAnim writebyte arguments
|
||||
; 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
|
||||
; Special_UnownPuzzle writebyte arguments
|
||||
; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm)
|
||||
const_def
|
||||
const UNOWNPUZZLE_KABUTO ; 0
|
||||
@ -256,7 +256,7 @@ CMDQUEUE_STONETABLE EQU 2
|
||||
const UNOWNPUZZLE_HO_OH ; 3
|
||||
NUM_UNOWN_PUZZLES EQU const_value
|
||||
|
||||
; used by Special_DisplayUnownWords
|
||||
; Special_DisplayUnownWords writebyte arguments
|
||||
; UnownWalls and MenuDataHeaders_UnownWalls indexes (see data/unown_walls.asm)
|
||||
const_def
|
||||
const UNOWNWORDS_ESCAPE ; 0
|
||||
@ -264,7 +264,7 @@ NUM_UNOWN_PUZZLES EQU const_value
|
||||
const UNOWNWORDS_WATER ; 2
|
||||
const UNOWNWORDS_HO_OH ; 3
|
||||
|
||||
; used by Special_MoveTutor
|
||||
; Special_MoveTutor writebyte arguments
|
||||
const_value set 1
|
||||
const MOVETUTOR_FLAMETHROWER ; 1
|
||||
const MOVETUTOR_THUNDERBOLT ; 2
|
||||
|
@ -2452,7 +2452,7 @@ WinTrainerBattle: ; 3cfa4
|
||||
ld c, 40
|
||||
call DelayFrames
|
||||
call EmptyBattleTextBox
|
||||
ld c, $3
|
||||
ld c, BATTLETOWERTEXT_LOSS_TEXT
|
||||
farcall BattleTowerText
|
||||
call WaitPressAorB_BlinkCursor
|
||||
ld hl, wPayDayMoney
|
||||
@ -3022,7 +3022,7 @@ LostBattle: ; 3d38e
|
||||
call DelayFrames
|
||||
|
||||
call EmptyBattleTextBox
|
||||
ld c, 2
|
||||
ld c, BATTLETOWERTEXT_WIN_TEXT
|
||||
farcall BattleTowerText
|
||||
call WaitPressAorB_BlinkCursor
|
||||
call ClearTileMap
|
||||
|
@ -1659,11 +1659,11 @@ ret_170bd2: ; 170bd2
|
||||
SpecialCheckForBattleTowerRules: ; 170bd3
|
||||
farcall CheckForBattleTowerRules
|
||||
jr c, .asm_170bde
|
||||
xor a
|
||||
xor a ; FALSE
|
||||
jr .asm_170be0
|
||||
|
||||
.asm_170bde
|
||||
ld a, $1
|
||||
ld a, TRUE
|
||||
|
||||
.asm_170be0
|
||||
ld [ScriptVar], a
|
||||
|
@ -67,17 +67,17 @@ ReceptionistScript_0x9e3e2:
|
||||
|
||||
Script_Menu_ChallengeExplanationCancel: ; 0x9e3fc
|
||||
writetext Text_WantToGoIntoABattleRoom
|
||||
writebyte $1
|
||||
writebyte TRUE
|
||||
special Special_Menu_ChallengeExplanationCancel
|
||||
if_equal $1, Script_ChooseChallenge
|
||||
if_equal $2, Script_BattleTowerExplanation
|
||||
if_equal 1, Script_ChooseChallenge
|
||||
if_equal 2, Script_BattleTowerExplanation
|
||||
jump Script_BattleTowerHopeToServeYouAgain
|
||||
|
||||
Script_ChooseChallenge: ; 0x9e40f
|
||||
writebyte BATTLETOWERACTION_RESETDATA ; ResetBattleTowerTrainerSRAM
|
||||
special BattleTowerAction
|
||||
special SpecialCheckForBattleTowerRules
|
||||
if_not_equal $0, Script_WaitButton
|
||||
if_not_equal FALSE, Script_WaitButton
|
||||
writetext Text_SaveBeforeEnteringBattleRoom
|
||||
yesorno
|
||||
iffalse Script_Menu_ChallengeExplanationCancel
|
||||
@ -193,7 +193,7 @@ UnreferencedScript_0x9e4ea:
|
||||
special BattleTowerAction
|
||||
if_not_equal $0, Script_MayNotEnterABattleRoomUnderL70
|
||||
special SpecialCheckForBattleTowerRules
|
||||
if_not_equal $0, Script_WaitButton
|
||||
if_not_equal FALSE, Script_WaitButton
|
||||
writebyte BATTLETOWERACTION_05
|
||||
special BattleTowerAction
|
||||
if_equal $0, .zero
|
||||
|
@ -29,7 +29,7 @@ Script_BattleRoomLoop: ; 0x9f425
|
||||
waitsfx
|
||||
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn
|
||||
opentext
|
||||
battletowertext $1
|
||||
battletowertext BATTLETOWERTEXT_INTRO
|
||||
buttonsound
|
||||
closetext
|
||||
special BattleTowerBattle ; calls predef startbattle
|
||||
|
@ -33,7 +33,7 @@ BurnedTower1F_MapScriptHeader:
|
||||
.Next:
|
||||
checkevent EVENT_RELEASED_THE_BEASTS
|
||||
iftrue .Done
|
||||
changeblock 6, 14, $9 ; ladder
|
||||
changeblock 6, 14, $09 ; ladder
|
||||
.Done:
|
||||
return
|
||||
|
||||
|
@ -28,7 +28,7 @@ BurnedTowerB1F_MapScriptHeader:
|
||||
.LadderCallback:
|
||||
checkevent EVENT_RELEASED_THE_BEASTS
|
||||
iftrue .NoChange
|
||||
changeblock 6, 14, $2
|
||||
changeblock 6, 14, $02
|
||||
.NoChange:
|
||||
return
|
||||
|
||||
|
@ -23,7 +23,7 @@ UnknownScript_0x7d781:
|
||||
jump UnknownScript_0x7d791
|
||||
|
||||
UnknownScript_0x7d78a:
|
||||
changeblock 16, 4, $d
|
||||
changeblock 16, 4, $0d
|
||||
jump UnknownScript_0x7d791
|
||||
|
||||
UnknownScript_0x7d791:
|
||||
@ -31,15 +31,15 @@ UnknownScript_0x7d791:
|
||||
iftrue .Layout2
|
||||
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
|
||||
iftrue .Layout3
|
||||
changeblock 10, 8, $d
|
||||
changeblock 10, 8, $0d
|
||||
return
|
||||
|
||||
.Layout2:
|
||||
changeblock 4, 10, $d
|
||||
changeblock 4, 10, $0d
|
||||
return
|
||||
|
||||
.Layout3:
|
||||
changeblock 10, 12, $d
|
||||
changeblock 10, 12, $0d
|
||||
return
|
||||
|
||||
UnknownScript_0x7d7ac:
|
||||
|
@ -24,7 +24,7 @@ GoldenrodDeptStoreRoof_MapScriptHeader:
|
||||
|
||||
.ChangeBlock:
|
||||
changeblock 0, 2, $3f
|
||||
changeblock 0, 4, $f
|
||||
changeblock 0, 4, $0f
|
||||
return
|
||||
|
||||
.CheckSaleChangeClerk:
|
||||
|
@ -27,7 +27,7 @@ LancesRoom_MapScriptHeader:
|
||||
.KeepDoorsClosed:
|
||||
checkevent EVENT_LANCES_ROOM_EXIT_OPEN
|
||||
iffalse .OpenDoors
|
||||
changeblock 4, 0, $b
|
||||
changeblock 4, 0, $0b
|
||||
.OpenDoors:
|
||||
return
|
||||
|
||||
@ -69,7 +69,7 @@ LanceScript_0x180e7b:
|
||||
waitbutton
|
||||
closetext
|
||||
playsound SFX_ENTER_DOOR
|
||||
changeblock 4, 0, $b
|
||||
changeblock 4, 0, $0b
|
||||
reloadmappart
|
||||
closetext
|
||||
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
|
||||
|
@ -22,7 +22,7 @@ RadioTower3F_MapScriptHeader:
|
||||
|
||||
.Change:
|
||||
changeblock 14, 2, $2a
|
||||
changeblock 14, 4, $1
|
||||
changeblock 14, 4, $01
|
||||
return
|
||||
|
||||
RadioTower3FSuperNerdScript:
|
||||
@ -144,7 +144,7 @@ UnknownScript_0x5e605:
|
||||
setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
|
||||
playsound SFX_ENTER_DOOR
|
||||
changeblock 14, 2, $2a
|
||||
changeblock 14, 4, $1
|
||||
changeblock 14, 4, $01
|
||||
reloadmappart
|
||||
closetext
|
||||
waitsfx
|
||||
|
@ -153,8 +153,8 @@ UnknownScript_0x1a4e1e:
|
||||
scall UnknownScript_0x1a4e7f
|
||||
UnknownScript_0x1a4e21:
|
||||
askforphonenumber PHONE_COOLTRAINERF_BETH
|
||||
if_equal $1, UnknownScript_0x1a4e8f
|
||||
if_equal $2, UnknownScript_0x1a4e8b
|
||||
if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a4e8f
|
||||
if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a4e8b
|
||||
trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
|
||||
scall UnknownScript_0x1a4e83
|
||||
jump UnknownScript_0x1a4e87
|
||||
|
@ -30,8 +30,8 @@ RuinsOfAlphAerodactylChamber_MapScriptHeader:
|
||||
return
|
||||
|
||||
.FloorClosed:
|
||||
changeblock 2, 2, $1
|
||||
changeblock 4, 2, $2
|
||||
changeblock 2, 2, $01
|
||||
changeblock 4, 2, $02
|
||||
return
|
||||
|
||||
.WallOpenScript:
|
||||
|
@ -31,8 +31,8 @@ RuinsOfAlphHoOhChamber_MapScriptHeader:
|
||||
return
|
||||
|
||||
.FloorClosed:
|
||||
changeblock 2, 2, $1
|
||||
changeblock 4, 2, $2
|
||||
changeblock 2, 2, $01
|
||||
changeblock 4, 2, $02
|
||||
return
|
||||
|
||||
.WallOpenScript:
|
||||
|
@ -34,8 +34,8 @@ RuinsOfAlphKabutoChamber_MapScriptHeader:
|
||||
return
|
||||
|
||||
.FloorClosed:
|
||||
changeblock 2, 2, $1
|
||||
changeblock 4, 2, $2
|
||||
changeblock 2, 2, $01
|
||||
changeblock 4, 2, $02
|
||||
return
|
||||
|
||||
.WallOpenScript:
|
||||
|
@ -31,8 +31,8 @@ RuinsOfAlphOmanyteChamber_MapScriptHeader:
|
||||
return
|
||||
|
||||
.FloorClosed:
|
||||
changeblock 2, 2, $1
|
||||
changeblock 4, 2, $2
|
||||
changeblock 2, 2, $01
|
||||
changeblock 4, 2, $02
|
||||
return
|
||||
|
||||
.WallOpenScript:
|
||||
|
@ -79,7 +79,7 @@ TinTower1F_MapScriptHeader:
|
||||
.StairsCallback:
|
||||
checkevent EVENT_GOT_RAINBOW_WING
|
||||
iftrue .DontHideStairs
|
||||
changeblock 10, 2, $9
|
||||
changeblock 10, 2, $09
|
||||
.DontHideStairs:
|
||||
return
|
||||
|
||||
|
@ -429,10 +429,10 @@ Function17d1f1: ; 17d1f1
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Parameter: [ScriptVar] = 0..1
|
||||
;
|
||||
; if [ScriptVar] == 0
|
||||
; if [ScriptVar] == FALSE
|
||||
; Show japanese menu options
|
||||
; - News - News - ??? - Cancel
|
||||
; if [ScriptVar] == 1
|
||||
; if [ScriptVar] == TRUE
|
||||
; Show BattleTower-Menu with 3 options in english language
|
||||
; - Challenge - Explanation - Cancel
|
||||
Special_Menu_ChallengeExplanationCancel: ; 17d224
|
||||
|
Loading…
x
Reference in New Issue
Block a user