REM Level 17/Mercenaries

set_generate_speed(200)

set_creature_armour(knight,200)
set_creature_armour(giant,80)
set_creature_armour(barbarian,70)
set_creature_armour(samurai,110)
set_creature_armour(hell_hound,70)
set_creature_armour(avatar,180)
set_creature_armour(thief,100)
set_creature_armour(archer,90)
set_creature_armour(dark_mistress,110)

set_creature_strength(knight,160)
set_creature_strength(giant,200)
set_creature_strength(barbarian,135)
set_creature_strength(samurai,160)
set_creature_strength(hell_hound,120)
set_creature_strength(avatar,200)
set_creature_strength(thief,100)
set_creature_strength(archer,120)

set_creature_health(knight,1500)
set_creature_health(giant,1500)
set_creature_health(barbarian,1200)
set_creature_health(samurai,1400)
set_creature_health(hell_hound,1000)
set_creature_health(avatar,4000)
set_creature_health(thief,1000)
set_creature_health(archer,1000)
set_creature_health(dark_mistress,800)

set_creature_max_level(player6,thief,10)
set_creature_max_level(player0,thief,10)

max_creatures(player0,30)
max_creatures(player6,30)

computer_player(player6,10)

ally_players(player6,player_good)

start_money(player0,8000)
start_money(player6,6000000)

add_creature_to_pool(troll,10)
add_creature_to_pool(orc,10)
add_creature_to_pool(druid,10)
add_creature_to_pool(vampire,10)
add_creature_to_pool(bile_demon,10)
add_creature_to_pool(time_mage,10)
add_creature_to_pool(sorceror,10)
add_creature_to_pool(tentacle,10)
add_creature_to_pool(dark_mistress,10)
add_creature_to_pool(dragon,10)
creature_available(player0,troll,1,1)
creature_available(player0,orc,1,1)
creature_available(player0,druid,1,1)
creature_available(player0,vampire,1,1)
creature_available(player0,bile_demon,1,1)
creature_available(player0,time_mage,1,1)
creature_available(player0,sorceror,1,1)
creature_available(player0,tentacle,1,1)
creature_available(player0,dark_mistress,1,1)
creature_available(player0,dragon,1,1)

add_creature_to_pool(archer,40)
add_creature_to_pool(hell_hound,40)
add_creature_to_pool(barbarian,40)
add_creature_to_pool(giant,40)
add_creature_to_pool(samurai,40)
add_creature_to_pool(thief,40)
creature_available(player6,hell_hound,1,1)
creature_available(player6,barbarian,1,1)
creature_available(player6,giant,1,1)
creature_available(player6,samurai,1,1)
creature_available(player6,thief,1,1)
creature_available(player6,archer,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,1)
room_available(player0,guard_post,1,0)
room_available(player0,workshop,1,0)
room_available(player0,barracks,1,0)
room_available(player0,temple,1,0)
room_available(player0,bridge,1,0)
room_available(player0,prison,1,0)

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

trap_available(player0,word_of_power,1,0)
trap_available(player0,lightning,1,0)
trap_available(player0,boulder,1,0)
trap_available(player0,poison_gas,1,0)
trap_available(player0,lava,1,0)
door_available(all_players,magic,1,0)

if(player0,game_turn >= 10)
 quick_objective(1,"Gardu is free. You and Madru now have the same number of allies. It's time to leave him without friends at all, and then crowd on him. Trot hid here, he hired a horde of mercenaries to protect himself from you. I think his attempt is futile.",player0)
endif

create_party(tramo)
	add_to_party(tramo,knight,6,0,attack_enemies,22222)
	add_to_party(tramo,monk,10,0,steal_spells,0)
	add_to_party(tramo,monk,10,0,steal_spells,0)
	add_to_party(tramo,monk,9,0,steal_spells,0)
	add_to_party(tramo,monk,9,0,steal_spells,0)
	add_to_party(tramo,monk,9,0,steal_spells,0)
	
create_party(trafa)
	add_to_party(trafa,knight,8,0,attack_enemies,22222)
	add_to_party(trafa,fairy,10,0,steal_spells,0)
	add_to_party(trafa,fairy,10,0,steal_spells,0)
	add_to_party(trafa,fairy,10,0,steal_spells,0)
	add_to_party(trafa,fairy,10,0,steal_spells,0)
	add_to_party(trafa,fairy,10,0,steal_spells,0)
	
create_party(trabar)
	add_to_party(trabar,barbarian,8,0,attack_enemies,0)
	add_to_party(trabar,barbarian,7,0,attack_enemies,0)
	add_to_party(trabar,barbarian,8,0,attack_enemies,0)
	add_to_party(trabar,giant,9,0,attack_enemies,0)
	add_to_party(trabar,giant,10,0,attack_enemies,0)
	add_to_party(trabar,giant,6,0,attack_enemies,0)
	
create_party(tratar)
	add_to_party(tratar,thief,10,0,attack_enemies,0)
	add_to_party(tratar,thief,10,0,attack_enemies,0)
	add_to_party(tratar,archer,10,0,attack_enemies,0)
	add_to_party(tratar,archer,10,0,attack_enemies,0)
	add_to_party(tratar,archer,10,0,attack_enemies,0)
	add_to_party(tratar,archer,10,0,attack_enemies,0)
	
create_party(moga)
	add_to_party(moga,thief,9,0,attack_enemies,0)
	add_to_party(moga,knight,10,0,attack_enemies,0)
	add_to_party(moga,hell_hound,6,0,attack_enemies,0)
	add_to_party(moga,hell_hound,6,0,attack_enemies,0)
	add_to_party(moga,hell_hound,6,0,attack_enemies,0)
	
create_party(tymoga)
	add_to_party(tymoga,knight,8,0,attack_enemies,0)
	add_to_party(tymoga,samurai,10,0,attack_enemies,0)
	add_to_party(tymoga,samurai,10,0,attack_enemies,0)
	add_to_party(tymoga,barbarian,9,0,attack_enemies,0)
	add_to_party(tymoga,barbarian,9,0,attack_enemies,0)
	add_to_party(tymoga,barbarian,9,0,attack_enemies,0)
	
create_party(smoga)
	add_to_party(smoga,hell_hound,10,0,attack_enemies,0)
	add_to_party(smoga,archer,9,0,attack_enemies,0)
	add_to_party(smoga,archer,9,0,attack_enemies,0)
	add_to_party(smoga,archer,9,0,attack_enemies,0)
	add_to_party(smoga,archer,9,0,attack_enemies,0)
	add_to_party(smoga,archer,9,0,attack_enemies,0)
	
if_action_point(2,player0)
 add_party_to_level(player_good,trabar,-4,1)
 add_party_to_level(player_good,trabar,-4,1)
endif

if_action_point(3,player0)
 add_party_to_level(player_good,tratar,-4,1)
 add_party_to_level(player_good,tratar,-4,1)
endif
 
if_action_point(1,player0)
 quick_information(2,"Just another trap, nothing special.")
 add_party_to_level(player_good,tramo,-1,1)
 add_party_to_level(player_good,trafa,-2,1)
 add_party_to_level(player_good,trafa,-2,1)
 add_party_to_level(player_good,trafa,-3,1)
 add_party_to_level(player_good,trafa,-3,1)
endif

if(player_good,graveyard == 0)
quick_information(3,"The mercenaries called for reinforcements.")
 add_party_to_level(player_good,tymoga,-5,1)
 add_party_to_level(player_good,tymoga,-5,1)
endif

if(player_good,treasure == 0)
quick_information(4,"You stole all the mercenaries' proceeds, they sent several detachments after you.")
 add_party_to_level(player_good,moga,-5,1)
 add_party_to_level(player_good,moga,-5,1)
 add_party_to_level(player_good,smoga,-5,1)
endif

if(player_good,torture == 0)
quick_information(5,"Several more groups have been sent for your head.")
 add_party_to_level(player_good,smoga,-5,1)
 add_party_to_level(player_good,smoga,-5,1)
 add_party_to_level(player_good,smoga,-5,1)
 add_party_to_level(player_good,smoga,-5,1)
endif

if(player0,dungeon_destroyed == 1)
 lose_game
endif

if(player6,dungeon_destroyed == 1)
 quick_objective(6,"Great! You have destroyed the coward, now only a small matter remains. Kill the commanders of the mercenary army.",player0)
 if(player_good,knight == 0)
  if(player_good,avatar == 0)
   win_game
  endif
 endif
endif