REM level 3 as of 17.12.96

REM Play Level 2

SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,8

START_MONEY(PLAYER0,3000)


ADD_CREATURE_TO_POOL(BUG,10)
ADD_CREATURE_TO_POOL(FLY,10)
ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
ADD_CREATURE_TO_POOL(SORCEROR,10)

SET_CREATURE_MAX_LEVEL(PLAYER_GOOD,KNIGHT,2)
SET_CREATURE_MAX_LEVEL(PLAYER_GOOD,THIEF,2)
SET_CREATURE_MAX_LEVEL(PLAYER_GOOD,DWARFA,2)
SET_CREATURE_MAX_LEVEL(PLAYER_GOOD,TUNNELLER,2)
SET_CREATURE_MAX_LEVEL(PLAYER_GOOD,ARCHER,2)

SET_CREATURE_MAX_LEVEL(PLAYER0,DEMONSPAWN,10)


SET_CREATURE_STRENGTH(KNIGHT,70)
SET_CREATURE_ARMOUR(KNIGHT,80)

CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
CREATURE_AVAILABLE(PLAYER0,FLY,1,1)
CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,1)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,0)

MAGIC_AVAILABLE(PLAYER0,POWER_HAND,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_SLAP,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)

CREATURE_AVAILABLE(PLAYER_GOOD,TUNNELLER,1,1)
CREATURE_AVAILABLE(PLAYER_GOOD,THIEF,1,1)
CREATURE_AVAILABLE(PLAYER_GOOD,ARCHER,1,1)

CREATE_PARTY(THIEVES)
ADD_TO_PARTY(THIEVES,THIEF,1,200,STEAL_GOLD,0)
ADD_TO_PARTY(THIEVES,ARCHER,1,200,ATTACK_ENEMIES,0)

CREATE_PARTY(DWARVES)
ADD_TO_PARTY(DWARVES,DWARFA,1,200,ATTACK_ENEMIES,0)
ADD_TO_PARTY(DWARVES,DWARFA,1,200,ATTACK_ENEMIES,0)

CREATE_PARTY(ELITE)
ADD_TO_PARTY(ELITE,DWARFA,1,200,ATTACK_ENEMIES,0)
ADD_TO_PARTY(ELITE,THIEF,1,200,ATTACK_ENEMIES,0)

CREATE_PARTY(KNIGHT)
ADD_TO_PARTY(KNIGHT,ARCHER,1,200,ATTACK_ENEMIES,0)
ADD_TO_PARTY(KNIGHT,KNIGHT,1,2000,ATTACK_ENEMIES,0)

rem CREATE_TEXT(1,34"BUILD A DUNGEON WITH A TREASURE ROOM, A LAIR, A HATCHERY AND A TRAINING ROOM.  MAKE SURE ALL ROOMS ARE AT LEAST 9 BLOCKS IN SIZE.")
DISPLAY_OBJECTIVE(34,PLAYER0)

IF(PLAYER0,TREASURE>=9)
	SET_FLAG(PLAYER0,FLAG0,1)
ENDIF

IF(PLAYER0,LAIR>=9)
	SET_FLAG(PLAYER0,FLAG1,1)
ENDIF

IF(PLAYER0,GARDEN>=9)
	SET_FLAG(PLAYER0,FLAG2,1)
ENDIF

IF(PLAYER0,TRAINING>=9)
	SET_FLAG(PLAYER0,FLAG3,1)
ENDIF

IF(PLAYER0,ENTRANCE>0)
	SET_FLAG(PLAYER0,FLAG4,1)
ENDIF


IF(PLAYER0,FLAG0==1)
	IF(PLAYER0,FLAG1==1)
		IF(PLAYER0,FLAG2==1)
			IF(PLAYER0,FLAG3==1)
				IF(PLAYER0,FLAG4==1)
rem					CREATE_TEXT(11,35"YOU CAN NOW BUILD A RESEARCH ROOM.  LAY ONE DOWN, MAKING SURE THAT IT IS ALSO AT LEAST 9 BLOCKS IN SIZE.")
					DISPLAY_OBJECTIVE(35,PLAYER0)
					ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
					TUTORIAL_FLASH_BUTTON(9,PLAYER0)
					SET_FLAG(PLAYER0,FLAG6,1)
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDIF


IF(PLAYER0, FLAG6 == 0)
	IF(PLAYER0, GAME_TURN > 12000)
		IF(PLAYER0,TREASURE > 0)
			IF(PLAYER0,LAIR > 0)
				IF(PLAYER0,GARDEN > 0)
					IF(PLAYER0,TRAINING > 0)
						IF(PLAYER0,ENTRANCE>0)
rem							CREATE_TEXT(11,35"YOU CAN NOW BUILD A RESEARCH ROOM.  LAY ONE DOWN, MAKING SURE THAT IT IS ALSO AT LEAST 9 BLOCKS IN SIZE.")
							DISPLAY_OBJECTIVE(35,PLAYER0)
							ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
							TUTORIAL_FLASH_BUTTON(9,PLAYER0)
						ENDIF
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDIF

IF(PLAYER0,RESEARCH>0)
rem	CREATE_TEXT(31,36"THE NEW RESEARCH ROOM WILL ATTRACT CREATURES THAT LIKE TO RESEARCH SPELLS AND NEW ROOMS, LIKE SORCERORS.")
	DISPLAY_INFORMATION(36,PLAYER0)
	SET_TIMER(PLAYER0,TIMER6)
ENDIF

IF(PLAYER0,RESEARCH>=9)
	IF(PLAYER0,FLAG7 == 0)
		SET_FLAG(PLAYER0,FLAG7,1)
	ENDIF
ENDIF

IF(PLAYER0,TIMER6 > 6000)
	IF(PLAYER0,FLAG7 == 0)
		SET_FLAG(PLAYER0,FLAG7,1)
	ENDIF
ENDIF

IF(PLAYER0,FLAG7 == 1)
	SET_FLAG(PLAYER0,FLAG5,1)
rem CREATE_TEXT(32,37"WELL DONE.  YOU CAN NOW DROP MOST CREATURES IN HERE TO RESEARCH.  HOWEVER, SORCERORS MAKE THE BEST RESEARCHERS".)
	DISPLAY_OBJECTIVE(37,PLAYER0)
	MAX_CREATURES(PLAYER0,12)
	CREATURE_AVAILABLE(PLAYER0,BUG,1,0)
	CREATURE_AVAILABLE(PLAYER0,FLY,1,0)
	CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,0)
	CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
ENDIF

IF(PLAYER0,TOTAL_CREATURES >= 10)
	SET_FLAG(PLAYER1,FLAG0,1)
ENDIF

IF(PLAYER0,SORCEROR > 0)
rem CREATE_TEXT(12,38"A SORCEROR HAS JOINED YOU, ATTRACTED TO YOUR DUNGEON BY THE RESEARCH ROOM.  THEY MAKE EXCELLENT RESEARCHERS AND ONCE TRAINED, SUPERB LONG RANGE FIGHTERS.")
	DISPLAY_OBJECTIVE(38,PLAYER0)
	CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
	CREATURE_AVAILABLE(PLAYER0,FLY,1,1)
	CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,1)
	CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
	SET_FLAG(PLAYER2,FLAG0,1)
ENDIF

IF(PLAYER2,FLAG0==1)
	SET_TIMER(PLAYER0,TIMER2)
	IF(PLAYER0,TIMER2>=5000)
		IF(PLAYER_GOOD,FLAG0==0)
			SET_FLAG(PLAYER_GOOD,FLAG1,1)
			ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,THIEVES,-1,DUNGEON,0,1,500)
			ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARVES,-1,DUNGEON,0,1,2000)
			IF(PLAYER_GOOD,TOTAL_CREATURES==0)
rem				CREATE_TEXT(14,39"THE FIRST WAVE OF ATTACKERS LIE DEAD.  PREPARE FOR THE NEXT ASSAULT.")
				DISPLAY_OBJECTIVE(39,PLAYER0)
				SET_TIMER(PLAYER0,TIMER3)
				IF(PLAYER0,TIMER3>2000)
					IF(PLAYER0,TOTAL_CREATURES>=10)
						ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,-1,DUNGEON,0,1,500)
						ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,DUNGEON,0,1,500)
						IF(PLAYER_GOOD,TOTAL_CREATURES==0)
rem							CREATE_TEXT(15,40"CONGRATULATIONS, THE BLOODY CARCASSES OF THE FALLEN HEROES LIE WITH EXPRESSIONS OF WRITHING AGONY AT YOUR CREATURES' FEET.  PRESS SPACE TO GO ON TO THE NEXT LAND.")
							DISPLAY_OBJECTIVE(40,PLAYER0)
							WIN_GAME
						ENDIF
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDIF

IF_ACTION_POINT(1,PLAYER0)
	IF(PLAYER_GOOD,FLAG1==0)
	SET_FLAG(PLAYER_GOOD,FLAG0,1)
		IF(PLAYER0,TOTAL_CREATURES>=10)
			ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,THIEVES,-1,DUNGEON,0,1,500)
			ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARVES,-1,DUNGEON,0,1,500)
			IF(PLAYER_GOOD,TOTAL_CREATURES==0)
rem				CREATE_TEXT(14,41"THE FIRST WAVE OF ATTACKERS LIE DEAD.  PREPARE FOR THE NEXT ASSAULT.")
				DISPLAY_OBJECTIVE(41,PLAYER0)
				SET_TIMER(PLAYER0,TIMER3)
				IF(PLAYER0,TIMER3>2000)
					IF(PLAYER0,TOTAL_CREATURES>=10)
						ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,-1,DUNGEON,0,1,500)
						ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,DUNGEON,0,1,500)
						IF(PLAYER_GOOD,TOTAL_CREATURES==0)
rem							CREATE_TEXT(15,42"CONGRATULATIONS, THE BLOODY CARCASSES OF THE FALLEN HEROES LIE WITH EXPRESSIONS OF WRITHING AGONY AT YOUR CREATURES' FEET.  PRESS SPACE TO GO ON TO THE NEXT LAND.")
							DISPLAY_OBJECTIVE(42,PLAYER0)
							WIN_GAME
						ENDIF
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDIF

IF(PLAYER0,TIMER2 >= 3750)
rem	CREATE_TEXT(33,43"BE PATIENT, HEROES ARE SOON TO COME. MAKE SURE YOUR CREATURES ARE TRAINED. (MAYBE TRY TRAINING A SORCEROR!).")
	DISPLAY_OBJECTIVE(43,PLAYER0)
ENDIF

IF_AVAILABLE(PLAYER0,POWER_SPEED==1)
rem	CREATE_TEXT(34,44"YOU HAVE RESEARCHED THE SPEED UP SPELL.  CAST IT ON CREATURES TO INCREASE THEIR SPEED.")
	DISPLAY_INFORMATION(44,PLAYER0)
ENDIF

	











				
