summaryrefslogtreecommitdiff
path: root/data/scripts/maps/Route120.inc
diff options
context:
space:
mode:
authorgolem galvanize <golemgalvanize@github.com>2018-01-09 16:48:01 -0500
committergolem galvanize <golemgalvanize@github.com>2018-01-09 16:48:01 -0500
commitc7722a492017dbd8a5fb3bb216062eb62129daf5 (patch)
tree2a5c0ba6a6b9364aa93eb4a9a89b35153954ab63 /data/scripts/maps/Route120.inc
parent2d141bc612ffecc984f6b4238c2791ba8419a192 (diff)
parent85174ad6193d3d58b92deaaedf8c510440ed85ee (diff)
fixing merge conflicts
Diffstat (limited to 'data/scripts/maps/Route120.inc')
-rw-r--r--data/scripts/maps/Route120.inc248
1 files changed, 121 insertions, 127 deletions
diff --git a/data/scripts/maps/Route120.inc b/data/scripts/maps/Route120.inc
index 75385fe8f..b49834564 100644
--- a/data/scripts/maps/Route120.inc
+++ b/data/scripts/maps/Route120.inc
@@ -5,73 +5,69 @@ Route120_MapScripts:: @ 815160E
.byte 0
Route120_MapScript1_15161E:: @ 815161E
- checkflag 2145
- callif 1, Route120_EventScript_151628
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, Route120_EventScript_151628
end
Route120_EventScript_151628:: @ 8151628
- compare 0x8004, 0
- callif 1, Route120_EventScript_15166B
- compare 0x8004, 1
- callif 1, Route120_EventScript_151672
- compare 0x8004, 2
- callif 1, Route120_EventScript_151676
- compare 0x8004, 3
- callif 1, Route120_EventScript_15167A
- compare 0x8004, 4
- callif 1, Route120_EventScript_15167E
- compare 0x8004, 5
- callif 1, Route120_EventScript_151682
+ compare VAR_SPECIAL_4, 0
+ call_if_eq Route120_EventScript_15166B
+ compare VAR_SPECIAL_4, 1
+ call_if_eq Route120_EventScript_151672
+ compare VAR_SPECIAL_4, 2
+ call_if_eq Route120_EventScript_151676
+ compare VAR_SPECIAL_4, 3
+ call_if_eq Route120_EventScript_15167A
+ compare VAR_SPECIAL_4, 4
+ call_if_eq Route120_EventScript_15167E
+ compare VAR_SPECIAL_4, 5
+ call_if_eq Route120_EventScript_151682
return
Route120_EventScript_15166B:: @ 815166B
- disappear 30
- disappear 36
+ removeobject 30
+ removeobject 36
return
Route120_EventScript_151672:: @ 8151672
- disappear 37
+ removeobject 37
return
Route120_EventScript_151676:: @ 8151676
- disappear 38
+ removeobject 38
return
Route120_EventScript_15167A:: @ 815167A
- disappear 39
+ removeobject 39
return
Route120_EventScript_15167E:: @ 815167E
- disappear 41
+ removeobject 41
return
Route120_EventScript_151682:: @ 8151682
- disappear 40
+ removeobject 40
return
Route120_MapScript1_151686:: @ 8151686
- checkflag 228
- callif 0, Route120_EventScript_1516A2
- checkflag 285
- callif 1, Route120_EventScript_1516B5
- checkflag 285
- callif 0, Route120_EventScript_1516DA
+ call_if_unset FLAG_REGI_DOORS_OPENED, Route120_EventScript_1516A2
+ call_if_set FLAG_RECEIVED_DEVON_SCOPE, Route120_EventScript_1516B5
+ call_if_unset FLAG_RECEIVED_DEVON_SCOPE, Route120_EventScript_1516DA
end
Route120_EventScript_1516A2:: @ 81516A2
- setmaptile 7, 54, 124, 1
- setmaptile 7, 55, 145, 1
+ setmetatile 7, 54, 124, 1
+ setmetatile 7, 55, 145, 1
return
Route120_EventScript_1516B5:: @ 81516B5
- setmaptile 13, 15, 663, 0
- setmaptile 12, 16, 671, 0
- setmaptile 12, 17, 161, 0
- setmaptile 13, 17, 161, 0
+ setmetatile 13, 15, 663, 0
+ setmetatile 12, 16, 671, 0
+ setmetatile 12, 17, 161, 0
+ setmetatile 13, 17, 161, 0
return
Route120_EventScript_1516DA:: @ 81516DA
- spritebehave 36, 10
+ setobjectmovementtype 36, 10
return
Route120_MapScript1_1516DF:: @ 81516DF
@@ -80,47 +76,46 @@ Route120_MapScript1_1516DF:: @ 81516DF
end
Route120_EventScript_1516EA:: @ 81516EA
- getplayerxy 0x4000, 0x4001
- compare 0x4001, 14
- jumpif 3, Route120_EventScript_151715
- compare 0x4001, 60
- jumpif 3, Route120_EventScript_151719
- compare 0x4001, 61
- jumpif 4, Route120_EventScript_151711
+ getplayerxy VAR_TEMP_0, VAR_TEMP_1
+ compare VAR_TEMP_1, 14
+ goto_if_le Route120_EventScript_151715
+ compare VAR_TEMP_1, 60
+ goto_if_le Route120_EventScript_151719
+ compare VAR_TEMP_1, 61
+ goto_if_ge Route120_EventScript_151711
return
Route120_EventScript_151711:: @ 8151711
- setweather 1
+ setweather WEATHER_CLOUDS
return
Route120_EventScript_151715:: @ 8151715
- setweather 2
+ setweather WEATHER_SUNNY
return
Route120_EventScript_151719:: @ 8151719
- compare 0x4000, 7
- jumpif 3, Route120_EventScript_151735
- compare 0x4000, 19
- jumpif 3, Route120_EventScript_151715
- jump Route120_EventScript_151735
+ compare VAR_TEMP_0, 7
+ goto_if_le Route120_EventScript_151735
+ compare VAR_TEMP_0, 19
+ goto_if_le Route120_EventScript_151715
+ goto Route120_EventScript_151735
end
Route120_EventScript_151735:: @ 8151735
- setweather 3
+ setweather WEATHER_RAIN_LIGHT
return
Route120_EventScript_151739:: @ 8151739
lock
faceplayer
- checkdailyflags
- checkflag 2254
- jumpeq Route120_EventScript_151837
- msgbox Route120_Text_1C58F1, 5
- compare RESULT, 1
- callif 1, Route120_EventScript_151841
- compare RESULT, 0
- callif 1, Route120_EventScript_15184A
- specialval RESULT, GetPlayerTrainerIdOnesDigit
+ dodailyevents
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE120, Route120_EventScript_151837
+ msgbox Route120_Text_1C58F1, MSGBOX_YESNO
+ compare RESULT, YES
+ call_if_eq Route120_EventScript_151841
+ compare RESULT, NO
+ call_if_eq Route120_EventScript_15184A
+ specialvar RESULT, GetPlayerTrainerIdOnesDigit
switch RESULT
case 0, Route120_EventScript_1517DC
case 5, Route120_EventScript_1517DC
@@ -135,35 +130,35 @@ Route120_EventScript_151739:: @ 8151739
end
Route120_EventScript_1517DC:: @ 81517DC
- setvar 0x8004, 143
- jump Route120_EventScript_151813
+ setvar VAR_SPECIAL_4, ITEM_FIGY_BERRY
+ goto Route120_EventScript_151813
end
Route120_EventScript_1517E7:: @ 81517E7
- setvar 0x8004, 144
- jump Route120_EventScript_151813
+ setvar VAR_SPECIAL_4, ITEM_WIKI_BERRY
+ goto Route120_EventScript_151813
end
Route120_EventScript_1517F2:: @ 81517F2
- setvar 0x8004, 145
- jump Route120_EventScript_151813
+ setvar VAR_SPECIAL_4, ITEM_MAGO_BERRY
+ goto Route120_EventScript_151813
end
Route120_EventScript_1517FD:: @ 81517FD
- setvar 0x8004, 146
- jump Route120_EventScript_151813
+ setvar VAR_SPECIAL_4, ITEM_AGUAV_BERRY
+ goto Route120_EventScript_151813
end
Route120_EventScript_151808:: @ 8151808
- setvar 0x8004, 147
- jump Route120_EventScript_151813
+ setvar VAR_SPECIAL_4, ITEM_IAPAPA_BERRY
+ goto Route120_EventScript_151813
end
Route120_EventScript_151813:: @ 8151813
- giveitem 0x8004
+ giveitem_std VAR_SPECIAL_4
compare RESULT, 0
- jumpeq Route120_EventScript_1A029B
- setflag 2254
+ goto_if_eq Route120_EventScript_1A029B
+ setflag FLAG_DAILY_RECEIVED_BERRY_ROUTE120
msgbox Route120_Text_1C5A0B, 4
release
end
@@ -184,88 +179,87 @@ Route120_EventScript_15184A:: @ 815184A
Route120_EventScript_151853:: @ 8151853
lock
faceplayer
- checkflag 290
- jumpeq Route120_EventScript_151884
- msgbox Route120_Text_171827, 5
- compare RESULT, 0
- jumpeq Route120_EventScript_151877
- jump Route120_EventScript_15189D
+ goto_if_set FLAG_NOT_READY_FOR_BATTLE_ROUTE120, Route120_EventScript_151884
+ msgbox Route120_Text_171827, MSGBOX_YESNO
+ compare RESULT, NO
+ goto_if_eq Route120_EventScript_151877
+ goto Route120_EventScript_15189D
end
Route120_EventScript_151877:: @ 8151877
msgbox Route120_Text_17193D, 4
- setflag 290
+ setflag FLAG_NOT_READY_FOR_BATTLE_ROUTE120
release
end
Route120_EventScript_151884:: @ 8151884
- msgbox Route120_Text_17196F, 5
- compare RESULT, 0
- jumpeq Route120_EventScript_151877
- jump Route120_EventScript_15189D
+ msgbox Route120_Text_17196F, MSGBOX_YESNO
+ compare RESULT, NO
+ goto_if_eq Route120_EventScript_151877
+ goto Route120_EventScript_15189D
end
Route120_EventScript_15189D:: @ 815189D
msgbox Route120_Text_1719A0, 4
- closebutton
+ closemessage
compare FACING, 2
- callif 1, Route120_EventScript_15197F
+ call_if_eq Route120_EventScript_15197F
compare FACING, 3
- callif 1, Route120_EventScript_15198A
- move 31, Route120_Movement_1A083F
- waitmove 0
- pause 20
+ call_if_eq Route120_EventScript_15198A
+ applymovement 31, Route120_Movement_1A083F
+ waitmovement 0
+ delay 20
msgbox Route120_Text_1719D4, 4
- closebutton
- move 30, Route120_Movement_1A0843
- waitmove 0
- move 30, Route120_Movement_1A0662
- waitmove 0
- checksound
- pokecry SPECIES_KECLEON, 2
- pause 40
- waitpokecry
+ closemessage
+ applymovement 30, Route120_Movement_1A0843
+ waitmovement 0
+ applymovement 30, Route120_Movement_1A0662
+ waitmovement 0
+ waitse
+ playmoncry SPECIES_KECLEON, 2
+ delay 40
+ waitmoncry
setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
- setvar 0x8004, 0
- setflag 2145
+ setvar VAR_SPECIAL_4, 0
+ setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
- clearflag 2145
- jump Route120_EventScript_151908
+ clearflag FLAG_SYS_CTRL_OBJ_DELETE
+ goto Route120_EventScript_151908
end
Route120_EventScript_151908:: @ 8151908
- move 31, Route120_Movement_1A0845
- move 255, Route120_Movement_1A0841
- waitmove 0
+ applymovement 31, Route120_Movement_1A0845
+ applymovement 255, Route120_Movement_1A0841
+ waitmovement 0
msgbox Route120_Text_171A40, 4
- giveitem ITEM_DEVON_SCOPE
- setflag 285
+ giveitem_std ITEM_DEVON_SCOPE
+ setflag FLAG_RECEIVED_DEVON_SCOPE
msgbox Route120_Text_171B0E, 4
- closebutton
- move 31, Route120_Movement_1A0845
- waitmove 0
- pause 50
- setanimation 0, 1
- doanimation 30
- pause 15
- disappear 31
- checkanimation 30
- setmaptile 13, 15, 663, 0
- setmaptile 12, 16, 671, 0
- setmaptile 12, 17, 161, 0
- setmaptile 13, 17, 161, 0
+ closemessage
+ applymovement 31, Route120_Movement_1A0845
+ waitmovement 0
+ delay 50
+ setfieldeffectargument 0, 1
+ dofieldeffect 30
+ delay 15
+ removeobject 31
+ waitfieldeffect 30
+ setmetatile 13, 15, 663, 0
+ setmetatile 12, 16, 671, 0
+ setmetatile 12, 17, 161, 0
+ setmetatile 13, 17, 161, 0
special DrawWholeMapView
release
end
Route120_EventScript_15197F:: @ 815197F
- move 255, Route120_Movement_1A083F
- waitmove 0
+ applymovement 255, Route120_Movement_1A083F
+ waitmovement 0
return
Route120_EventScript_15198A:: @ 815198A
- move 255, Route120_Movement_151995
- waitmove 0
+ applymovement 255, Route120_Movement_151995
+ waitmovement 0
return
Route120_Movement_151995:: @ 8151995
@@ -292,9 +286,9 @@ Route120_EventScript_1519B3:: @ 81519B3
Route120_EventScript_1519CA:: @ 81519CA
trainerbattle 0, OPPONENT_ROBERT_1, 0, Route120_Text_1BF07E, Route120_Text_1BF0A5
- specialval RESULT, sub_8082C68
+ specialvar RESULT, ShouldTryRematchBattle
compare RESULT, 1
- jumpeq Route120_EventScript_1519F1
+ goto_if_eq Route120_EventScript_1519F1
msgbox Route120_Text_1BF0C3, 6
end
@@ -315,9 +309,9 @@ Route120_EventScript_151A1F:: @ 8151A1F
Route120_EventScript_151A36:: @ 8151A36
trainerbattle 0, OPPONENT_BRANDON_1, 0, Route120_Text_1BF32B, Route120_Text_1BF36B
- specialval RESULT, sub_8082C68
+ specialvar RESULT, ShouldTryRematchBattle
compare RESULT, 1
- jumpeq Route120_EventScript_151A5D
+ goto_if_eq Route120_EventScript_151A5D
msgbox Route120_Text_1BF38D, 6
end