SET_GENERATE_SPEED(200)


START_MONEY(ALL_PLAYERS,10000)

ADD_CREATURE_TO_POOL(BILE_DEMON,10)
ADD_CREATURE_TO_POOL(DRAGON,10)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,10)
ADD_CREATURE_TO_POOL(HELL_HOUND,5)
ADD_CREATURE_TO_POOL(TENTACLE,5)
ADD_CREATURE_TO_POOL(DEMONSPAWN,5)
ADD_CREATURE_TO_POOL(SORCEROR,10)
ADD_CREATURE_TO_POOL(TROLL,5)
ADD_CREATURE_TO_POOL(SPIDER,5)
ADD_CREATURE_TO_POOL(ORC,15)
	
	
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TENTACLE,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)
	

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

		
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
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_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,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_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_ARMAGEDDON,1,0)



DOOR_AVAILABLE(ALL_PLAYERS,WOOD,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)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)


RESEARCH(PLAYER0,MAGIC,POWER_SIGHT,5000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CALL_TO_ARMS,5000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_HOLD_AUDIENCE,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_SPEED,10000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CONCEAL,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_PROTECT,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_HEAL_CREATURE,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CAVE_IN,25000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_LIGHTNING,25000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_OBEY,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CHICKEN,25000)
RESEARCH(PLAYER0,MAGIC,POWER_DISEASE,50000)
RESEARCH(PLAYER0,MAGIC,POWER_ARMAGEDDON,300000)
RESEARCH(PLAYER0,MAGIC,POWER_DESTROY_WALLS,300000)





	DISPLAY_OBJECTIVE(124,PLAYER0)



IF(PLAYER0,ENTRANCE > 0)
	IF(PLAYER0, GAME_TURN < 4000)
		SET_TIMER(PLAYER0,TIMER0)
	ENDIF
ENDIF


IF(PLAYER0,ENTRANCE < 0)
	IF(PLAYER0, GAME_TURN > 4000)
		SET_TIMER(PLAYER0,TIMER0)
	ENDIF
ENDIF



IF(PLAYER0,TIMER0 > 9000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-1,10,3,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-2,10,3,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-3,5,5,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-4,5,5,0)
ENDIF


IF(PLAYER0,TIMER0 > 13000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,THIEF,-1,8,4,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,THIEF,-2,8,4,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-3,10,5,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-4,10,5,0)
ENDIF


IF(PLAYER0,TIMER0 > 15000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-1,8,5,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-2,8,5,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,1,7,6,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,2,7,6,0)
ENDIF

IF(PLAYER0,TIMER0 > 20000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-1,8,6,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-2,8,6,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-3,7,7,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-4,7,7,0)
ENDIF


IF(PLAYER0,TIMER0 > 23000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,-1,6,7,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,-2,6,7,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-3,5,8,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-4,5,8,0)
ENDIF


IF(PLAYER0,TIMER0 > 26000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-1,5,8,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-2,5,8,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,-3,5,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,-4,5,9,0)
ENDIF

IF(PLAYER0,TIMER0 > 31000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-1,4,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-2,4,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-3,10,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-4,10,9,0)
ENDIF


IF(PLAYER0,TIMER0 > 34500)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,-1,6,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,-2,9,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-3,6,9,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-4,7,9,0)
ENDIF


IF(PLAYER0,TIMER0 > 38500)
	SET_FLAG(PLAYER0,FLAG0,1)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,5,10,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-2,5,10,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-3,7,8,0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-4,7,8,0)
ENDIF

IF(PLAYER0,DUNGEON_DESTROYED==1)
	DISPLAY_OBJECTIVE(126,PLAYER0)
	LOSE_GAME
ENDIF


IF(PLAYER0, ALL_DUNGEONS_DESTROYED == 1)
	IF(PLAYER_GOOD,AVATAR==0)
		IF(PLAYER0,FLAG0==1)
			DISPLAY_OBJECTIVE(125,PLAYER0)
			WIN_GAME
		ENDIF
	ENDIF
ENDIF
