AzaleaKurt_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 1
	dbw MAPCALLBACK_TILES, KurtBasementOpen

KurtBasementOpen:
	checkevent EVENT_UNLOCK_KURT_CHAMBER
	iffalse .notOpen
	changeblock 14, 4, $1e
.notOpen
	return

AzaleaKurtSignpost1:
	farjump BallMaking
	end

AzaleaKurtNPC1:
	faceplayer
	opentext
	copybytetovar BallMakingLevel
	if_less_than 35, AzaleaKurt_325567
	checkevent EVENT_UNLOCK_KURT_CHAMBER
	iftrue AzaleaKurt_32556d
	writetext AzaleaKurtNPC1_Text_325573
	waitbutton
	follow 2, 0
	closetext
	checkcode VAR_FACING
	if_equal 1, .below
	applymovement 2, AzaleaKurtNPC1_Movement1

.donewalking
	stopfollow
	playsound SFX_ENTER_DOOR
	changeblock 14, 4, $1e
	setevent EVENT_UNLOCK_KURT_CHAMBER
	opentext
	writetext AzaleaKurtNPC1_Text_3255c5
	endtext

.below
	applymovement 2, AzaleaKurtNPC1_MovementBelow
	jump .donewalking

AzaleaKurtNPC1_MovementBelow:
	slow_step_right
	slow_step_down
	slow_step_right
	slow_step_right
	slow_step_right
	slow_step_right
	turn_head_left
	step_end

AzaleaKurtNPC1_Movement1:
	slow_step_down
	slow_step_right
	slow_step_right
	slow_step_right
	slow_step_right
	slow_step_right
	turn_head_left
	step_end

AzaleaKurtNPC2:
	jumptextfaceplayer AzaleaKurtNPC2_Text_324b14

AzaleaKurt_325567:
	writetext AzaleaKurt_325567_Text_325698
	endtext

AzaleaKurt_32556d:
	writetext AzaleaKurt_32556d_Text_325707
	endtext

AzaleaKurtNPC1_Text_325573:
	db TX_COMPRESSED, $6e, $1a, $bf, $01, $05, $a2, $e3, $9a, $af
	db $a6, $f5, $86, $3f, $aa, $47, $14, $d6, $33, $26
	db $55, $09, $6f, $7a, $8a

	db $50, $0e, $a2, $12, $16, $bb, $92, $53, $22, $12, $1a
	db $9e, $04, $16, $a5, $a4, $68, $a7, $82, $2b, $6a
	db $d5, $60, $1e, $f4, $35, $47, $cf
	db $d4, $d0

AzaleaKurtNPC1_Text_3255c5:
	db TX_COMPRESSED, $74, $49, $69, $38, $af, $50, $6f, $99
	db $2d, $eb, $49, $ac, $f1, $4b, $08, $7a, $89, $69, $db

	db $01, $50, $fb, $d9, $bd, $e8, $6a, $80, $82, $d4, $b0
	db $bc, $fe, $a9, $1c, $40, $5f, $38, $1c, $25, $a4
	db $d5, $2f, $56, $68, $b8, $af, $7b, $d4

	db $78, $01, $49, $30, $45, $c7, $01, $8d, $60, $a2, $75, $79
	db $7a, $c3, $1f, $d5, $23, $fc, $40, $60, $20

	db $b4, $02, $a0, $92, $99, $37, $b5, $68, $24
	db $3c, $86, $99, $64, $cf, $3e

	db $00, $24, $d5, $cb, $49, $c7, $c2, $b3
	db $7b, $a6, $0c, $7d, $44, $04, $16, $a7, $3a, $32

	db $7c, $05, $a4, $e1, $ea, $06, $6b, $83, $b9, $c9, $da
	db $1e, $b0, $c7, $f5, $48, $e5, $a4, $df
	db $f5, $34

AzaleaKurtNPC2_Text_324b14:
	db TX_COMPRESSED, $62, $7d, $e8, $7f, $1d, $16, $41, $30, $d2, $ef

	db $c0, $0a, $0c, $65, $67, $b6, $73, $62, $bd, $ef
	db $7e, $f5, $38, $d2, $2e, $55, $bd, $52, $81, $06, $35

	db $80, $b0, $cb, $49, $c6, $57, $b8, $58, $c9
	db $cb, $d7, $aa, $fa, $70, $64, $96, $93, $8b, $1f, $29

	db $b0, $08, $1e, $4e, $07, $09, $69, $38, $b0, $85
	db $f7, $b4, $99, $83, $25, $9a, $f5, $9b, $95, $0e
	db $d2, $aa, $d2, $72, $c2, $1e, $a3
	db $d4, $d0

AzaleaKurt_325567_Text_325698:
	db TX_COMPRESSED, $61, $2f, $49, $91, $1b, $1a, $41, $e6, $58
	db $5e, $7f, $54, $8e, $03, $95, $5e, $f7, $a8, $98, $05

	db $60, $04, $18, $44, $74, $e3, $44, $b1, $f6, $24, $68
	db $79, $27, $39, $0d, $cd, $5d, $a5, $63, $b1, $a3

	db $c0, $01, $e1, $aa, $24, $e5, $9e, $b2, $93
	db $43, $c2, $0c, $22, $3a, $71, $21, $aa, $58
	db $55, $3f, $aa, $47, $2d, $26, $ff
	db $a9, $a0

AzaleaKurt_32556d_Text_325707:
	db TX_COMPRESSED, $15, $d0, $4a, $ce, $02, $0b, $51, $9d
	db $23, $cc, $84, $96, $32, $34, $71, $f0
	db $4a, $98, $4b, $d2, $64, $46, $e2, $9d, $3e, $75, $90, $5e

	db $00, $ea, $2b, $3e, $8c, $c1, $8e, $0c, $90, $10, $5a
	db $e3, $4d

AzaleaKurt_MapEventHeader ;filler
	db 0, 0

;warps
	db 3
	warp_def $7, $3, 3, AZALEA_TOWN
	warp_def $7, $4, 3, AZALEA_TOWN
	warp_def $5, $f, 1, AZALEA_KURT_BASEMENT

	;xy triggers
	db 0

	;signposts
	db 1
	signpost 2, 14, SIGNPOST_READ, AzaleaKurtSignpost1

	;people-events
	db 2
	person_event SPRITE_LASS, 4, 9, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_RED, 0, 0, AzaleaKurtNPC1, -1
	person_event SPRITE_KURT, 2, 3, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_RED, 0, 0, AzaleaKurtNPC2, -1

