REM PLAY Level 129

SET_GENERATE_SPEED(500)
MAX_CREATURES(PLAYER0,20)
START_MONEY(PLAYER0,10000)




ADD_CREATURE_TO_POOL(HELL_HOUND,20)
ADD_CREATURE_TO_POOL(HORNY,20)
ADD_CREATURE_TO_POOL(SORCEROR,10)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(ORC,20)
ADD_CREATURE_TO_POOL(FAIRY,20)



CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)


ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,0,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,0,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,0,0)
ROOM_AVAILABLE(ALL_PLAYERS,garden,1,1)


TRAP_AVAILABLE(ALL_PLAYERS,ALARM,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,STEEL,1,7)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
		

		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(PLAYER1,POWER_SIGHT,1,1)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,0,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,0,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
		MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)


CREATE_PARTY(WAITB)
	ADD_TO_PARTY(WAITB,DWARFA,6,750,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITB,ARCHER,6,850,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITB,ARCHER,6,750,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITB,WIZARD,7,1250,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITB,ARCHER,6,850,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITB,WIZARD,7,1250,ATTACK_ENEMIES,0)

CREATE_PARTY(WAITC)
	ADD_TO_PARTY(WAITC,WITCH,7,1550,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITC,WITCH,7,1550,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITC,WITCH,7,1550,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITC,WITCH,7,1550,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITC,MONK,8,1850,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITC,MONK,8,1750,ATTACK_ENEMIES,0)

CREATE_PARTY(WAITD)
	ADD_TO_PARTY(WAITD,SAMURAI,6,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITD,SAMURAI,6,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITD,SAMURAI,6,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITD,SAMURAI,6,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITD,SAMURAI,6,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(WAITD,SAMURAI,6,1000,ATTACK_ENEMIES,0)

create_party(waite)
	add_to_party(waite,barbarian,7,1500,attack_enemies,0)
	add_to_party(waite,barbarian,7,1500,attack_enemies,0)
	add_to_party(waite,archer,5,1250,attack_enemies,0)
	add_to_party(waite,archer,5,1250,attack_enemies,0)
	add_to_party(waite,archer,5,1250,attack_enemies,0)


create_party(finala)
	add_to_party(finala,samurai,7,1500,attack_enemies,0)
	add_to_party(finala,witch,7,1500,attack_enemies,0)
	add_to_party(finala,thief,7,1500,attack_enemies,0)
	add_to_party(finala,dwarfa,7,1500,attack_enemies,0)
	add_to_party(finala,dwarfa,7,1500,attack_enemies,0)

create_party(finalb)
	add_to_party(finalb,barbarian,8,2000,attack_enemies,0)
	add_to_party(finalb,barbarian,8,2000,attack_enemies,0)
	add_to_party(finalb,barbarian,8,2000,attack_enemies,0)
	add_to_party(finalb,fairy,8,2000,attack_enemies,0)
	add_to_party(finalb,fairy,8,2000,attack_enemies,0)

create_party(finalc)
	add_to_party(finalc,giant,8,2200,attack_enemies,0)
	add_to_party(finalc,giant,8,2200,attack_enemies,0)
	add_to_party(finalc,dwarfa,8,2200,attack_enemies,0)
	add_to_party(finalc,giant,8,2200,attack_enemies,0)
	add_to_party(finalc,dwarfa,8,2200,attack_enemies,0)
	add_to_party(finalc,dwarfa,8,2200,attack_enemies,0)


CREATE_PARTY(KNIGHT)
	ADD_TO_PARTY(KNIGHT,KNIGHT,10,5000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(KNIGHT,SAMURAI,10,2500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(KNIGHT,SAMURAI,10,2500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(KNIGHT,SAMURAI,10,2500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(KNIGHT,SAMURAI,10,2500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(KNIGHT,SAMURAI,10,2500,ATTACK_ENEMIES,0)

DISPLAY_OBJECTIVE(904, PLAYER0)

if(player0,game_turn >= 250)
	DISPLAY_INFORMATION(905)
endif
	
	
if(player0,game_turn >= 25000)
	add_creature_to_level(player_good,fairy,14,5,4,1000)
endif   
				
if_action_point(3,player0)
	add_party_to_level(player_good,waitb,4,1)
endif
if_action_point(4,player0)
	set_timer(Player0,timer4)
		if(player0,timer4 >= 500)
		add_party_to_level(player_good,waitc,5,1)
		add_party_to_level(player_good,waitd,6,1)
		endif
endif

if_action_point(7,player0)
	add_party_to_level(Player_good,waite,-1,1)
endif

IF(PLAYER0,GRAVEYARD >= 1)
	ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,1)
ENDIF


IF(PLAYER0,DUNGEON_DESTROYED == 1)
	LOSE_GAME
ENDIF


IF_ACTION_POINT(1,PLAYER0)
	ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
	DISPLAY_OBJECTIVE(906, PLAYER0)
ENDIF


rem aps 12 & 13

set_timer(Player2,timer4)

if(player2,timer4 >= 6000)
	if(Player2,flag4 == 0)
		next_command_reusable
		add_tunneller_party_to_level(Player_good,waitb,12,dungeon,0,3,500)
		next_command_reusable
		set_timer(player2,timer4)
	endif
endif

if_action_point(1,player0)
	set_flag(player2,flag4,1)
endif

if(player2,timer3 >= 8000)
	if(Player2,flag3 == 0)
		next_command_reusable
		add_tunneller_party_to_level(Player_good,waitc,13,dungeon,0,3,500)
		next_command_reusable
		set_timer(player2,timer3)
	endif
endif

if_action_point(3,player0)
	set_flag(player2,flag3,1)
endif



if_action_point(8,player0)
	add_party_to_level(player_good,finala,9,1)
	add_party_to_level(player_good,finalb,10,1)     
	add_party_to_level(player_good,finalc,11,1)
	set_timer(player_good,timer6)
		if(player_good,timer6 >= 250)
		add_party_to_level(player_good,knight,player_good,1)
			if(player_good,dungeon_destroyed == 1)
				if(player_good,knight == 0)
				win_game
				endif
			endif
		endif
endif

if(player0,workshop >= 1)
	room_available(player0,workshop,1,1)
endif

if(player0,prison >= 1)
	room_available(player0,prison,1,1)
endif

if(player0,torture >= 1)
	room_available(player0,torture,1,1)
endif

if(player0,temple >= 1)
	room_available(player0,temple,1,1)
endif

if(player0,scavenger >= 1)
	room_available(player0,scavenger,1,1)
endif

if(player0,barracks >= 1)
	room_available(player0,workshop,1,1)
endif
