GoldenrodGameCorner_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

GoldenrodGameCornerPoker:
	farjump GameCornerPoker

GoldenrodGameCornerNPC1:
	jumptextfaceplayer GoldenrodGameCornerNPC1_Text

GoldenrodGameCornerNPC2:
	jumptextfaceplayer GoldenrodGameCornerNPC2_Text

GoldenrodGameCornerNPC3:
	jumptextfaceplayer GoldenrodGameCornerNPC3_Text

GoldenrodGameCornerNPC4:
	jumptextfaceplayer GoldenrodGameCornerNPC4_Text

GoldenrodGameCornerMonExchange:
	faceplayer
	opentext
	special Special_DisplayCoinCaseBalance
	farwritetext OwsauriGameCorner_Text_ExchangeGameCoins
	waitbutton
	farwritetext OwsauriGameCornerMonExchange_Text_WhichMon
	loadmenudata GoldenrodGameCornerPokemonMenu
	verticalmenu
	closewindow
	anonjumptable
	dw .done
	dw GoldenrodGameCorner_MonExchange_GetEevee
	dw GoldenrodGameCorner_MonExchange_GetBagon
	dw GoldenrodGameCorner_MonExchange_GetPorygon
.done
	closetext
	end

GoldenrodGameCornerTMExchange:
	faceplayer
	opentext
	special Special_DisplayCoinCaseBalance
	farwritetext OwsauriGameCorner_Text_ExchangeGameCoins
	waitbutton
	farwritetext OwsauriGameCornerTMExchange_Text_WhichTM
	loadmenudata GoldenrodGameCornerTMMenu
	verticalmenu
	closewindow
	anonjumptable
	dw .done
	dw GoldenrodGameCorner_TMExchange_GetTM72
	dw GoldenrodGameCorner_TMExchange_GetTM73
	dw GoldenrodGameCorner_TMExchange_GetTM74
.done
	closetext
	end

GoldenrodGameCornerCoinVendor:
	jumpstd gamecornercoinvendor

GoldenrodGameCornerSlots:
	farjump OwsauriSlots

GoldenrodGameCornerBlackjack:
	farjump GameCornerBlackjack

GoldenrodGameCornerMemory:
	farjump SpurgeGameCornerMemory

GoldenrodGameCornerCardFlip:
	farjump SpurgeGameCornerCardFlip

GoldenrodGameCorner_MonExchange_GetEevee:
	pokenamemem EEVEE, 0
	writetext GoldenrodGameCorner_MonExchange_Text_AreYouSure
	yesorno
	iffalse .done
	checkcode VAR_PARTYCOUNT
	sif >, 5
		farjumptext OwsauriGameCorner_Text_NoRoomInParty
	checkcoins 1000
	sif =, 2
		farjumptext OwsauriGameCorner_Text_NeedMoreCoins
	takecoins 1000
	farwritetext OwsauriGameCorner_Text_HereYouGo
	waitbutton
	farwritetext OwsauriGameCorner_MonExchange_Text_ReceivedMon
	playwaitsfx SFX_DEX_FANFARE_80_109
	givepoke EEVEE, 21, NO_ITEM, 0
.done
	closetext
	end

GoldenrodGameCorner_MonExchange_GetBagon:
	pokenamemem BAGON, 0
	writetext GoldenrodGameCorner_MonExchange_Text_AreYouSure
	yesorno
	iffalse .done
	checkcode VAR_PARTYCOUNT
	sif >, 5
		farjumptext OwsauriGameCorner_Text_NoRoomInParty
	checkcoins 3000
	sif =, 2
		farjumptext OwsauriGameCorner_Text_NeedMoreCoins
	takecoins 3000
	farwritetext OwsauriGameCorner_Text_HereYouGo
	waitbutton
	farwritetext OwsauriGameCorner_MonExchange_Text_ReceivedMon
	playwaitsfx SFX_DEX_FANFARE_80_109
	givepoke BAGON, 15, NO_ITEM, 0
.done
	closetext
	end

GoldenrodGameCorner_MonExchange_GetPorygon:
	pokenamemem PORYGON, 0
	writetext GoldenrodGameCorner_MonExchange_Text_AreYouSure
	yesorno
	iffalse .done
	checkcode VAR_PARTYCOUNT
	sif >, 5
		farjumptext OwsauriGameCorner_Text_NoRoomInParty
	checkcoins 5000
	sif =, 2
		farjumptext OwsauriGameCorner_Text_NeedMoreCoins
	takecoins 5000
	farwritetext OwsauriGameCorner_Text_HereYouGo
	waitbutton
	farwritetext OwsauriGameCorner_MonExchange_Text_ReceivedMon
	playwaitsfx SFX_DEX_FANFARE_80_109
	givepoke PORYGON, 21, NO_ITEM, 0
.done
	closetext
	end

GoldenrodGameCorner_TMExchange_GetTM72:
	writebyte 72
	farjump OwsauriGameCorner_TMExchange_DoExchange

GoldenrodGameCorner_TMExchange_GetTM73:
	writebyte 73
	farjump OwsauriGameCorner_TMExchange_DoExchange

GoldenrodGameCorner_TMExchange_GetTM74:
	writebyte 74
	farjump OwsauriGameCorner_TMExchange_DoExchange

GoldenrodGameCornerTMMenu:
	db $40 ; flags
	db 03, 05 ; start coords
	db 11, 19 ; end coords
	dw GoldenrodGameCornerTMOptions
	db 1 ; default option

GoldenrodGameCornerTMOptions:
	db $80
	db $3
	db "TM72    3000@"
	db "TM73    3000@"
	db "TM74    3000@"

GoldenrodGameCornerPokemonMenu:
	db $40 ; flags
	db 03, 00 ; start coords
	db 11, 19 ; end coords
	dw GoldenrodGameCornerPokemonOptions
	db 1 ; default option

GoldenrodGameCornerPokemonOptions:
	db $80
	db $3
	db "Eevee        1000@"
	db "Bagon        3000@"
	db "Porygon      5000@"

GoldenrodGameCornerNPC1_Text:
	db TX_COMPRESSED, $62, $3f, $cb, $49, $82, $8c, $ef, $7b, $1f
	db $37, $b8, $04, $cc, $12, $32, $71

	db $00, $ea, $34, $83, $cc, $b0, $c4, $85, $17
	db $35, $e5, $85, $95, $21, $90, $4d, $67, $b0, $1c, $af, $84

	db $80, $1f, $69, $03, $66, $21, $21, $aa, $2b, $3c, $02, $b3
	db $7a, $d3, $b7, $05, $9b, $5a, $a4, $71, $6d, $0c, $87
	db $95, $56, $93, $8e, $4d, $c8, $c3, $0a, $0d, $46, $bf

	db $00, $07, $86, $a8, $ea, $20, $41, $93, $31, $f0, $a2
	db $de, $0e, $11, $f0, $52, $c6, $f9

	db $80, $11, $dd, $04, $32, $73, $2d, $23
	db $43, $cc, $ea, $f3, $39, $d7, $cf

	db $c0, $1d, $38, $7b, $19, $09, $2c, $64, $68, $e5
	db $85, $ec, $86, $20, $31, $a2, $58, $fb, $1d

	db $00, $67, $49, $11, $7a, $bb, $9c, $02, $64, $64
	db $e5, $ed, $e7, $46, $4e
	db $34, $d0

GoldenrodGameCornerNPC2_Text:
	db TX_COMPRESSED, $29, $27, $0a, $15, $44, $b4, $98
	db $27, $83, $86, $06, $b8, $93, $59, $cd, $59
	db $aa, $10, $93, $20, $5f, $32, $6f, $78

	db $80, $15, $d5, $23, $88, $69, $67, $2c, $33, $95, $ea
	db $b7, $ad, $26, $fc, $a9, $26, $48, $08, $2d
	db $2a, $e4, $ee, $5a, $4e, $32, $9d, $23, $27
	db $ea, $68

GoldenrodGameCornerNPC3_Text:
	db TX_COMPRESSED, $75, $30, $19, $37, $bd, $05, $30, $0b, $44
	db $cb, $cf, $82, $9c, $eb, $e6
	db $e2, $a8, $4b, $ba, $ca, $95, $39, $ac, $a9, $71

	db $00, $eb, $08, $08, $2d, $17, $1c, $e8, $42, $a4, $32
	db $72, $f6, $01, $5c, $d8, $da, $11, $92, $36, $ea, $0f

	db $e0, $36, $08, $35, $a0, $24, $83, $24
	db $d7, $b0, $d5, $ed, $5a, $0a, $32, $3b

	db $04, $01, $07, $de, $a2, $5a, $4d, $f8, $b1, $f2, $9b
	db $78, $64, $96, $93, $1a, $e3, $0b, $5f
	db $35, $4d, $a1, $59, $0d, $7e

	db $00, $24, $d5, $c0, $41, $6a, $64, $79, $25, $32, $24, $f5
	db $6f, $5a, $76, $e6, $0b, $0b, $f1, $f3
	db $f5, $34

GoldenrodGameCornerNPC4_Text:
	db TX_COMPRESSED, $72, $85, $a8, $ce, $92, $99, $15, $9e, $dc, $b4
	db $9b, $cc, $f7, $50, $81, $b3, $02, $43, $9a, $b7, $cf
	db $2a, $95, $e9, $32, $3b, $9c, $eb, $e7
	db $ea, $68

GoldenrodGameCorner_MonExchange_Text_AreYouSure:
	db TX_COMPRESSED, $ad, $67, $01, $05, $a8, $86, $96, $70, $10, $5a
	db $7a, $ad, $25, $ca, $79, $52
	db $d3, $40

GoldenrodGameCorner_MapEventHeader ;filler
	db 0, 0

;warps
	db 2
	warp_def $d, $2, 11, GOLDENROD_CITY
	warp_def $d, $3, 11, GOLDENROD_CITY

	;xy triggers
	db 0

	;signposts
	db 32
	signpost 6, 1, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 8, 1, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 9, 1, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 10, 1, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 11, 1, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 6, 6, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 7, 6, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 8, 6, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 10, 6, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 11, 6, SIGNPOST_READ, GoldenrodGameCornerSlots
	signpost 6, 7, SIGNPOST_READ, GoldenrodGameCornerPoker
	signpost 7, 7, SIGNPOST_READ, GoldenrodGameCornerPoker
	signpost 8, 7, SIGNPOST_READ, GoldenrodGameCornerPoker
	signpost 9, 7, SIGNPOST_READ, GoldenrodGameCornerPoker
	signpost 10, 7, SIGNPOST_READ, GoldenrodGameCornerPoker
	signpost 11, 7, SIGNPOST_READ, GoldenrodGameCornerPoker
	signpost 6, 12, SIGNPOST_READ, GoldenrodGameCornerBlackjack
	signpost 7, 12, SIGNPOST_READ, GoldenrodGameCornerBlackjack
	signpost 6, 13, SIGNPOST_READ, GoldenrodGameCornerBlackjack
	signpost 9, 12, SIGNPOST_READ, GoldenrodGameCornerBlackjack
	signpost 10, 12, SIGNPOST_READ, GoldenrodGameCornerBlackjack
	signpost 11, 12, SIGNPOST_READ, GoldenrodGameCornerBlackjack
	signpost 7, 13, SIGNPOST_READ, GoldenrodGameCornerMemory
	signpost 8, 13, SIGNPOST_READ, GoldenrodGameCornerMemory
	signpost 9, 13, SIGNPOST_READ, GoldenrodGameCornerMemory
	signpost 10, 13, SIGNPOST_READ, GoldenrodGameCornerMemory
	signpost 11, 13, SIGNPOST_READ, GoldenrodGameCornerMemory
	signpost 6, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlip
	signpost 8, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlip
	signpost 9, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlip
	signpost 10, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlip
	signpost 11, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlip

	;people-events
	db 7
	person_event SPRITE_ROCKER, 7, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, 0, 0, GoldenrodGameCornerNPC1, -1
	person_event SPRITE_PHARMACIST, 9, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_OW_RED, 0, 0, GoldenrodGameCornerNPC2, -1
	person_event SPRITE_POKEFAN_M, 8, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_OW_YELLOW, 0, 0, GoldenrodGameCornerNPC3, -1
	person_event SPRITE_GRANNY, 7, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_PURPLE, 0, 0, GoldenrodGameCornerNPC4, -1
	person_event SPRITE_RECEPTIONIST, 2, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 0, 0, GoldenrodGameCornerMonExchange, -1
	person_event SPRITE_RECEPTIONIST, 2, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 0, 0, GoldenrodGameCornerTMExchange, -1
	person_event SPRITE_CLERK, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 0, 0, GoldenrodGameCornerCoinVendor, -1

