SET_GENERATE_SPEED(400)

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

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


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


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


DISPLAY_OBJECTIVE(128,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(30000)
SET_TIMER(PLAYER0,TIMER0)

IF(PLAYER0,TIMER0 >= 30000)
	IF(PLAYER0,MONEY > 50000)
		WIN_GAME
	ENDIF

	IF(PLAYER0,MONEY < 50000)
		LOSE_GAME
	ENDIF
ENDIF
