REM PLAY Level 17

REM      CRISIS

SET_GENERATE_SPEED(500)

MAX_CREATURES(PLAYER0,60)

SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,THIEF,10)

START_MONEY(PLAYER0,10000)

ADD_CREATURE_TO_POOL(FLY,3)
ADD_CREATURE_TO_POOL(BUG,4)
ADD_CREATURE_TO_POOL(SORCEROR,12)
ADD_CREATURE_TO_POOL(BILE_DEMON,11)
ADD_CREATURE_TO_POOL(DRAGON,19)
ADD_CREATURE_TO_POOL(TROLL,3)
ADD_CREATURE_TO_POOL(ORC,4)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,6)
ADD_CREATURE_TO_POOL(SKELETON,14)
ADD_CREATURE_TO_POOL(GHOST,15)
ADD_CREATURE_TO_POOL(HELL_HOUND,4)
ADD_CREATURE_TO_POOL(VAMPIRE,3)
ADD_CREATURE_TO_POOL(TENTACLE,5)
ADD_CREATURE_TO_POOL(HORNY,1)

                CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
	        CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,SKELETON,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,GHOST,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,VAMPIRE,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,TENTACLE,1,1)
                CREATURE_AVAILABLE(ALL_PLAYERS,HORNY,1,1)



		ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
		ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
		ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
		ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
		ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
		ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)




		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
                MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)



 	        DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
		DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
		DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
		DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)


IF(PLAYER0,DUNGEON_DESTROYED == 1)
	LOSE_GAME
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
        IF(PLAYER_GOOD,KNIGHT == 0)
                WIN_GAME
        ENDIF
ENDIF

SET_CREATURE_STRENGTH(KNIGHT,200)
SET_CREATURE_HEALTH(KNIGHT,4000)
SET_CREATURE_ARMOUR(KNIGHT,200)

CREATE_PARTY(ONE)
	ADD_TO_PARTY(ONE,ARCHER,1,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,2,400,ATTACK_ENEMIES,0)

CREATE_PARTY(ONEB)
	ADD_TO_PARTY(ONEB,ARCHER,4,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONEB,ARCHER,4,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONEB,ARCHER,3,350,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONEB,THIEF,3,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
	ADD_TO_PARTY(TWO,GIANT,2,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,BARBARIAN,3,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,BARBARIAN,4,400,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
	ADD_TO_PARTY(THREE,DWARFA,3,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,DWARFA,3,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,DWARFA,3,400,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
	ADD_TO_PARTY(FOUR,WITCH,5,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,WIZARD,5,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,FAIRY,4,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,FAIRY,5,450,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,WIZARD,6,700,ATTACK_ENEMIES,0)

CREATE_PARTY(FIVE)
	ADD_TO_PARTY(FIVE,THIEF,6,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FIVE,THIEF,6,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FIVE,THIEF,6,300,ATTACK_ENEMIES,0)

CREATE_PARTY(SIX)
	ADD_TO_PARTY(SIX,DWARFA,10,4200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SIX,DWARFA,10,4200,ATTACK_ENEMIES,0)


CREATE_PARTY(SEVEN)
	ADD_TO_PARTY(SEVEN,BARBARIAN,10,4200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SEVEN,BARBARIAN,10,4200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SEVEN,FAIRY,10,4200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SEVEN,FAIRY,10,4200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SEVEN,ARCHER,10,4000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SEVEN,ARCHER,10,4000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(SEVEN,ARCHER,10,4000,ATTACK_ENEMIES,0)

CREATE_PARTY(FINAL)
	ADD_TO_PARTY(FINAL,BARBARIAN,10,4000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FINAL,BARBARIAN,10,4000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FINAL,ARCHER,10,4000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FINAL,ARCHER,10,4000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FINAL,WIZARD,10,4200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FINAL,AVATAR,7,4500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FINAL,KNIGHT,10,6000,ATTACK_ENEMIES,0)

CREATE_PARTY(A)
	ADD_TO_PARTY(A,FAIRY,6,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(A,FAIRY,6,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(A,FAIRY,10,4000,ATTACK_ENEMIES,0)

CREATE_PARTY(B)
	ADD_TO_PARTY(B,DWARFA,6,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(B,GIANT,6,300,ATTACK_ENEMIES,0)

CREATE_PARTY(C)
	ADD_TO_PARTY(C,WIZARD,3,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(C,WIZARD,3,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(C,ARCHER,3,400,ATTACK_ENEMIES,0)

CREATE_PARTY(D)
	ADD_TO_PARTY(D,ARCHER,6,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(D,BARBARIAN,7,300,ATTACK_ENEMIES,0)





IF_ACTION_POINT(7,PLAYER0)
        IF(PLAYER0,TOTAL_CREATURES>=6)
	        ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,DUNGEON,0,1,300)
                SET_TIMER(PLAYER0,TIMER0)
        ENDIF
ENDIF

IF(PLAYER0,TOTAL_GOLD_MINED >= 2500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,-4,ACTION_POINT,17,3,300)
ENDIF

IF(PLAYER0,TIMER0>=300)
        ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,13,DUNGEON,0,4,400)
ENDIF

IF(PLAYER0,TIMER0>=500)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,12,1,2,300)
ENDIF

IF(PLAYER0,TIMER0>=520)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,14,1,2,300)
ENDIF

IF(PLAYER0,TIMER0>=540)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,15,1,2,300)
ENDIF

IF(PLAYER0,TIMER0>=560)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,2,1,2,300)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,16,DUNGEON_HEART,0,3,300)
ENDIF

IF_ACTION_POINT(16,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,A,-5,1)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,-1,1)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,-3,DUNGEON,0,3,300)
ENDIF

IF_ACTION_POINT(9,PLAYER0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,1,1,5,600)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,6,1)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
	SET_TIMER(PLAYER0,TIMER1)
ENDIF

IF(PLAYER0,TIMER1>=50)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,9,1,5,300)
ENDIF

IF(PLAYER0,TIMER1>=75)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,16,2,3,300)
ENDIF

IF(PLAYER0,TIMER1>=100)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,11,1,4,300)
ENDIF

IF(PLAYER0,TIMER1>=125)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,18,1,4,300)
ENDIF

IF(PLAYER0,TIMER1>=150)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,15,1,3,300)
ENDIF

IF(PLAYER0,TIMER1>=175)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,12,1,4,300)
ENDIF

IF(PLAYER0,TIMER1>=180)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-6,1,4,300)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
        ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,-7,ACTION_POINT,4,8,400)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SEVEN,-7,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FINAL,-7,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,B,3,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,B,-6,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,A,8,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,D,-8,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,C,10,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,D,-2,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,-1,1)
        SET_TIMER(PLAYER0,TIMER2)
ENDIF

IF(PLAYER0,TIMER2>=50)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,16,1,5,300)
ENDIF

IF(PLAYER0,TIMER2>=75)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,9,1,3,300)
ENDIF

IF(PLAYER0,TIMER2>=100)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,3,1,4,300)
ENDIF

IF(PLAYER0,TIMER2>=125)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,4,1,4,300)
ENDIF

IF(PLAYER0,TIMER2>=150)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,10,1,3,300)
ENDIF

IF(PLAYER0,TIMER2>=175)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,2,1,4,300)
ENDIF

IF(PLAYER0,TIMER2>=180)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-3,1,4,300)
ENDIF

IF(PLAYER0,TIMER2>=180)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,8,1,4,300)
ENDIF
