REM ****************************************************
REM Don't Fear The Reaper
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)
ALLY_PLAYERS(PLAYER0,PLAYER1,1)

START_MONEY(ALL_PLAYERS,7500)


CREATE_PARTY(TN)
ADD_TO_PARTY(TN,TENTACLE,5,0,ATTACK_ROOMS,0)
ADD_TO_PARTY(TN,TENTACLE,1,0,ATTACK_ROOMS,0)
ADD_TO_PARTY(TN,TENTACLE,1,0,ATTACK_ROOMS,0)
ADD_TO_PARTY(TN,TENTACLE,1,0,ATTACK_ROOMS,0)
ADD_TO_PARTY(TN,TENTACLE,2,0,ATTACK_ROOMS,0)
ADD_TO_PARTY(TN,TENTACLE,1,0,ATTACK_ROOMS,0)
IF_AVAILABLE(PLAYER0,BARRACKS>0)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TN,1,DUNGEON,0,3,600)
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,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,BARRACKS,1,0)

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,1)
MAGIC_AVAILABLE(PLAYER0,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(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)



TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)

ADD_CREATURE_TO_POOL(DRAWFROM(SPIDER,TENTACLE),​1)
CREATURE_AVAILABLE(PLAYER1,SPIDER,1,0)
CREATURE_AVAILABLE(PLAYER1,TENTACLE,1,0)

ADD_CREATURE_TO_POOL(DRAWFROM(BUG,FLY),​2)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,0)

ADD_CREATURE_TO_POOL(DRAWFROM(WIZARD,SORCEROR),​6)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,WIZARD,1,0)
SET_CREATURE_MAX_LEVEL(PLAYER0,WIZARD,5)
SET_CREATURE_MAX_LEVEL(PLAYER1,WIZARD,5)


ADD_CREATURE_TO_POOL(ORC,3)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,0)

ADD_CREATURE_TO_POOL(TROLL,​4)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,0)

ADD_CREATURE_TO_POOL(DARK_MISTRESS,​6)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,0)

ADD_CREATURE_TO_POOL(DRAGON,​1)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,0)

ADD_CREATURE_TO_POOL(BILE_DEMON,​4)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,0)

ADD_CREATURE_TO_POOL(DEMONSPAWN,​6)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,0)

MAX_CREATURES(ALL_PLAYERS,7)

IF(PLAYER0,BILE_DEMON>0)
	CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,0,0)
ENDIF
IF(PLAYER1,BILE_DEMON>0)
	CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,0,0)
ENDIF

IF(PLAYER0,ORC>1)
	CREATURE_AVAILABLE(PLAYER0,ORC,0,0)
ENDIF
IF(PLAYER1,ORC>0)
	CREATURE_AVAILABLE(PLAYER1,ORC,0,0)
ENDIF

IF(PLAYER0,GAME_TURN>555)
REM	QUICK_INFORMATION(8,"You're at the shores of Acemist isle. An awfully poor and Christian place where its citizens die of old age, live a boring puritanical life and enjoy spreading their ludicrous beliefs. Some call it the second Poland. Do not underestimate them, however: they even managed to convert some of your minions which they'll gladly use against you. Their abominable accent makes the isle name sound as if they were mumbling 'Assmist isle'. A fitting future name once your bile demons are done with it, don't you think?",ALL_PLAYERS)
	DISPLAY_INFORMATION(13,ALL_PLAYERS)
ENDIF

REM	QUICK_OBJECTIVE(1,"The people have been alarmed concerning your arrival. As a way of saving money, a converted horned reaper was offered to take on not one but two pathetic keepers and their minions all alone! An offer he just could not resist. A simple but uneasy task: make the day his last one.",-1)
 DISPLAY_OBJECTIVE(12,-1)

REVEAL_MAP_LOCATION(PLAYER0,-1,25)

IF(PLAYER_GOOD,HORNY==0)
REM	QUICK_OBJECTIVE(2,"Horny is not so horny anymore. Good job",ALL_PLAYERS)
	DISPLAY_OBJECTIVE(14,ALL_PLAYERS)
	IF(PLAYER0,FLAG0==0)
		SET_FLAG(PLAYER0,CAMPAIGN_FLAG0,0)
		SET_TIMER(PLAYER0,TIMER1)
	ENDIF
	IF(PLAYER0,FLAG0>0)
		SET_FLAG(PLAYER0,CAMPAIGN_FLAG0,20000)
		REM QUICK_OBJECTIVE(11,"20000 gold transferred!",ALL_PLAYERS)
		DISPLAY_OBJECTIVE(15,ALL_PLAYERS)
		SET_TIMER(PLAYER0,TIMER1)
	ENDIF
ENDIF
IF(PLAYER0,TIMER1>50)
	WIN_GAME
ENDIF

IF(PLAYER0,TOTAL_CREATURES>6)
REM	QUICK_INFORMATION(3,"Creature limit reached. Do not expect any new arrivals until you lose a creature.",ALL_PLAYERS)
	DISPLAY_INFORMATION(16,ALL_PLAYERS)
ENDIF

IF(PLAYER0,TIMER2>1500)
REM	QUICK_INFORMATION(4,"A couple of dwarf miners to the north-west mined this land of quite some riches. The treasure is stored in a garrison they guard nearby. There, a warlock Dr. Goldstein has prepared a portal possessing a power to transport the fortune to another dungeon. Touch-activate it before they do if you wish for some gold bonus in the next realm!",2)
	DISPLAY_INFORMATION(17,2)
	REVEAL_MAP_LOCATION(PLAYER0,2,25)
	BONUS_LEVEL_TIME(10000)
	SET_TIMER(PLAYER0,TIMER0)
ENDIF


IF(PLAYER0,TIMER0>10000)
IF(PLAYER0,FLAG0==0)
	BONUS_LEVEL_TIME(0)
REM	QUICK_INFORMATION(6,"All of Dr. Goldstein's treasure has just been transmitted away by the portal. No way of snatching it now...",2)
	DISPLAY_INFORMATION(18,2)
ENDIF
ENDIF

IF_ACTION_POINT(2,PLAYER0)
IF(PLAYER0,TIMER0<10000)
	SET_FLAG(PLAYER0,FLAG0,1)
REM	QUICK_INFORMATION(5,"Well done, all of Dr. Goldstein's goods were teleported to the halls nearby! You will be 20000 gold richer in the Martyr Halls dungeon!",2)
	rem cold puff
	DISPLAY_INFORMATION(19,2)
	PLAY_MESSAGE(PLAYER0,SOUND,49)
	BONUS_LEVEL_TIME(0)
ENDIF
ENDIF

IF(PLAYER0,TIMER0>11000)
	rem accent
	PLAY_MESSAGE(PLAYER0,SPEECH,93)
ENDIF

IF(PLAYER0,IMP>0)
	SET_FLAG(PLAYER0,FLAG1,1)
ENDIF
IF(PLAYER1,TRAINING>0)
	SET_FLAG(PLAYER0,FLAG1,1)
ENDIF

IF(PLAYER0,FLAG1==1)
	SET_TIMER(PLAYER0,TIMER2)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TUNNELLER,-1,1,10,0)
ENDIF

IF(PLAYER0,WIZARD>0)
REM	QUICK_INFORMATION(9,"Hint: wizards are limited to level 5 in this land.",ALL_PLAYERS)
	DISPLAY_INFORMATION(20,ALL_PLAYERS)
ENDIF

IF(PLAYER0,GAME_TURN>600)
IF(PLAYER0,GAME_TURN<1200)
IF(PLAYER0,SKELETON>0)
	ADD_CREATURE_TO_LEVEL(PLAYER0,VAMPIRE,3,1,1,500)
REM	QUICK_INFORMATION(10,"Your undead fiend has just attracted a vampire!",ALL_PLAYERS)
	DISPLAY_INFORMATION(21,ALL_PLAYERS)
ENDIF
ENDIF
ENDIF