Skip to content

Commit

Permalink
Add more event flags and fight counters for phone scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
iimarckus committed Jul 10, 2015
1 parent d1fbc07 commit 86c13ac
Show file tree
Hide file tree
Showing 20 changed files with 381 additions and 352 deletions.
31 changes: 29 additions & 2 deletions constants/event_flags.asm
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,39 @@ EVENT_GOT_HP_UP_FROM_VERMILION_GUY EQU $0e2
EVENT_GOT_TM29_PSYCHIC EQU $0e3
EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE EQU $0f9
EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM EQU $0fb
EVENT_JACK_ASKED_FOR_PHONE_NUMBER EQU $25f
EVENT_SHOWED_BEVERLY_MARILL EQU $261
EVENT_HUEY_ASKED_FOR_PHONE_NUMBER EQU $263
EVENT_GOT_PROTEIN_FROM_HUEY EQU $265
EVENT_GOT_HP_UP_FROM_JOEY EQU $266
EVENT_GOT_CARBOS_FROM_VANCE EQU $267
EVENT_GOT_IRON_FROM_PARRY EQU $268
EVENT_GOT_CALCIUM_FROM_ERIN EQU $269
EVENT_SHOWED_DEREK_PIKACHU EQU $28d
EVENT_SHOWED_TIFFANY_CLEFAIRY EQU $293
EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER EQU $26b
EVENT_BETH_ASKED_FOR_PHONE_NUMBER EQU $26d
EVENT_JOSE_ASKED_FOR_PHONE_NUMBER EQU $26f
EVENT_REENA_ASKED_FOR_PHONE_NUMBER EQU $271
EVENT_JOEY_ASKED_FOR_PHONE_NUMBER EQU $273
EVENT_WADE_ASKED_FOR_PHONE_NUMBER EQU $275
EVENT_RALPH_ASKED_FOR_PHONE_NUMBER EQU $277
EVENT_LIZ_ASKED_FOR_PHONE_NUMBER EQU $279
EVENT_ANTHONY_ASKED_FOR_PHONE_NUMBER EQU $27b
EVENT_TODD_ASKED_FOR_PHONE_NUMBER EQU $27d
EVENT_GINA_ASKED_FOR_PHONE_NUMBER EQU $27f
EVENT_IRWIN_ASKED_FOR_PHONE_NUMBER EQU $281
EVENT_ARNIE_ASKED_FOR_PHONE_NUMBER EQU $283
EVENT_ALAN_ASKED_FOR_PHONE_NUMBER EQU $285
EVENT_DANA_ASKED_FOR_PHONE_NUMBER EQU $289
EVENT_CHAD_ASKED_FOR_PHONE_NUMBER EQU $28b
EVENT_DEREK_ASKED_FOR_PHONE_NUMBER EQU $28d
EVENT_TULLY_ASKED_FOR_PHONE_NUMBER EQU $28f
EVENT_BRENT_ASKED_FOR_PHONE_NUMBER EQU $291
EVENT_TIFFANY_ASKED_FOR_PHONE_NUMBER EQU $293
EVENT_VANCE_ASKED_FOR_PHONE_NUMBER EQU $295
EVENT_WILTON_ASKED_FOR_PHONE_NUMBER EQU $297
EVENT_KENJI_ASKED_FOR_PHONE_NUMBER EQU $299
EVENT_PARRY_ASKED_FOR_PHONE_NUMBER EQU $29b
EVENT_ERIN_ASKED_FOR_PHONE_NUMBER EQU $29d
EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD EQU $29e
EVENT_SWITCH_1 EQU $2d3
EVENT_SWITCH_2 EQU $2d4
Expand Down
52 changes: 26 additions & 26 deletions maps/NationalPark.asm
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ SchoolboyJack1Script:
iftrue UnknownScript_0x5c088
checkcellnum $5
iftrue UnknownScript_0x5c108
checkevent $025f
checkevent EVENT_JACK_ASKED_FOR_PHONE_NUMBER
iftrue UnknownScript_0x5c071
writetext UnknownText_0x5c4f3
keeptextopen
setevent $025f
setevent EVENT_JACK_ASKED_FOR_PHONE_NUMBER
scall UnknownScript_0x5c0fc
jump UnknownScript_0x5c074

Expand All @@ -103,57 +103,57 @@ UnknownScript_0x5c074:
UnknownScript_0x5c088:
scall UnknownScript_0x5c114
winlosstext SchoolboyJack1BeatenText, $0000
copybytetovar wd9f2
if_equal $4, UnknownScript_0x5c0a7
if_equal $3, UnknownScript_0x5c0ad
if_equal $2, UnknownScript_0x5c0b3
if_equal $1, UnknownScript_0x5c0b9
if_equal $0, UnknownScript_0x5c0bf
UnknownScript_0x5c0a7:
copybytetovar JackFightCount
if_equal 4, .Fight4
if_equal 3, .Fight3
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
.Fight4
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x5c0f3
UnknownScript_0x5c0ad:
iftrue .LoadFight4
.Fight3
checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x5c0e6
UnknownScript_0x5c0b3:
iftrue .LoadFight3
.Fight2
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue UnknownScript_0x5c0d9
UnknownScript_0x5c0b9:
checkflag $0047
iftrue UnknownScript_0x5c0cc
UnknownScript_0x5c0bf:
iftrue .LoadFight2
.Fight1
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight1
.LoadFight0
loadtrainer SCHOOLBOY, JACK1
startbattle
returnafterbattle
loadvar wd9f2, $1
loadvar JackFightCount, 1
clearflag ENGINE_JACK
end

UnknownScript_0x5c0cc:
.LoadFight1
loadtrainer SCHOOLBOY, JACK2
startbattle
returnafterbattle
loadvar wd9f2, $2
loadvar JackFightCount, 2
clearflag ENGINE_JACK
end

UnknownScript_0x5c0d9:
.LoadFight2
loadtrainer SCHOOLBOY, JACK3
startbattle
returnafterbattle
loadvar wd9f2, $3
loadvar JackFightCount, 3
clearflag ENGINE_JACK
end

UnknownScript_0x5c0e6:
.LoadFight3
loadtrainer SCHOOLBOY, JACK4
startbattle
returnafterbattle
loadvar wd9f2, $4
loadvar JackFightCount, 4
clearflag ENGINE_JACK
end

UnknownScript_0x5c0f3:
.LoadFight4
loadtrainer SCHOOLBOY, JACK5
startbattle
returnafterbattle
Expand Down
44 changes: 22 additions & 22 deletions maps/OlivineLighthouse2F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ SailorHuey1Script:
iftrue UnknownScript_0x5afc7
checkcellnum $7
iftrue UnknownScript_0x5b05f
checkevent $0263
checkevent EVENT_HUEY_ASKED_FOR_PHONE_NUMBER
iftrue UnknownScript_0x5afb0
setevent $0263
setevent EVENT_HUEY_ASKED_FOR_PHONE_NUMBER
scall UnknownScript_0x5b053
jump UnknownScript_0x5afb3

Expand All @@ -78,57 +78,57 @@ UnknownScript_0x5afb3:
UnknownScript_0x5afc7:
scall UnknownScript_0x5b06b
winlosstext SailorHuey1BeatenText, $0000
copybytetovar wd9f4
if_equal $3, UnknownScript_0x5afe2
if_equal $2, UnknownScript_0x5afe8
if_equal $1, UnknownScript_0x5afee
if_equal $0, UnknownScript_0x5aff4
UnknownScript_0x5afe2:
copybytetovar HueyFightCount
if_equal 3, .Fight3
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
.Fight3
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x5b01b
UnknownScript_0x5afe8:
iftrue .LoadFight3
.Fight2
checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x5b00e
UnknownScript_0x5afee:
iftrue .LoadFight2
.Fight1
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue UnknownScript_0x5b001
UnknownScript_0x5aff4:
iftrue .LoadFight1
.LoadFight0
loadtrainer SAILOR, HUEY1
startbattle
returnafterbattle
loadvar wd9f4, $1
loadvar HueyFightCount, 1
clearflag ENGINE_HUEY
end

UnknownScript_0x5b001:
.LoadFight1
loadtrainer SAILOR, HUEY2
startbattle
returnafterbattle
loadvar wd9f4, $2
loadvar HueyFightCount, 2
clearflag ENGINE_HUEY
end

UnknownScript_0x5b00e:
.LoadFight2
loadtrainer SAILOR, HUEY3
startbattle
returnafterbattle
loadvar wd9f4, $3
loadvar HueyFightCount, 3
clearflag ENGINE_HUEY
end

UnknownScript_0x5b01b:
.LoadFight3
loadtrainer SAILOR, HUEY4
startbattle
returnafterbattle
clearflag ENGINE_HUEY
checkevent EVENT_HUEY_PROTEIN
iftrue UnknownScript_0x5b03f
checkevent $0265
checkevent EVENT_GOT_PROTEIN_FROM_HUEY
iftrue UnknownScript_0x5b03e
scall UnknownScript_0x5b076
verbosegiveitem PROTEIN, 1
iffalse UnknownScript_0x5b06f
setevent $0265
setevent EVENT_GOT_PROTEIN_FROM_HUEY
jump UnknownScript_0x5b05f

UnknownScript_0x5b03e:
Expand Down
60 changes: 30 additions & 30 deletions maps/Route26.asm
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ CooltrainermGaven3Script:
iftrue UnknownScript_0x1a4d79
checkcellnum $b
iftrue UnknownScript_0x1a4dcb
checkevent $026b
checkevent EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER
iftrue UnknownScript_0x1a4d62
writetext UnknownText_0x1a4fe4
keeptextopen
setevent $026b
setevent EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER
scall UnknownScript_0x1a4dbf
jump UnknownScript_0x1a4d65

Expand All @@ -80,33 +80,33 @@ UnknownScript_0x1a4d65:
UnknownScript_0x1a4d79:
scall UnknownScript_0x1a4dd7
winlosstext CooltrainermGaven3BeatenText, $0000
copybytetovar wd9f5
if_equal $2, UnknownScript_0x1a4d90
if_equal $1, UnknownScript_0x1a4d96
if_equal $0, UnknownScript_0x1a4d9c
UnknownScript_0x1a4d90:
copybytetovar GavenFightCount
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
.Fight2
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a4db6
UnknownScript_0x1a4d96:
iftrue .LoadFight2
.Fight1
checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a4da9
UnknownScript_0x1a4d9c:
iftrue .LoadFight1
.LoadFight0
loadtrainer COOLTRAINERM, GAVEN3
startbattle
returnafterbattle
loadvar wd9f5, $1
loadvar GavenFightCount, 1
clearflag ENGINE_GAVEN
end

UnknownScript_0x1a4da9:
.LoadFight1
loadtrainer COOLTRAINERM, GAVEN1
startbattle
returnafterbattle
loadvar wd9f5, $2
loadvar GavenFightCount, 2
clearflag ENGINE_GAVEN
end

UnknownScript_0x1a4db6:
.LoadFight2
loadtrainer COOLTRAINERM, GAVEN2
startbattle
returnafterbattle
Expand Down Expand Up @@ -195,11 +195,11 @@ CooltrainerfBeth1Script:
iftrue UnknownScript_0x1a4e35
checkcellnum $c
iftrue UnknownScript_0x1a4e87
checkevent $026d
checkevent EVENT_BETH_ASKED_FOR_PHONE_NUMBER
iftrue UnknownScript_0x1a4e1e
writetext UnknownText_0x1a51d9
keeptextopen
setevent $026d
setevent EVENT_BETH_ASKED_FOR_PHONE_NUMBER
scall UnknownScript_0x1a4e7b
jump UnknownScript_0x1a4e21

Expand All @@ -216,33 +216,33 @@ UnknownScript_0x1a4e21:
UnknownScript_0x1a4e35:
scall UnknownScript_0x1a4e93
winlosstext CooltrainerfBeth1BeatenText, $0000
copybytetovar wd9f6
if_equal $2, UnknownScript_0x1a4e4c
if_equal $1, UnknownScript_0x1a4e52
if_equal $0, UnknownScript_0x1a4e58
UnknownScript_0x1a4e4c:
copybytetovar BethFightCount
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
.Fight2
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x1a4e72
UnknownScript_0x1a4e52:
iftrue .LoadFight2
.Fight1
checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0x1a4e65
UnknownScript_0x1a4e58:
iftrue .LoadFight1
.LoadFight0
loadtrainer COOLTRAINERF, BETH1
startbattle
returnafterbattle
loadvar wd9f6, $1
loadvar BethFightCount, 1
clearflag ENGINE_BETH
end

UnknownScript_0x1a4e65:
.LoadFight1
loadtrainer COOLTRAINERF, BETH2
startbattle
returnafterbattle
loadvar wd9f6, $2
loadvar BethFightCount, 2
clearflag ENGINE_BETH
end

UnknownScript_0x1a4e72:
.LoadFight2
loadtrainer COOLTRAINERF, BETH3
startbattle
returnafterbattle
Expand Down
Loading

0 comments on commit 86c13ac

Please sign in to comment.