pokecrystal-board/maps/DayCare.asm
Remy Oukaour c05b7f41dd Renaming: (fix #412)
- MapTriggers / maptrigger → SceneScripts / scene_script
- XYTriggers / xy_trigger → CoordEvents / coord_event
- Signposts / signpost → BGEvents / bg_event
- PersonEvents / person_event → ObjectEvents / object_event
2017-12-24 14:33:17 -05:00

181 lines
3.2 KiB
NASM

const_value set 2
const DAYCARE_GRAMPS
const DAYCARE_GRANNY
DayCare_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 1
dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
.EggCheckCallback:
checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
iftrue .PutDayCareManOutside
clearevent EVENT_DAY_CARE_MAN_IN_DAY_CARE
setevent EVENT_DAY_CARE_MAN_ON_ROUTE_34
return
.PutDayCareManOutside:
setevent EVENT_DAY_CARE_MAN_IN_DAY_CARE
clearevent EVENT_DAY_CARE_MAN_ON_ROUTE_34
return
DayCareManScript_Inside:
faceplayer
opentext
checkevent EVENT_GOT_ODD_EGG
iftrue .AlreadyHaveOddEgg
writetext DayCareManText_GiveOddEgg
buttonsound
closetext
checkcode VAR_PARTYCOUNT
if_equal PARTY_LENGTH, .PartyFull
special Special_GiveOddEgg
opentext
writetext DayCareText_GotOddEgg
playsound SFX_KEY_ITEM
waitsfx
writetext DayCareText_DescribeOddEgg
waitbutton
closetext
setevent EVENT_GOT_ODD_EGG
end
.PartyFull:
opentext
writetext DayCareText_PartyFull
waitbutton
closetext
end
.AlreadyHaveOddEgg:
special Special_DayCareMan
waitbutton
closetext
end
DayCareLadyScript:
faceplayer
opentext
checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
iftrue .HusbandWasLookingForYou
special Special_DayCareLady
waitbutton
closetext
end
.HusbandWasLookingForYou:
writetext Text_GrampsLookingForYou
waitbutton
closetext
end
DayCareBookshelf:
jumpstd difficultbookshelf
Text_GrampsLookingForYou:
text "Gramps was looking"
line "for you."
done
Text_DayCareManTalksAboutEggTicket:
text "I'm the DAY-CARE"
line "MAN."
para "There's something"
line "new in GOLDENROD"
para "called the TRADE"
line "CORNER."
para "I was given an EGG"
line "TICKET that can be"
para "traded in for a"
line "ODD EGG."
para "But since we run a"
line "DAY-CARE, we don't"
para "need it. You may"
line "as well have it."
done
DayCareManText_GiveOddEgg:
text "I'm the DAY-CARE"
line "MAN."
para "Do you know about"
line "EGGS?"
para "I was raising"
line "#MON with my"
cont "wife, you see."
para "We were shocked to"
line "find an EGG!"
para "How incredible is"
line "that?"
para "Well, wouldn't you"
line "like this EGG?"
para "Then fine, this is"
line "yours to keep!"
done
DayCareText_ComeAgain:
text "Come again."
done
DayCareText_GotOddEgg:
text "<PLAYER> received"
line "ODD EGG!"
done
DayCareText_DescribeOddEgg:
text "I found that when"
line "I was caring for"
para "someone's #MON"
line "before."
para "But the trainer"
line "didn't want the"
para "EGG, so I'd kept"
line "it around."
done
DayCareText_PartyFull:
text "You've no room for"
line "this."
done
DayCare_MapEventHeader:
; filler
db 0, 0
.Warps:
db 4
warp_def $5, $0, 3, ROUTE_34
warp_def $6, $0, 4, ROUTE_34
warp_def $7, $2, 5, ROUTE_34
warp_def $7, $3, 5, ROUTE_34
.CoordEvents:
db 0
.BGEvents:
db 2
bg_event 1, 0, BGEVENT_READ, DayCareBookshelf
bg_event 1, 1, BGEVENT_READ, DayCareBookshelf
.ObjectEvents:
db 2
object_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareManScript_Inside, EVENT_DAY_CARE_MAN_IN_DAY_CARE
object_event SPRITE_GRANNY, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, DayCareLadyScript, -1