mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
79 lines
1.7 KiB
PHP
79 lines
1.7 KiB
PHP
MysteryGiftScript_SurfPichu::
|
|
setvaddress MysteryGiftScript_SurfPichu
|
|
vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible
|
|
returnram
|
|
|
|
SurfPichu_GiveIfPossible:
|
|
specialvar VAR_GIFT_PICHU_SLOT, CalculatePlayerPartyCount
|
|
compare VAR_GIFT_PICHU_SLOT, PARTY_SIZE
|
|
vgoto_if_eq SurfPichu_FullParty
|
|
setflag FLAG_MYSTERY_GIFT_DONE
|
|
vcall SurfPichu_GiveEgg
|
|
lock
|
|
faceplayer
|
|
vmessage sText_MysteryGiftEgg
|
|
waitmessage
|
|
waitbuttonpress
|
|
playfanfare MUS_OBTAIN_ITEM
|
|
waitfanfare
|
|
release
|
|
end
|
|
|
|
SurfPichu_FullParty:
|
|
lock
|
|
faceplayer
|
|
vmessage sText_FullParty
|
|
waitmessage
|
|
waitbuttonpress
|
|
release
|
|
end
|
|
|
|
SurfPichu_GiveEgg:
|
|
giveegg SPECIES_PICHU
|
|
setmoneventlegal VAR_GIFT_PICHU_SLOT
|
|
setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER
|
|
compare VAR_GIFT_PICHU_SLOT, 1
|
|
vgoto_if_eq SurfPichu_Slot1
|
|
compare VAR_GIFT_PICHU_SLOT, 2
|
|
vgoto_if_eq SurfPichu_Slot2
|
|
compare VAR_GIFT_PICHU_SLOT, 3
|
|
vgoto_if_eq SurfPichu_Slot3
|
|
compare VAR_GIFT_PICHU_SLOT, 4
|
|
vgoto_if_eq SurfPichu_Slot4
|
|
compare VAR_GIFT_PICHU_SLOT, 5
|
|
vgoto_if_eq SurfPichu_Slot5
|
|
return
|
|
|
|
SurfPichu_Slot1:
|
|
setmonmove 1, 2, MOVE_SURF
|
|
return
|
|
|
|
SurfPichu_Slot2::
|
|
setmonmove 2, 2, MOVE_SURF
|
|
return
|
|
|
|
SurfPichu_Slot3:
|
|
setmonmove 3, 2, MOVE_SURF
|
|
return
|
|
|
|
SurfPichu_Slot4:
|
|
setmonmove 4, 2, MOVE_SURF
|
|
return
|
|
|
|
SurfPichu_Slot5:
|
|
setmonmove 5, 2, MOVE_SURF
|
|
return
|
|
|
|
sText_MysteryGiftEgg:
|
|
.string "Thank you for using the MYSTERY\n"
|
|
.string "GIFT System.\p"
|
|
.string "From the POKéMON CENTER we\n"
|
|
.string "have a gift--a POKéMON EGG!\p"
|
|
.string "Please raise it with love and\n"
|
|
.string "kindness.$"
|
|
|
|
sText_FullParty:
|
|
.string "Oh, your party appears to be full.\p"
|
|
.string "Please come see me after storing\n"
|
|
.string "a POKéMON on a PC.$"
|