LEVEL_VERSION(1)
SET_GENERATE_SPEED(400)
START_MONEY(PLAYER0,3500)
START_MONEY(PLAYER1,2500)
MAX_CREATURES(PLAYER0,20)
MAX_CREATURES(PLAYER1,25)

COMPUTER_PLAYER(PLAYER1,7)

ADD_CREATURE_TO_POOL(FLY,10)
ADD_CREATURE_TO_POOL(BUG,10)
ADD_CREATURE_TO_POOL(DEMONSPAWN,10)
ADD_CREATURE_TO_POOL(TROLL,10)
ADD_CREATURE_TO_POOL(SPIDER,10)
ADD_CREATURE_TO_POOL(HELL_HOUND,10)
ADD_CREATURE_TO_POOL(TENTACLE,10)
ADD_CREATURE_TO_POOL(SORCEROR,15)
ADD_CREATURE_TO_POOL(ORC,15)
ADD_CREATURE_TO_POOL(BILE_DEMON,8)
ADD_CREATURE_TO_POOL(DRAGON,8)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,8)

CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,0)
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,0)
CREATURE_AVAILABLE(PLAYER1,HELL_HOUND,1,2)
CREATURE_AVAILABLE(ALL_PLAYERS,TENTACLE,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,0)
CREATURE_AVAILABLE(PLAYER0,ORC,1,0)
CREATURE_AVAILABLE(PLAYER1,ORC,1,3)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,0)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,0)
CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,2)
CREATURE_AVAILABLE(PLAYER1,VAMPIRE,1,2)

SET_CREATURE_MAX_LEVEL(PLAYER0,THIEF,10)
SET_CREATURE_MAX_LEVEL(PLAYER0,DEMONSPAWN,10)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
REM If player bridges to blue trying to send heroes to him and
REM loses the bridge, blue will learn how to make bridges 
ROOM_AVAILABLE(PLAYER1,BRIDGE,4,0)
ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,0)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,3,0)
ROOM_AVAILABLE(PLAYER0,TORTURE,1,0)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,3,0)
ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,0)
ROOM_AVAILABLE(PLAYER0,SCAVENGER,3,0)

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_POSSESS,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,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_PROTECT,1,0)

TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)

DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)

CREATE_PARTY(HERO_WAVES)
	ADD_TO_PARTY(HERO_WAVES,BARBARIAN,5,250,ATTACK_ENEMIES,0)	
	ADD_TO_PARTY(HERO_WAVES,DWARFA,5,250,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HERO_WAVES,WIZARD,5,250,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HERO_WAVES,FAIRY,5,250,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HERO_WAVES,ARCHER,5,250,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HERO_WAVES,MONK,5,250,ATTACK_ENEMIES,0)

CREATE_PARTY(GEMTHIEVES)
	ADD_TO_PARTY(GEMTHIEVES,THIEF,5,200,STEAL_GOLD,0)
	ADD_TO_PARTY(GEMTHIEVES,DWARFA,5,200,STEAL_GOLD,0)
	ADD_TO_PARTY(GEMTHIEVES,BARBARIAN,5,200,STEAL_GOLD,0)

CREATE_PARTY(TREASURETHIEVES)
	ADD_TO_PARTY(TREASURETHIEVES,THIEF,5,200,STEAL_GOLD,0)
	ADD_TO_PARTY(TREASURETHIEVES,THIEF,5,200,STEAL_GOLD,0)
	ADD_TO_PARTY(TREASURETHIEVES,THIEF,5,200,STEAL_GOLD,0)
	
CREATE_PARTY(LANDLORD_A)
	ADD_TO_PARTY(LANDLORD_A,SAMURAI,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_A,KNIGHT,8,2000,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_A,MONK,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_A,WIZARD,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_A,WITCH,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_A,GIANT,8,500,DEFEND_HEART,0)

CREATE_PARTY(LANDLORD_B)
	ADD_TO_PARTY(LANDLORD_B,SAMURAI,8,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD_B,KNIGHT,8,2000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD_B,MONK,8,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD_B,WIZARD,8,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD_B,WITCH,8,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD_B,GIANT,8,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(LANDLORD_BACKUP)
	ADD_TO_PARTY(LANDLORD_BACKUP,WIZARD,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_BACKUP,WIZARD,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_BACKUP,SAMURAI,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_BACKUP,SAMURAI,8,500,DEFEND_HEART,0)	
	ADD_TO_PARTY(LANDLORD_BACKUP,MONK,8,500,DEFEND_HEART,0)
	ADD_TO_PARTY(LANDLORD_BACKUP,MONK,8,500,DEFEND_HEART,0)

rem - prevent prison convert snow-balling -
IF( PLAYER0, SKELETON > 3 )
    SET_GAME_RULE( PrisonSkeletonChance, 80 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF
IF( PLAYER0,SKELETON > 6 )
    SET_GAME_RULE( PrisonSkeletonChance, 65 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF
IF( PLAYER0,SKELETON > 9 )
    SET_GAME_RULE( PrisonSkeletonChance, 50 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF
IF( PLAYER0,GHOST > 3 )
    SET_GAME_RULE( GhostConvertChance, 30 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF

rem - prevent torture convert snow-balling -
IF( PLAYER0, CREATURES_CONVERTED > 3 )
    SET_GAME_RULE( TortureDeathChance, 33 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF
IF( PLAYER0, CREATURES_CONVERTED > 6 )
    SET_GAME_RULE( TortureDeathChance, 50 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF
IF( PLAYER0,CREATURES_CONVERTED > 9 )
    SET_GAME_RULE( TortureDeathChance, 67 )
    ADD_TO_FLAG( PLAYER0, FLAG4, 1 )
ENDIF

rem - modify stun chance -
IF( PLAYER0,FLAG4 >= 1 )
    SET_GAME_RULE( StunEvilEnemyChance, 90 )
    SET_GAME_RULE( StunGoodEnemyChance, 90 )
ENDIF
IF( PLAYER0,FLAG4 >= 2 )
    SET_GAME_RULE( StunEvilEnemyChance, 80 )
    SET_GAME_RULE( StunGoodEnemyChance, 80 )
ENDIF
IF( PLAYER0,FLAG4 >= 3 )
    SET_GAME_RULE( StunGoodEnemyChance, 60 )
ENDIF
IF( PLAYER0,FLAG4 >= 4 )
    SET_GAME_RULE( StunEvilEnemyChance, 60 )
    SET_GAME_RULE( StunGoodEnemyChance, 50 )
ENDIF
IF( PLAYER0,FLAG4 >= 5 )
    SET_GAME_RULE( StunGoodEnemyChance, 30 )
ENDIF

rem - set graveyard limits -
IF( PLAYER0, VAMPIRE >= 2 )
    SET_GAME_RULE( BodiesForVampire, 10 )
ENDIF
IF( PLAYER0, VAMPIRE >= 4 )
    SET_GAME_RULE( BodiesForVampire, 15 )
ENDIF
IF( PLAYER0, VAMPIRE >= 6 )
    SET_GAME_RULE( BodiesForVampire, 20 )
ENDIF

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

REM TIMER_0 - Game started timer
REM TIMER_1 - Spawning from hero base timer
REM TIMER_2 - Gem thieves timer
REM TIMER_3 - Gold thieves timer
REM TIMER_4 - Timer for gold floor to become treasure room

SET_FLAG(PLAYER0,FLAG0,0) REM Front door flag: 0 door intact, 1 door broken
SET_FLAG(PLAYER0,FLAG1,0) REM Blue defeated: 0 alive, 1 defeated
SET_FLAG(PLAYER0,FLAG2,0) REM White defeated/heart reached: 0 alive, 1 defeated
SET_FLAG(PLAYER0,FLAG3,0) REM Undead warning
SET_FLAG(PLAYER0,FLAG4,0) REM Stun change dictated by undead creature numbers

SET_TIMER(PLAYER0,TIMER0)
SET_CREATURE_TENDENCIES(PLAYER1,IMPRISON,1)

REM "This realm is waterlogged and infested with heroes ready to take advantage of any gaps in your dungeon. Dig carefully and trust your senses."
DISPLAY_OBJECTIVE(130,ALL_PLAYERS)

IF(PLAYER0,TIMER0 >= 500)
	REM "There is another Keeper to the north, along with the Heroes' main force. Build yourself up carefully and grow your forces before moving towards the enemy."
	DISPLAY_INFORMATION(131,ALL_PLAYERS)
ENDIF

IF(PLAYER0,TIMER0 >= 2000)
	REM "There are many secrets hidden within the earth if you look carefully, but such secrets will not go unguarded."
	DISPLAY_INFORMATION(132,ALL_PLAYERS)
ENDIF

REM If player finds hellhounds, remind them of their use.

IF(PLAYER0,HELL_HOUND>0)
	REM "You have found a Hellhound. These faithful pooches can smell the stench of your enemies through walls and alert you to their presence, a trait which will be most useful here."
	DISPLAY_INFORMATION(133,ALL_PLAYERS)
	SET_CREATURE_CONFIGURATION(HELL_HOUND,EntranceRoom,LAIR,GUARD_POST,NULL)
	SET_CREATURE_CONFIGURATION(HELL_HOUND,RoomSlabsRequired,25,9,0)
ENDIF

REM If blue digs all gold, add treasure room at gold.

IF_SLAB_OWNER(36,8,PLAYER1)
	IF_SLAB_OWNER(42,11,PLAYER1)
		IF_SLAB_OWNER(37,13,PLAYER1)
			SET_TIMER(PLAYER1,TIMER4)
			IF(PLAYER1,TIMER4 >= 5000)
				CHANGE_SLAB_TYPE(35,8,TREASURY_AREA,FLOOR)
				CHANGE_SLAB_TYPE(11,20,PRETTY_PATH,NONE)
			ENDIF
		ENDIF
	ENDIF
ENDIF

REM If timer big enough, allow blue the other rooms:

IF(PLAYER0,TIMER0 >= 10000)
	CHANGE_SLAB_TYPE(30,38,TRAINING_AREA,MATCH)
	CHANGE_SLAB_OWNER(30,38,PLAYER1)
ENDIF
IF(PLAYER0,TIMER0 >= 25000)
	CHANGE_SLAB_TYPE(41,24,PRISON_AREA,MATCH)
	CHANGE_SLAB_TYPE(41,35,GRAVE_AREA,MATCH)
	CHANGE_SLAB_TYPE(41,31,TORTURE_AREA,MATCH)
	CHANGE_SLAB_OWNER(41,24,PLAYER1,NONE)
	CHANGE_SLAB_OWNER(41,35,PLAYER1,NONE)
	CHANGE_SLAB_OWNER(41,31,PLAYER1,NONE)
ENDIF

REM If player digs into water surrounding hero base,
REM let them know of the threat.
REM If Blue already defeated, don't trigger as landlord
REM is coming straight for you

IF_ACTION_POINT(4,PLAYER0)
	IF(PLAYER0,FLAG0==0)
		IF(PLAYER0,FLAG1==0)
			REM "You've found yourself at the outskirts of the hero fortress. The door leading there is sealed; it may be best to keep it that way until you're ready."
			DISPLAY_INFORMATION(134,4)
		ENDIF
	ENDIF
ENDIF

REM If player continues, spawn waves.

IF_ACTION_POINT(8,PLAYER0)
	IF(PLAYER0,FLAG0==0)
		IF(PLAYER0,FLAG1==0)
			SET_TIMER(PLAYER0,TIMER1)
			REM "The main hero stronghold now knows you're here and will be sending reinforcements. It may be best to strike before they can assemble too many."
			DISPLAY_INFORMATION(135,8)
			IF(PLAYER0,TIMER1 >= 3500)
				NEXT_COMMAND_REUSABLE
				ADD_PARTY_TO_LEVEL(PLAYER_GOOD,HERO_WAVES,1,1)
				NEXT_COMMAND_REUSABLE
				SET_TIMER(PLAYER0,TIMER1)
			ENDIF
		ENDIF
	ENDIF
ENDIF

REM If player breaks in the front door, the waves will stop.
REM If blue is defeated previous waves will stop anyway, so 
REM text will only display if blue is alive.

IF_ACTION_POINT(1,PLAYER0)
	SET_FLAG(PLAYER0,FLAG0,1)
	IF(PLAYER0,FLAG1==0)
		REM "The Heroes can no longer send reinforcements to handle you now you're knocking on their door, and will have to face you with their remaining forces."
		DISPLAY_INFORMATION(136,ALL_PLAYERS)
		SET_DOOR(UNLOCKED,63,12)
		SET_DOOR(UNLOCKED,67,12)
	ENDIF
ENDIF

REM If player gains access to the gems, annoy them.
REM Only if hero heart not destroyed

IF_ACTION_POINT(3,PLAYER0)
	IF(PLAYER0,FLAG2==0)
		SET_TIMER(PLAYER0,TIMER2)
			IF(PLAYER0,TIMER2 >= 6000)
				NEXT_COMMAND_REUSABLE
				ADD_PARTY_TO_LEVEL(PLAYER_GOOD,GEMTHIEVES,-2,1)
				NEXT_COMMAND_REUSABLE
				ADD_PARTY_TO_LEVEL(PLAYER_GOOD,GEMTHIEVES,-3,1)
				IF_SLAB_OWNER(16,74,PLAYER0)
					NEXT_COMMAND_REUSABLE
					ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TREASURETHIEVES,2,1)
				ENDIF
				NEXT_COMMAND_REUSABLE
				SET_TIMER(PLAYER0,TIMER2)
		ENDIF
	ENDIF
ENDIF

REM If player gains access to neutral Treasure Room, spawn
REM opportunistic thieves.
REM Only if hero heart not destroyed.

IF_SLAB_OWNER(16,74,PLAYER0)
	IF(PLAYER0,FLAG2==0)
		SET_TIMER(PLAYER0,TIMER3)
		IF(PLAYER0,TIMER3 >= 1000)
			ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TREASURETHIEVES,2,1)
		ENDIF
	ENDIF
ENDIF

REM If player claims a Temple
REM Give Blue access to Scavenger Room

IF(PLAYER0,TEMPLE>0)
	SET_FLAG(PLAYER1,FLAG7,1)
ENDIF

REM If player breaks blue door, unlock next door and pretend he had Scavenger Room all along.
IF_ACTION_POINT(9,PLAYER0)
	SET_DOOR(UNLOCKED,25,43)
	SET_FLAG(PLAYER1,FLAG7,1)
ENDIF

IF(PLAYER1,FLAG7 == 1)
	CHANGE_SLAB_TYPE(9,35,SCAVENGE_AREA)
	CHANGE_SLAB_OWNER(9,35,PLAYER1)
ENDIF

REM When player reaches hero heart - Spawn landlord and open doors
REM only if blue not destroyed.
REM If blue is defeated and Lord has left, spawn a backup party.
IF_ACTION_POINT(5,PLAYER0)
	IF(PLAYER0,FLAG1==0)
		SET_FLAG(PLAYER0,FLAG2,1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD_A,-1,1)
		SET_DOOR(UNLOCKED,60,15)
		SET_DOOR(UNLOCKED,60,19)
		SET_DOOR(UNLOCKED,60,24)
		SET_DOOR(UNLOCKED,62,26)
		SET_DOOR(UNLOCKED,70,15)
		SET_DOOR(UNLOCKED,70,19)
		SET_DOOR(UNLOCKED,70,24)
		SET_DOOR(UNLOCKED,68,26)
		SET_DOOR(UNLOCKED,10,66)
		SET_DOOR(UNLOCKED,63,12)
		SET_DOOR(UNLOCKED,67,12)
		SET_DOOR(UNLOCKED,65,24)
		SET_DOOR(UNLOCKED,49,34)
	ENDIF
	IF(PLAYER0,FLAG1==1)
		SET_FLAG(PLAYER0,FLAG2,1)
		REM "Even with the Lord gone, the heroes make their last, desperate attempt to defend their Heart and keep their grip on this land. Pathetic, really."
		DISPLAY_INFORMATION(137,-1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD_BACKUP,-1,1)
		SET_DOOR(UNLOCKED,60,15)
		SET_DOOR(UNLOCKED,60,19)
		SET_DOOR(UNLOCKED,60,24)
		SET_DOOR(UNLOCKED,62,26)
		SET_DOOR(UNLOCKED,70,15)
		SET_DOOR(UNLOCKED,70,19)
		SET_DOOR(UNLOCKED,70,24)
		SET_DOOR(UNLOCKED,68,26)
		SET_DOOR(UNLOCKED,10,66)
		SET_DOOR(UNLOCKED,63,12)
		SET_DOOR(UNLOCKED,67,12)
		SET_DOOR(UNLOCKED,65,24)
		SET_DOOR(UNLOCKED,49,34)
	ENDIF
ENDIF

REM If Blue defeated first, heroes will tunnel straight to player.
IF(PLAYER1,DUNGEON_DESTROYED==1)
	SET_FLAG(PLAYER0,FLAG1,1)
	IF(PLAYER0,FLAG2==0)
		REM "The Lord of the Land has heard of the collapse of the rival Keeper and is coming to strike while you are licking your wounds."
		DISPLAY_INFORMATION(138,-4)
		ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,-4,DUNGEON_HEART,0,6,400)
		REM ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD_B,-4,DUNGEON_HEART,0,8,500)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD_B,-1,1)
		ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,GEMTHIEVES,-2,DUNGEON_HEART,0,6,500)
		SET_DOOR(UNLOCKED,60,15)
		SET_DOOR(UNLOCKED,60,19)
		SET_DOOR(UNLOCKED,60,24)
		SET_DOOR(UNLOCKED,62,26)
		SET_DOOR(UNLOCKED,70,15)
		SET_DOOR(UNLOCKED,70,19)
		SET_DOOR(UNLOCKED,70,24)
		SET_DOOR(UNLOCKED,68,26)
		SET_DOOR(UNLOCKED,10,66)
		SET_DOOR(UNLOCKED,63,12)
		SET_DOOR(UNLOCKED,67,12)
		SET_DOOR(UNLOCKED,65,24)
		SET_DOOR(UNLOCKED,49,34)
	ENDIF
ENDIF

IF(PLAYER0,FLAG1==1)
	IF(PLAYER_GOOD,KNIGHT==0)
	REM "Now the Lord has been dealt with, destroy the Heroes' Dungeon Heart to expel them for good."
	DISPLAY_OBJECTIVE(139,ALL_PLAYERS)
	ENDIF
ENDIF

REM If White defeated first, blue will dig to player.
IF(PLAYER_GOOD,DUNGEON_DESTROYED==1)
	IF(PLAYER0,FLAG1==0)
		REM "The Keeper to the north has heard of the collapse of the hero fort and is coming to strike while your back is turned."
		DISPLAY_INFORMATION(140,6)
		CHANGE_SLAB_TYPE(25,46,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(25,47,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(25,48,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(25,49,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(25,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(26,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(27,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(28,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(29,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(30,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(31,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(32,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(33,50,BRIDGE_FRAME,NONE)
		CHANGE_SLAB_TYPE(34,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_TYPE(35,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_TYPE(36,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_TYPE(37,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_TYPE(38,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_TYPE(39,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_TYPE(40,50,PRETTY_PATH,NONE)
		CHANGE_SLAB_OWNER(25,46,PLAYER1,MATCH)
		CHANGE_SLAB_OWNER(34,50,PLAYER1,NONE)
		CHANGE_SLAB_OWNER(35,50,PLAYER1,NONE)
		CHANGE_SLAB_OWNER(36,50,PLAYER1,NONE)
		CHANGE_SLAB_OWNER(37,50,PLAYER1,NONE)
		CHANGE_SLAB_OWNER(38,50,PLAYER1,NONE)
		CHANGE_SLAB_OWNER(39,50,PLAYER1,NONE)
		CHANGE_SLAB_OWNER(40,50,PLAYER1,NONE)
		USE_POWER_AT_POS(PLAYER1,58,64,POWER_CALL_TO_ARMS,9,1)
		PLAY_MESSAGE(PLAYER0,SPEECH,117)
		SET_TIMER(PLAYER3,TIMER7)
		IF(PLAYER3,TIMER7 > 100)
			USE_POWER_AT_POS(PLAYER1,118,151,POWER_CALL_TO_ARMS,9,1)
		ENDIF
		ROOM_AVAILABLE(PLAYER1,BRIDGE,1,1)
		ADD_CREATURE_TO_LEVEL(PLAYER1,IMP,6,4,3,0)
		COMPUTER_DIG_TO_LOCATION(PLAYER1,6,PLAYER0)
	ENDIF
ENDIF

REM when appropriate rooms are under your control, explain
IF(PLAYER0,PRISON>0)
	IF(PLAYER0,FLAG3==0)
		REM "This land is not kind to the undead. You may find it increasingly difficult to grow your ranks through imprisoning or torture, and it will be harder to attract Vampires."
		DISPLAY_INFORMATION(141,ALL_PLAYERS)
		SET_FLAG(PLAYER0,FLAG3,1)
	ENDIF
ENDIF
IF(PLAYER0,TORTURE>0)
	IF(PLAYER0,FLAG3==0)
		REM "This land is not kind to the undead. You may find it increasingly difficult to grow your ranks through imprisoning or torture, and it will be harder to attract Vampires."
		DISPLAY_INFORMATION(142,ALL_PLAYERS)
		SET_FLAG(PLAYER0,FLAG3,1)
	ENDIF
ENDIF
IF(PLAYER0,GRAVEYARD>0)
	IF(PLAYER0,FLAG3==0)
		REM "This land is not kind to the undead. You may find it increasingly difficult to grow your ranks through imprisoning or torture, and it will be harder to attract Vampires."
		DISPLAY_INFORMATION(143,ALL_PLAYERS)
		SET_FLAG(PLAYER0,FLAG3,1)
	ENDIF
ENDIF


IF_ACTION_POINT(10,PLAYER0)
	REM "You have found the rival Keeper. He is currently minding his own business, unaware of your presence. Keep him oblivious until you have an army at his door."
	DISPLAY_INFORMATION(144,10)
ENDIF




IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
	KILL_CREATURE(PLAYER_GOOD,ANY_CREATURE,ANYWHERE,255)
	WIN_GAME
ENDIF
