REM ****************************************************
REM Cloud Temple Ruins
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(PLAYER3,0)

START_MONEY(PLAYER0,25000)
START_MONEY(PLAYER3,25000)
START_MONEY(PLAYER1,55000)

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,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,0)
ROOM_AVAILABLE(PLAYER0,LAIR,1,0)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,0)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,0,0)
ROOM_AVAILABLE(PLAYER0,GUARD_POST,0,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)


MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER3,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_ARMAGEDDON,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_DESTROY_WALLS,1,0)

ADD_CREATURE_TO_POOL(ORC,8)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,0)
ADD_CREATURE_TO_POOL(SPIDER,4)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,0)
ADD_CREATURE_TO_POOL(SORCEROR,10)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,0)
ADD_CREATURE_TO_POOL(DEMONSPAWN,10)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,0)
ADD_CREATURE_TO_POOL(TROLL,10)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,0)
ADD_CREATURE_TO_POOL(BILE_DEMON,8)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,0)
CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,0)
ADD_CREATURE_TO_POOL(DRAGON,6)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,0)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,0)
ADD_CREATURE_TO_POOL(TENTACLE,12)
CREATURE_AVAILABLE(ALL_PLAYERS,TENTACLE,1,0)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,8)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,0)

MAX_CREATURES(ALL_PLAYERS,25)

CREATE_PARTY(BBS)
ADD_TO_PARTY(BBS,BARBARIAN,10,0,ATTACK_DUNGEON_HEART,0)
ADD_TO_PARTY(BBS,BARBARIAN,10,0,ATTACK_DUNGEON_HEART,0)
ADD_TO_PARTY(BBS,BARBARIAN,10,0,ATTACK_DUNGEON_HEART,0)
ADD_TO_PARTY(BBS,BARBARIAN,10,0,ATTACK_DUNGEON_HEART,0)
ADD_TO_PARTY(BBS,BARBARIAN,10,0,ATTACK_DUNGEON_HEART,0)
ADD_TO_PARTY(BBS,BARBARIAN,10,0,ATTACK_DUNGEON_HEART,0)

REVEAL_MAP_LOCATION(ALL_PLAYERS,1,25)
REVEAL_MAP_LOCATION(ALL_PLAYERS,2,25)

IF(PLAYER0,TOTAL_CREATURES>1)
	MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
	IF(PLAYER1,TRAINING>0)
		ADD_CREATURE_TO_LEVEL(PLAYER1,HORNY,3,3,3,0)
	ENDIF
ENDIF

IF(PLAYER_GOOD,BARBARIAN==0)
IF(PLAYER_GOOD,DUNGEON_DESTROYED==0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BBS,-1,2)
	REM	QUICK_OBJECTIVE(3,"A new group of natives has appeared!",ALL_PLAYERS)
	DISPLAY_OBJECTIVE(165,ALL_PLAYERS)
ENDIF
ENDIF

IF(PLAYER0,GAME_TURN>22300)
	REM	QUICK_INFORMATION(4,"Legends say the barbaric natives keep fairies somewhere near the ruins...",ALL_PLAYERS)
	DISPLAY_INFORMATION(166,ALL_PLAYERS)
ENDIF

IF(PLAYER0,AVATAR>0)
	SET_FLAG(PLAYER0,FLAG1,1)
ENDIF

REM	QUICK_OBJECTIVE(1,"You'll be battling two keepers and the natives for the riches of the land. Eliminate them all and the barbarians will be joining you throughout the campaign! Good luck!",ALL_PLAYERS)
DISPLAY_OBJECTIVE(164,ALL_PLAYERS)

IF(PLAYER_GOOD,DUNGEON_DESTROYED>0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BBS,-1,11)
	IF(PLAYER0,ALL_DUNGEONS_DESTROYED>0)
	IF(PLAYER_GOOD,BARBARIAN==0)
		SET_FLAG(PLAYER0,FLAG1,1)
	ENDIF
	ENDIF
ENDIF

IF(PLAYER0,FLAG1>0)
	REM	QUICK_OBJECTIVE(2,"The natives are now under your command. New slaves! Wonderful!",ALL_PLAYERS)
	DISPLAY_OBJECTIVE(167,ALL_PLAYERS)
	SET_FLAG(PLAYER0,CAMPAIGN_FLAG7,3)
	SET_FLAG(PLAYER0,CAMPAIGN_FLAG6,1)
	WIN_GAME
ENDIF