REM PLAY Level 1

SET_GENERATE_SPEED(600)

MAX_CREATURES(PLAYER0,40)
MAX_CREATURES(PLAYER1,6)

START_MONEY(PLAYER0,20000)
START_MONEY(PLAYER1,20000)

COMPUTER_PLAYER(PLAYER1,0)

REM ALL PLAYERS

ADD_CREATURE_TO_POOL(SPIDER,10)
ADD_CREATURE_TO_POOL(BUG,10)
ADD_CREATURE_TO_POOL(FLY,10)
ADD_CREATURE_TO_POOL(TROLL,10)
ADD_CREATURE_TO_POOL(SORCEROR,10)
ADD_CREATURE_TO_POOL(BILE_DEMON,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,8)
ADD_CREATURE_TO_POOL(DRAGON,10)
ADD_CREATURE_TO_POOL(HELL_HOUND,10)
ADD_CREATURE_TO_POOL(ORC,20)

	REM Creature_Availability

CREATURE_AVAILABLE(PLAYER0,FLY,1,1)
CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
CREATURE_AVAILABLE(PLAYER0,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,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,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,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(PLAYER1,POWER_SIGHT,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,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)

	REM  doors & traps

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

	REM  parties

CREATE_PARTY(OBIWAN)
	ADD_TO_PARTY(OBIWAN,THIEF,2,5000,STEAL_GOLD,0)
	ADD_TO_PARTY(OBIWAN,BARBARIAN,1,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(OBIWAN,DWARFA,1,300,STEAL_GOLD,0)

CREATE_PARTY(MAUL)
	ADD_TO_PARTY(MAUL,THIEF,4,5000,STEAL_GOLD,0)
	ADD_TO_PARTY(MAUL,BARBARIAN,3,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(MAUL,DWARFA,4,300,STEAL_GOLD,0)
	ADD_TO_PARTY(MAUL,DWARFA,4,300,STEAL_GOLD,0)
	ADD_TO_PARTY(MAUL,DWARFA,4,300,STEAL_GOLD,0)

CREATE_PARTY(JARJAR)
	ADD_TO_PARTY(JARJAR,WIZARD,9,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(JARJAR,BARBARIAN,9,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(JARJAR,KNIGHT,10,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(JARJAR,WITCH,8,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(JARJAR,SAMURAI,8,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(JARJAR,GIANT,8,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(JARJAR,FAIRY,9,300,ATTACK_ENEMIES,0)

DISPLAY_OBJECTIVE(916,ALL_PLAYERS)

IF(PLAYER0,TOTAL_CREATURES >= 5)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,OBIWAN,-1,1)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAUL,-2,1)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,JARJAR,1,1)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
	ADD_CREATURE_TO_LEVEL(PLAYER1,ORC,3,5,10,5000)
	ADD_CREATURE_TO_LEVEL(PLAYER1,ORC,3,5,7,1000)
	ADD_CREATURE_TO_LEVEL(PLAYER1,DRAGON,3,5,8,3000)
	ADD_CREATURE_TO_LEVEL(PLAYER1,BILE_DEMON,3,5,7,1000)
	ADD_CREATURE_TO_LEVEL(PLAYER1,DARK_MISTRESS,3,5,8,1000)
	ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,3,5,10,0)
	ADD_CREATURE_TO_LEVEL(PLAYER1,SORCEROR,3,2,10,1000)
	ADD_CREATURE_TO_LEVEL(PLAYER1,VAMPIRE,3,2,10,10000)
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
	IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
		WIN_GAME
	ENDIF
ENDIF

IF(PLAYER0,DUNGEON_DESTROYED == 1)
	LOSE_GAME
ENDIF