;Main Quest part 4

;Enter desert
SCENE 55 deasert2
#Include prtychk.txt
#include steal.txt
IF XP @check2
@safe
COMPARE #<leave>, "1"
IF= @leave
H: Ill have to be careful in the desert. If I get dehydrated I will die.
H: I must camp often to take a drink.
H: I must take care not to return to the well while in the desert or I will die.
COMPARE #<thirst>, "0" 
IF> @countdown
SET thirst, "60"
@countdown
COUNTDOWN #<thirst>
SET leave, "1"
GOTO link 11, 0
END
@leave
SET thirst, "0"
COUNTDOWN 0
SET leave, "0"
GOTO link 6, 6
END
@check2
COMPARE #<thirst>, "0"
If> @dehydrated
GOTO @safe
END
@dehydrated
H: Im dehydrated!
TAKE H10000
SET thirst, "0"
END

;Desert scene
SCENE 56 deasert
#Include prtychk.txt
#include steal.txt
IF XP @campdehydrate
IF -I94 @nodrink
H: Should I have a drink?
ASK 10
IF Qyes @drink
H: Ill drink later 
END
@nodrink
H: I have no water left, I need to go buy some more.
END
@drink
H: Thats better
TAKE I94
COMPARE #<thirst>, "300"
IF= @countdown
ADD thirst, "60"
@countdown
COUNTDOWN #<thirst>
END
@campdehydrate
H: Im dehydrated!
TAKE H10000
SET thirst, "0"
END

;From Caves
SCENE 57 cave6
#Include prtychk.txt
#include steal.txt
IF XP @check2
@safe
H: Ill have to be careful in the desert. If I get dehydrated I will die.
H: I must camp often to take a drink
COMPARE #<thirst>, "0" 
IF> @countdown
SET thirst, "60"
@countdown
COUNTDOWN #<thirst>
GOTO link 12, 2
END
@check2
COMPARE #<thirst>, "0"
If> @dehydratedC
GOTO @safe
END
@dehydratedC
H: Im dehydrated!
TAKE H10000
SET thirst, "0"
END

;Final desert scene
SCENE 50 desert2
#Include prtychk.txt
#include steal.txt
#include class1.txt
IF XP @finaldehydrate
GOTO @random
@finaldehydrate
H: Im dehydrated!
TAKE H10000
SET thirst, "0"
END
@random
IF R10 @WDragon
IF R80 @desert
GOTO @random
END
@desert
GOTO LINK 12, 1
END
@WDragon
COMPARE #<num.hostClass> "35"
IF> @monster
IF= @monster
GIVE T65
IF -T61 @end
BKGND aztec2
1: The dragons temple!
ACTOR 1 "White Gem", Whitegem, 1, 25, 90
H: Its the white gem!
H: Now come out dragon!
ACTOR 1 "White Dragon", josh41, 1, 25, 90
1: You have come a long way %1.
H: You talk?
1: All dragons talk, we are just wary of to whom.
H: Dragon give up the gem or fight!
1: I cannot do that, the gem's power is what has kept me alive.
1: Without it I will die
H: Then prepare to die dragon!
1: So be it.
MOVE 1, -50, 90, 1
#include running.txt
FIGHT 205
#include eat.txt
IF alive @winner
GIVE T66
WAIT 5
MOVE 1, 25, 90, 1
1: I will await your return, but be warned, the power of the gems is not to be tampered with.
END
@winner
MOVE 1, 25, 90, 1
1: GROOOOOOOOOAR!
1: Take the gem, but please be careful with its power.
ACTOR 1 "White Gem", Whitegem, 1, 25, 90
H: He died.
H: There is a %I191 here as well.
MOVE 1, -50, 90, 1
GIVE T1205
GIVE T67
GIVE I42
GIVE I191
H: Now back to the old man.
@end
END

@Monster
H: The desert just goes on forever
H: I should go south to get out
GOTO LINK 12, 1
END