;-------------------------
; Quest 9, 

TOKEN	90, "You have earned the level 1 badge in the Pokegatchi pit."
TOKEN	91, "You have earned the level 2 badge in the Pokegatchi pit."
TOKEN	92, "You have earned the level 3 badge in the Pokegatchi pit."
TOKEN	93, "You have earned the level 4 badge in the Pokegatchi pit."
TOKEN	94, "You have earned the level 5 badge in the Pokegatchi pit."
TOKEN	95, "You have earned the level 6 badge in the Pokegatchi pit."
TOKEN	96, "You have earned the level 7 badge in the Pokegatchi pit."
TOKEN	97, "You have earned the level 8 badge in the Pokegatchi pit."
TOKEN	98, "You have earned the level 9 badge in the Pokegatchi pit."
TOKEN	99, "You have earned the level 10 badge in the Pokegatchi pit."


;---------
SCENE 90 title, SCENE, "Pokegatchi Pit"
	THEME	0

	ACTOR 1, "Babidi", "babidi", 3, 30, 60

;GOTO @giftMonster

@beginning
	COMPARE	#<num.hostPets>, 0
	IF> @hasPet

	1: This is the Pokegatchi Pit
	1: It is exclusively for Pet Trainers.
	1: Return when you have a pet!

	END

; Start the battles
@hasPet

;	1: Map Flags Are #<num.mapFlags>
	FLAGS	1024		; people cannot attack monsters/pets

	IF T90, @T90
	1: You have much to prove.
	1: Training a Pokegatchi requires much time and effort.
	1: It requires you to think of something beyond yourself.
	1: Your training skills will be tested here, in the pit.
	1: You may heal your pets as you like.
	1: But only they may fight.
	1: Now you will fight my worriors!
	FIGHT 5
	; Earth 4
	IF DEAD, @dead
	GIVE	T90
; Fall into next

@T90
	IF T91, @T91
	1: %T90
	1: But that means little.
	1: Try this one.
	WAIT 3
	FIGHT 53
	; death 11
	IF DEAD, @dead
	GIVE	T91
; Fall into next

@T91
	IF T92, @T92
	1: %T91
	1: Not bad
	1: How about another?
	WAIT 3
	FIGHT 59	
	; air 18
	IF DEAD, @dead
	GIVE	T92
; Fall into next

@T92
	IF T93, @T93
	1: %T92
	1: A decent accomplishment
	1: But how are you against the dead?
	WAIT 3
	FIGHT 67
	; fire 34
	IF DEAD, @dead
	GIVE	T93
; Fall into next

@T93
	IF T94, @T94
	1: %T93
	1: Perhaps water is your weakness?
	WAIT 3
	FIGHT 109
	; water 50
	IF DEAD, @dead
	GIVE	T94
; Fall into next

@T94
	IF T95, @T95
	1: %T94
	1: The undead yearn for your soul.
	WAIT 3
	FIGHT 123
	; nature 64
	IF DEAD, @dead
	GIVE	T95
; Fall into next


@T95
	IF T96, @T96
	1: %T95
	1: Perhaps a spirit will be your match.
	WAIT 3
	FIGHT 29
	; spirit 85
	IF DEAD, @dead
	GIVE	T96
; Fall into next


@T96
	IF T97, @T97
	1: %T96
	1: Here is an opponent worthy of you.
	WAIT 3
	FIGHT 36
	; death 101
	IF DEAD, @dead
	GIVE	T97
; Fall into next


@T97
	IF T98, @T98
	1: %T97
	1: Surely, *this* pokegatchi will give you pause.
	WAIT 3
	FIGHT 47
	; death 120
	IF DEAD, @dead
	GIVE	T98
; Fall into next


@T98
	IF T99, @T99
	1: %T98
	1: But now you must face my most horrible opponents!
	WAIT 3
	FIGHT 47, 49
	; death 125 AND death 120
	IF DEAD, @dead
	GIVE	T99
	1: You have defeated my mightiest pokegatchis!
	1: %T99
	1: It is with great honor, that I bestow..
	1: upon you... AND your pets...
	1: ..this fine piece of mythic armor, the %I191
	GIVE I191
	1: Furthermore...
	1: I would like you to consider training an advanced pets.
	1: What you see here is not the appearance of the pokegatchi in question
	1: The real ones are too large to fit in the pit.
	1: Plus they tend to fight.

@giftMonster

	ACTOR 2, "Earth", 	"josh2", 2, 40, 90
	ACTOR 3, "Air", 	"josh2", 2, 30, 90
	ACTOR 4, "Fire", 	"josh2", 2, 20, 90
	ACTOR 5, "Water", 	"josh2", 2, 10, 90

@choose
	1: Please type the name of the pet you wish:
	ASK 60
	IF QEarth, @giveEarth
	IF QAir, @giveAir
	IF QFire, @giveFire
	IF QWater, @giveWater

	1: Really, please choose "Earth," "Air," "Fire," or "Water."
	GOTO @choose

@giveEarth
	1: A wise choice.
	GIVE I1020
	1: The Earth Master is now yours
	GOTO @done
	END
@giveAir
	1: A wise choice.
	GIVE I1021
	1: The Air Master is now yours
	GOTO @done
	END
@giveFire
	1: A wise choice.
	GIVE I1022
	1: The Fire Master is now yours
	GOTO @done
	END
@GiveWater
	1: A wise choice.
	GIVE I1023

	1: The Water Master is now yours
@done
	MOVE	2, -30, 90
	MOVE	3, -30, 90
	MOVE	4, -30, 90
	MOVE	5, -30, 90

	END


@T99
	1: %T99
	1: Do you wish to return your badges and begin again?
	ASK 30
	IF YES, @restart
	1: Then farewall, fellow pokegatchi master
	END

@restart
	1: You are a brave adventurer!
	1: I hereby accept your ten badges!
	TAKE T99
	TAKE T98
	TAKE T97
	TAKE T96
	TAKE T95
	TAKE T94
	TAKE T93
	TAKE T92
	TAKE T91
	TAKE T90
	1: Now, it is as if your time in the pit has never occured
	1: Let us begin anew...
	WAIT 5
	GOTO @beginning

@dead
	1: Your pet has let you down.
	1: Or have you let IT down?
	1: Ultimately, its training is YOUR responsibility.
	1: Come back when you are both better prepared.
	
	
END

; comment at the end
