ref: f16d60e3f921b2e81cae9df47366d86423dfe795
parent: fdfbeb7e5fa1e4fd9f7bd807ad5f987505d81128
author: IIMarckus <[email protected]>
date: Wed Jun 24 17:20:04 EDT 2015
Update some event flags.
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -42,6 +42,7 @@
EVENT_DUDE_TALKED_TO_YOU EQU $041
EVENT_LEARNED_TO_CATCH_POKEMON EQU $042
EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON EQU $043
+EVENT_BEAT_ELITE_FOUR EQU $044
EVENT_GOT_SHUCKIE EQU $045
EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM EQU $046
EVENT_GOT_SUNNY_DAY_FROM_RADIO_TOWER EQU $047
@@ -563,6 +564,7 @@
EVENT_BEAT_SAGE_GAKU EQU $5c9
EVENT_BEAT_SAGE_MASA EQU $5ca
EVENT_BEAT_SAGE_KOJI EQU $5cb
+EVENT_RIVAL_SPROUT_TOWER EQU $6c4
EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE EQU $6ff
EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER EQU $700
EVENT_ELMS_AIDE_IN_LAB EQU $701
@@ -570,7 +572,10 @@
EVENT_BOULDER_IN_ICE_PATH_2 EQU $70e
EVENT_BOULDER_IN_ICE_PATH_3 EQU $70f
EVENT_BOULDER_IN_ICE_PATH_4 EQU $710
+EVENT_OPENED_MT_SILVER EQU $74f
EVENT_FOUGHT_SNORLAX EQU $750
+EVENT_RED_IN_MT_SILVER EQU $762
+EVENT_TELEPORT_GUY EQU $77c
EVENT_PICKED_UP_FOCUS_BAND EQU $77d
EVENT_PICKED_UP_GOLD_BERRY_FROM_HO_OH_ITEM_ROOM EQU $794
EVENT_PICKED_UP_MYSTERYBERRY_FROM_HO_OH_ITEM_ROOM EQU $795
--- a/engine/buena_phone_scripts.asm
+++ b/engine/buena_phone_scripts.asm
@@ -66,7 +66,7 @@
end
UnknownScript_0xa0b77:
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0xa0b82
random $b
jump UnknownScript_0xa0b84
--- a/engine/more_phone_scripts.asm
+++ b/engine/more_phone_scripts.asm
@@ -1219,7 +1219,7 @@
jump UnknownScript_0xa0484
UnknownScript_0xa0848:
- checkevent $074f
+ checkevent EVENT_OPENED_MT_SILVER
iftrue UnknownScript_0xa08e0
checkevent EVENT_FOUGHT_SNORLAX
iftrue UnknownScript_0xa08d8
@@ -1229,7 +1229,7 @@
iftrue UnknownScript_0xa08f0
checkflag ENGINE_FLYPOINT_VERMILION
iftrue UnknownScript_0xa08c8
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0xa08c0
checkflag ENGINE_RISINGBADGE
iftrue UnknownScript_0xa08b8
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -617,8 +617,8 @@
setevent $07af
setevent $07ae
setevent $07cf
- setflag $000e
- setflag $0017
+ setflag ENGINE_ROCKET_SIGNAL_ON_CH20
+ setflag ENGINE_ROCKETS_IN_MAHOGANY
variablesprite $4, $52
variablesprite $5, $4
variablesprite $6, $35
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -100,7 +100,7 @@
loadfont
checkevent EVENT_GOT_SS_TICKET_FROM_ELM
iftrue UnknownScript_0x78bee
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue ElmGiveTicketScript
UnknownScript_0x78bee: ; 0x78bee
checkevent EVENT_GOT_MASTER_BALL_FROM_ELM
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -23,7 +23,7 @@
; 0x1988e8
UnknownScript_0x1988e8: ; 0x1988e8
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iffalse UnknownScript_0x198908
checkitem COIN_CASE
iffalse UnknownScript_0x1988fd
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -11,7 +11,7 @@
; 0x56bf9
UnknownScript_0x56bf9: ; 0x56bf9
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iffalse UnknownScript_0x56c19
checkitem COIN_CASE
iffalse UnknownScript_0x56c0e
--- a/maps/HallOfFame.asm
+++ b/maps/HallOfFame.asm
@@ -34,10 +34,10 @@
pause 15
writebyte $2
special Function12324
- setevent $0044
- setevent $077c
- setevent $06c4
- clearevent $0762
+ setevent EVENT_BEAT_ELITE_FOUR
+ setevent EVENT_TELEPORT_GUY
+ setevent EVENT_RIVAL_SPROUT_TOWER
+ clearevent EVENT_RED_IN_MT_SILVER
setevent $0737
clearevent $0738
domaptrigger GROUP_SPROUT_TOWER_3F, MAP_SPROUT_TOWER_3F, $1
--- a/maps/IndigoPlateauPokeCenter1F.asm
+++ b/maps/IndigoPlateauPokeCenter1F.asm
@@ -155,13 +155,13 @@
jumptextfaceplayer UnknownText_0x180178
; 0x180139
-GrampsScript_0x180139: ; 0x180139
+TeleportGuyScript:
faceplayer
loadfont
- writetext UnknownText_0x180335
+ writetext TeleportGuyText1
yesorno
- iffalse UnknownScript_0x180154
- writetext UnknownText_0x1803e7
+ iffalse .No
+ writetext TeleportGuyYesText
closetext
loadmovesprites
playsound SFX_WARP_TO
@@ -169,23 +169,20 @@
waitbutton
warp GROUP_NEW_BARK_TOWN, MAP_NEW_BARK_TOWN, $d, $6
end
-; 0x180154
-UnknownScript_0x180154: ; 0x180154
- writetext UnknownText_0x180411
+.No
+ writetext TeleportGuyNoText
closetext
loadmovesprites
end
-; 0x18015a
-JynxScript_0x18015a: ; 0x18015a
+AbraScript:
loadfont
- writetext UnknownText_0x180433
+ writetext AbraText
cry ABRA
closetext
loadmovesprites
end
-; 0x180164
MovementData_0x180164: ; 0x180164
step_up
@@ -285,7 +282,7 @@
done
; 0x180335
-UnknownText_0x180335: ; 0x180335
+TeleportGuyText1:
text "Ah! You're chal-"
line "lenging the ELITE"
@@ -304,25 +301,22 @@
para "Would you like to"
line "go home now?"
done
-; 0x1803e7
-UnknownText_0x1803e7: ; 0x1803e7
+TeleportGuyYesText:
text "OK, OK. Picture"
line "your house in your"
cont "mind…"
done
-; 0x180411
-UnknownText_0x180411: ; 0x180411
+TeleportGuyNoText:
text "OK, OK. The best"
line "of luck to you!"
done
; 0x180433
-UnknownText_0x180433: ; 0x180433
+AbraText:
text "ABRA: Aabra…"
done
-; 0x180441
IndigoPlateauPokeCenter1F_MapEventHeader: ; 0x180441
; filler
@@ -349,6 +343,6 @@
person_event SPRITE_CLERK, 11, 15, $6, $0, 255, 255, $0, 0, ClerkScript_0x18012f, $ffff
person_event SPRITE_COOLTRAINER_M, 15, 15, $2, $22, 255, 255, $0, 0, CooltrainerMScript_0x180136, $ffff
person_event SPRITE_SILVER, 13, 20, $7, $0, 255, 255, $0, 0, ObjectEvent, $077b
- person_event SPRITE_GRAMPS, 13, 5, $6, $0, 255, 255, $90, 0, GrampsScript_0x180139, $077c
- person_event SPRITE_JYNX, 13, 4, $16, $0, 255, 255, $b0, 0, JynxScript_0x18015a, $077c
+ person_event SPRITE_GRAMPS, 13, 5, $6, $0, 255, 255, $90, 0, TeleportGuyScript, EVENT_TELEPORT_GUY
+ person_event SPRITE_JYNX, 13, 4, $16, $0, 255, 255, $b0, 0, AbraScript, EVENT_TELEPORT_GUY
; 0x1804b9
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -125,7 +125,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x5c0f3
UnknownScript_0x5c0ad: ; 0x5c0ad
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x5c0e6
UnknownScript_0x5c0b3: ; 0x5c0b3
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/OaksLab.asm
+++ b/maps/OaksLab.asm
@@ -13,7 +13,7 @@
OakScript_0x19b3c8: ; 0x19b3c8
faceplayer
loadfont
- checkevent $074f
+ checkevent EVENT_OPENED_MT_SILVER
iftrue UnknownScript_0x19b3ea
checkevent $00e1
iftrue UnknownScript_0x19b3dd
@@ -40,7 +40,7 @@
UnknownScript_0x19b3f7: ; 0x19b3f7
writetext UnknownText_0x19b4fc
keeptextopen
- setevent $074f
+ setevent EVENT_OPENED_MT_SILVER
jump UnknownScript_0x19b3ea
; 0x19b401
--- a/maps/OlivineLighthouse2F.asm
+++ b/maps/OlivineLighthouse2F.asm
@@ -93,7 +93,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x5b01b
UnknownScript_0x5afe8: ; 0x5afe8
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x5b00e
UnknownScript_0x5afee: ; 0x5afee
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route26.asm
+++ b/maps/Route26.asm
@@ -94,7 +94,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a4db6
UnknownScript_0x1a4d96: ; 0x1a4d96
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a4da9
UnknownScript_0x1a4d9c: ; 0x1a4d9c
loadtrainer COOLTRAINERM, GAVEN3
@@ -245,7 +245,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a4e72
UnknownScript_0x1a4e52: ; 0x1a4e52
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a4e65
UnknownScript_0x1a4e58: ; 0x1a4e58
loadtrainer COOLTRAINERF, BETH1
--- a/maps/Route27.asm
+++ b/maps/Route27.asm
@@ -135,7 +135,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a093c
UnknownScript_0x1a091c: ; 0x1a091c
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a092f
UnknownScript_0x1a0922: ; 0x1a0922
loadtrainer BIRD_KEEPER, JOSE2
@@ -337,7 +337,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a0a26
UnknownScript_0x1a0a06: ; 0x1a0a06
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a0a19
UnknownScript_0x1a0a0c: ; 0x1a0a0c
loadtrainer COOLTRAINERF, REENA1
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -85,7 +85,7 @@
if_equal $1, UnknownScript_0x1a1711
if_equal $0, UnknownScript_0x1a1717
UnknownScript_0x1a16ff: ; 0x1a16ff
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a174b
UnknownScript_0x1a1705: ; 0x1a1705
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -81,7 +81,7 @@
if_equal $1, UnknownScript_0x1a54c4
if_equal $0, UnknownScript_0x1a54ca
UnknownScript_0x1a54b2: ; 0x1a54b2
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a54fe
UnknownScript_0x1a54b8: ; 0x1a54b8
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -266,7 +266,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1905e8
UnknownScript_0x1905a2: ; 0x1905a2
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1905db
UnknownScript_0x1905a8: ; 0x1905a8
checkflag $004a
@@ -447,7 +447,7 @@
if_equal $1, UnknownScript_0x19069e
if_equal $0, UnknownScript_0x1906a4
UnknownScript_0x19068c: ; 0x19068c
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1906d8
UnknownScript_0x190692: ; 0x190692
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route33.asm
+++ b/maps/Route33.asm
@@ -73,7 +73,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1ac0bc
UnknownScript_0x1ac076: ; 0x1ac076
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1ac0af
UnknownScript_0x1ac07c: ; 0x1ac07c
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -149,7 +149,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x78128
UnknownScript_0x780e2: ; 0x780e2
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x7811b
UnknownScript_0x780e8: ; 0x780e8
checkflag $004b
@@ -306,7 +306,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x7820a
UnknownScript_0x781c4: ; 0x781c4
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x781fd
UnknownScript_0x781ca: ; 0x781ca
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -295,7 +295,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x19ca26
UnknownScript_0x19c9e0: ; 0x19c9e0
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19ca19
UnknownScript_0x19c9e6: ; 0x19c9e6
checkflag $004b
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -239,7 +239,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1941ab
UnknownScript_0x194165: ; 0x194165
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19419e
UnknownScript_0x19416b: ; 0x19416b
checkflag $004b
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -127,7 +127,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a1ded
UnknownScript_0x1a1da7: ; 0x1a1da7
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a1de0
UnknownScript_0x1a1dad: ; 0x1a1dad
checkevent EVENT_CLEARED_RADIO_TOWER
@@ -298,7 +298,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a1ee0
UnknownScript_0x1a1e9a: ; 0x1a1e9a
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a1ed3
UnknownScript_0x1a1ea0: ; 0x1a1ea0
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -93,7 +93,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a92d3
UnknownScript_0x1a92a0: ; 0x1a92a0
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a92c6
UnknownScript_0x1a92a6: ; 0x1a92a6
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -140,7 +140,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x19d123
UnknownScript_0x19d0f0: ; 0x19d0f0
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19d116
UnknownScript_0x19d0f6: ; 0x19d0f6
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
@@ -337,7 +337,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x19d215
UnknownScript_0x19d1e2: ; 0x19d1e2
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19d208
UnknownScript_0x19d1e8: ; 0x19d1e8
checkevent EVENT_CLEARED_RADIO_TOWER
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -65,7 +65,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x19d8a7
UnknownScript_0x19d887: ; 0x19d887
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19d89a
UnknownScript_0x19d88d: ; 0x19d88d
loadtrainer BIRD_KEEPER, VANCE1
@@ -262,7 +262,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x19d9ab
UnknownScript_0x19d98b: ; 0x19d98b
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19d99e
UnknownScript_0x19d991: ; 0x19d991
loadtrainer FISHER, WILTON1
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -261,7 +261,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x19e1f5
UnknownScript_0x19e1d5: ; 0x19e1d5
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x19e1e8
UnknownScript_0x19e1db: ; 0x19e1db
loadtrainer HIKER, PARRY3
--- a/maps/Route46.asm
+++ b/maps/Route46.asm
@@ -94,7 +94,7 @@
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a9717
UnknownScript_0x1a96f7: ; 0x1a96f7
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a970a
UnknownScript_0x1a96fd: ; 0x1a96fd
loadtrainer PICNICKER, ERIN1
--- a/maps/SilverCaveRoom3.asm
+++ b/maps/SilverCaveRoom3.asm
@@ -66,5 +66,5 @@
; people-events
db 1
- person_event SPRITE_RED, 14, 13, $7, $0, 255, 255, $80, 0, RedScript_0x18c603, $0762
+ person_event SPRITE_RED, 14, 13, $7, $0, 255, 255, $80, 0, RedScript_0x18c603, EVENT_RED_IN_MT_SILVER
; 0x18c65c
--- a/maps/SproutTower3F.asm
+++ b/maps/SproutTower3F.asm
@@ -437,5 +437,5 @@
person_event SPRITE_SAGE, 15, 15, $8, $0, 255, 255, $92, 3, TrainerSageNeal, $ffff
person_event SPRITE_POKE_BALL, 18, 10, $1, $0, 255, 255, $1, 0, ItemFragment_0x184a19, $0649
person_event SPRITE_POKE_BALL, 5, 18, $1, $0, 255, 255, $1, 0, ItemFragment_0x184a1b, $064a
- person_event SPRITE_SILVER, 8, 14, $7, $0, 255, 255, $0, 0, ObjectEvent, $06c4
+ person_event SPRITE_SILVER, 8, 14, $7, $0, 255, 255, $0, 0, ObjectEvent, EVENT_RIVAL_SPROUT_TOWER
; 0x18501a
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -28,7 +28,7 @@
UnknownScript_0x18502f: ; 0x18502f
checkevent EVENT_GOT_RAINBOW_WING
iftrue UnknownScript_0x185047
- checkevent $0044
+ checkevent EVENT_BEAT_ELITE_FOUR
iffalse UnknownScript_0x185050
special SpecialBeastsCheck
iffalse UnknownScript_0x185050
--- a/maps/VictoryRoadGate.asm
+++ b/maps/VictoryRoadGate.asm
@@ -133,6 +133,6 @@
; people-events
db 3
person_event SPRITE_OFFICER, 15, 12, $9, $0, 255, 255, $0, 0, OfficerScript_0x9ba03, $ffff
- person_event SPRITE_BLACK_BELT, 9, 11, $9, $0, 255, 255, $0, 0, BlackBeltScript_0x9ba21, $074f
+ person_event SPRITE_BLACK_BELT, 9, 11, $9, $0, 255, 255, $0, 0, BlackBeltScript_0x9ba21, EVENT_OPENED_MT_SILVER
person_event SPRITE_BLACK_BELT, 9, 16, $8, $0, 255, 255, $0, 0, BlackBeltScript_0x9ba24, $0750
; 0x9bbf8