REM PLAY Level 15

SET_GENERATE_SPEED(500)

MAX_CREATURES(PLAYER0,40)
MAX_CREATURES(PLAYER1,35)
MAX_CREATURES(PLAYER2,35)

START_MONEY(PLAYER0,7500)
START_MONEY(PLAYER1,7500)
START_MONEY(PLAYER2,7500)

REM     Computer Player stuff
		COMPUTER_PLAYER(PLAYER1,0)
		COMPUTER_PLAYER(PLAYER2,1)
		


ADD_CREATURE_TO_POOL(TROLL,30)
ADD_CREATURE_TO_POOL(SORCEROR,25)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,35)
ADD_CREATURE_TO_POOL(DRAGON,17)
ADD_CREATURE_TO_POOL(HELL_HOUND,15)
ADD_CREATURE_TO_POOL(VAMPIRE,3)
ADD_CREATURE_TO_POOL(ORC,25)
											

REM ALL PLAYERS
	REM Creature_Availability

		CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,VAMPIRE,1,1)
		CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)

	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,SCAVENGER,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
		ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
		

	REM Spells
		
		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,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_PROTECT,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_ARMAGEDDON,1,0)


	REM  doors & traps

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

	REM  research order	


rem CREATE_TEXT(0,113"YOU ARE ONE OF THREE DUNGEON KEEPERS VYING FOR POWER IN THIS LAND.YOUR RIVALS WILL GIVE YOU NO QUARTER HERE.MAKE SURE NONE OF THEIR NUMBER ESCAPE YOUR TORTURE ROOM.")
rem CREATE_TEXT(1,114"ONE OF YOUR OPPONANTS IS WEAK DESTROY HIM.")
rem CREATE_TEXT(2,115"YOUR OTHER OPPONANT HAS FEW CREATURES, STRIKE NOW.")
rem CREATE_TEXT(3,116"TAKE WHAT YOU CAN FROM THIS ANCIENT DUNGEON, IT MAY WE HOLD ITEMS WHICH MAY BE OF INTEREST TO YOU.")
rem CREATE_TEXT(4,117"YOUR RESEARCHERS HAVE CRAFTED A DESTROY WALLS SPELL FROM THE ETHER. USE IT TO SMASH DOWN THE PROTECTED WALLS OF YOUR UNSUSPECTING ENEMY.")
rem CREATE_TEXT(5,118"ONE OF YOUR OPPONENTS HAS DEVELOPED A SPELL WHICH CAN BREAK DOWN YOUR PROTECTED WALLS, BE ON YOUR GUARD.")
rem CREATE_TEXT(6,119"YOU HAVE DEVELOPED A SPELL TO END WORLDS. YOU MAY SUMMON ARMAGEDDON, BUT WILL YOU BE THE VICTOR AT JUDGEMENT DAY.")

DISPLAY_OBJECTIVE(113,PLAYER0)

IF(PLAYER0,GAME_TURN >= 15000)
	IF(PLAYER1,TOTAL_CREATURES >= 10)
		IF(PLAYER1,DUNGEON_DESTROYED == 0)
		DISPLAY_INFORMATION(114,PLAYER0)
		ENDIF
	ENDIF
ENDIF

IF(PLAYER0,GAME_TURN >= 20000)
	IF(PLAYER2,TOTAL_CREATURES >= 10)
		IF(PLAYER2,DUNGEON_DESTROYED == 0)
		DISPLAY_INFORMATION(115,PLAYER0)
		ENDIF
	ENDIF
ENDIF

IF_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS == 1)
	DISPLAY_INFORMATION(116,PLAYER0)
	SET_FLAG(PLAYER0,FLAG0,1)
ENDIF

IF(PLAYER0,FLAG0 == 0)
	IF_AVAILABLE(PLAYER1,POWER_DESTROY_WALLS == 1)
	DISPLAY_INFORMATION(117,PLAYER0)
	SET_FLAG(PLAYER0,FLAG0,1)
	ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 0)
	IF_AVAILABLE(PLAYER1,POWER_DESTROY_WALLS == 1)
	DISPLAY_INFORMATION(118,PLAYER0)
	SET_FLAG(PLAYER0,FLAG0,1)
	ENDIF
ENDIF

IF_AVAILABLE(PLAYER0,POWER_ARMAGEDDON == 1)
	DISPLAY_INFORMATION(119,PLAYER0)
ENDIF

IF(PLAYER0,DUNGEON_DESTROYED == 1)
	LOSE_GAME
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
	IF(PLAYER2,DUNGEON_DESTROYED == 1)
		IF(PLAYER_GOOD, TOTAL_CREATURES == 0)
			WIN_GAME
		ENDIF
	ENDIF
ENDIF


CREATE_PARTY(ONE)
	ADD_TO_PARTY(ONE,ARCHER,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,WIZARD,5,600,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
	ADD_TO_PARTY(TWO,DWARFA,4,800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,DWARFA,4,800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,DWARFA,4,800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,DWARFA,4,800,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
	ADD_TO_PARTY(THREE,WITCH,6,1800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,WITCH,6,1800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,WITCH,6,1800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,WITCH,6,1800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,WITCH,6,1800,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
	ADD_TO_PARTY(FOUR,BARBARIAN,5,900,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,BARBARIAN,5,900,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,BARBARIAN,5,900,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,BARBARIAN,5,900,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,BARBARIAN,5,900,ATTACK_ENEMIES,0)
	
IF_ACTION_POINT(2,PLAYER0)
	IF(PLAYER2,FLAG5 == 0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,2,1)
	SET_FLAG(PLAYER2,FLAG5 == 1)
	ENDIF
ENDIF

IF_ACTION_POINT(3,PLAYER0)
	IF(PLAYER2,FLAG5 == 0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,2,1)
	SET_FLAG(PLAYER2,FLAG5 == 1)
	ENDIF
ENDIF

IF_ACTION_POINT(1,PLAYER0)
	SET_TIMER(PLAYER_GOOD,TIMER0)
		IF(PLAYER_GOOD,TIMER0 >= 500)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,4,1)
			IF(PLAYER_GOOD,TIMER0 >= 1000)
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,5,1)
			ENDIF
		ENDIF
ENDIF

IF(PLAYER0,PRISON > 0)
	ROOM_AVAILABLE(PLAYER0,PRISON,1,1)
ENDIF





