rem 20 level/Lava lair

if(player0,game_turn >= 10)
 quick_objective(1,"Madru has nowhere else to run. He summoned his last forces for defense. Attack and destroy him, along with his pathetic fortress!",player0)
 magic_available(player0,power_lightning,1,1)
endif

if(player0,game_turn >= 20)
 quick_information(8,"This time you don't have to worry about your allies. Even if they die, the main thing is to defeat Madr!")
endif

computer_player(player1,10)
computer_player(player2,10)
computer_player(player3,10)
computer_player(player4,10)
computer_player(player5,10)
computer_player(player6,10)

ally_players(player0,player4)
ally_players(player0,player5)
ally_players(player4,player5)

ally_players(player_good,player1)
ally_players(player_good,player2)
ally_players(player_good,player3)
ally_players(player_good,player6)
ally_players(player1,player6)
ally_players(player1,player2)
ally_players(player1,player3)
ally_players(player2,player6)
ally_players(player2,player3)
ally_players(player3,player6)

set_generate_speed(100)
rem Jaba
set_creature_armour(demonspawn,200)
set_creature_strength(demonspawn,200)
set_creature_health(demonspawn,3500)
set_creature_armour(dragon,240)
set_creature_strength(dragon,240)
set_creature_health(dragon,5000)
rem Gardu
set_creature_armour(knight,250)
set_creature_strength(knight,200)
set_creature_health(knight,3200)
rem Mr. Purple
set_creature_armour(avatar,250)
set_creature_strength(avatar,200)
set_creature_health(avatar,3200)

set_creature_armour(witch,150)
set_creature_health(witch,2500)
set_creature_armour(fairy,150)
set_creature_health(fairy,2500)
set_creature_armour(tentacle,150)
set_creature_strength(tentacle,200)
set_creature_health(tentacle,3500)
set_creature_armour(bug,220)
set_creature_strength(bug,150)
set_creature_health(bug,3000)

set_creature_armour(troll,100)
set_creature_strength(troll,120)
set_creature_health(troll,2000)
set_creature_armour(bile_demon,250)
set_creature_strength(bile_demon,250)
set_creature_health(bile_demon,10000)
set_creature_armour(orc,100)
set_creature_strength(orc,150)
set_creature_health(orc,2000)
set_creature_armour(hell_hound,50)
set_creature_strength(hell_hound,120)
set_creature_health(hell_hound,1800)
set_creature_armour(giant,50)
set_creature_strength(giant,180)
set_creature_health(giant,2400)
set_creature_armour(spider,100)
set_creature_strength(spider,140)
set_creature_health(spider,2000)
set_creature_strength(dark_mistress,100)
set_creature_armour(dark_mistress,100)
set_creature_health(dark_mistress,1500)
set_creature_armour(fly,50)
set_creature_strength(fly,200)
set_creature_health(fly,1000)
set_creature_fear(fly,0)

rem player5/Gardu
start_money(player5,6000000)
max_creatures(player5,20)
add_creature_to_pool(samurai,10)
add_creature_to_pool(archer,10)
add_creature_to_pool(barbarian,10)
add_creature_to_pool(monk,10)
add_creature_to_pool(giant,10)
creature_available(player5,samurai,1,1)
set_creature_armour(samurai,50)
set_creature_strength(samurai,180)
set_creature_health(samurai,2400)
creature_available(player5,archer,1,1)
set_creature_armour(archer,50)
set_creature_strength(archer,180)
set_creature_health(archer,2400)
creature_available(player5,barbarian,1,1)
set_creature_armour(barbarian,50)
set_creature_strength(barbarian,180)
set_creature_health(barbarian,2400)
creature_available(player5,monk,1,1)
set_creature_armour(monk,50)
set_creature_strength(monk,180)
set_creature_health(monk,2400)
creature_available(player5,giant,1,1)

rem player4/Mr. Purple
start_money(player4,6000000)
max_creatures(player4,20)
add_creature_to_pool(druid,30)
add_creature_to_pool(skeleton,30)
add_creature_to_pool(wizard,10)
add_creature_to_pool(tunneller,10)
creature_available(player4,druid,1,1)
set_creature_armour(druid,50)
set_creature_strength(druid,100)
set_creature_health(druid,1000)
creature_available(player4,skeleton,1,1)
set_creature_armour(skeleton,50)
set_creature_strength(skeleton,180)
set_creature_health(skeleton,1000)
creature_available(player4,wizard,1,1)
set_creature_health(wizard,1000)
creature_available(player4,tunneller,1,1)
set_creature_armour(tunneller,50)
set_creature_strength(tunneller,80)
set_creature_health(tunneller,1000)

rem player0
start_money(player0,30000)
max_creatures(player0,30)
add_creature_to_pool(sorceror,15)
add_creature_to_pool(dwarfa,15)
add_creature_to_pool(time_mage,15)
add_creature_to_pool(vampire,15)
creature_available(player0,sorceror,1,1)
creature_available(player0,dwarfa,1,1)
creature_available(player0,druid,1,1)
creature_available(player0,time_mage,1,1)
creature_available(player0,vampire,1,1)
creature_available(player0,skeleton,1,1)

start_money(player1,6000000)
max_creatures(player1,20)
add_creature_to_pool(horny,20)
add_creature_to_pool(troll,20)
add_creature_to_pool(orc,20)
add_creature_to_pool(spider,20)
add_creature_to_pool(hell_hound,20)
creature_available(player1,horny,1,1)
creature_available(player1,troll,1,1)
creature_available(player1,orc,1,1)
creature_available(player1,hell_hound,1,1)
creature_available(player1,spider,1,1)

start_money(player2,6000000)
max_creatures(player2,20)
creature_available(player2,horny,1,1)
creature_available(player2,troll,1,1)
creature_available(player2,orc,1,1)
creature_available(player2,hell_hound,1,1)
creature_available(player2,spider,1,1)

start_money(player3,6000000)
max_creatures(player3,20)
creature_available(player3,horny,1,1)
creature_available(player3,troll,1,1)
creature_available(player3,orc,1,1)
creature_available(player3,hell_hound,1,1)
creature_available(player3,spider,1,1)

start_money(player6,6000000)
max_creatures(player6,20)
creature_available(player6,horny,1,1)
creature_available(player6,troll,1,1)
creature_available(player6,orc,1,1)
creature_available(player6,hell_hound,1,1)
creature_available(player6,spider,1,1)

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,guard_post,1,1)
room_available(all_players,workshop,1,1)
room_available(all_players,prison,1,1)
room_available(all_players,torture,1,1)
room_available(all_players,barracks,1,1)
room_available(all_players,graveyard,1,1)
room_available(all_players,scavenger,1,1)

magic_available(all_players,power_imp,1,1)
magic_available(all_players,power_call_to_arms,1,1)
magic_available(all_players,power_hold_audience,1,1)
magic_available(all_players,power_cave_in,1,1)
magic_available(all_players,power_protect,1,1)
magic_available(all_players,power_chicken,1,1)
magic_available(all_players,power_lightning,1,0)
magic_available(player6,power_disease,1,0)
magic_available(all_players,power_heal_creature,1,1)
magic_available(all_players,power_sight,1,1)
magic_available(all_players,power_obey,1,1)
magic_available(all_players,power_speed,1,1)
magic_available(all_players,power_conceal,1,1)

trap_available(all_players,boulder,1,0)
trap_available(all_players,word_of_power,1,0)
trap_available(all_players,lightning,1,0)

create_party(one)
	add_to_party(destr,orc,10,0,attack_rooms,0)
	add_to_party(destr,orc,10,0,attack_rooms,0)
	add_to_party(destr,orc,10,0,attack_rooms,0)
	
create_party(two)
	add_to_party(destr,troll,10,0,attack_rooms,0)
	add_to_party(destr,troll,10,0,attack_rooms,0)
	add_to_party(destr,hell_hound,10,0,attack_rooms,0)
	
create_party(three)
	add_to_party(destr,giant,10,0,attack_enemies,0)
	add_to_party(destr,giant,10,0,attack_enemies,0)
	add_to_party(destr,giant,10,0,attack_enemies,0)
	add_to_party(destr,hell_hound,10,0,attack_enemies,0)
	
create_party(four)
	add_to_party(destr,dark_mistress,10,0,attack_enemies,0)
	add_to_party(destr,dark_mistress,10,0,attack_enemies,0)
	add_to_party(destr,dark_mistress,10,0,attack_enemies,0)
	add_to_party(destr,dark_mistress,10,0,attack_enemies,0)
	
create_party(kilo)
	add_to_party(kilo,horny,10,0,attack_enemies,0)
	add_to_party(kilo,horny,10,0,attack_enemies,0)
	add_to_party(kilo,horny,10,0,attack_enemies,0)
	add_to_party(kilo,horny,10,0,attack_enemies,0)
	add_to_party(kilo,horny,10,0,attack_enemies,0)
	add_to_party(kilo,horny,10,0,attack_enemies,0)
	
create_party(poor)
	add_to_party(poor,fly,10,0,attack_enemies,0)
	add_to_party(poor,fly,10,0,attack_enemies,0)
	add_to_party(poor,fly,10,0,attack_enemies,0)
	add_to_party(poor,fly,10,0,attack_enemies,0)
	add_to_party(poor,fly,10,0,attack_enemies,0)

if(player0,game_turn >= 25000)
 add_party_to_level(player_good,one,3,1)
endif

if(player0,game_turn >= 35000)
 add_party_to_level(player_good,two,3,1)
endif

if(player0,game_turn >= 50000)
 add_party_to_level(player_good,three,3,1)
endif

if(player0,game_turn >= 70000)
 add_party_to_level(player_good,four,3,1)
endif

if(player_good,dungeon_destroyed == 1)
 quick_objective(2,"Nothing changes, Madr hid somewhere in his shelter. Find him!",player0)
 magic_available(all_players,power_destroy_walls,1,1)
 add_party_to_level(player_good,fly,2,1)
 add_party_to_level(player_good,fly,2,1)
endif

if_action_point(1,player0)
 add_party_to_level(player_good,kilo,1,1)
 add_party_to_level(player_good,kilo,1,1)
 add_party_to_level(player_good,kilo,1,1)
endif

if(player_good,bile_demon == 0)
 quick_objective(3,"Victory! After so much time, without even remembering the reasons for your enmity, you have finally dealt with your enemy!",player0)
 win_game
endif

if(player0,dungeon_destroyed == 1)
 lose_game
endif

if(player0,demonspawn == 0)
 if(player0,dragon == 0)
  quick_information(4,"I feel sorry for the frog, he could make our life a lot easier...")
 endif
endif

if(player0,dragon == 1)
  quick_information(5,"Look! That creature turned out to be not poisonous at all, but just young! She grew up and became a powerful lizard.")
endif

if(player4,dungeon_destroyed == 1)
  quick_information(6,"Mr. Purple is dead...")
endif

if(player5,dungeon_destroyed == 1)
 quick_information(7,"Gardu died...")
endif