Skip to content

Commit

Permalink
Correct usage of MysteryEvent to MysteryGift
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Oct 17, 2021
1 parent d045548 commit ece7ef3
Show file tree
Hide file tree
Showing 48 changed files with 2,389 additions and 2,389 deletions.
4 changes: 2 additions & 2 deletions data/event_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ gText_LegendaryFlewAway::
.string "The {STR_VAR_1} flew away!$"

.include "data/text/pc_transfer.inc"
.include "data/text/mevent.inc"
.include "data/text/questionnaire.inc"
.include "data/text/abnormal_weather.inc"

EventScript_SelectWithoutRegisteredItem::
Expand Down Expand Up @@ -1006,7 +1006,7 @@ Common_EventScript_LegendaryFlewAway::
end

.include "data/scripts/pc_transfer.inc"
.include "data/scripts/mevent.inc"
.include "data/scripts/questionnaire.inc"
.include "data/scripts/abnormal_weather.inc"
.include "data/scripts/trainer_script.inc"
.include "data/scripts/berry_tree.inc"
Expand Down
18 changes: 9 additions & 9 deletions data/mystery_event.s → data/mystery_gift.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "constants/flags.h"
#include "constants/items.h"
#include "constants/map_scripts.h"
#include "constants/mevent.h"
#include "constants/mystery_gift.h"
#include "constants/moves.h"
#include "constants/region_map_sections.h"
#include "constants/songs.h"
Expand All @@ -15,11 +15,11 @@
.section .rodata

.align 2
.include "data/scripts/mevent_stamp_card.inc"
.include "data/scripts/mevent_pichu.inc"
.include "data/scripts/mevent_trainer.inc"
.include "data/scripts/mevent_battle_card.inc"
.include "data/scripts/mevent_aurora_ticket.inc"
.include "data/scripts/mevent_mystic_ticket.inc"
.include "data/scripts/mevent_altering_cave.inc"
.include "data/scripts/mevent_old_sea_map.inc"
.include "data/scripts/gift_stamp_card.inc"
.include "data/scripts/gift_pichu.inc"
.include "data/scripts/gift_trainer.inc"
.include "data/scripts/gift_battle_card.inc"
.include "data/scripts/gift_aurora_ticket.inc"
.include "data/scripts/gift_mystic_ticket.inc"
.include "data/scripts/gift_altering_cave.inc"
.include "data/scripts/gift_old_sea_map.inc"
4 changes: 2 additions & 2 deletions data/scripts/cable_club.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ CableClub_EventScript_DistributeEonTicket::
compare VAR_RESULT, TRUE
goto_if_eq CableClub_EventScript_AlreadyGotEonTicket
goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_AlreadyGotEonTicket
msgbox Mevent_Text_TheresATicketForYou, MSGBOX_DEFAULT
msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT
giveitem ITEM_EON_TICKET
setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND
setvar VAR_DISTRIBUTE_EON_TICKET, 0
msgbox Mevent_Text_TryUsingItAtLilycovePort, MSGBOX_DEFAULT
msgbox MysteryGift_Text_TryUsingItAtLilycovePort, MSGBOX_DEFAULT
release
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
MysteryEventScript_AlteringCave::
setvaddress MysteryEventScript_AlteringCave
MysteryGiftScript_AlteringCave::
setvaddress MysteryGiftScript_AlteringCave
addvar VAR_ALTERING_CAVE_WILD_SET, 1
compare VAR_ALTERING_CAVE_WILD_SET, 10
vgoto_if_ne MysteryEventScript_AlteringCave_
vgoto_if_ne MysteryGiftScript_AlteringCave_
setvar VAR_ALTERING_CAVE_WILD_SET, 0
MysteryEventScript_AlteringCave_:
MysteryGiftScript_AlteringCave_:
lock
faceplayer
vmessage sText_MysteryGiftAlteringCave
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MysteryEventScript_AuroraTicket::
setvaddress MysteryEventScript_AuroraTicket
MysteryGiftScript_AuroraTicket::
setvaddress MysteryGiftScript_AuroraTicket
lock
faceplayer
vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
MysteryEventScript_BattleCard::
setvaddress MysteryEventScript_BattleCard
vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryEventScript_BattleCardInfo
MysteryGiftScript_BattleCard::
setvaddress MysteryGiftScript_BattleCard
vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryGiftScript_BattleCardInfo
setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON
specialvar VAR_0x8008, GetMysteryGiftCardStat
compare VAR_0x8008, REQUIRED_CARD_BATTLES
vgoto_if_ne MysteryEventScript_BattleCardInfo
vgoto_if_ne MysteryGiftScript_BattleCardInfo
lock
faceplayer
vmessage sText_MysteryGiftBattleCountCard_WonPrize
Expand All @@ -15,7 +15,7 @@ MysteryEventScript_BattleCard::
setflag FLAG_MYSTERY_GIFT_DONE
end

MysteryEventScript_BattleCardInfo:
MysteryGiftScript_BattleCardInfo:
lock
faceplayer
vmessage sText_MysteryGiftBattleCountCard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MysteryEventScript_MysticTicket::
setvaddress MysteryEventScript_MysticTicket
MysteryGiftScript_MysticTicket::
setvaddress MysteryGiftScript_MysticTicket
lock
faceplayer
vgoto_if_set FLAG_RECEIVED_MYSTIC_TICKET, MysticTicket_Obtained
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MysteryEventScript_OldSeaMap::
setvaddress MysteryEventScript_OldSeaMap
MysteryGiftScript_OldSeaMap::
setvaddress MysteryGiftScript_OldSeaMap
lock
faceplayer
vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained
Expand Down
4 changes: 2 additions & 2 deletions data/scripts/mevent_pichu.inc → data/scripts/gift_pichu.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MysteryEventScript_SurfPichu::
setvaddress MysteryEventScript_SurfPichu
MysteryGiftScript_SurfPichu::
setvaddress MysteryGiftScript_SurfPichu
vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible
returnram

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MysteryEventScript_StampCard::
setvaddress MysteryEventScript_StampCard
MysteryGiftScript_StampCard::
setvaddress MysteryGiftScript_StampCard
setorcopyvar VAR_RESULT, GET_MAX_STAMPS
specialvar VAR_0x8008, GetMysteryGiftCardStat
setorcopyvar VAR_RESULT, GET_NUM_STAMPS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MysteryEventScript_VisitingTrainer::
setvaddress MysteryEventScript_VisitingTrainer
MysteryGiftScript_VisitingTrainer::
setvaddress MysteryGiftScript_VisitingTrainer
special ValidateEReaderTrainer
compare VAR_RESULT, 0
vgoto_if_eq MysteryEventScript_VisitingTrainerArrived
vgoto_if_eq MysteryGiftScript_VisitingTrainerArrived
lock
faceplayer
vmessage sText_MysteryGiftVisitingTrainerInstructions
Expand All @@ -11,7 +11,7 @@ MysteryEventScript_VisitingTrainer::
release
end

MysteryEventScript_VisitingTrainerArrived:
MysteryGiftScript_VisitingTrainerArrived:
lock
faceplayer
vmessage sText_MysteryGiftVisitingTrainerArrived
Expand Down
62 changes: 0 additions & 62 deletions data/scripts/mevent.inc

This file was deleted.

62 changes: 62 additions & 0 deletions data/scripts/questionnaire.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
EventScript_Questionnaire::
lockall
msgbox Questionnaire_Text_FillOut, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Questionnaire_EventScript_Release
setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE
call Common_ShowEasyChatScreen
lock
faceplayer
specialvar VAR_0x8008, GetMartEmployeeObjectEventId
compare VAR_0x8004, 1
goto_if_eq Questionnaire_EventScript_PlayerInputMysteryEventPhrase
compare VAR_0x8004, 2
goto_if_eq Questionnaire_EventScript_PlayerInputMysteryGiftPhrase
compare VAR_RESULT, 0
goto_if_eq Questionnaire_EventScript_Release
compare VAR_RESULT, 1
goto_if_eq Questionnaire_EventScript_ThankYou
end

Questionnaire_EventScript_PlayerInputMysteryEventPhrase::
goto_if_unset FLAG_SYS_POKEDEX_GET, Questionnaire_EventScript_ThankYou
goto_if_set FLAG_SYS_MYSTERY_EVENT_ENABLE, Questionnaire_EventScript_ThankYou
applymovement VAR_0x8008, Common_Movement_FaceDown
waitmovement 0
playse SE_PIN
applymovement VAR_0x8008, Common_Movement_ExclamationMark
waitmovement 0
applymovement VAR_0x8008, Common_Movement_Delay48
waitmovement 0
msgbox Questionnaire_Text_YouKnowThoseWordsEvent, MSGBOX_DEFAULT
setflag FLAG_SYS_MYSTERY_EVENT_ENABLE
msgbox Questionnaire_Text_YouCanAccessMysteryEvent, MSGBOX_DEFAULT
releaseall
end

Questionnaire_EventScript_PlayerInputMysteryGiftPhrase::
goto_if_unset FLAG_SYS_POKEDEX_GET, Questionnaire_EventScript_ThankYou
goto_if_set FLAG_SYS_MYSTERY_GIFT_ENABLE, Questionnaire_EventScript_ThankYou
applymovement VAR_0x8008, Common_Movement_FaceDown
waitmovement 0
playse SE_PIN
applymovement VAR_0x8008, Common_Movement_ExclamationMark
waitmovement 0
applymovement VAR_0x8008, Common_Movement_Delay48
waitmovement 0
msgbox Questionnaire_Text_YouKnowThoseWordsGift, MSGBOX_DEFAULT
setflag FLAG_SYS_MYSTERY_GIFT_ENABLE
msgbox Questionnaire_Text_YouCanAccessMysteryGift, MSGBOX_DEFAULT
releaseall
end

Questionnaire_EventScript_Release::
releaseall
end

Questionnaire_EventScript_ThankYou::
applymovement VAR_0x8008, Common_Movement_FaceDown
waitmovement 0
msgbox Questionnaire_Text_ThankYou, MSGBOX_DEFAULT
releaseall
end
16 changes: 8 additions & 8 deletions data/text/mevent.inc → data/text/questionnaire.inc
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
Mevent_Text_FillOutQuestionnaire::
Questionnaire_Text_FillOut::
.string "There is a questionnaire.\n"
.string "Would you like to fill it out?$"

Mevent_Text_QuestionnaireThankYou::
Questionnaire_Text_ThankYou::
.string "Thank you for taking the time to\n"
.string "fill out our questionnaire.\p"
.string "Your feedback will be used for\n"
.string "future reference.$"

Mevent_Text_YouKnowThoseWordsGift::
Questionnaire_Text_YouKnowThoseWordsGift::
.string "Oh, hello!\n"
.string "You know those words?\p"
.string "That means you must know about\n"
.string "the MYSTERY GIFT.\p"
.string "From now on, you should be\n"
.string "receiving MYSTERY GIFTS!$"

Mevent_Text_YouCanAccessMysteryGift::
Questionnaire_Text_YouCanAccessMysteryGift::
.string "Once you save your game, you can\n"
.string "access the MYSTERY GIFT.$"

Mevent_Text_YouKnowThoseWordsEvent::
Questionnaire_Text_YouKnowThoseWordsEvent::
.string "Oh, hello!\n"
.string "You know those words?\p"
.string "That means you must know about\n"
.string "the MYSTERY EVENT.$"

Mevent_Text_YouCanAccessMysteryEvent::
Questionnaire_Text_YouCanAccessMysteryEvent::
.string "Once you save your game, you can\n"
.string "access the MYSTERY EVENT.$"

Mevent_Text_TheresATicketForYou::
MysteryGift_Text_TheresATicketForYou::
.string "Thank you for using the MYSTERY\n"
.string "EVENT System.\p"
.string "You must be {PLAYER}.\n"
.string "There is a ticket here for you.$"

Mevent_Text_TryUsingItAtLilycovePort::
MysteryGift_Text_TryUsingItAtLilycovePort::
.string "It appears to be for use at\n"
.string "the LILYCOVE CITY port.\p"
.string "Why not give it a try and see what\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef GUARD_CONSTANTS_MEVENT_H
#define GUARD_CONSTANTS_MEVENT_H
#ifndef GUARD_CONSTANTS_MYSTERY_GIFT_H
#define GUARD_CONSTANTS_MYSTERY_GIFT_H

#define GET_NUM_STAMPS 0
#define GET_MAX_STAMPS 1
Expand Down Expand Up @@ -44,4 +44,4 @@

#define WONDER_CARD_FLAG_OFFSET 1000

#endif //GUARD_MEVENT_H
#endif //GUARD_CONSTANTS_MYSTERY_GIFT_H
Loading

0 comments on commit ece7ef3

Please sign in to comment.