pokecrystal-board/maps/CeladonGameCornerPrizeRoom.asm

293 lines
7.4 KiB
NASM
Raw Normal View History

CELADONGAMECORNERPRIZEROOM_TM32_COINS EQU 1500
CELADONGAMECORNERPRIZEROOM_TM29_COINS EQU 3500
CELADONGAMECORNERPRIZEROOM_TM15_COINS EQU 7500
CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS EQU 2222
CELADONGAMECORNERPRIZEROOM_PORYGON_COINS EQU 5555
CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS EQU 8888
object_const_def
2015-11-26 21:22:14 -08:00
const CELADONGAMECORNERPRIZEROOM_GENTLEMAN
const CELADONGAMECORNERPRIZEROOM_PHARMACIST
CeladonGameCornerPrizeRoom_MapScripts:
def_scene_scripts
def_callbacks
CeladonGameCornerPrizeRoomGentlemanScript:
jumptextfaceplayer CeladonGameCornerPrizeRoomGentlemanText
CeladonGameCornerPrizeRoomPharmacistScript:
jumptextfaceplayer CeladonGameCornerPrizeRoomPharmacistText
2018-01-12 14:09:32 -08:00
CeladonGameCornerPrizeRoomTMVendor:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext CeladonPrizeRoom_PrizeVendorIntroText
2015-11-25 07:16:29 -08:00
waitbutton
checkitem COIN_CASE
2015-10-16 10:35:43 -07:00
iffalse CeladonPrizeRoom_NoCoinCase
writetext CeladonPrizeRoom_AskWhichPrizeText
2015-10-16 10:35:43 -07:00
CeladonPrizeRoom_tmcounterloop:
special DisplayCoinCaseBalance
loadmenu CeladonPrizeRoom_TMMenuHeader
2015-12-15 15:59:49 -08:00
verticalmenu
closewindow
ifequal 1, .DoubleTeam
ifequal 2, .Psychic
ifequal 3, .HyperBeam
sjump CeladonPrizeRoom_CancelPurchaseScript
.DoubleTeam:
checkcoins CELADONGAMECORNERPRIZEROOM_TM32_COINS
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
getitemname STRING_BUFFER_3, TM_DOUBLE_TEAM
2015-10-16 10:35:43 -07:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
2015-11-04 17:20:14 -08:00
giveitem TM_DOUBLE_TEAM
2015-10-16 10:35:43 -07:00
iffalse CeladonPrizeRoom_notenoughroom
takecoins CELADONGAMECORNERPRIZEROOM_TM32_COINS
sjump CeladonPrizeRoom_purchased
.Psychic:
checkcoins CELADONGAMECORNERPRIZEROOM_TM29_COINS
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
getitemname STRING_BUFFER_3, TM_PSYCHIC_M
2015-10-16 10:35:43 -07:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_PSYCHIC_M
2015-10-16 10:35:43 -07:00
iffalse CeladonPrizeRoom_notenoughroom
takecoins CELADONGAMECORNERPRIZEROOM_TM29_COINS
sjump CeladonPrizeRoom_purchased
.HyperBeam:
checkcoins CELADONGAMECORNERPRIZEROOM_TM15_COINS
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
getitemname STRING_BUFFER_3, TM_HYPER_BEAM
2015-10-16 10:35:43 -07:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
2015-11-04 17:20:14 -08:00
giveitem TM_HYPER_BEAM
2015-10-16 10:35:43 -07:00
iffalse CeladonPrizeRoom_notenoughroom
takecoins CELADONGAMECORNERPRIZEROOM_TM15_COINS
sjump CeladonPrizeRoom_purchased
2015-10-16 10:35:43 -07:00
CeladonPrizeRoom_askbuy:
writetext CeladonPrizeRoom_ConfirmPurchaseText
yesorno
end
2015-10-16 10:35:43 -07:00
CeladonPrizeRoom_purchased:
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
sjump CeladonPrizeRoom_tmcounterloop
2015-10-16 10:35:43 -07:00
CeladonPrizeRoom_notenoughcoins:
writetext CeladonPrizeRoom_NotEnoughCoinsText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
2015-10-16 10:35:43 -07:00
CeladonPrizeRoom_notenoughroom:
writetext CeladonPrizeRoom_NotEnoughRoomText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
CeladonPrizeRoom_CancelPurchaseScript:
writetext CeladonPrizeRoom_ComeAgainText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
2015-10-16 10:35:43 -07:00
CeladonPrizeRoom_NoCoinCase:
writetext CeladonPrizeRoom_NoCoinCaseText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
CeladonPrizeRoom_TMMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 2, 15, TEXTBOX_Y - 1
dw .MenuData
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR ; flags
db 4 ; items
db "TM32 {d:CELADONGAMECORNERPRIZEROOM_TM32_COINS}@"
db "TM29 {d:CELADONGAMECORNERPRIZEROOM_TM29_COINS}@"
db "TM15 {d:CELADONGAMECORNERPRIZEROOM_TM15_COINS}@"
db "CANCEL@"
2018-01-12 14:09:32 -08:00
CeladonGameCornerPrizeRoomPokemonVendor:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext CeladonPrizeRoom_PrizeVendorIntroText
2015-11-25 07:16:29 -08:00
waitbutton
checkitem COIN_CASE
2015-10-16 10:35:43 -07:00
iffalse CeladonPrizeRoom_NoCoinCase
.loop
writetext CeladonPrizeRoom_AskWhichPrizeText
special DisplayCoinCaseBalance
loadmenu .MenuHeader
2015-12-15 15:59:49 -08:00
verticalmenu
closewindow
ifequal 1, .Pikachu
ifequal 2, .Porygon
ifequal 3, .Larvitar
sjump CeladonPrizeRoom_CancelPurchaseScript
.Pikachu:
checkcoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
readvar VAR_PARTYCOUNT
2018-02-02 18:09:17 -08:00
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
getmonname STRING_BUFFER_3, PIKACHU
2015-10-16 10:35:43 -07:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
setval PIKACHU
special GameCornerPrizeMonCheckDex
2015-10-04 11:14:51 -07:00
givepoke PIKACHU, 25
takecoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS
sjump .loop
.Porygon:
checkcoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
readvar VAR_PARTYCOUNT
2018-02-02 18:09:17 -08:00
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
getmonname STRING_BUFFER_3, PORYGON
2015-10-16 10:35:43 -07:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
setval PORYGON
special GameCornerPrizeMonCheckDex
2015-10-04 11:14:51 -07:00
givepoke PORYGON, 15
takecoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS
sjump .loop
.Larvitar:
checkcoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
readvar VAR_PARTYCOUNT
2018-02-02 18:09:17 -08:00
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
getmonname STRING_BUFFER_3, LARVITAR
2015-10-16 10:35:43 -07:00
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
setval LARVITAR
special GameCornerPrizeMonCheckDex
2015-10-04 11:14:51 -07:00
givepoke LARVITAR, 40
takecoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS
sjump .loop
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 2, 17, TEXTBOX_Y - 1
dw .MenuData
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR ; flags
db 4 ; items
db "PIKACHU {d:CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS}@"
db "PORYGON {d:CELADONGAMECORNERPRIZEROOM_PORYGON_COINS}@"
db "LARVITAR {d:CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS}@"
db "CANCEL@"
CeladonGameCornerPrizeRoomGentlemanText:
text "I wanted PORYGON,"
line "but I was short by"
cont "100 coins…"
done
CeladonGameCornerPrizeRoomPharmacistText:
2019-04-12 08:18:35 -07:00
if DEF(_CRYSTAL_AU)
text "I don't want to"
line "lose my coins."
done
else
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
2019-04-12 08:18:35 -07:00
endc
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 @"
text_ram wStringBuffer3
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
CeladonGameCornerPrizeRoom_MapEvents:
db 0, 0 ; filler
def_warp_events
2018-02-01 19:22:07 -08:00
warp_event 2, 5, CELADON_CITY, 7
warp_event 3, 5, CELADON_CITY, 7
def_coord_events
def_bg_events
2018-02-01 19:22:07 -08:00
bg_event 2, 1, BGEVENT_READ, CeladonGameCornerPrizeRoomTMVendor
bg_event 4, 1, BGEVENT_READ, CeladonGameCornerPrizeRoomPokemonVendor
def_object_events
2018-02-01 19:22:07 -08:00
object_event 0, 2, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomGentlemanScript, -1
object_event 4, 4, SPRITE_PHARMACIST, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomPharmacistScript, -1