pokecrystal-board/maps/GoldenrodGameCorner.asm

492 lines
14 KiB
NASM
Raw Normal View History

2018-01-31 08:38:45 -08:00
const_def 2 ; object constants
2015-11-26 21:22:14 -08:00
const GOLDENRODGAMECORNER_CLERK
const GOLDENRODGAMECORNER_RECEPTIONIST1
const GOLDENRODGAMECORNER_RECEPTIONIST2
const GOLDENRODGAMECORNER_PHARMACIST1
const GOLDENRODGAMECORNER_PHARMACIST2
const GOLDENRODGAMECORNER_POKEFAN_M1
const GOLDENRODGAMECORNER_COOLTRAINER_M
const GOLDENRODGAMECORNER_POKEFAN_F
const GOLDENRODGAMECORNER_COOLTRAINER_F
const GOLDENRODGAMECORNER_GENTLEMAN
const GOLDENRODGAMECORNER_POKEFAN_M2
const GOLDENRODGAMECORNER_POKEFAN_M3
GoldenrodGameCorner_MapScripts:
db 0 ; scene scripts
db 1 ; callbacks
callback MAPCALLBACK_OBJECTS, .Callback
.Callback:
2015-06-24 20:20:04 -07:00
checkevent EVENT_BEAT_ELITE_FOUR
iffalse .finish
checkitem COIN_CASE
iffalse .move_tutor_inside
checkcode VAR_WEEKDAY
2018-02-02 18:09:17 -08:00
ifequal WEDNESDAY, .move_tutor_outside
ifequal SATURDAY, .move_tutor_outside
.move_tutor_inside
2015-11-26 21:22:14 -08:00
appear GOLDENRODGAMECORNER_POKEFAN_M3
return
.move_tutor_outside
checkflag ENGINE_DAILY_MOVE_TUTOR
iftrue .finish
2015-11-26 21:22:14 -08:00
disappear GOLDENRODGAMECORNER_POKEFAN_M3
.finish
return
GoldenrodGameCornerPokefanM3Script:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerPokefanM3Text
2015-11-25 07:16:29 -08:00
waitbutton
closetext
turnobject GOLDENRODGAMECORNER_POKEFAN_M3, RIGHT
end
GoldenrodGmeCornerCoinVendorScript:
jumpstd gamecornercoinvendor
GoldenrodGmeCornerTMVendorScript:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerPrizeVendorIntroText
2015-11-25 07:16:29 -08:00
waitbutton
checkitem COIN_CASE
iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript
writetext GoldenrodGameCornerPrizeVendorWhichPrizeText
GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36
special DisplayCoinCaseBalance
loadmenu GoldenrodGameCornerTMVendorMenuHeader
2015-12-15 15:59:49 -08:00
verticalmenu
closewindow
2018-02-02 18:09:17 -08:00
ifequal 1, .Thunder
ifequal 2, .Blizzard
ifequal 3, .FireBlast
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
.Thunder:
checkcoins 5500
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
2018-01-11 22:40:20 -08:00
itemtotext TM_THUNDER, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
2015-11-04 17:20:14 -08:00
giveitem TM_THUNDER
iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
takecoins 5500
jump GoldenrodGmeCornerTMVendor_FinishScript
.Blizzard:
checkcoins 5500
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
2018-01-11 22:40:20 -08:00
itemtotext TM_BLIZZARD, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
2015-11-04 17:20:14 -08:00
giveitem TM_BLIZZARD
iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
takecoins 5500
jump GoldenrodGmeCornerTMVendor_FinishScript
.FireBlast:
checkcoins 5500
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
2018-01-11 22:40:20 -08:00
itemtotext TM_FIRE_BLAST, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
2015-11-04 17:20:14 -08:00
giveitem TM_FIRE_BLAST
iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
takecoins 5500
jump GoldenrodGmeCornerTMVendor_FinishScript
GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript:
writetext GoldenrodGameCornerPrizeVendorConfirmPrizeText
yesorno
end
GoldenrodGmeCornerTMVendor_FinishScript:
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
jump GoldenrodGmeCornerTMVendor_LoopScript
GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript:
writetext GoldenrodGameCornerPrizeVendorNeedMoreCoinsText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript:
writetext GoldenrodGameCornerPrizeVendorNoMoreRoomText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
GoldenrodGameCornerPrizeVendor_CancelPurchaseScript:
writetext GoldenrodGameCornerPrizeVendorQuitText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
GoldenrodGameCornerPrizeVendor_NoCoinCaseScript:
writetext GoldenrodGameCornerPrizeVendorNoCoinCaseText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
end
GoldenrodGameCornerTMVendorMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 2, 15, TEXTBOX_Y - 1
dw .MenuData
2013-04-30 23:28:11 -07:00
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR ; flags
2013-04-30 23:28:11 -07:00
db 4 ; items
db "TM25 5500@"
db "TM14 5500@"
db "TM38 5500@"
db "CANCEL@"
GoldenrodGameCornerPrizeMonVendorScript:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerPrizeVendorIntroText
2015-11-25 07:16:29 -08:00
waitbutton
checkitem COIN_CASE
iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript
.loop
writetext GoldenrodGameCornerPrizeVendorWhichPrizeText
special DisplayCoinCaseBalance
loadmenu .MenuHeader
2015-12-15 15:59:49 -08:00
verticalmenu
closewindow
2018-02-02 18:09:17 -08:00
ifequal 1, .abra
ifequal 2, .cubone
ifequal 3, .wobbuffet
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
.abra
checkcoins 100
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
2018-02-02 18:09:17 -08:00
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
2018-01-11 22:40:20 -08:00
pokenamemem ABRA, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
writebyte ABRA
special GameCornerPrizeMonCheckDex
2015-10-04 11:14:51 -07:00
givepoke ABRA, 5
takecoins 100
jump .loop
.cubone
checkcoins 800
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
2018-02-02 18:09:17 -08:00
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
2018-01-11 22:40:20 -08:00
pokenamemem CUBONE, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
writebyte CUBONE
special GameCornerPrizeMonCheckDex
2015-10-04 11:14:51 -07:00
givepoke CUBONE, 15
takecoins 800
jump .loop
.wobbuffet
checkcoins 1500
2018-02-02 18:09:17 -08:00
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
2018-02-02 18:09:17 -08:00
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
2018-01-11 22:40:20 -08:00
pokenamemem WOBBUFFET, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
2015-11-25 07:16:29 -08:00
waitsfx
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
2015-11-25 07:16:29 -08:00
waitbutton
writebyte WOBBUFFET
special GameCornerPrizeMonCheckDex
2015-10-04 11:14:51 -07:00
givepoke WOBBUFFET, 15
takecoins 1500
jump .loop
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 2, 17, TEXTBOX_Y - 1
dw .MenuData
2013-04-30 23:28:11 -07:00
db 1 ; default option
.MenuData:
db STATICMENU_CURSOR ; flags
2013-04-30 23:28:11 -07:00
db 4 ; items
db "ABRA 100@"
db "CUBONE 800@"
db "WOBBUFFET 1500@"
db "CANCEL@"
GoldenrodGameCornerPharmacistScript:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerPharmacistText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
turnobject LAST_TALKED, LEFT
end
GoldenrodGameCornerPokefanM1Script:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerPokefanM1Text
2015-11-25 07:16:29 -08:00
waitbutton
closetext
turnobject GOLDENRODGAMECORNER_POKEFAN_M1, RIGHT
end
GoldenrodGameCornerCooltrainerMScript:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerCooltrainerMText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
turnobject GOLDENRODGAMECORNER_COOLTRAINER_M, LEFT
end
GoldenrodGameCornerPokefanFScript:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerPokefanFText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
turnobject GOLDENRODGAMECORNER_POKEFAN_F, RIGHT
end
GoldenrodGameCornerCooltrainerFScript:
jumptextfaceplayer GoldenrodGameCornerCooltrainerFText
GoldenrodGameCornerGentlemanScript:
faceplayer
2015-12-09 15:25:44 -08:00
opentext
writetext GoldenrodGameCornerGentlemanText
2015-11-25 07:16:29 -08:00
waitbutton
closetext
turnobject GOLDENRODGAMECORNER_GENTLEMAN, RIGHT
end
GoldenrodGameCornerPokefanM2Script:
jumptextfaceplayer GoldenrodGameCornerPokefanM2Text
GoldenrodGameCornerLeftTheirDrinkScript:
jumptext GoldenrodGameCornerLeftTheirDrinkText
GoldenrodGameCornerSlotsMachineScript:
random 6
2018-02-02 18:09:17 -08:00
ifequal 0, GoldenrodGameCornerLuckySlotsMachineScript
2018-01-11 22:40:20 -08:00
refreshscreen
writebyte FALSE
special SlotMachine
2015-11-25 07:16:29 -08:00
closetext
end
GoldenrodGameCornerLuckySlotsMachineScript:
2018-01-11 22:40:20 -08:00
refreshscreen
writebyte TRUE
special SlotMachine
2015-11-25 07:16:29 -08:00
closetext
end
GoldenrodGameCornerCardFlipMachineScript:
2018-01-11 22:40:20 -08:00
refreshscreen
special CardFlip
2015-11-25 07:16:29 -08:00
closetext
end
GoldenrodGameCornerPrizeVendorIntroText:
text "Welcome!"
para "We exchange your"
line "game coins for"
cont "fabulous prizes!"
done
GoldenrodGameCornerPrizeVendorWhichPrizeText:
text "Which prize would"
line "you like?"
done
GoldenrodGameCornerPrizeVendorConfirmPrizeText:
2018-01-23 14:39:09 -08:00
text_from_ram wStringBuffer3
text "."
line "Is that right?"
done
GoldenrodGameCornerPrizeVendorHereYouGoText:
text "Here you go!"
done
GoldenrodGameCornerPrizeVendorNeedMoreCoinsText:
text "Sorry! You need"
line "more coins."
done
GoldenrodGameCornerPrizeVendorNoMoreRoomText:
text "Sorry. You can't"
line "carry any more."
done
GoldenrodGameCornerPrizeVendorQuitText:
text "OK. Please save"
line "your coins and"
cont "come again!"
done
GoldenrodGameCornerPrizeVendorNoCoinCaseText:
text "Oh? You don't have"
line "a COIN CASE."
done
GoldenrodGameCornerPharmacistText:
text "I always play this"
line "slot machine. It"
para "pays out more than"
line "others, I think."
done
GoldenrodGameCornerPokefanM1Text:
text "I just love this"
line "new slot machine."
para "It's more of a"
line "challenge than the"
cont "ones in CELADON."
done
GoldenrodGameCornerCooltrainerMText:
text "Life is a gamble."
line "I'm going to flip"
cont "cards till I drop!"
done
GoldenrodGameCornerPokefanFText:
text "Card flip…"
para "I prefer it over"
line "the slots because"
para "it's easier to"
line "figure the odds."
para "But the payout is"
line "much lower."
done
GoldenrodGameCornerCooltrainerFText:
text "I won't quit until"
line "I win!"
done
GoldenrodGameCornerGentlemanText:
text "I taught BLIZZARD"
line "to my #MON."
para "It was hard to get"
line "enough coins for"
para "it, but it was"
line "worth it."
done
GoldenrodGameCornerPokefanM2Text:
text "I couldn't win at"
line "the slots, and I"
para "blew it on card"
line "flipping…"
para "I got so furious,"
line "I tossed out my"
para "COIN CASE in the"
line "UNDERGROUND."
done
GoldenrodGameCornerPokefanM3Text:
text "Wahahah! The coins"
line "keep rolling in!"
done
GoldenrodGameCornerLeftTheirDrinkText:
text "Someone left their"
line "drink."
para "It smells sweet."
done
GoldenrodGameCorner_MapEvents:
db 0, 0 ; filler
db 2 ; warp events
2018-02-01 19:22:07 -08:00
warp_event 2, 13, GOLDENROD_CITY, 10
warp_event 3, 13, GOLDENROD_CITY, 10
db 0 ; coord events
db 31 ; bg events
2018-02-01 19:22:07 -08:00
bg_event 6, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 6, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 6, 8, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 6, 9, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 6, 10, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 6, 11, BGEVENT_RIGHT, GoldenrodGameCornerSlotsMachineScript
bg_event 7, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 7, 7, BGEVENT_READ, GoldenrodGameCornerLuckySlotsMachineScript
bg_event 7, 8, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 7, 9, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 7, 10, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 7, 11, BGEVENT_LEFT, GoldenrodGameCornerSlotsMachineScript
bg_event 12, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 12, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 12, 8, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 12, 9, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 12, 10, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
bg_event 12, 11, BGEVENT_RIGHT, GoldenrodGameCornerSlotsMachineScript
2018-02-01 19:22:07 -08:00
bg_event 13, 6, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 13, 7, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 13, 8, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 13, 9, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 13, 10, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 13, 11, BGEVENT_LEFT, GoldenrodGameCornerCardFlipMachineScript
2018-02-01 19:22:07 -08:00
bg_event 18, 6, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 18, 7, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 18, 8, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 18, 9, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 18, 10, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
bg_event 18, 11, BGEVENT_RIGHT, GoldenrodGameCornerCardFlipMachineScript
2018-02-01 19:22:07 -08:00
bg_event 12, 1, BGEVENT_LEFT, GoldenrodGameCornerLeftTheirDrinkScript
db 12 ; object events
2018-02-01 19:22:07 -08:00
object_event 3, 2, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGmeCornerCoinVendorScript, -1
object_event 16, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGmeCornerTMVendorScript, -1
object_event 18, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPrizeMonVendorScript, -1
object_event 8, 7, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
object_event 8, 7, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, NITE, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
object_event 11, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM1Script, -1
2018-02-01 19:22:07 -08:00
object_event 14, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerMScript, -1
object_event 17, 6, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanFScript, -1
object_event 10, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerFScript, -1
object_event 5, 10, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerGentlemanScript, -1
object_event 2, 9, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM2Script, -1
object_event 17, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM3Script, EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR