;---------
; Healing Spot

SCENE 1500 cultelson,  SCENE, "Holy Ground", 0, 0
	GIVE L9999
	GIVE M9999
	N: HP/MP restored!
	COMPARE #<ee4>, 1
	IF= @end
	ACTOR 9, "Easter Egg", egg, 1,20,70
END

@end
END

@eventactorclick9
	N: You found easter egg #4!
	SET ee4, 1
	GIVE I233
	MOVE 9,-100,-100,1
END

;-------------------
; Deamon Shrine - Level B1

;This is link number 3!

SCENE 1501 cultshrine, SCENE, "Deamon Shrine", 0,0
	COMPARE #<cultelson>, 3
	IF= @checkifgotkey
@checktime
	COMPARE #<defeatcult283current>, 0
	IF= @normal
	IF< @normal
	SET defeatcult283new, #<num.hostAge>
	SUB defeatcult283new, #<defeatcult283current>
	COMPARE #<defeatcult283new>, 15
	IF<, @empty
@normal
	ACTOR 1, "Cultist", cult1, 1,31,65
	ACTOR 2, "Cultist", cult2, 1,65,69
	ACTOR 3, "Cultist", cult3, 1,57,66
	1: Omega...
	2: Please... let us be your servants!
	3: Look out! Someone has come to stop us!
	2: This is for you, Omega!
	WAIT 2
	MUSIC cultfight.mid
	MOVE 1,-100,-100,1
	MOVE 2,-100,-100,1
	MOVE 3,-100,-100,1
	FIGHT 524,525,526,217,217
	MUSIC cultelson.mid
	MOVE 1,31,65,1
	MOVE 2,65,69,1
	MOVE 3,57,66,1
	IF WIN, @won
	IF LOSE @lose
END

@won
	1: Ugh...
	2: Omega! We were your servants!
	3: How could you let this happen to us...?
	WAIT 2
	MOVE 1,-100,-100,1
	MOVE 2,-100,-100,1
	MOVE 3,-100,-100,1
	ADD cultelson, 1
	SET defeatcult283current, #<num.hostAge>
	COMPARE #<cultelson>, 3
	IF= @getkey
	IF> @pastgetkey
	N: There is still evil on this floor.
	WAIT 2
	N: Continue to clense this level and
	N: the way will be clear.
END

@lose
	1: Praise be to Omega!
	2: We must pray more...
END

@empty
	SET timeleft, 15
	SUB timeleft,#<defeatcult283new>
	N: There is no one here.
	WAIT 1
	N: It will be another #<timeleft> game minute(s)
	N: before any more cultists come.
END

@pastgetkey
	N: So far, you're defeated #<cultelson> groups
	N: of cultists on Elson's floor.
	COMPARE #<cultelson>, 10
	IF= @includetext1
	COMPARE #<cultelson>, 20
	IF= @includetext2
	COMPARE #<cultelson>, 30
	IF= @includetext3
	COMPARE #<cultelson>, 40
	IF= @includetext4
	COMPARE #<cultelson>, 50
	IF= @includetext5
	COMPARE #<cultelson>, 60
	IF= @includetext6
	COMPARE #<cultelson>, 70
	IF= @includetext7
	COMPARE #<cultelson>, 80
	IF= @includetext8
	COMPARE #<cultelson>, 90
	IF= @includetext9
	COMPARE #<cultelson>, 100
	IF= @includetext10
END

@pastgetkey
	N: So far, you're defeated #<cultelson> groups
	N: of cultists on Elson's floor.
	COMPARE #<cultelson>, 10
	IF= @includetext1
	COMPARE #<cultelson>, 20
	IF= @includetext2
	COMPARE #<cultelson>, 30
	IF= @includetext3
	COMPARE #<cultelson>, 40
	IF= @includetext4
	COMPARE #<cultelson>, 50
	IF= @includetext5
	COMPARE #<cultelson>, 60
	IF= @includetext6
	COMPARE #<cultelson>, 70
	IF= @includetext7
	COMPARE #<cultelson>, 80
	IF= @includetext8
	COMPARE #<cultelson>, 90
	IF= @includetext9
	COMPARE #<cultelson>, 100
	IF= @includetext10
END

@includetext1
SET atlabel, elsonreward1
#INCLUDE cult_equip.txt
END

@includetext2
SET atlabel, elsonreward2
#INCLUDE cult_equip.txt
END

@includetext3
SET atlabel, elsonreward3
#INCLUDE cult_equip.txt
END

@includetext4
SET atlabel, elsonreward4
#INCLUDE cult_equip.txt
END

@includetext5
SET atlabel, elsonreward5
#INCLUDE cult_equip.txt
END

@includetext6
SET atlabel, elsonreward6
#INCLUDE cult_equip.txt
END

@includetext7
SET atlabel, elsonreward7
#INCLUDE cult_equip.txt
END

@includetext8
SET atlabel, elsonreward8
#INCLUDE cult_equip.txt
END

@includetext9
SET atlabel, elsonreward9
#INCLUDE cult_equip.txt
END

@includetext10
SET  atlabel, elsonreward10
#INCLUDE cult_equip.txt
END


@checkifgotkey
	COMPARE #<gotelsonkey>, 1
	IF= @checktime
	GOTO @getkey
END

@getkey
	ACTOR 4, "Key", cultkeys, 1,50,50
END

@eventactorclick4
	MOVE 4,-100,-100,1
	N: You have gotten the Elson Key.
	WAIT 2
	N: You can now go down to the next floor!
	GIVE I408
	SET gotelsonkey, 1
END

;-----------------------------------------------------

SCENE 1502 cultshrine, SCENE, "Deamon Shrine", 0,0
	COMPARE #<cultelson>, 3
	IF= @checkifgotkey
@checktime
	COMPARE #<defeatcult281current>, 0
	IF= @normal
	IF< @normal
	SET defeatcult281new, #<num.hostAge>
	SUB defeatcult281new, #<defeatcult281current>
	COMPARE #<defeatcult281new>, 15
	IF<, @empty
@normal
	ACTOR 1, "Cultist", cult1, 1,35,60
	ACTOR 2, "Cultist", cult2, 1,40,70
	ACTOR 3, "Cultist", cult3, 1,54,68
	ACTOR 0, "Cultist",	cult1, 1,62,65
	1: Daemons! We bring you offerings!
	3: Please! Assist us!
	0: Look out! Someone's here!
	2: Die, fool!
	WAIT 2
	MUSIC cultfight.mid
	MOVE 1,-100,-100,1
	MOVE 2,-100,-100,1
	MOVE 3,-100,-100,1
	MOVE 0,-100,-100,1
	FIGHT 524,524,525,526,418,418
	MUSIC cultelson.mid
	MOVE 1,35,60,1
	MOVE 2,40,70,1
	MOVE 3,54,66,1
	MOVE 0,62,65,1
	IF WIN, @won
	IF LOSE @lose
END

@won
	1: No! I thought we were blessed by Omega...
	3: Omega! How could you?!
	WAIT 2
	MOVE 1,-100,-100,1
	MOVE 2,-100,-100,1
	MOVE 3,-100,-100,1
	MOVE 0,-100,-100,1
	ADD cultelson, 1
	SET defeatcult281current, #<num.hostAge>
	COMPARE #<cultelson>, 3
	IF= @getkey
	IF> @pastgetkey
	N: There is still evil on this floor.
	WAIT 2
	N: Continue to clense this level and
	N: the way will be clear.
END

@lose
	1: You fool! You will never defeat us!
	2: Let's continue praying...
END

@empty
	SET timeleft, 15
	SUB timeleft,#<defeatcult281new>
	N: There is no one here.
	WAIT 1
	N: It will be another #<timeleft> game minute(s)
	N: before any more cultists come.
END

@checkifgotkey
	COMPARE #<gotelsonkey>, 1
	IF= @checktime
	GOTO @getkey
END

@getkey
	ACTOR 4, "Key", cultkeys, 1,50,50
END

@pastgetkey
	N: So far, you're defeated #<cultelson> groups
	N: of cultists on Elson's floor.
	COMPARE #<cultelson>, 10
	IF= @includetext1
	COMPARE #<cultelson>, 20
	IF= @includetext2
	COMPARE #<cultelson>, 30
	IF= @includetext3
	COMPARE #<cultelson>, 40
	IF= @includetext4
	COMPARE #<cultelson>, 50
	IF= @includetext5
	COMPARE #<cultelson>, 60
	IF= @includetext6
	COMPARE #<cultelson>, 70
	IF= @includetext7
	COMPARE #<cultelson>, 80
	IF= @includetext8
	COMPARE #<cultelson>, 90
	IF= @includetext9
	COMPARE #<cultelson>, 100
	IF= @includetext10
END

@includetext1
SET atlabel, elsonreward1
#INCLUDE cult_equip.txt
END

@includetext2
SET atlabel, elsonreward2
#INCLUDE cult_equip.txt
END

@includetext3
SET atlabel, elsonreward3
#INCLUDE cult_equip.txt
END

@includetext4
SET atlabel, elsonreward4
#INCLUDE cult_equip.txt
END

@includetext5
SET atlabel, elsonreward5
#INCLUDE cult_equip.txt
END

@includetext6
SET atlabel, elsonreward6
#INCLUDE cult_equip.txt
END

@includetext7
SET atlabel, elsonreward7
#INCLUDE cult_equip.txt
END

@includetext8
SET atlabel, elsonreward8
#INCLUDE cult_equip.txt
END

@includetext9
SET atlabel, elsonreward9
#INCLUDE cult_equip.txt
END

@includetext10
SET  atlabel, elsonreward10
#INCLUDE cult_equip.txt
END

@eventactorclick4
	MOVE 4,-100,-100,1
	N: You have gotten the Elson Key.
	WAIT 2
	N: You can now go down to the next floor!
	GIVE I408
	SET gotelsonkey, 1
END

;-----------------------------------------------------------

SCENE 1503 cultshrine, SCENE, "Deamon Shrine", 0,0
	COMPARE #<cultelson>, 3
	IF= @checkifgotkey
@checktime
	COMPARE #<defeatcult284current>, 0
	IF= @normal
	IF< @normal
	SET defeatcult284new, #<num.hostAge>
	SUB defeatcult284new, #<defeatcult284current>
	COMPARE #<defeatcult284new>, 15
	IF<, @empty
@normal
	ACTOR 1, "Cultist", cult1, 1,35,68
	ACTOR 2, "Cultist", cult2, 1,70,64
	ACTOR 3, "Daemon", daemon, 1,25,75
	ACTOR 0, "Cultist",	cult3, 1,45,66
	1: Deamons...
	0: Please accept these offerings.
	2: We hope that you will let us continue to serve you...
	0: It is %1! He is the deamon killer!
	1: Omega! Let us serve you now!
	WAIT 2
	MUSIC cultfight.mid
	MOVE 1,-100,-100,1
	MOVE 2,-100,-100,1
	MOVE 3,-100,-100,1
	MOVE 0,-100,-100,1
	FIGHT 524,525,526,217,418,418
	MUSIC cultelson.mid
	MOVE 1,35,68,1
	MOVE 2,70,64,1
	MOVE 3,25,75,1
	MOVE 0,45,66,1
	IF WIN, @won
	IF LOSE @lose
END

@won
	2: Why...?
	0: Omega... did we not do enough?
	1: Ugh...
	WAIT 2
	MOVE 1,-100,-100,1
	MOVE 2,-100,-100,1
	MOVE 3,-100,-100,1
	MOVE 0,-100,-100,1
	ADD cultelson, 1
	SET defeatcult284current, #<num.hostAge>
	COMPARE #<cultelson>, 3
	IF= @getkey
	IF> @pastgetkey
	N: There is still evil on this floor.
	WAIT 2
	N: Continue to clense this level and
	N: the way will be clear.
END

@lose
	1: Wonderful.
	2: Thank you for your blessing, Omega!
END

@pastgetkey
	N: So far, you're defeated #<cultelson> groups
	N: of cultists on Elson's floor.
	COMPARE #<cultelson>, 10
	IF= @includetext1
	COMPARE #<cultelson>, 20
	IF= @includetext2
	COMPARE #<cultelson>, 30
	IF= @includetext3
	COMPARE #<cultelson>, 40
	IF= @includetext4
	COMPARE #<cultelson>, 50
	IF= @includetext5
	COMPARE #<cultelson>, 60
	IF= @includetext6
	COMPARE #<cultelson>, 70
	IF= @includetext7
	COMPARE #<cultelson>, 80
	IF= @includetext8
	COMPARE #<cultelson>, 90
	IF= @includetext9
	COMPARE #<cultelson>, 100
	IF= @includetext10
END

@includetext1
SET atlabel, elsonreward1
#INCLUDE cult_equip.txt
END

@includetext2
SET atlabel, elsonreward2
#INCLUDE cult_equip.txt
END

@includetext3
SET atlabel, elsonreward3
#INCLUDE cult_equip.txt
END

@includetext4
SET atlabel, elsonreward4
#INCLUDE cult_equip.txt
END

@includetext5
SET atlabel, elsonreward5
#INCLUDE cult_equip.txt
END

@includetext6
SET atlabel, elsonreward6
#INCLUDE cult_equip.txt
END

@includetext7
SET atlabel, elsonreward7
#INCLUDE cult_equip.txt
END

@includetext8
SET atlabel, elsonreward8
#INCLUDE cult_equip.txt
END

@includetext9
SET atlabel, elsonreward9
#INCLUDE cult_equip.txt
END

@includetext10
SET  atlabel, elsonreward10
#INCLUDE cult_equip.txt
END

@empty
	SET timeleft, 15
	SUB timeleft,#<defeatcult284new>
	N: There is no one here.
	WAIT 1
	N: It will be another #<timeleft> game minute(s)
	N: before any more cultists come.
END

@checkifgotkey
	COMPARE #<gotelsonkey>, 1
	IF= @checktime
	GOTO @getkey
END

@getkey
	ACTOR 4, "Key", cultkeys, 1,50,50
END

@eventactorclick4
	MOVE 4,-100,-100,1
	N: You have gotten the Elson Key.
	WAIT 2
	N: You can now go down to the next floor!
	GIVE I408
	SET gotelsonkey, 1
END

;-----------------------------------------------------------

SCENE 1504 cultlocked, SCENE, "Door to the Next Floor", 0,0

IF I408, @opendoor
COMPARE #<openedelsongate>, 1
IF= @doorunlocked
N: The door is locked.
WAIT 2
N: One of the cultists must
N: have it. Go look around this
N: level some more.
END

@opendoor
N: %1 uses the Elson Key to open the gate.
SOUND unlock.wav
TAKE I408
SET openedelsongate, 1
WAIT 2
@doorunlocked
N: You open the door and crawl down the ladder.
WAIT 2
N: ...next version!
WAIT 1
N: If you kill enough cultist groups, you will win things...
END

