REM ****************************************************
REM Opulent Point
REM
REM Assmist Isle Campaign by Kix
REM
REM v2.0 for DAT file objectives (by dayokay)
REM 14-Nov-2020
REM ****************************************************

LEVEL_VERSION(1)

COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,0)
ALLY_PLAYERS(PLAYER1,PLAYER2,1)
START_MONEY(PLAYER1,11000)
START_MONEY(PLAYER2,999000)
MAX_CREATURES(ALL_PLAYERS,25)

SET_CREATURE_TENDENCIES(PLAYER2,FLEE,1)
SET_CREATURE_TENDENCIES(PLAYER1,FLEE,1)


CREATE_PARTY(GIANTS)
	ADD_TO_PARTY(GIANTS,GIANT,3,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(GIANTS,GIANT,4,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(GIANTS,GIANT,4,0,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(GIANTS2)
	ADD_TO_PARTY(GIANTS2,GIANT,8,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(GIANTS2,GIANT,8,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(GIANTS2,GIANT,8,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(GIANTS2,GIANT,8,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(GIANTS2,GIANT,10,0,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PINTRO)
	ADD_TO_PARTY(PINTRO,ARCHER,1,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(PINTRO,ARCHER,1,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(PINTRO,DWARFA,1,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(PINTRO,DWARFA,1,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(PINTRO,THIEF,1,0,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(PINTRO,MONK,2,0,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(HLP)
	ADD_TO_PARTY(HLP,IMP,9,0,ATTACK_DUNGEON_HEART,0)

IF(PLAYER0,MONEY<200)
	NEXT_COMMAND_REUSABLE
	ADD_GOLD_TO_PLAYER(PLAYER0,100)
ENDIF
IF(PLAYER1,MONEY<500)
	NEXT_COMMAND_REUSABLE
	ADD_GOLD_TO_PLAYER(PLAYER1,500)
ENDIF

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,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER1,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER1,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER1,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER1,WORKSHOP,1,1)
ROOM_AVAILABLE(PLAYER1,TORTURE,1,0)
ROOM_AVAILABLE(PLAYER1,GRAVEYARD,1,0)
ROOM_AVAILABLE(PLAYER1,TEMPLE,1,0)
ROOM_AVAILABLE(PLAYER1,GUARD_POST,1,0)
TRAP_AVAILABLE(PLAYER1,POISON_GAS,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CALL_TO_ARMS,1,1)

ADD_CREATURE_TO_POOL(DARK_MISTRESS,5)
ADD_CREATURE_TO_POOL(BUG,5)
ADD_CREATURE_TO_POOL(SPIDER,7)
ADD_CREATURE_TO_POOL(SORCEROR,5)
ADD_CREATURE_TO_POOL(ORC,5)
ADD_CREATURE_TO_POOL(TROLL,5)
ADD_CREATURE_TO_POOL(BILE_DEMON,5)
ADD_CREATURE_TO_POOL(DEMONSPAWN,5)
ADD_CREATURE_TO_POOL(DRAGON,5)

CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,0)
CREATURE_AVAILABLE(PLAYER1,BUG,1,0)
CREATURE_AVAILABLE(PLAYER1,SORCEROR,1,0)
CREATURE_AVAILABLE(PLAYER1,ORC,1,0)
CREATURE_AVAILABLE(PLAYER1,TROLL,1,0)
CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,0)
CREATURE_AVAILABLE(PLAYER1,DEMONSPAWN,1,0)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,0)

IF_CONTROLS(PLAYER0,HORNY>0)
IF(PLAYER_GOOD,AVATAR==0)
REM	QUICK_OBJECTIVE(5,"The symbol of your power is rightfully reclaimed making you victorious! Onto the next realm!",ALL_PLAYERS)
	DISPLAY_OBJECTIVE(55,ALL_PLAYERS)
	WIN_GAME
ENDIF
ENDIF

IF(PLAYER0,HORNY==0)
REM	QUICK_OBJECTIVE(6,"The symbol of your power is gone, no chance to keep the riches now.",ALL_PLAYERS)
	DISPLAY_OBJECTIVE(54,ALL_PLAYERS)
	LOSE_GAME
ENDIF

IF(PLAYER0,IMP>0)
	SET_TIMER(PLAYER0,TIMER0)
	MAGIC_AVAILABLE(PLAYER1,POWER_IMP,1,1)
	ADD_PARTY_TO_LEVEL(PLAYER0,PINTRO,-1,1)
REM	QUICK_OBJECTIVE(4,"Some traitors entered the tombs through the surface gate, this time under your command. Lead their way and free the wizard.",-1)
	DISPLAY_OBJECTIVE(52,-1)
ENDIF

IF(PLAYER0,TIMER0>5000)
	ADD_GOLD_TO_PLAYER(PLAYER1,250000)
	ADD_PARTY_TO_LEVEL(PLAYER1,HLP,1,6)
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED==1)
	ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ENDIF

IF_CONTROLS(PLAYER0,WIZARD>0)
	ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
	TUTORIAL_FLASH_BUTTON(18,100)
REM	QUICK_INFORMATION(3,"The wise bearded man is no longer heroes' trophy, now set the reaper free before he dies of starvation!",ALL_PLAYERS)
	DISPLAY_INFORMATION(53,-1)
ENDIF


REM	QUICK_OBJECTIVE(1,"You've found a rich vein below one of the towers. The word spread quickly and people lurk western tombs hoping to find anything worth snatching. Some of them were greedy enough to join you as it is clear you are the richest around here. That's why you can expect a visit from the two keepers who combined their powers defeat you. Free your trapped reaper to return to your former glory. No one will dare to attack you when you have one of them!",ALL_PLAYERS)
	DISPLAY_OBJECTIVE(48,ALL_PLAYERS)

IF(PLAYER0,GAME_TURN>360)
REM	QUICK_INFORMATION(2,"You'll need a bridge to get to the walled-in reaper. Your imprisoned wizard has the plans, getting to him won't be easy though. Due to massive treasure beneath your territory you'll never run out of gold in this land. Use it in combination with call to arms spell to reclaim the tombs and to free the wizard.",2)
	DISPLAY_INFORMATION(49,2)
	TUTORIAL_FLASH_BUTTON(23,100)
ENDIF

IF(PLAYER0,GAME_TURN>460)
REM	QUICK_INFORMATION(2,"You'll need a bridge to get to the walled-in reaper. Your imprisoned wizard has the plans, getting to him won't be easy though. Due to massive treasure beneath your territory you'll never run out of gold in this land. Use it in combination with call to arms spell to reclaim the tombs and to free the wizard.",2)
	DISPLAY_OBJECTIVE(50,2)
	TUTORIAL_FLASH_BUTTON(23,100)
ENDIF

IF_CONTROLS(PLAYER0,DEMONSPAWN>0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PINTRO,-2,1)
ENDIF

IF(PLAYER0,TOTAL_CREATURES>29)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,GIANTS,-2,1)
ENDIF

IF(PLAYER0,TOTAL_CREATURES>40)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,GIANTS,-2,3)
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED==1)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,GIANTS2,-2,2)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
REM	QUICK_INFORMATION(9,"I can hear water dripping near the corner behind the guard post. A secret passage, perhaps?",3)
	DISPLAY_INFORMATION(51,3)
ENDIF
