REM LEVEL 10(ADVENTURE) MAP00014

SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,30)

START_MONEY(PLAYER0,10000)

REM ALL PLAYERS

	REM Creature_Availability



		CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
		CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,1)
		CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
		CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
		CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,1)
		CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
		CREATURE_AVAILABLE(PLAYER0,DRAGON,1,1)
		CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
		
					
		ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
		ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
		ADD_CREATURE_TO_POOL(SORCEROR,30)
		ADD_CREATURE_TO_POOL(TROLL,20)
		ADD_CREATURE_TO_POOL(BILE_DEMON,10)
		ADD_CREATURE_TO_POOL(HELL_HOUND,30)
		ADD_CREATURE_TO_POOL(DRAGON,15)
		ADD_CREATURE_TO_POOL(ORC,15)



	REM Room_Availability

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



		
	REM Spells
		
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)






	REM  doors & traps

		DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
		TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)				
		TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)				
		DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)	
		DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)	
		TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)				
		TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)				
		TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)				
					


	

REM ---------------------------------------------------------


CREATE_PARTY(FIRST)
ADD_TO_PARTY(FIRST,BARBARIAN,2,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(FIRST,GIANT,2,	1500,ATTACK_ENEMIES,0)

CREATE_PARTY(SECOND)
ADD_TO_PARTY(SECOND,MONK,3,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(SECOND,MONK,3,1500,ATTACK_ENEMIES,0)


CREATE_PARTY(THIRD)
ADD_TO_PARTY(THIRD,ARCHER,4,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(THIRD,BARBARIAN,4,1500,ATTACK_ENEMIES,0)

CREATE_PARTY(FOURTH)
ADD_TO_PARTY(FOURTH,WIZARD,4,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(FOURTH,GIANT,4,1500,ATTACK_ENEMIES,0)

CREATE_PARTY(FIFTH)
ADD_TO_PARTY(FIFTH,WIZARD,5,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(FIFTH,WIZARD,5,1750,ATTACK_ENEMIES,0)

CREATE_PARTY(SIXTH)
ADD_TO_PARTY(SIXTH,MONK,6,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(SIXTH,MONK,6,1500,ATTACK_ENEMIES,0)


CREATE_PARTY(SEVENTH)
ADD_TO_PARTY(SEVENTH,FAIRY,6,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(SEVENTH,FAIRY,6,1500,ATTACK_ENEMIES,0)

CREATE_PARTY(EIGHTH)
ADD_TO_PARTY(EIGHTH,WITCH,8,1500,ATTACK_ENEMIES,0)
ADD_TO_PARTY(EIGHTH,WITCH,8,1500,ATTACK_ENEMIES,0)


SET_TIMER(PLAYER_GOOD,TIMER0)

SET_TIMER(PLAYER_GOOD,TIMER1)
IF(PLAYER_GOOD,FLAG0==0)
	IF(PLAYER_GOOD,TIMER0 >= 1000)
		IF(PLAYER_GOOD,TIMER1 > 1750)
			NEXT_COMMAND_REUSABLE
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIRST,3,1)
			NEXT_COMMAND_REUSABLE
			SET_TIMER(PLAYER_GOOD,TIMER1)
		ENDIF
	ENDIF
ENDIF

SET_TIMER(PLAYER_GOOD,TIMER2)
IF(PLAYER_GOOD,FLAG0==0)
	IF(PLAYER_GOOD,TIMER0>=1750)
		IF(PLAYER_GOOD,TIMER2>2250)
			NEXT_COMMAND_REUSABLE
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SECOND,1,1)
			NEXT_COMMAND_REUSABLE
			SET_TIMER(PLAYER_GOOD,TIMER2)
		ENDIF
	ENDIF
ENDIF

SET_TIMER(PLAYER_GOOD,TIMER3)
IF(PLAYER_GOOD,FLAG0==0)
	IF(PLAYER_GOOD,TIMER0>=2500)
		IF(PLAYER_GOOD,TIMER3>2750)
			NEXT_COMMAND_REUSABLE
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THIRD,2,1)
			NEXT_COMMAND_REUSABLE
			SET_TIMER(PLAYER_GOOD,TIMER3)
		ENDIF
	ENDIF
ENDIF

SET_TIMER(PLAYER_GOOD,TIMER4)
IF(PLAYER_GOOD,FLAG0==0)
	IF(PLAYER_GOOD,TIMER0>=3250)
		IF(PLAYER_GOOD,TIMER4>3500)
			NEXT_COMMAND_REUSABLE
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOURTH,4,1)
			NEXT_COMMAND_REUSABLE
			SET_TIMER(PLAYER_GOOD,TIMER4)
		ENDIF
	ENDIF
ENDIF

CREATE_PARTY(KNIGHT)
ADD_TO_PARTY(KNIGHT,KNIGHT,6,10000,ATTACK_ENEMIES,0)
ADD_TO_PARTY(KNIGHT,ARCHER,6,900,ATTACK_ENEMIES,0)
ADD_TO_PARTY(KNIGHT,BARBARIAN,6,900,ATTACK_ENEMIES,0)
ADD_TO_PARTY(KNIGHT,MONK,6,900,ATTACK_ENEMIES,0)
ADD_TO_PARTY(KNIGHT,FAIRY,8,900,ATTACK_ENEMIES,0)


IF(PLAYER_GOOD,TIMER0>=13000)
	SET_FLAG(PLAYER_GOOD,FLAG0,1)
	IF(PLAYER_GOOD,TOTAL_CREATURES==0)
rem		CREATE_TEXT(1,102"YOU HAVE DECIMATED THE FIRST WAVE.  THE FINAL WAVE IS ON ITS WAY, AND THEY'RE PISSED OFF.  TRAIN UP YOUR CREATURES AND PREPARE YOURSELF.")
		DISPLAY_OBJECTIVE(102,PLAYER0)
		SET_TIMER(PLAYER0,TIMER1)
		IF(PLAYER0,TIMER1>=3000)
rem			CREATE_TEXT(2,103"HERE THEY COME...")
			DISPLAY_OBJECTIVE(103,PLAYER0)
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIFTH,1,1)
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIXTH,2,1)
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SEVENTH,3,1)
			IF(PLAYER0,TIMER1 >= 5000)
				ADD_PARTY_TO_LEVEL(PLAYER_GOOD,EIGHTH,4,1)
				IF(PLAYER_GOOD,TOTAL_CREATURES < 3)
					ADD_PARTY_TO_LEVEL(PLAYER_GOOD,KNIGHT,1,1)
					IF(PLAYER_GOOD,KNIGHT==0)
rem						CREATE_TEXT(3,104"THE HEROES ARE DECIMATED.  THIS LAND, AND ITS SPOILS, ARE YOURS.")
						DISPLAY_OBJECTIVE(104,PLAYER0)
						WIN_GAME
					ENDIF
				ENDIF
			ENDIF	
		ENDIF
	ENDIF
ENDIF

REM CHAZ,MATT,LOUISE,NICK,MUM AND VARIOUS OTHERS - HELLO

rem CREATE_TEXT(4,105"THIS LAND IS ON ITS KNEES AND AS A LAST DITCH DEFENCE OF THEIR REALM, HAS PREPARED A FULL SCALE ATTACK ON YOU DUNGEON.  WIPE OUT THIS FORCE TO CONTROL THI LAND.")
DISPLAY_OBJECTIVE(105,PLAYER0)


IF_AVAILABLE(PLAYER0,POWER_CHICKEN==1)
rem	CREATE_TEXT(2,97"YOUR RESEARCHERS HAVE COME UP WITH A DEVASTATING SPELL, THE SPELL OF CHICKEN.  CAST IT ON A CREATURE TO TRANSFORM THEM FROM A FIERY BEAST INTO A CLUCKING CHICKEN.  MARVELLOUS.")
   	DISPLAY_INFORMATION(97,PLAYER0)
ENDIF

IF_AVAILABLE(PLAYER0,ALARM==1)
rem	CREATE_TEXT(5,98"YOUR ENGINEERS HAVE BUILT AN ALARM TRAP.  IT WILL WARN YOU WHEN TRIGGERED BY ENEMIES, BUT ALSO CALL ANY NEARBY CREATURES TO THAT POINT.")
	DISPLAY_INFORMATION(98,PLAYER0)
ENDIF

IF_AVAILABLE(PLAYER0,MAGIC==1)
rem CREATE_TEXT(6,99"A MAGIC DOOR IS AVAILABLE TO YOU.  THIS DOOR IS IMPREGNABLE TO ALL BYT MAGICAL ATTACKS.")
	DISPLAY_INFORMATION(99,PLAYER0)
ENDIF

