forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2319 from AsparagusEduardo/RHH/pr/Lures
Implemented Lures and Repel/Lure "use another" menu
- Loading branch information
Showing
12 changed files
with
417 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,115 @@ | ||
EventScript_RepelWoreOff:: | ||
.if I_REPEL_LURE_MENU == TRUE | ||
checkitem ITEM_REPEL, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother | ||
checkitem ITEM_SUPER_REPEL, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother | ||
checkitem ITEM_MAX_REPEL, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother | ||
.else | ||
checkitem VAR_LAST_REPEL_LURE_USED, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother | ||
.endif | ||
lock | ||
msgbox Text_RepelWoreOff, MSGBOX_SIGN | ||
release | ||
end | ||
|
||
EventScript_RepelUseAnother: | ||
lock | ||
msgbox Text_UseAnotherRepel, MSGBOX_YESNO | ||
.if I_REPEL_LURE_MENU == TRUE | ||
callnative TryDrawRepelMenu | ||
goto_if_eq VAR_RESULT, FALSE, EventScript_RepelWoreOff_Chose | ||
waitstate | ||
goto_if_eq VAR_RESULT, 127, EventScript_RepelWoreOff_End | ||
EventScript_RepelWoreOff_Chose: | ||
callnative HandleRepelMenuChoice | ||
bufferitemname 1, VAR_0x8004 | ||
removeitem VAR_0x8004, 1 | ||
playse SE_REPEL | ||
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN | ||
.else | ||
goto_if_eq VAR_RESULT, YES, EventScript_UsedRepel | ||
.endif | ||
EventScript_RepelWoreOff_End: | ||
release | ||
end | ||
|
||
EventScript_UsedRepel: | ||
bufferitemname 1, VAR_LAST_REPEL_LURE_USED | ||
playse SE_REPEL | ||
lock | ||
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN | ||
removeitem VAR_LAST_REPEL_LURE_USED, 1 | ||
waitse | ||
callnative HandleUseExpiredRepel | ||
release | ||
end | ||
|
||
EventScript_LureWoreOff:: | ||
.if I_REPEL_LURE_MENU == TRUE | ||
checkitem ITEM_LURE, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother | ||
checkitem ITEM_SUPER_LURE, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother | ||
checkitem ITEM_MAX_LURE, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother | ||
.else | ||
checkitem VAR_LAST_REPEL_LURE_USED, 1 | ||
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother | ||
.endif | ||
lock | ||
msgbox Text_LureWoreOff, MSGBOX_SIGN | ||
release | ||
end | ||
|
||
EventScript_LureUseAnother: | ||
lock | ||
msgbox Text_UseAnotherLure, MSGBOX_YESNO | ||
.if I_REPEL_LURE_MENU == TRUE | ||
callnative TryDrawLureMenu | ||
goto_if_eq VAR_RESULT, FALSE, EventScript_LureWoreOff_Chose | ||
waitstate | ||
goto_if_eq VAR_RESULT, 127, EventScript_LureWoreOff_End | ||
EventScript_LureWoreOff_Chose: | ||
callnative HandleLureMenuChoice | ||
bufferitemname 1, VAR_0x8004 | ||
removeitem VAR_0x8004, 1 | ||
playse SE_REPEL | ||
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN | ||
.else | ||
goto_if_eq VAR_RESULT, YES, EventScript_UsedLure | ||
.endif | ||
EventScript_LureWoreOff_End: | ||
release | ||
end | ||
|
||
EventScript_UsedLure: | ||
bufferitemname 1, VAR_LAST_REPEL_LURE_USED | ||
playse SE_REPEL | ||
lock | ||
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN | ||
removeitem VAR_LAST_REPEL_LURE_USED, 1 | ||
waitse | ||
callnative HandleUseExpiredLure | ||
release | ||
end | ||
|
||
Text_RepelWoreOff: | ||
.string "REPEL's effect wore off…$" | ||
|
||
Text_UseAnotherRepel:: | ||
.string "REPEL's effect wore off!\n" | ||
.string "Use another?$" | ||
|
||
Text_LureWoreOff: | ||
.string "Lure's effect wore off…$" | ||
|
||
Text_UseAnotherLure:: | ||
.string "Lure's effect wore off!\n" | ||
.string "Use another?$" | ||
|
||
Text_UsedNewRepelLure:: | ||
.string "{PLAYER} used the\n" | ||
.string "{STR_VAR_2}.$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.