SET_GENERATE_SPEED(350)

MAX_CREATURES(PLAYER0,20)

START_MONEY(PLAYER0,5000)

		CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)

		ADD_CREATURE_TO_POOL(FLY,20)
		ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
		ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
		ADD_CREATURE_TO_POOL(SORCEROR,30)
		ADD_CREATURE_TO_POOL(TROLL,20)
		ADD_CREATURE_TO_POOL(SPIDER,20)
		ADD_CREATURE_TO_POOL(BILE_DEMON,8)
		ADD_CREATURE_TO_POOL(ORC,20)

		
			
	REM Room_Availability

		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_HAND,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,1)
	   	MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,1)
	   	MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,1)

	REM  doors & traps

		DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
		DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
		DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)				

					


REM	Win condition disabled in KeeperFX
IF(PLAYER0,HORNY>0)
REM	WIN_GAME
ENDIF

REM **************************************************
REM ** KeeperFX specific level script.				**
REM **************************************************


CREATE_PARTY(ARCHGUARD)
	ADD_TO_PARTY(ARCHGUARD,THIEF,4,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ARCHGUARD,THIEF,4,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ARCHGUARD,THIEF,4,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ARCHGUARD,ARCHER,5,500,ATTACK_ENEMIES,0)

CREATE_PARTY(ARROWERS)
	ADD_TO_PARTY(ARROWERS,ARCHER,5,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ARROWERS,ARCHER,5,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ARROWERS,ARCHER,5,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ARROWERS,ARCHER,5,500,ATTACK_ENEMIES,0)

CREATE_PARTY(DWARWITCH)
	ADD_TO_PARTY(DWARWITCH,DWARFA,5,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(DWARWITCH,DWARFA,5,400,STEAL_GOLD,0)
	ADD_TO_PARTY(DWARWITCH,WITCH,7,600,ATTACK_ENEMIES,0)

CREATE_PARTY(TOUGHMELEE)
	ADD_TO_PARTY(TOUGHMELEE,BARBARIAN,7,600,DEFEND_PARTY,0)
	ADD_TO_PARTY(TOUGHMELEE,BARBARIAN,7,600,DEFEND_PARTY,0)
	ADD_TO_PARTY(TOUGHMELEE,GIANT,7,600,ATTACK_ROOMS,0)
	ADD_TO_PARTY(TOUGHMELEE,GIANT,7,600,ATTACK_ROOMS,0)

CREATE_PARTY(WITCHERS)
	ADD_TO_PARTY(WITCHERS,WITCH,8,1000,STEAL_SPELLS,0)
	ADD_TO_PARTY(WITCHERS,WITCH,8,1000,STEAL_SPELLS,0)

CREATE_PARTY(MONKIES)
	ADD_TO_PARTY(MONKIES,MONK,5,1200,STEAL_GOLD,0)
	ADD_TO_PARTY(MONKIES,MONK,5,1200,STEAL_GOLD,0)
	ADD_TO_PARTY(MONKIES,MONK,5,1200,STEAL_GOLD,0)

CREATE_PARTY(BARBIES)
	ADD_TO_PARTY(BARBIES,BARBARIAN,7,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,7,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,7,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,7,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,7,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,7,1000,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(ELITWITCH)
	ADD_TO_PARTY(ELITWITCH,WITCH,10,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ELITWITCH,WITCH,10,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(LANDLORD)
	ADD_TO_PARTY(LANDLORD,KNIGHT,9,2500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,8,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,8,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,8,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,8,800,DEFEND_PARTY,0)

REM ****************************************************************************

REM "Your location is already known to the heroes of this land. They have moved quickly to mobilise their forces against you."
DISPLAY_OBJECTIVE(122,ALL_PLAYERS)

IF(PLAYER0,GAME_TURN >= 500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-4,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 1000)
	REM "The heroes of this realm possess treasures of great power. Obviously, these should belong to you..."
	DISPLAY_INFORMATION(124)
ENDIF

IF(PLAYER0,GAME_TURN >= 2050)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARWITCH,-2,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 3500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-3,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 5250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARROWERS,-6,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 7500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-5,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 9050)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARWITCH,-5,DUNGEON,0,1,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,WITCHERS,-4,DUNGEON,0,1,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,MONKIES,-3,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 11500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-1,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 13000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TOUGHMELEE,-1,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 15500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-6,DUNGEON,0,1,250)

	IF(PLAYER_GOOD,TOTAL_CREATURES <= 0)
		ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,BARBIES,-7,DUNGEON,0,6,250)
		ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITWITCH,-7,DUNGEON,0,6,250)
		ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD,-7,DUNGEON,0,6,250)
		REM "You've upset the local Lord. He's on his way right now. Shall I alert the media?"
		DISPLAY_OBJECTIVE(123,-7)
		SET_TIMER(PLAYER_GOOD,TIMER0)
	ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 200)
	IF(PLAYER_GOOD,TOTAL_CREATURES <= 0)
		REM "Success is thine. Truly, you have earned your title, Dungeon Keeper."
		DISPLAY_OBJECTIVE(170,PLAYER0)
		WIN_GAME
	ENDIF
ENDIF

