pokecrystal/maps/CeladonGameCornerPrizeRoom.asm

293 lines
6.2 KiB
NASM
Raw Normal View History

2015-11-27 05:22:14 +00:00
const_value set 2
const CELADONGAMECORNERPRIZEROOM_GENTLEMAN
const CELADONGAMECORNERPRIZEROOM_PHARMACIST
2015-07-10 08:45:35 +00:00
CeladonGameCornerPrizeRoom_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
CeladonGameCornerPrizeRoomGentlemanScript:
jumptextfaceplayer CeladonGameCornerPrizeRoomGentlemanText
CeladonGameCornerPrizeRoomPharmacistScript:
jumptextfaceplayer CeladonGameCornerPrizeRoomPharmacistText
GoldenrodGameCornerTMVendor:
faceplayer
2015-12-09 23:25:44 +00:00
opentext
writetext CeladonPrizeRoom_PrizeVendorIntroText
2015-11-25 15:16:29 +00:00
waitbutton
checkitem COIN_CASE
2015-10-16 17:35:43 +00:00
iffalse CeladonPrizeRoom_NoCoinCase
writetext CeladonPrizeRoom_AskWhichPrizeText
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_tmcounterloop:
special Special_DisplayCoinCaseBalance
loadmenudata CeladonPrizeRoom_TMMenuDataHeader
2015-12-15 23:59:49 +00:00
verticalmenu
closewindow
2015-10-16 17:35:43 +00:00
if_equal $1, .doubleteam
if_equal $2, .psychic
if_equal $3, .hyperbeam
jump CeladonPrizeRoom_cancel
.doubleteam
checkcoins 1500
2015-10-16 17:35:43 +00:00
if_equal $2, CeladonPrizeRoom_notenoughcoins
itemtotext TM_DOUBLE_TEAM, $0
2015-10-16 17:35:43 +00:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
2015-11-05 01:20:14 +00:00
giveitem TM_DOUBLE_TEAM
2015-10-16 17:35:43 +00:00
iffalse CeladonPrizeRoom_notenoughroom
takecoins 1500
2015-10-16 17:35:43 +00:00
jump CeladonPrizeRoom_purchased
.psychic
checkcoins 3500
2015-10-16 17:35:43 +00:00
if_equal $2, CeladonPrizeRoom_notenoughcoins
itemtotext TM_PSYCHIC_M, $0
2015-10-16 17:35:43 +00:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
giveitem TM_PSYCHIC_M
2015-10-16 17:35:43 +00:00
iffalse CeladonPrizeRoom_notenoughroom
takecoins 3500
2015-10-16 17:35:43 +00:00
jump CeladonPrizeRoom_purchased
.hyperbeam
checkcoins 7500
2015-10-16 17:35:43 +00:00
if_equal $2, CeladonPrizeRoom_notenoughcoins
itemtotext TM_HYPER_BEAM, $0
2015-10-16 17:35:43 +00:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
2015-11-05 01:20:14 +00:00
giveitem TM_HYPER_BEAM
2015-10-16 17:35:43 +00:00
iffalse CeladonPrizeRoom_notenoughroom
takecoins 7500
2015-10-16 17:35:43 +00:00
jump CeladonPrizeRoom_purchased
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_askbuy:
writetext CeladonPrizeRoom_ConfirmPurchaseText
yesorno
end
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_purchased:
2015-11-25 15:16:29 +00:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 15:16:29 +00:00
waitbutton
2015-10-16 17:35:43 +00:00
jump CeladonPrizeRoom_tmcounterloop
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_notenoughcoins:
writetext CeladonPrizeRoom_NotEnoughCoinsText
2015-11-25 15:16:29 +00:00
waitbutton
closetext
end
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_notenoughroom:
writetext CeladonPrizeRoom_NotEnoughRoomText
2015-11-25 15:16:29 +00:00
waitbutton
closetext
end
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_cancel:
writetext CeladonPrizeRoom_ComeAgainText
2015-11-25 15:16:29 +00:00
waitbutton
closetext
end
2015-10-16 17:35:43 +00:00
CeladonPrizeRoom_NoCoinCase:
writetext CeladonPrizeRoom_NoCoinCaseText
2015-11-25 15:16:29 +00:00
waitbutton
closetext
end
CeladonPrizeRoom_TMMenuDataHeader:
db $40 ; flags
db 02, 00 ; start coords
db 11, 15 ; end coords
dw .MenuData2
db 1 ; default option
.MenuData2:
db $80 ; flags
db 4 ; items
db "TM32 1500@"
db "TM29 3500@"
db "TM15 7500@"
db "CANCEL@"
GoldenrodGameCornerPokemonVendor:
faceplayer
2015-12-09 23:25:44 +00:00
opentext
writetext CeladonPrizeRoom_PrizeVendorIntroText
2015-11-25 15:16:29 +00:00
waitbutton
checkitem COIN_CASE
2015-10-16 17:35:43 +00:00
iffalse CeladonPrizeRoom_NoCoinCase
.loop
writetext CeladonPrizeRoom_AskWhichPrizeText
2015-10-16 17:35:43 +00:00
special Special_DisplayCoinCaseBalance
loadmenudata .MenuDataHeader
2015-12-15 23:59:49 +00:00
verticalmenu
closewindow
2015-10-16 17:35:43 +00:00
if_equal $1, .pikachu
if_equal $2, .porygon
if_equal $3, .larvitar
jump CeladonPrizeRoom_cancel
.pikachu
checkcoins 2222
2015-10-16 17:35:43 +00:00
if_equal $2, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
2015-10-16 17:35:43 +00:00
if_equal $6, CeladonPrizeRoom_notenoughroom
pokenamemem PIKACHU, $0
2015-10-16 17:35:43 +00:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
2015-11-25 15:16:29 +00:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 15:16:29 +00:00
waitbutton
writebyte PIKACHU
special Special_GameCornerPrizeMonCheckDex
2015-10-04 18:14:51 +00:00
givepoke PIKACHU, 25
takecoins 2222
2015-10-16 17:35:43 +00:00
jump .loop
.porygon
checkcoins 5555
2015-10-16 17:35:43 +00:00
if_equal $2, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
2015-10-16 17:35:43 +00:00
if_equal $6, CeladonPrizeRoom_notenoughroom
pokenamemem PORYGON, $0
2015-10-16 17:35:43 +00:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
2015-11-25 15:16:29 +00:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 15:16:29 +00:00
waitbutton
writebyte PORYGON
special Special_GameCornerPrizeMonCheckDex
2015-10-04 18:14:51 +00:00
givepoke PORYGON, 15
takecoins 5555
2015-10-16 17:35:43 +00:00
jump .loop
.larvitar
checkcoins 8888
2015-10-16 17:35:43 +00:00
if_equal $2, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
2015-10-16 17:35:43 +00:00
if_equal $6, CeladonPrizeRoom_notenoughroom
pokenamemem LARVITAR, $0
2015-10-16 17:35:43 +00:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
2015-11-25 15:16:29 +00:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 15:16:29 +00:00
waitbutton
writebyte LARVITAR
special Special_GameCornerPrizeMonCheckDex
2015-10-04 18:14:51 +00:00
givepoke LARVITAR, 40
takecoins 8888
2015-10-16 17:35:43 +00:00
jump .loop
.MenuDataHeader:
db $40 ; flags
db 02, 00 ; start coords
db 11, 17 ; end coords
dw .MenuData2
db 1 ; default option
.MenuData2:
db $80 ; flags
db 4 ; items
db "PIKACHU 2222@"
db "PORYGON 5555@"
db "LARVITAR 8888@"
db "CANCEL@"
CeladonGameCornerPrizeRoomGentlemanText:
text "I wanted PORYGON,"
line "but I was short by"
cont "100 coins…"
done
CeladonGameCornerPrizeRoomPharmacistText:
text "Whew…"
para "I've got to stay"
line "calm and cool…"
para "I can't lose my"
line "cool, or I'll lose"
cont "all my money…"
done
CeladonPrizeRoom_PrizeVendorIntroText:
text "Welcome!"
para "We exchange your"
line "coins for fabulous"
cont "prizes!"
done
CeladonPrizeRoom_AskWhichPrizeText:
text "Which prize would"
line "you like?"
done
CeladonPrizeRoom_ConfirmPurchaseText:
text "OK, so you wanted"
line "a @"
2015-02-10 23:37:24 +00:00
text_from_ram StringBuffer3
text "?"
done
CeladonPrizeRoom_HereYouGoText:
text "Here you go!"
done
CeladonPrizeRoom_NotEnoughCoinsText:
text "You don't have"
line "enough coins."
done
CeladonPrizeRoom_NotEnoughRoomText:
text "You have no room"
line "for it."
done
CeladonPrizeRoom_ComeAgainText:
text "Oh. Please come"
line "back with coins!"
done
CeladonPrizeRoom_NoCoinCaseText:
text "Oh? You don't have"
line "a COIN CASE."
done
2015-07-10 08:45:35 +00:00
CeladonGameCornerPrizeRoom_MapEventHeader:
; filler
db 0, 0
.Warps:
db 2
warp_def $5, $2, 7, CELADON_CITY
warp_def $5, $3, 7, CELADON_CITY
.CoordEvents:
db 0
.BGEvents:
db 2
bg_event 1, 2, BGEVENT_READ, GoldenrodGameCornerTMVendor
bg_event 1, 4, BGEVENT_READ, GoldenrodGameCornerPokemonVendor
.ObjectEvents:
db 2
object_event SPRITE_GENTLEMAN, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomGentlemanScript, -1
object_event SPRITE_PHARMACIST, 4, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomPharmacistScript, -1