Skip to content

Commit

Permalink
BugFix - Trainer Rematches are not always infinite during their time …
Browse files Browse the repository at this point in the history
…slots.
  • Loading branch information
SoupPotato committed Jan 31, 2024
1 parent ff78171 commit 9d4e923
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 83 deletions.
7 changes: 3 additions & 4 deletions engine/phone/scripts/alan.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ AlanPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checktime DAY
iftrue AlanWednesdayDay
iftrue AlanWantsBattle
checktime EVE
iftrue AlanWantsBattle

.NotWednesday:
farsjump AlanHangUpScript
Expand Down Expand Up @@ -46,9 +48,6 @@ AlanPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Male

AlanWednesdayDay:
setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON

AlanWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_36
setflag ENGINE_ALAN_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/anthony.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AnthonyPhoneCalleeScript:
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checktime NITE
iftrue AnthonyFridayNight
iftrue AnthonyWantsBattle

farsjump AnthonyHangUpScript

Expand All @@ -19,9 +19,6 @@ AnthonyPhoneCallerScript:
ifequal 0, AnthonyWantsBattle
farsjump Phone_GenericCall_Male

AnthonyFridayNight:
setflag ENGINE_ANTHONY_FRIDAY_NIGHT

AnthonyWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_33
setflag ENGINE_ANTHONY_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/arnie.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ArniePhoneCalleeScript:
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checktime MORN
iftrue ArnieTuesdayMorning
iftrue ArnieWantsBattle
farsjump ArnieHangUpScript

.WantsBattle:
Expand All @@ -18,9 +18,6 @@ ArniePhoneCallerScript:
ifequal 0, ArnieWantsBattle
farsjump Phone_GenericCall_Male

ArnieTuesdayMorning:
setflag ENGINE_ARNIE_TUESDAY_MORNING

ArnieWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_35
setflag ENGINE_ARNIE_READY_FOR_REMATCH
Expand Down
7 changes: 3 additions & 4 deletions engine/phone/scripts/beth.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ BethPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checktime DAY
iftrue BethFridayAfternoon
iftrue BethWantsBattle
checktime EVE
iftrue BethWantsBattle

.NotFriday:
farsjump BethHangUpScript
Expand All @@ -30,9 +32,6 @@ BethPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Female

BethFridayAfternoon:
setflag ENGINE_BETH_FRIDAY_AFTERNOON

BethWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_26
setflag ENGINE_BETH_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/chad.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ChadPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checktime MORN
iftrue ChadFridayMorning
iftrue ChadWantsBattle

.NotFriday:
farsjump ChadHangUpScript
Expand All @@ -34,9 +34,6 @@ ChadPhoneCallerScript:
ifequal 0, ChadFoundRare
farsjump Phone_GenericCall_Male

ChadFridayMorning:
setflag ENGINE_CHAD_FRIDAY_MORNING

ChadWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38
setflag ENGINE_CHAD_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/dana.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DanaPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime NITE
iftrue DanaThursdayNight
iftrue DanaWantsBattle

.NotThursday:
farsjump DanaHangUpScript
Expand Down Expand Up @@ -48,9 +48,6 @@ DanaPhoneCallerScript:
ifequal 0, DanaFoundRare
farsjump Phone_GenericCall_Female

DanaThursdayNight:
setflag ENGINE_DANA_THURSDAY_NIGHT

DanaWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38
setflag ENGINE_DANA_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/erin.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ErinPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checktime NITE
iftrue ErinSaturdayNight
iftrue ErinWantsBattle

.NotSaturday:
farsjump ErinWorkingHardScript
Expand All @@ -31,9 +31,6 @@ ErinPhoneCallerScript:
.GenericCall:
farsjump Phone_GenericCall_Female

ErinSaturdayNight:
setflag ENGINE_ERIN_SATURDAY_NIGHT

ErinWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_46
setflag ENGINE_ERIN_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/gaven.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GavenPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime MORN
iftrue GavenThursdayMorningScript
iftrue GavenWantsRematch

.NotThursday:
farsjump GavenHangUpNotThursdayScript
Expand All @@ -32,9 +32,6 @@ GavenPhoneCallerScript:
ifequal 0, GavenFoundRare
farsjump Phone_GenericCall_Male

GavenThursdayMorningScript:
setflag ENGINE_GAVEN_THURSDAY_MORNING

GavenWantsRematch:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_26
setflag ENGINE_GAVEN_READY_FOR_REMATCH
Expand Down
7 changes: 3 additions & 4 deletions engine/phone/scripts/gina.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ GinaPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checktime DAY
iftrue GinaSundayDay
iftrue GinaWantsBattle
checktime EVE
iftrue GinaWantsBattle

.NotSunday:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
Expand Down Expand Up @@ -55,9 +57,6 @@ GinaPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Female

GinaSundayDay:
setflag ENGINE_GINA_SUNDAY_AFTERNOON

GinaWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34
setflag ENGINE_GINA_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/huey.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ HueyPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checktime NITE
iftrue HueyWednesdayNight
iftrue HueyWantsBattle

.NotWednesday:
special RandomPhoneMon
Expand All @@ -32,9 +32,6 @@ HueyPhoneCallerScript:
.Flavor:
farsjump PhoneScript_MonFlavorText

HueyWednesdayNight:
setflag ENGINE_HUEY_WEDNESDAY_NIGHT

HueyWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_LIGHTHOUSE
setflag ENGINE_HUEY_READY_FOR_REMATCH
Expand Down
2 changes: 2 additions & 0 deletions engine/phone/scripts/joey.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ JoeyPhoneCalleeScript:
ifnotequal MONDAY, .NotMonday
checktime DAY
iftrue JoeyWantsBattle
checktime EVE
iftrue JoeyWantsBattle

.NotMonday:
special RandomPhoneMon
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/jose.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ JosePhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checktime NITE
iftrue JoseSaturdayNight
iftrue JoseWantsBattle

.NotSaturday:
farsjump JoseHangUpScript
Expand Down Expand Up @@ -42,9 +42,6 @@ JosePhoneCallerScript:
ifequal 0, JoseFoundRare
farsjump Phone_GenericCall_Male

JoseSaturdayNight:
setflag ENGINE_JOSE_SATURDAY_NIGHT

JoseWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27
setflag ENGINE_JOSE_READY_FOR_REMATCH
Expand Down
7 changes: 3 additions & 4 deletions engine/phone/scripts/liz.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ LizPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime DAY
iftrue LizThursdayAfternoon
iftrue LizWantsBattle
checktime EVE
iftrue LizWantsBattle

.NotThursday:
special RandomPhoneMon
Expand Down Expand Up @@ -39,9 +41,6 @@ LizPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Female

LizThursdayAfternoon:
setflag ENGINE_LIZ_THURSDAY_AFTERNOON

LizWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32
setflag ENGINE_LIZ_READY_FOR_REMATCH
Expand Down
7 changes: 3 additions & 4 deletions engine/phone/scripts/parry.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ ParryPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal FRIDAY, .WantsRematch
checktime DAY
iftrue ParryFridayDay
iftrue ParryWantsBattle
checktime EVE
iftrue ParryWantsBattle

.WantsRematch:
farsjump ParryBattleWithMeScript
Expand All @@ -31,9 +33,6 @@ ParryPhoneCallerScript:
.GenericCall:
farsjump Phone_GenericCall_Male

ParryFridayDay:
setflag ENGINE_PARRY_FRIDAY_AFTERNOON

ParryWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_45
setflag ENGINE_PARRY_READY_FOR_REMATCH
Expand Down
4 changes: 1 addition & 3 deletions engine/phone/scripts/ralph.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RalphPhoneCalleeScript:
iftrue .Rematch
farscall PhoneScript_AnswerPhone_Male
checktime MORN
iftrue Ralph_WednesdayMorning
iftrue Ralph_FightMe
farsjump RalphNoItemScript

.Rematch:
Expand All @@ -18,8 +18,6 @@ RalphPhoneCallerScript:
ifequal 0, Ralph_FightMe
farsjump Phone_GenericCall_Male

Ralph_WednesdayMorning:
setflag ENGINE_RALPH_WEDNESDAY_MORNING
Ralph_FightMe:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32
setflag ENGINE_RALPH_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/reena.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ReenaPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checktime MORN
iftrue ReenaSundayMorning
iftrue ReenaWantsBattle

.NotSunday:
farsjump ReenaForwardScript
Expand All @@ -30,9 +30,6 @@ ReenaPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Female

ReenaSundayMorning:
setflag ENGINE_REENA_SUNDAY_MORNING

ReenaWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27
setflag ENGINE_REENA_READY_FOR_REMATCH
Expand Down
7 changes: 3 additions & 4 deletions engine/phone/scripts/tiffany.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ TiffanyPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checktime DAY
iftrue TiffanyTuesdayAfternoon
iftrue TiffanyWantsBattle
checktime EVE
iftrue TiffanyWantsBattle

.NotTuesday:
farsjump TiffanyNoItemScript
Expand Down Expand Up @@ -48,9 +50,6 @@ TiffanyPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Female

TiffanyTuesdayAfternoon:
setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON

TiffanyWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43
setflag ENGINE_TIFFANY_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/todd.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ToddPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checktime MORN
iftrue ToddSaturdayMorning
iftrue ToddWantsBattle

.NotSaturday:
checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
Expand Down Expand Up @@ -43,9 +43,6 @@ ToddPhoneCallerScript:
ifequal 0, ToddFoundRare
farsjump Phone_GenericCall_Male

ToddSaturdayMorning:
setflag ENGINE_TODD_SATURDAY_MORNING

ToddWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34
setflag ENGINE_TODD_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/tully.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TullyPhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checktime NITE
iftrue TullySundayNight
iftrue TullyWantsBattle

.NotSunday:
farsjump TullyNoItemScript
Expand Down Expand Up @@ -46,9 +46,6 @@ TullyPhoneCallerScript:
.Generic:
farsjump Phone_GenericCall_Male

TullySundayNight:
setflag ENGINE_TULLY_SUNDAY_NIGHT

TullyWantsBattle:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_42
setflag ENGINE_TULLY_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/vance.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VancePhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checktime NITE
iftrue VanceWednesdayNight
iftrue VanceWantsRematch

.NotWednesday:
farsjump VanceLookingForwardScript
Expand All @@ -31,9 +31,6 @@ VancePhoneCallerScript:
.WantsBattle:
farsjump Phone_GenericCall_Male

VanceWednesdayNight:
setflag ENGINE_VANCE_WEDNESDAY_NIGHT

VanceWantsRematch:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44
setflag ENGINE_VANCE_READY_FOR_REMATCH
Expand Down
5 changes: 1 addition & 4 deletions engine/phone/scripts/wade.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WadePhoneCalleeScript:
readvar VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checktime NITE
iftrue WadeTuesdayNight
iftrue WadeWantsBattle2

.NotTuesday:
farscall PhoneScript_Random2
Expand Down Expand Up @@ -70,9 +70,6 @@ WadePhoneCallerScript:
.ContestToday:
farsjump PhoneScript_BugCatchingContest

WadeTuesdayNight:
setflag ENGINE_WADE_TUESDAY_NIGHT

WadeWantsBattle2:
getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_31
setflag ENGINE_WADE_READY_FOR_REMATCH
Expand Down
Loading

0 comments on commit 9d4e923

Please sign in to comment.