REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Bonus Level - Full Moon
REM  Campaign: DK Original
REM  Authors:  based on Bullfrog script
REM		 KeeperFX CCP Team
REM  Date:   17 Aug 1997 - 02 Nov 2013
REM  Copying and copyrights:
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; either version 2 of the License, or
REM (at your option) any later version.
REM ****************************************************************************

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)

CREATE_PARTY(DWARFSTEAL)
	ADD_TO_PARTY(DWARFSTEAL,DWARFA,1,300,STEAL_GOLD,0)

REM "Three other Dungeon Keepers, each as evil and powerful as you, have expanded their empires into this realm. Ultimately, only the one who rules the underworld can conquer the realms above."
DISPLAY_OBJECTIVE(133,PLAYER0)

IF(PLAYER0,GAME_TURN >= 50)
	REM "You are about to face the greatest challenge yet to your evil aspirations. Here it comes, ready or not."
	DISPLAY_INFORMATION(132)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 20000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-1,APPROPRIATE_DUNGEON,0,1,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 30000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-2,APPROPRIATE_DUNGEON,0,1,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 40000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-1,APPROPRIATE_DUNGEON,0,1,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 50000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-2,APPROPRIATE_DUNGEON,0,1,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 60000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-1,APPROPRIATE_DUNGEON,0,2,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 70000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-2,APPROPRIATE_DUNGEON,0,2,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 80000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-1,APPROPRIATE_DUNGEON,0,3,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 90000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-2,APPROPRIATE_DUNGEON,0,3,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 91000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-1,APPROPRIATE_DUNGEON,0,4,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 92000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-2,APPROPRIATE_DUNGEON,0,5,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 93000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-1,APPROPRIATE_DUNGEON,0,6,100)
ENDIF																	   

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 94000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,-2,APPROPRIATE_DUNGEON,0,7,100)
ENDIF

IF(ALL_PLAYERS,TOTAL_GOLD_MINED > 95000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARFSTEAL,1,APPROPRIATE_DUNGEON,0,8,100)
ENDIF

BONUS_LEVEL_TIME(20000)
SET_TIMER(PLAYER0,TIMER0)

IF(PLAYER0,TIMER0 >= 20000)
	IF(PLAYER0,MONEY >= 30000)
		REM "Well done! Your immense wealth has drew the attention of a Thief. He will serve you well in the next realm!"
		DISPLAY_OBJECTIVE(175,PLAYER0)
		ADD_CREATURE_TO_LEVEL(PLAYER0,THIEF,2,1,10,0)
		REM Using a timer to make sure add creature command will be executed
		SET_TIMER(PLAYER0,TIMER1)
	ENDIF
	IF(PLAYER0,MONEY < 30000)
		LOSE_GAME
	ENDIF
ENDIF

IF(PLAYER0,TIMER1 >= 200)
	WIN_GAME
ENDIF
