pokecrystal-board/engine/phone/scripts/mom.asm

143 lines
3.2 KiB
NASM
Raw Normal View History

MomPhoneCalleeScript:
checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
2020-10-04 16:43:28 -07:00
iftrue .started_quest
checkevent EVENT_DUDE_TALKED_TO_YOU
iftrue MomPhoneLectureScript
checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
iftrue MomPhoneNoGymQuestScript
checkevent EVENT_GOT_A_POKEMON_FROM_ELM
iftrue MomPhoneNoPokedexScript
sjump MomPhoneNoPokemonScript
2020-10-04 16:43:28 -07:00
.started_quest
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_8
iftrue MomPhoneHangUpScript
farwritetext MomPhoneGreetingText
2019-11-03 09:48:54 -08:00
promptbutton
getcurlandmarkname STRING_BUFFER_3
readvar VAR_ENVIRONMENT
ifequal TOWN, MomPhoneInTown
ifequal ROUTE, MomPhoneOnRoute
sjump MomPhoneOther
MomPhoneLandmark:
farwritetext MomPhoneLandmarkText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomSavingMoney
MomPhoneInTown:
readvar VAR_MAPGROUP
ifequal GROUP_NEW_BARK_TOWN, .newbark
ifequal GROUP_CHERRYGROVE_CITY, .cherrygrove
ifequal GROUP_VIOLET_CITY, .violet
ifequal GROUP_AZALEA_TOWN, .azalea
ifequal GROUP_GOLDENROD_CITY, .goldenrod
farwritetext MomPhoneGenericAreaText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomSavingMoney
.newbark
farwritetext MomPhoneNewBarkText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomSavingMoney
.cherrygrove
farwritetext MomPhoneCherrygroveText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomSavingMoney
.violet
getlandmarkname STRING_BUFFER_4, LANDMARK_SPROUT_TOWER
sjump MomPhoneLandmark
.azalea
getlandmarkname STRING_BUFFER_4, LANDMARK_SLOWPOKE_WELL
sjump MomPhoneLandmark
.goldenrod
getlandmarkname STRING_BUFFER_4, LANDMARK_RADIO_TOWER
sjump MomPhoneLandmark
MomPhoneOnRoute:
farwritetext MomOtherAreaText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomSavingMoney
MomPhoneOther:
farwritetext MomDeterminedText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomSavingMoney
MomSavingMoney:
checkflag ENGINE_MOM_SAVING_MONEY
iffalse .NotSaving
checkmoney MOMS_MONEY, 0
ifequal HAVE_MORE, .SavingHasMoney
sjump .SavingNoMoney
.NotSaving:
checkmoney MOMS_MONEY, 0
ifequal HAVE_MORE, .HasMoney
sjump .NoMoney
.SavingHasMoney:
getmoney STRING_BUFFER_3, MOMS_MONEY
farwritetext MomCheckBalanceText
yesorno
iftrue MomPhoneSaveMoneyScript
sjump MomPhoneWontSaveMoneyScript
.SavingNoMoney:
farwritetext MomImportantToSaveText
yesorno
iftrue MomPhoneSaveMoneyScript
sjump MomPhoneWontSaveMoneyScript
.NoMoney:
farwritetext MomYoureNotSavingText
yesorno
iftrue MomPhoneSaveMoneyScript
sjump MomPhoneWontSaveMoneyScript
.HasMoney:
getmoney STRING_BUFFER_3, MOMS_MONEY
farwritetext MomYouveSavedText
yesorno
iftrue MomPhoneSaveMoneyScript
sjump MomPhoneWontSaveMoneyScript
MomPhoneSaveMoneyScript:
setflag ENGINE_MOM_SAVING_MONEY
farwritetext MomOKIllSaveText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomPhoneHangUpScript
MomPhoneWontSaveMoneyScript:
clearflag ENGINE_MOM_SAVING_MONEY
farwritetext MomPhoneWontSaveMoneyText
2019-11-03 09:48:54 -08:00
promptbutton
sjump MomPhoneHangUpScript
MomPhoneHangUpScript:
farwritetext MomPhoneHangUpText
end
MomPhoneNoPokemonScript:
farwritetext MomPhoneNoPokemonText
end
MomPhoneNoPokedexScript:
farwritetext MomPhoneNoPokedexText
end
MomPhoneNoGymQuestScript:
farwritetext MomPhoneNoGymQuestText
end
MomPhoneLectureScript:
setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
setflag ENGINE_MOM_ACTIVE
specialphonecall SPECIALCALL_NONE
farwritetext MomPhoneLectureText
yesorno
iftrue MomPhoneSaveMoneyScript
sjump MomPhoneWontSaveMoneyScript