summaryrefslogtreecommitdiff
path: root/engine/phone/scripts/tully.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2018-12-31 16:35:13 -0500
committerGitHub <noreply@github.com>2018-12-31 16:35:13 -0500
commit4259e7051e2cc621267fc62d6ea11620ab995122 (patch)
tree18133db512710c15ab5d32385ed80771aff58254 /engine/phone/scripts/tully.asm
parent378667d9ecd80940bb6ef59781c82bd38ce38650 (diff)
parentafbf1b3ffcea7ab5cfd03a8205c18e948c549bb7 (diff)
Merge pull request #585 from Rangi42/master
Refactor engine/phone/
Diffstat (limited to 'engine/phone/scripts/tully.asm')
-rw-r--r--engine/phone/scripts/tully.asm60
1 files changed, 60 insertions, 0 deletions
diff --git a/engine/phone/scripts/tully.asm b/engine/phone/scripts/tully.asm
new file mode 100644
index 000000000..b6bf84ba7
--- /dev/null
+++ b/engine/phone/scripts/tully.asm
@@ -0,0 +1,60 @@
+TullyPhoneCalleeScript:
+ trainertotext FISHER, TULLY1, MEM_BUFFER_0
+ checkflag ENGINE_TULLY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_TULLY_SUNDAY_NIGHT
+ iftrue .NotSunday
+ checkflag ENGINE_TULLY_HAS_WATER_STONE
+ iftrue .WaterStone
+ checkcode VAR_WEEKDAY
+ ifnotequal SUNDAY, .NotSunday
+ checktime NITE
+ iftrue TullySundayNight
+
+.NotSunday:
+ farjump UnknownScript_0xa0990
+
+.WantsBattle:
+ landmarktotext ROUTE_42, MEM_BUFFER_2
+ farjump UnknownScript_0xa0a82
+
+.WaterStone:
+ landmarktotext ROUTE_42, MEM_BUFFER_2
+ farjump UnknownScript_0xa0add
+
+TullyPhoneCallerScript:
+ trainertotext FISHER, TULLY1, MEM_BUFFER_0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_TULLY
+ iftrue .Generic
+ checkflag ENGINE_TULLY_SUNDAY_NIGHT
+ iftrue .Generic
+ checkflag ENGINE_TULLY_HAS_WATER_STONE
+ iftrue .Generic
+ farscall PhoneScript_Random3
+ ifequal 0, TullyWantsBattle
+ checkevent EVENT_TULLY_GAVE_WATER_STONE
+ iftrue .WaterStone
+ farscall PhoneScript_Random2
+ ifequal 0, TullyFoundWaterStone
+
+.WaterStone:
+ farscall PhoneScript_Random11
+ ifequal 0, TullyFoundWaterStone
+
+.Generic:
+ farjump Phone_GenericCall_Male
+
+TullySundayNight:
+ setflag ENGINE_TULLY_SUNDAY_NIGHT
+
+TullyWantsBattle:
+ landmarktotext ROUTE_42, MEM_BUFFER_2
+ setflag ENGINE_TULLY
+ farjump PhoneScript_WantsToBattle_Male
+
+TullyFoundWaterStone:
+ setflag ENGINE_TULLY_HAS_WATER_STONE
+ landmarktotext ROUTE_42, MEM_BUFFER_2
+ farjump PhoneScript_FoundItem_Male