pokeemerald/data/scripts/field_move_scripts.inc

304 lines
6.9 KiB
PHP
Raw Normal View History

2020-07-02 10:59:52 +02:00
@ Interact with cuttable tree
2021-07-20 21:18:31 +02:00
EventScript_CutTree::
lockall
goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut
checkpartymove MOVE_CUT
2019-10-07 07:13:34 +02:00
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CheckTreeCantCut
setfieldeffectargument 0, VAR_RESULT
bufferpartymonnick STR_VAR_1, VAR_RESULT
buffermovename STR_VAR_2, MOVE_CUT
msgbox Text_WantToCut, MSGBOX_YESNO
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
goto_if_eq EventScript_CancelCut
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
closemessage
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
goto EventScript_CutTreeDown
end
2020-07-02 10:59:52 +02:00
@ Use cut from party menu
2021-07-20 21:18:31 +02:00
EventScript_UseCut::
lockall
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
goto EventScript_CutTreeDown
end
2021-07-20 21:18:31 +02:00
EventScript_CutTreeDown::
applymovement VAR_LAST_TALKED, Movement_CutTreeDown
waitmovement 0
removeobject VAR_LAST_TALKED
releaseall
end
2021-07-20 21:18:31 +02:00
Movement_CutTreeDown:
cut_tree
step_end
2021-07-20 21:18:31 +02:00
EventScript_CheckTreeCantCut::
msgbox Text_CantCut, MSGBOX_DEFAULT
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_CancelCut::
closemessage
releaseall
end
2021-07-20 21:18:31 +02:00
Text_WantToCut:
.string "This tree looks like it can be\n"
.string "CUT down!\p"
.string "Would you like to CUT it?$"
2021-07-20 21:18:31 +02:00
Text_MonUsedFieldMove:
.string "{STR_VAR_1} used {STR_VAR_2}!$"
2021-07-20 21:18:31 +02:00
Text_CantCut:
.string "This tree looks like it can be\n"
.string "CUT down!$"
2020-07-02 10:59:52 +02:00
@ Interact with smashable rock
2021-07-20 21:18:31 +02:00
EventScript_RockSmash::
lockall
goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock
checkpartymove MOVE_ROCK_SMASH
2019-10-07 07:13:34 +02:00
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantSmashRock
setfieldeffectargument 0, VAR_RESULT
bufferpartymonnick STR_VAR_1, VAR_RESULT
buffermovename STR_VAR_2, MOVE_ROCK_SMASH
msgbox Text_WantToSmash, MSGBOX_YESNO
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
goto_if_eq EventScript_CancelSmash
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
closemessage
dofieldeffect FLDEFF_USE_ROCK_SMASH
waitstate
2019-04-06 01:39:45 +02:00
goto EventScript_SmashRock
end
2020-07-02 10:59:52 +02:00
@ Use rock smash from party menu
2021-07-20 21:18:31 +02:00
EventScript_UseRockSmash::
lockall
dofieldeffect FLDEFF_USE_ROCK_SMASH
waitstate
2019-04-06 01:39:45 +02:00
goto EventScript_SmashRock
end
2021-07-20 21:18:31 +02:00
EventScript_SmashRock::
applymovement VAR_LAST_TALKED, Movement_SmashRock
waitmovement 0
removeobject VAR_LAST_TALKED
specialvar VAR_RESULT, TryUpdateRusturfTunnelState
2020-06-29 17:41:09 +02:00
compare VAR_RESULT, TRUE
goto_if_eq EventScript_EndSmash
2017-11-17 17:50:07 +01:00
special RockSmashWildEncounter
2020-06-29 17:41:09 +02:00
compare VAR_RESULT, FALSE
goto_if_eq EventScript_EndSmash
waitstate
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_EndSmash::
releaseall
end
2021-07-20 21:18:31 +02:00
Movement_SmashRock:
rock_smash_break
step_end
2021-07-20 21:18:31 +02:00
EventScript_CantSmashRock::
msgbox Text_CantSmash, MSGBOX_DEFAULT
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_CancelSmash::
closemessage
releaseall
end
2021-07-20 21:18:31 +02:00
Text_WantToSmash:
.string "This rock appears to be breakable.\n"
.string "Would you like to use ROCK SMASH?$"
2021-07-20 21:18:31 +02:00
Text_CantSmash:
2018-12-07 16:41:08 +01:00
.string "It's a rugged rock, but a POKéMON\n"
.string "may be able to smash it.$"
2021-07-20 21:18:31 +02:00
EventScript_StrengthBoulder::
lockall
goto_if_unset FLAG_BADGE04_GET, EventScript_CantStrength
goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder
checkpartymove MOVE_STRENGTH
2019-10-07 07:13:34 +02:00
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantStrength
setfieldeffectargument 0, VAR_RESULT
msgbox Text_WantToStrength, MSGBOX_YESNO
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
goto_if_eq EventScript_CancelStrength
closemessage
dofieldeffect FLDEFF_USE_STRENGTH
waitstate
goto EventScript_ActivateStrength
end
2021-07-20 21:18:31 +02:00
EventScript_UseStrength::
lockall
dofieldeffect FLDEFF_USE_STRENGTH
waitstate
goto EventScript_ActivateStrength
end
2021-07-20 21:18:31 +02:00
EventScript_ActivateStrength::
setflag FLAG_SYS_USE_STRENGTH
msgbox Text_MonUsedStrength, MSGBOX_DEFAULT
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_CantStrength::
msgbox Text_CantStrength, MSGBOX_DEFAULT
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_CheckActivatedBoulder::
msgbox Text_StrengthActivated, MSGBOX_DEFAULT
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_CancelStrength::
closemessage
releaseall
end
2021-07-20 21:18:31 +02:00
Text_WantToStrength:
2018-12-07 16:41:08 +01:00
.string "It's a big boulder, but a POKéMON\n"
.string "may be able to push it aside.\p"
.string "Would you like to use STRENGTH?$"
2021-07-20 21:18:31 +02:00
Text_MonUsedStrength:
.string "{STR_VAR_1} used STRENGTH!\p"
2018-12-07 16:41:08 +01:00
.string "{STR_VAR_1}'s STRENGTH made it\n"
.string "possible to move boulders around!$"
2021-07-20 21:18:31 +02:00
Text_CantStrength:
2018-12-07 16:41:08 +01:00
.string "It's a big boulder, but a POKéMON\n"
.string "may be able to push it aside.$"
2021-07-20 21:18:31 +02:00
Text_StrengthActivated:
.string "STRENGTH made it possible to move\n"
.string "boulders around.$"
2021-07-20 21:18:31 +02:00
EventScript_UseWaterfall::
lockall
checkpartymove MOVE_WATERFALL
2019-10-07 07:13:34 +02:00
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantWaterfall
bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
msgbox Text_WantToWaterfall, MSGBOX_YESNO
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
goto_if_eq EventScript_EndWaterfall
msgbox Text_MonUsedWaterfall, MSGBOX_DEFAULT
dofieldeffect FLDEFF_USE_WATERFALL
goto EventScript_EndWaterfall
2021-07-20 21:18:31 +02:00
EventScript_CannotUseWaterfall::
lockall
2021-07-20 21:18:31 +02:00
EventScript_CantWaterfall::
msgbox Text_CantWaterfall, MSGBOX_DEFAULT
2021-07-20 21:18:31 +02:00
EventScript_EndWaterfall::
releaseall
end
2021-07-20 21:18:31 +02:00
Text_CantWaterfall:
.string "A wall of water is crashing down with\n"
.string "a mighty roar.$"
2021-07-20 21:18:31 +02:00
Text_WantToWaterfall:
2018-12-07 16:41:08 +01:00
.string "It's a large waterfall.\n"
.string "Would you like to use WATERFALL?$"
2021-07-20 21:18:31 +02:00
Text_MonUsedWaterfall:
.string "{STR_VAR_1} used WATERFALL.$"
2021-07-20 21:18:31 +02:00
EventScript_UseDive::
lockall
checkpartymove MOVE_DIVE
2019-10-07 07:13:34 +02:00
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantDive
bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox Text_WantToDive, MSGBOX_YESNO
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
goto_if_eq EventScript_EndDive
msgbox Text_MonUsedDive, MSGBOX_DEFAULT
dofieldeffect FLDEFF_USE_DIVE
goto EventScript_EndDive
end
2021-07-20 21:18:31 +02:00
EventScript_CantDive::
msgbox Text_CantDive, MSGBOX_DEFAULT
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_EndDive::
releaseall
end
2021-07-20 21:18:31 +02:00
EventScript_UseDiveUnderwater::
lockall
checkpartymove MOVE_DIVE
2019-10-07 07:13:34 +02:00
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantSurface
bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox Text_WantToSurface, MSGBOX_YESNO
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
goto_if_eq EventScript_EndSurface
msgbox Text_MonUsedDive, MSGBOX_DEFAULT
dofieldeffect FLDEFF_USE_DIVE
goto EventScript_EndSurface
end
2021-07-20 21:18:31 +02:00
EventScript_CantSurface::
lockall
msgbox Text_CantSurface, MSGBOX_DEFAULT
goto EventScript_EndSurface
end
2021-07-20 21:18:31 +02:00
EventScript_EndSurface::
releaseall
end
2021-07-20 21:18:31 +02:00
Text_CantDive:
.string "The sea is deep here. A POKéMON\n"
.string "may be able to go underwater.$"
2021-07-20 21:18:31 +02:00
Text_WantToDive:
.string "The sea is deep here.\n"
.string "Would you like to use DIVE?$"
2021-07-20 21:18:31 +02:00
Text_MonUsedDive:
.string "{STR_VAR_1} used DIVE.$"
2021-07-20 21:18:31 +02:00
Text_CantSurface:
.string "Light is filtering down from above.\n"
.string "A POKéMON may be able to surface.$"
2021-07-20 21:18:31 +02:00
Text_WantToSurface:
.string "Light is filtering down from above.\n"
.string "Would you like to use DIVE?$"
2021-07-20 21:18:31 +02:00
EventScript_FailSweetScent::
msgbox Text_FailSweetScent, MSGBOX_SIGN
end
2021-07-20 21:18:31 +02:00
Text_FailSweetScent:
2018-12-07 16:41:08 +01:00
.string "Looks like there's nothing here…$"