PhaceliaCity_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 1
	dbw 5, Phacelia_SetFlyFlag

Phacelia_SetFlyFlag:
	setflag ENGINE_FLYPOINT_PHACELIA_TOWN
	return

PhaceliaCitySignpost1:
	jumpstd pokecentersign

PhaceliaCitySignpost2:
	jumpstd martsign

PhaceliaCitySignpost3:
	db TX_COMPRESSED, $07, $86, $e0, $b3, $68, $76, $73
	db $69, $e1, $58, $6a, $24, $04
	db $77, $4d

PhaceliaCitySignpost4:
	db TX_COMPRESSED, $15, $08, $31, $cc, $9f, $4e, $cd
	db $74, $d0

PhaceliaCityNPC1:
	fruittree 20

PhaceliaCityNPC2:
	jumpstd smashrock

PhaceliaCityNPC3:
	jumpstd smashrock

PhaceliaCityNPC4:
	faceplayer
	opentext
	writetext PhaceliaCityNPC4_Text_2f5f08
	cry MACHOKE
	waitsfx
	endtext

PhaceliaCityNPC5:
	jumptextfaceplayer PhaceliaCityNPC5_Text_2f7488

PhaceliaCityNPC6:
	jumptextfaceplayer PhaceliaCityNPC5_Text_2f7488

PhaceliaCityNPC7:
	jumptextfaceplayer PhaceliaCityNPC7_Text_2f7efa

PhaceliaCityNPC9:
	jumpstd strengthboulder

PhaceliaCityNPC10:
	jumptextfaceplayer PhaceliaCityNPC10_Text_2f5e62

PhaceliaCityNPC11:
	jumpstd smashrock

PhaceliaCityNPC4_Text_2f5f08:
	db TX_COMPRESSED, $15, $d6, $52, $15, $23, $71, $8e, $44, $ea, $52, $9e
	db $34, $d0

PhaceliaCityNPC5_Text_2f7488:
	db TX_COMPRESSED, $50, $6c, $b4, $b1, $d8, $2c, $51, $59, $99
	db $1e, $b1, $f2, $9b, $32, $1e, $63, $42, $26, $01
	db $5a, $ab, $49, $c7, $c2, $f9, $92

	db $fc, $02, $9e

	db $00, $0d, $f4, $77, $f8, $08, $2d, $17, $1c
	db $d7, $b8, $77, $bd, $3b, $9c, $3b, $6b, $0f, $7a, $6b, $a5

	db $00, $dc, $cb, $8e, $29, $19, $88, $19, $39, $81, $69
	db $6f, $18, $23, $44, $09, $20, $20, $b4, $b8, $a4, $32, $67

	db $c0, $29, $e0

	db $00, $ed, $32, $ad, $1d, $fe, $02, $0b, $45
	db $c6, $f7, $21, $19, $39, $8d, $13, $26, $b6, $42, $0c, $6b, $a5

	db $00, $ed, $3f, $8e, $a2, $0c

	db $fc, $01, $b9, $f7, $bf, $81, $23, $27, $01, $05
	db $a7, $92, $7d, $11, $19, $db, $65, $30, $24, $38, $1c
	db $15, $5a, $4e, $08, $db, $58, $7b, $d3, $5a
	db $3e, $a9, $d3, $87, $b3, $a7, $70, $10, $5a, $83, $27
	db $a9, $a0

PhaceliaCityNPC7_Text_2f7efa:
	db TX_COMPRESSED, $ad, $96, $42, $bc, $8c, $9c, $cb, $0c, $b4
	db $9b, $cd, $10, $61, $24, $5b, $5d, $34, $7e, $3a
	db $55, $af, $c3, $25, $8e, $fa, $79, $96
	db $15, $5b, $05, $a1, $6e, $3e, $32, $35, $67, $15, $ac, $f5, $4b
	db $d4, $d0

PhaceliaCityNPC10_Text_2f5e62:
	db TX_COMPRESSED, $75, $35, $02, $06, $b3, $96, $18, $ac
	db $de, $11, $ab, $b8, $1c, $25, $64, $ca, $cf
	db $12, $a6, $56, $75, $44, $05, $f3, $ce, $82

	db $e2, $01, $89, $ca, $b5, $11, $7a, $34, $1e, $62, $b0
	db $4f, $6c, $c3, $5f, $1f, $41, $40
	db $e0, $a8, $57, $59, $4e, $be, $23, $f3, $49, $98, $9d
	db $42, $a2, $06, $0f, $27, $b2, $a4, $86, $24, $68
	db $54, $b3, $de, $c1, $1a, $b3, $25, $a2, $6a, $cf

	db $c0, $18, $9e, $29, $d1, $a9, $1c, $4e, $f7, $08, $fe, $93
	db $ef, $27, $7b, $84, $15, $d6, $53, $af, $88
	db $e3, $4d

PhaceliaCity_MapEventHeader ;filler
	db 0, 0

;warps
	db 10
	warp_def $3, $a, 3, MILOS_F1
	warp_def $5, $1c, 1, PHACELIA_GYM
	warp_def $7, $5, 1, PHACELIA_POLICE_F1
	warp_def $9, $f, 1, PHACELIA_POKECENTER
	warp_def $7, $19, 1, PHACELIA_MART
	warp_def $15, $6, 1, PHACELIA_WEST_EXIT
	warp_def $15, $b, 1, PHACELIA_MOVE_DELETER
	warp_def $13, $19, 1, PHACELIA_TM20
	warp_def $1d, $f, 1, PHACELIA_SOLROCK_TRADE
	warp_def $19, $20, 1, PHACELIA_EAST_EXIT

	;xy triggers
	db 0

	;signposts
	db 4
	signpost 9, 16, SIGNPOST_READ, PhaceliaCitySignpost1
	signpost 7, 26, SIGNPOST_READ, PhaceliaCitySignpost2
	signpost 20, 18, SIGNPOST_LOAD, PhaceliaCitySignpost3
	signpost 22, 10, SIGNPOST_LOAD, PhaceliaCitySignpost4

	;people-events
	db 11
	person_event SPRITE_FRUIT_TREE, 4, 20, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_YELLOW, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC1, -1
	person_event SPRITE_ROCK, 9, 9, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC2, -1
	person_event SPRITE_ROCK, 22, 16, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC3, -1
	person_event SPRITE_MACHOKE, 25, 17, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC4, -1
	person_event SPRITE_OFFICER, 6, 28, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC5, EVENT_ARRESTED_PALETTE_BLACK
	person_event SPRITE_OFFICER, 4, 10, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC6, EVENT_ARRESTED_PALETTE_BLACK
	person_event SPRITE_FISHER, 17, 22, SPRITEMOVEDATA_WANDER, 0, 0, -1, -1, PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC7, -1
	person_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_YELLOW, PERSONTYPE_TMHMBALL, TM_ENERGY_BALL, 0, EVENT_PHACELIA_TM54
	person_event SPRITE_BOULDER, 17, 17, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC9, -1
	person_event SPRITE_BLACK_BELT, 12, 13, SPRITEMOVEDATA_WANDER, 0, 0, -1, -1, PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC10, -1
	person_event SPRITE_ROCK, 27, 22, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PhaceliaCityNPC11, -1

