SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,1)
MAX_CREATURES(PLAYER1,1)
MAX_CREATURES(PLAYER2,1)
MAX_CREATURES(PLAYER3,1)

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


COMPUTER_PLAYER(PLAYER1,1)
COMPUTER_PLAYER(PLAYER2,1)
COMPUTER_PLAYER(PLAYER3,1)

ALLY_PLAYERS(PLAYER0,PLAYER1)
ALLY_PLAYERS(PLAYER0,PLAYER2)
ALLY_PLAYERS(PLAYER0,PLAYER3)

ALLY_PLAYERS(PLAYER1,PLAYER2)
ALLY_PLAYERS(PLAYER1,PLAYER3)

ALLY_PLAYERS(PLAYER2,PLAYER3)

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,1)

rem CREATE_TEXT(0,153"THIS LEVEL WILL TEST YOUR ABILITY TO TRAVEL THROUGH THESE UNDERGROUND CAVERNS AT GREAT SPEED. INDEED, SPEED IS YOUR ONLY ALLY HERE. MAKE IT TO THE END OF THE COURTSE IN THE TIME ALLOWED TO WIN.")
DISPLAY_OBJECTIVE(153,PLAYER0)

CREATE_PARTY(DWARF)
	ADD_TO_PARTY(DWARF,DWARFA,1,300,STEAL_GOLD,0)
REM	ADD_TUNNELLER_PARTY_TO_LEVEL(player,party_name,where,head_for,number,level,gold)


IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 20000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,1,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 30000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,1,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 40000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,1,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 50000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,1,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 60000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,2,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 70000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,2,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 80000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,3,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 90000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,3,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 91000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,4,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 92000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,5,1)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 93000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,6,1)
ENDIF																	   

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 94000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARF,-1,APPROPIATE_DUNGEON,1,7,1)
ENDIF

BONUS_LEVEL_TIME(20000)
SET_TIMER(PLAYER0,TIMER0)

IF(PLAYER0,TIMER0 >= 20000)
	IF(PLAYER0,MONEY > 30000)
		WIN_GAME
	ENDIF
	IF(PLAYER0,MONEY < 30000)
		LOSE_GAME
	ENDIF
ENDIF
