diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-18 23:06:30 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-11-18 23:06:51 -0500 |
commit | e66ea0cb996c70093fe3f250cafb7f1f87e84d4d (patch) | |
tree | 162e07afa059e7683e4aa991a1a82205c16b3025 /data/scripts/field_move_scripts.inc | |
parent | c57efdba5d3cc475f75c5909c31f96bbce6190b8 (diff) |
Reformat compare + goto_if/call_if to single statements
Diffstat (limited to 'data/scripts/field_move_scripts.inc')
-rw-r--r-- | data/scripts/field_move_scripts.inc | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc index 39a04ae1a..3e99fc08e 100644 --- a/data/scripts/field_move_scripts.inc +++ b/data/scripts/field_move_scripts.inc @@ -3,14 +3,12 @@ EventScript_CutTree:: lockall goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut checkpartymove MOVE_CUT - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CheckTreeCantCut + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CheckTreeCantCut setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_CUT msgbox Text_WantToCut, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelCut + goto_if_eq VAR_RESULT, NO, EventScript_CancelCut msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_CUT_ON_TREE @@ -64,14 +62,12 @@ EventScript_RockSmash:: lockall goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock checkpartymove MOVE_ROCK_SMASH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSmashRock + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_ROCK_SMASH msgbox Text_WantToSmash, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelSmash + goto_if_eq VAR_RESULT, NO, EventScript_CancelSmash msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_ROCK_SMASH @@ -92,11 +88,9 @@ EventScript_SmashRock:: waitmovement 0 removeobject VAR_LAST_TALKED specialvar VAR_RESULT, TryUpdateRusturfTunnelState - compare VAR_RESULT, TRUE - goto_if_eq EventScript_EndSmash + goto_if_eq VAR_RESULT, TRUE, EventScript_EndSmash special RockSmashWildEncounter - compare VAR_RESULT, FALSE - goto_if_eq EventScript_EndSmash + goto_if_eq VAR_RESULT, FALSE, EventScript_EndSmash waitstate releaseall end @@ -132,12 +126,10 @@ EventScript_StrengthBoulder:: goto_if_unset FLAG_BADGE04_GET, EventScript_CantStrength goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder checkpartymove MOVE_STRENGTH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantStrength + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantStrength setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToStrength, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelStrength + goto_if_eq VAR_RESULT, NO, EventScript_CancelStrength closemessage dofieldeffect FLDEFF_USE_STRENGTH waitstate @@ -193,13 +185,11 @@ Text_StrengthActivated: EventScript_UseWaterfall:: lockall checkpartymove MOVE_WATERFALL - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantWaterfall + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantWaterfall bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToWaterfall, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndWaterfall + goto_if_eq VAR_RESULT, NO, EventScript_EndWaterfall msgbox Text_MonUsedWaterfall, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_WATERFALL goto EventScript_EndWaterfall @@ -228,14 +218,12 @@ Text_MonUsedWaterfall: EventScript_UseDive:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantDive + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantDive bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToDive, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndDive + goto_if_eq VAR_RESULT, NO, EventScript_EndDive msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndDive @@ -253,14 +241,12 @@ EventScript_EndDive:: EventScript_UseDiveUnderwater:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSurface + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSurface bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToSurface, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndSurface + goto_if_eq VAR_RESULT, NO, EventScript_EndSurface msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndSurface |