SET_GENERATE_SPEED(1000)

MAX_CREATURES(ALL_PLAYERS,0)

START_MONEY(ALL_PLAYERS,10000)

		DISPLAY_OBJECTIVE(98,PLAYER0)

SET_TIMER(PLAYER0,TIMER0)
BONUS_LEVEL_TIME(50000)



ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,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,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,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_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_OBEY,1,0)


DOOR_AVAILABLE(ALL_PLAYERS,WOOD,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(ALL_PLAYERS,ROOM,BRIDGE,3000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_SIGHT,5000)
RESEARCH(ALL_PLAYERS,ROOM,GUARD_POST,5000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CALL_TO_ARMS,5000)
RESEARCH(ALL_PLAYERS,ROOM,WORKSHOP,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_HOLD_AUDIENCE,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_SPEED,10000)
RESEARCH(ALL_PLAYERS,ROOM,PRISON,20000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CONCEAL,15000)
RESEARCH(ALL_PLAYERS,ROOM,BARRACKS,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_PROTECT,15000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_HEAL_CREATURE,15000)
RESEARCH(ALL_PLAYERS,ROOM,TORTURE,20000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CAVE_IN,25000)
RESEARCH(ALL_PLAYERS,ROOM,TEMPLE,25000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_LIGHTNING,25000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_OBEY,15000)
RESEARCH(ALL_PLAYERS,ROOM,GRAVEYARD,50000)
RESEARCH(ALL_PLAYERS,MAGIC,POWER_CHICKEN,25000)
RESEARCH(PLAYER0,MAGIC,POWER_DISEASE,50000)




CREATE_PARTY(ZERO)
	ADD_TO_PARTY(ZERO,DWARFA,3,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ZERO,WIZARD,7,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ZERO,DWARFA,3,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ZERO,DWARFA,3,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ZERO,DWARFA,3,0,ATTACK_ENEMIES,0)

CREATE_PARTY(ONE)
	ADD_TO_PARTY(ONE,ARCHER,4,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,BARBARIAN,8,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,4,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,4,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ONE,ARCHER,4,0,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
	ADD_TO_PARTY(TWO,MONK,5,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,GIANT,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,MONK,5,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,MONK,5,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,MONK,5,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(TWO,GIANT,9,0,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
	ADD_TO_PARTY(THREE,SAMURAI,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,DRAGON,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,SAMURAI,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,SAMURAI,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(THREE,SAMURAI,6,0,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
	ADD_TO_PARTY(FOUR,ARCHER,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,BARBARIAN,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,ARCHER,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,BARBARIAN,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,ARCHER,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(FOUR,ARCHER,6,0,ATTACK_ENEMIES,0)

CREATE_PARTY(LAST)
	ADD_TO_PARTY(LAST,KNIGHT,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(LAST,AVATAR,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(LAST,KNIGHT,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(LAST,KNIGHT,9,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(LAST,KNIGHT,9,0,ATTACK_ENEMIES,0)






IF(PLAYER0,TIMER0 >= 4000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ZERO,4,1)
ENDIF

IF(PLAYER0,TIMER0 >= 7000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ZERO,1,1)
ENDIF

IF(PLAYER0,TIMER0 >= 10500)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ZERO,3,1)
ENDIF



IF(PLAYER0,TIMER0 >= 15000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,6,1)
ENDIF

IF(PLAYER0,TIMER0 >= 18000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
ENDIF

IF(PLAYER0,TIMER0 >= 20000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,5,1)
ENDIF



IF(PLAYER0,TIMER0 >= 24000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,1,1)
ENDIF

IF(PLAYER0,TIMER0 >= 25000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,4,1)
ENDIF

IF(PLAYER0,TIMER0 >= 28000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,3,1)
ENDIF



IF(PLAYER0,TIMER0 >= 35000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,2,1)
ENDIF

IF(PLAYER0,TIMER0 >= 37000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,5,1)
ENDIF

IF(PLAYER0,TIMER0 >= 38500)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,6,1)
ENDIF


IF(PLAYER0,TIMER0 >= 43500)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,3,1)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,2,1)
ENDIF

IF(PLAYER0,TIMER0 >= 48000)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,-3,1)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,-2,1)
ENDIF


IF(PLAYER0,TIMER0 >= 49000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,IMP,7,10,1,1500)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LAST,-1,1)
ENDIF





IF(PLAYER_GOOD,AVATAR==0)
	IF(PLAYER_GOOD,KNIGHT==0)
		IF(PLAYER0,TIMER0 >= 50000)
			DISPLAY_OBJECTIVE(99,PLAYER0)
			WIN_GAME
		ENDIF
	ENDIF
ENDIF
