Files
Pokemon-Firered/data/maps/ThreeIsland_DunsparceTunnel/scripts.inc
T
2022-06-24 21:10:48 -04:00

58 lines
2.0 KiB
C++

.set LOCALID_PROSPECTOR, 1
ThreeIsland_DunsparceTunnel_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, ThreeIsland_DunsparceTunnel_OnTransition
.byte 0
ThreeIsland_DunsparceTunnel_OnTransition::
setworldmapflag FLAG_WORLD_MAP_THREE_ISLAND_DUNSPARCE_TUNNEL
specialvar VAR_RESULT, IsNationalPokedexEnabled
copyvar VAR_0x8008, VAR_RESULT
compare VAR_0x8008, TRUE
call_if_eq ThreeIsland_DunsparceTunnel_EventScript_SetLayoutDugOut
compare VAR_0x8008, FALSE
call_if_eq ThreeIsland_DunsparceTunnel_EventScript_MoveProspectorToWall
end
ThreeIsland_DunsparceTunnel_EventScript_SetLayoutDugOut::
setmaplayoutindex LAYOUT_THREE_ISLAND_DUNSPARCE_TUNNEL_DUG_OUT
return
ThreeIsland_DunsparceTunnel_EventScript_MoveProspectorToWall::
setobjectxyperm LOCALID_PROSPECTOR, 6, 3
setobjectmovementtype LOCALID_PROSPECTOR, MOVEMENT_TYPE_FACE_RIGHT
return
ThreeIsland_DunsparceTunnel_EventScript_Prospector::
lock
faceplayer
goto_if_set FLAG_GOT_NUGGET_FROM_DUNSPARCE_TUNNEL, ThreeIsland_DunsparceTunnel_EventScript_ProspectorAlreadyGaveNugget
specialvar VAR_RESULT, IsNationalPokedexEnabled
compare VAR_RESULT, TRUE
goto_if_eq ThreeIsland_DunsparceTunnel_EventScript_ProspectorStruckGold
msgbox ThreeIsland_DunsparceTunnel_Text_ProspectingForGold
closemessage
applymovement LOCALID_PROSPECTOR, Movement_FaceOriginalDirection
waitmovement 0
release
end
ThreeIsland_DunsparceTunnel_EventScript_ProspectorStruckGold::
msgbox ThreeIsland_DunsparceTunnel_Text_StruckGoldThisIsForYou
giveitem ITEM_NUGGET
compare VAR_RESULT, FALSE
goto_if_eq ThreeIsland_DunsparceTunnel_EventScript_NoRoomForNugget
setflag FLAG_GOT_NUGGET_FROM_DUNSPARCE_TUNNEL
goto ThreeIsland_DunsparceTunnel_EventScript_ProspectorAlreadyGaveNugget
end
ThreeIsland_DunsparceTunnel_EventScript_NoRoomForNugget::
msgbox ThreeIsland_DunsparceTunnel_Text_WhoopsBagCrammedFull
release
end
ThreeIsland_DunsparceTunnel_EventScript_ProspectorAlreadyGaveNugget::
msgbox ThreeIsland_DunsparceTunnel_Text_ThatsANugget
release
end