SET_GENERATE_SPEED(500)


MAX_CREATURES(PLAYER0,20)
MAX_CREATURES(PLAYER1,22)
MAX_CREATURES(PLAYER2,22)

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


COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,1)
ALLY_PLAYERS(PLAYER1,PLAYER2)

SET_COMPUTER_GLOBALS(player1,60,1,1,1,1900,1)
SET_COMPUTER_GLOBALS(player2,70,1,2,1,1700,1)

SET_COMPUTER_CHECKS(PLAYER1,"CHECK FOR NEUTRAL PLACES",1000,0,0,0,30000)
rem SET_COMPUTER_CHECKS(PLAYER2,"CHECK FOR NEUTRAL PLACES",1000,0,0,0,30000)

IF(PLAYER0,TOTAL_CREATURES == 20)
	PRINT("I KNOW THY NAME, I WILL DESTROY THY EVIL PRESENCE. The Avatar")
ENDIF

REM ALL PLAYERS

	REM Creature_Availability


		ADD_CREATURE_TO_POOL(HELL_HOUND,50)
		ADD_CREATURE_TO_POOL(DARK_MISTRESS,40)
		ADD_CREATURE_TO_POOL(SORCEROR,40)
		ADD_CREATURE_TO_POOL(TROLL,40)
		ADD_CREATURE_TO_POOL(BILE_DEMON,40)
		ADD_CREATURE_TO_POOL(DRAGON,40)



		CREATURE_AVAILABLE(PLAYER1,HELL_HOUND,1,1)
		CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,1)
		CREATURE_AVAILABLE(PLAYER1,SORCEROR,1,1)
		CREATURE_AVAILABLE(PLAYER1,TROLL,1,1)
		CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,1)
		CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)

		CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
		CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
		CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
		CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)

		CREATURE_AVAILABLE(PLAYER2,HELL_HOUND,1,1)
		CREATURE_AVAILABLE(PLAYER2,DARK_MISTRESS,1,1)
		CREATURE_AVAILABLE(PLAYER2,SORCEROR,1,1)
		CREATURE_AVAILABLE(PLAYER2,TROLL,1,1)
		CREATURE_AVAILABLE(PLAYER2,BILE_DEMON,1,1)
		CREATURE_AVAILABLE(PLAYER2,DRAGON,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,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)


	REM  doors & traps

		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)
		TRAP_AVAILABLE(ALL_PLAYERS,LAVA,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)
		
REM ------------------------------------------------------------

DISPLAY_OBJECTIVE(111,PLAYER0)


IF_AVAILABLE(PLAYER0,POWER_CHICKEN==1)
rem CREATE_TEXT(2,108"YOUR RESEARCHERS HAVE DISCOVERED A DEVASTATING SPELL, THE SPELL OF CHICKEN.  CAST IT ON ANY CREATURE TO INSTANTLY TRANSFORM THEM INTO A CHICKEN.  MARVELLOUS.")
DISPLAY_OBJECTIVE(108,PLAYER0)
ENDIF


IF_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS==1)
rem CREATE_TEXT(3,110"YOU NOW HAVE THE POWER TO DESTROY ENEMY WALLS.  CAST IT SPARINGLY AND WISELY HOWEVER, AS IT WILL COST YOU MUCH IN GOLD.  BEWARE, YOUR ENEMIES MIGHT POSSESS IT ALSO.")
DISPLAY_OBJECTIVE(110,PLAYER0)
ENDIF


IF(PLAYER1,DUNGEON_DESTROYED==1)
	IF(PLAYER2,DUNGEON_DESTROYED==1)
rem	CREATE_TEXT(4,111"YOU ARE ALMOST VICTORIOUS. ONLY THE LORD OF THE LAND STANDS IN YOUR WAY, FIND HIM AND SHOW HIM SOME POWER.... ")
	DISPLAY_OBJECTIVE(111,PLAYER0)
	ENDIF
ENDIF


IF(PLAYER_GOOD,WIZARD==0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,1,10,1000000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-1,4,7,1000)
	IF(PLAYER_GOOD,KNIGHT==0)
		WIN_GAME
rem		CREATE_TEXT(5,112"WELL DONE THAT WAS FLIPPIN GREAT")
		DISPLAY_OBJECTIVE(112,PLAYER0)
	ENDIF
ENDIF

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




