-----------------------------------------------------------------
-- 12.06.2006, 07.06.2007 by Lion[MX]
-- для каждого пилота, у которого возможен LevelUp,
-- должны быть функции
--
-- CanAddProperty_<имя пилота>
-- функция должна возвращать 1 если можно или 0, если
-- нельзя купить перк или special
--
-- GetPropertyCost_<имя пилота>
-- функция должна возвращать цену перка или special'a в поинтах
--
-----------------------------------------------------------------

-- CanAddProperty
-- Проверка наличия предшествующих перков
-- для примера proper = {100,{"Instructor", "Tactics"},{}}

function CanAddProperty(pilot, proper)

if proper == nil then 
		return 0; 
else
	local i = getn(proper[2]);
	local prop_ = proper[2];
	local ret = 0;
	if (i == 1) then
		if (pilot:HasProperty(prop_[1])) then ret = 1; end;
	elseif (i == 2) then
		if (pilot:HasProperty(prop_[1]) and pilot:HasProperty(prop_[2])) then  ret = 1; end;
	elseif (i == 3) then
		if (pilot:HasProperty(prop_[1]) and pilot:HasProperty(prop_[2]) and pilot:HasProperty(prop_[3])) then  ret = 1; end;
	else
		ret = 1;
	end;

  if ret == 1 then
	local i = getn(proper[3]);
	local prop_ = proper[3];
	if (i == 1) then
		if (pilot:HasProperty(prop_[1])) then ret = 0; end;
	elseif (i == 2) then
		if (pilot:HasProperty(prop_[1]) or pilot:HasProperty(prop_[2])) then  ret = 0; end;
	elseif (i == 3) then
		if (pilot:HasProperty(prop_[1]) or pilot:HasProperty(prop_[2]) or pilot:HasProperty(prop_[3])) then  ret = 0; end;
	end;
  end;
	return ret;
end;
end;

function GetPropertyCost(proper)
	if proper == nil then 
		return 0; 
	end;
	return proper[1];
end;

-- сохранение и восстановление перков
-- пример SavePerks(AiaSpeaker, "AiaPerks");
function SavePerks(pilot, Qname)
  local perktab = {
	"Pilot_1", "Pilot_2", "Pilot_3", "Pilot_4",
	"Piloting_1", "Piloting_2", "Piloting_3", "Piloting_4", "Piloting_5", "Elite",
	"Fearless", "R_Wingman", "Tactics", "Tactics_Exp",
	"Learner", "Learner_Exp", "Instructor", "Instructor_Exp", 
	"Master_Mind",
	"Hard_to_Kill", "Lone_Wolf", "AI", "Alien",
	"F_Weapon_HC", "F_Weapon_AC", "F_Weapon_Laser",
	"Black_Market", "F_of_Merchant",
	"Gunnery_1", "Gunnery_2", "Gunnery_3", "Gunnery_4", "Gunnery_5",
	"Criticals_1", "Criticals_2", "Criticals_3",
	"inspire_1", "inspire_2", "inspire_3", 
	"Missiles_Rockets", "Missiles_2", "Missiles_3", "Missiles_4", "Missiles_5", "Rockets_1", "Rockets_2",
	"missile_salvo_1", "missile_salvo_2", "missile_salvo_3", "missile_salvo_4",
	"weak_spot_1", "weak_spot_2", "weak_spot_3",
	"snake_attack_1", "snake_attack_2", "snake_attack_3",
	"snipeOut_1", "snipeOut_2", "snipeOut_3", "snipeOut_4",
	"finesse_1", "finesse_2", "finesse_3",
	"burst_1", "burst_2", "burst_3", "burst_4",
	"cdg_1", "cdg_2",
	"polarization_1", "polarization_2", "polarization_3", "polarization_4",
	"depolarization_1", "depolarization_2", "depolarization_3", 
	"lucky_1", "lucky_2", "lucky_3", "lucky_4",
	"jinxed_1", "jinxed_2", 
	"Systems_1", "Systems_2", "Systems_3", "Systems_4",
	"Countermeasures","Countermeasures_Exp",
	"Repairman", "Repairman_Exp",
	"Shields_Op", "Shields_Exp",
	"Engine_Op", "Engine_Exp",
	"Gun_Range", "Gun_Dispersion", "Missile_Range",
	"boost_1", "boost_2",
	"Tech_Adaptation", "Tech_Adaptation_Prec", "Tech_Adaptation_Alien",
	"hack_ship_1", "hack_ship_2", "hack_ship_3", "hack_berserk_1",
	"summon_prec_1", "summon_prec_2", "summon_prec_3",
	"summon_navy_1", "summon_navy_2", "summon_navy_3",
	"summon_kfni_1", "summon_kfni_2", "summon_kfni_3",
	"summon_berserk_1", "summon_berserk_2", "summon_berserk_3", "summon_berserk_4"};

  local flag = "";
	for i, ss in perktab do
	  if (pilot:HasProperty(ss)) then
		flag = flag.."1";
	  else
		flag = flag.."0";
	  end;
	end;
  SetQuestLabel(Qname, flag);
  SetQuestLabel(Qname.."_Points", tostring(floor(pilot:GetPoints())));
end;

function RestorePerks(pilot, Qname)
  local perktab = {
	"Pilot_1", "Pilot_2", "Pilot_3", "Pilot_4",
	"Piloting_1", "Piloting_2", "Piloting_3", "Piloting_4", "Piloting_5", "Elite",
	"Fearless", "R_Wingman", "Tactics", "Tactics_Exp",
	"Learner", "Learner_Exp", "Instructor", "Instructor_Exp", 
	"Master_Mind",
	"Hard_to_Kill", "Lone_Wolf", "AI", "Alien",
	"F_Weapon_HC", "F_Weapon_AC", "F_Weapon_Laser",
	"Black_Market", "F_of_Merchant",
	"Gunnery_1", "Gunnery_2", "Gunnery_3", "Gunnery_4", "Gunnery_5",
	"Criticals_1", "Criticals_2", "Criticals_3",
	"inspire_1", "inspire_2", "inspire_3", 
	"Missiles_Rockets", "Missiles_2", "Missiles_3", "Missiles_4", "Missiles_5", "Rockets_1", "Rockets_2",
	"missile_salvo_1", "missile_salvo_2", "missile_salvo_3", "missile_salvo_4",
	"weak_spot_1", "weak_spot_2", "weak_spot_3",
	"snake_attack_1", "snake_attack_2", "snake_attack_3",
	"snipeOut_1", "snipeOut_2", "snipeOut_3", "snipeOut_4",
	"finesse_1", "finesse_2", "finesse_3",
	"burst_1", "burst_2", "burst_3", "burst_4",
	"cdg_1", "cdg_2",
	"polarization_1", "polarization_2", "polarization_3", "polarization_4",
	"depolarization_1", "depolarization_2", "depolarization_3", 
	"lucky_1", "lucky_2", "lucky_3", "lucky_4",
	"jinxed_1", "jinxed_2", 
	"Systems_1", "Systems_2", "Systems_3", "Systems_4",
	"Countermeasures","Countermeasures_Exp",
	"Repairman", "Repairman_Exp",
	"Shields_Op", "Shields_Exp",
	"Engine_Op", "Engine_Exp",
	"Gun_Range", "Gun_Dispersion", "Missile_Range",
	"boost_1", "boost_2",
	"Tech_Adaptation", "Tech_Adaptation_Prec", "Tech_Adaptation_Alien",
	"hack_ship_1", "hack_ship_2", "hack_ship_3", "hack_berserk_1",
	"summon_prec_1", "summon_prec_2", "summon_prec_3",
	"summon_navy_1", "summon_navy_2", "summon_navy_3",
	"summon_kfni_1", "summon_kfni_2", "summon_kfni_3",
	"summon_berserk_1", "summon_berserk_2", "summon_berserk_3", "summon_berserk_4"};

  local flag =  GetQuestLabel(Qname);

  for i, ss in perktab do		
  	if (strsub(flag, i, i) == "1") and (not (pilot:HasProperty(ss))) then
		pilot:SetPerk(ss);
	end;
  end;
  local saved_points = 0;
  if (GetQuestLabel(Qname.."_Points")~="") then
    saved_points = tonumber(GetQuestLabel(Qname.."_Points"));
  end;
  local points = pilot:GetPoints() + saved_points;
  pilot:SetPoints(points)
end;

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

properties_Bavard = {
  Pilot_1 =		{8,{},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{128,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Piloting_1 =		{15,{},{}},
  Piloting_2 =		{30,{"Piloting_1"},{}},
  Piloting_3 =		{75,{"Piloting_2"},{}},
  Piloting_4 =		{100,{"Piloting_3"},{}},
  Learner =		{15,{"Piloting_1"},{}},
	Learner_Exp =	{30,{"Learner", },{}},
	R_Wingman = 	{120,{"Piloting_3"},{}},
	Hard_to_Kill =	{120,{"Piloting_3"},{}},
	Gunnery_1 =		{10,{},{}},
	Gunnery_2 =		{35,{"Gunnery_1"},{}},
	Gunnery_3 =		{50,{"Gunnery_2"},{}},
	Gunnery_4 =		{70,{"Gunnery_3"},{}},
	Gunnery_5 =		{120,{"Gunnery_4"},{}},
	Criticals_1 = 		{50,{"Gunnery_2"},{}},
	Criticals_2 = 		{100,{"Criticals_1"},{}},
	Missiles_Rockets =	{15,{},{}},
	Missiles_2 =		{35,{"Missiles_Rockets"},{}},
	Missiles_3 =		{75,{"Missiles_2"},{}},
	Missiles_4 =		{100,{"Missiles_3"},{}},
	Rockets_1 =		{50,{"Missiles_Rockets"},{}},
	Rockets_2 =		{70,{"Rockets_1"},{}},
	missile_salvo_1 =	{50,{"Missiles_Rockets"},{}},
	missile_salvo_2 =	{70,{"missile_salvo_1"},{}},
	Elite =			{250,{"R_Wingman", "Hard_to_Kill", "Gunnery_5", "Missiles_4"},{}},
	Systems_1 =		{10,{},{}},
	Systems_2 =		{35,{"Systems_1"},{}},
	Systems_3 =		{70,{"Systems_2"},{}},
	Systems_4 =		{100,{"Systems_3"},{}},
	Countermeasures =	{35,{"Systems_1"},{}},
	Countermeasures_Exp = {75,{"Countermeasures"},{}},
	Repairman =		{30,{"Systems_1"},{}},
	Repairman_Exp =	{50,{"Repairman"},{}},
	Engine_Op =		{55,{"Repairman"},{}},
	Tech_Adaptation = 	{100,{"Repairman_Exp"},{}},
	Tech_Adaptation_Alien =	{15,{},{}}
	};

function GetPropertyCost_Bavard(property)
	return GetPropertyCost(properties_Bavard[property]);
end;

function CanAddProperty_Bavard(pilot, property)
	return CanAddProperty(pilot, properties_Bavard[property]);
end;	


properties_Joker = {
  Pilot_1 =		{8,{},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{128,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Piloting_1 =		{10,{},{}},
  Piloting_2 =		{35,{"Piloting_1"},{}},
  Piloting_3 =		{75,{"Piloting_2"},{}},
  Piloting_4 =		{120,{"Piloting_3"},{}},
	Learner =		{15,{"Piloting_1"},{}},
	Learner_Exp =	{30,{"Learner", },{}},
	Fearless = 		{70,{"Piloting_2"},{}},
	Lone_Wolf = 		{100,{"Piloting_3"},{}},
	Gunnery_1 =		{15,{},{}},
	Gunnery_2 =		{35,{"Gunnery_1"},{}},
	Gunnery_3 =		{50,{"Gunnery_2"},{}},
	snipeOut_1 = 	{100,{"Gunnery_3"},{}},
	Elite =			{250,{"Piloting_4", "snipeOut_1", "Missiles_3"},{}},
	Criticals_1 = 		{65,{"Gunnery_2"},{}},
	Criticals_2 = 		{100,{"Criticals_1"},{}},
	Missiles_Rockets = 	{15,{},{}},
	Missiles_2 = 		{50,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{100,{"Missiles_2"},{}},
	Systems_1 =		{15,{},{}},
	Systems_2 =		{35,{"Systems_1"},{}},
	Systems_3 =		{50,{"Systems_2"},{}},
	Systems_4 =		{75,{"Systems_3"},{}},
	hack_ship_1 =	{30,{"Systems_1"},{}},
	hack_ship_2 =	{50,{"hack_ship_1"},{}},
	hack_ship_3 =	{100,{"hack_ship_2"},{}},
	Engine_Op =		{30,{"Systems_1"},{}},
	Engine_Exp =	{75,{"Engine_Op"},{}},
	Tech_Adaptation = 	{100,{"Systems_3"},{}},
	Tech_Adaptation_Alien =	{150,{"Tech_Adaptation"},{}}
	};

function GetPropertyCost_Joker(property)
	return GetPropertyCost(properties_Joker[property]);
end;

function CanAddProperty_Joker(pilot, property)
	return CanAddProperty(pilot, properties_Joker[property]);
end;


properties_Ace = {
  Pilot_1 =		{8,{},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{128,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
  Piloting_1 =		{2,{},{}},
  Piloting_2 =		{25,{"Piloting_1"},{}},
  R_Wingman = 	{25,{"Piloting_1"},{}},
  Instructor = 		{50,{"Piloting_2"},{}},
	Instructor_Exp =	{100,{"Instructor", "Tactics"},{}},
	Tactics =		{50,{"Piloting_2", "Gunnery_2"},{}},
	Tactics_Exp =	{100,{"Tactics"},{}},
	Elite =			{250,{"Tactics_Exp", "Gunnery_5"},{}},
	Gunnery_1 =		{1,{},{}},
	Gunnery_2 =		{5,{"Gunnery_1"},{}},
	Gunnery_3 =		{30,{"Gunnery_2"},{}},
	Gunnery_4 =		{75,{"Gunnery_3"},{}},
	Gunnery_5 =		{120,{"Gunnery_4"},{}},
	F_Weapon_Laser =		{35,{"Gunnery_1"},{}},
	finesse_1 = 		{40,{"Gunnery_2"},{}},
	finesse_2 = 		{75,{"finesse_1"},{}},
	finesse_3 = 		{150,{"finesse_2"},{}},
	Criticals_1 = 		{50,{"Gunnery_2"},{}},
	Criticals_2 = 		{100,{"Criticals_1"},{}},
	Criticals_3 = 		{200,{"Criticals_2"},{}},
	snipeOut_1 = 	{5,{"Gunnery_1"},{}},
	snipeOut_2 = 	{30,{"snipeOut_1"},{}},
	snipeOut_3 = 	{60,{"snipeOut_2"},{}},
	snipeOut_4 = 	{150,{"snipeOut_3"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{75,{"Missiles_Rockets"},{}},
	Rockets_1 = 		{60,{"Missiles_Rockets"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{75,{"Systems_1"},{}},
	Countermeasures =	{35,{"Systems_1"},{}},
	Gun_Range = 	{100,{"Systems_2"},{}},
	Gun_Dispersion = 	{120,{"Gun_Range"},{}},
	Black_Market =	{75,{},{}}
	};

function GetPropertyCost_Ace(property)
	return GetPropertyCost(properties_Ace[property]);
end;

function CanAddProperty_Ace(pilot, property)
	return CanAddProperty(pilot, properties_Ace[property]);
end;


properties_Astra = {
  Pilot_1 =		{8,{},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{128,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
  Piloting_1 =		{2,{},{}},
  Piloting_2 =		{25,{"Piloting_1"},{}},
  R_Wingman = 	{25,{"Piloting_1"},{}},
  Learner =		{35,{"R_Wingman"},{}},
	Learner_Exp =	{75,{"Learner", },{}},
	Tactics =		{100,{"Learner_Exp"},{}},
	Elite =			{250,{"Tactics", "Gunnery_2", "lucky_3"},{}},
	Gunnery_1 =		{5,{},{}},
	Gunnery_2 =		{40,{"Gunnery_1"},{}},
	F_Weapon_AC = 	{75,{"Gunnery_2"},{}},
	lucky_1 =		{5,{},{}},
	lucky_2 =		{35,{"lucky_1"},{}},
	lucky_3 =		{75,{"lucky_2"},{}},
	lucky_4 =		{180,{"lucky_3"},{}},
	Fearless = 		{50,{"lucky_2"},{}},
	Missiles_Rockets =	{5,{},{}},
	Missiles_2 =		{40,{"Missiles_Rockets"},{}},
	Systems_1 =		{1,{},{}},
	Systems_2 =		{40,{"Systems_1"},{}},
	Systems_3 =		{80,{"Systems_2"},{}},
	Systems_4 =		{180,{"Systems_3"},{}},
	Countermeasures =	{20,{"Systems_1"},{}},
	Countermeasures_Exp = {40,{"Countermeasures"},{}},
	Shields_Op =		{25,{"Countermeasures"},{}},
	Shields_Exp =	{50,{"Shields_Op"},{}},
	Repairman =		{20,{"Systems_1"},{}},
	Repairman_Exp =	{40,{"Repairman"},{}},
	Engine_Op =		{25,{"Repairman"},{}},
	Engine_Exp =	{50,{"Engine_Op"},{}},
	Tech_Adaptation =	{50,{"Systems_2", "Repairman_Exp"},{}},
	jinxed_1 = 		{100,{"Systems_2", "lucky_3"},{}},
	jinxed_2 = 		{180,{"jinxed_1"},{}}
	};
	
function GetPropertyCost_Astra(property)
	return GetPropertyCost(properties_Astra[property]);
end;

function CanAddProperty_Astra(pilot, property)
	return CanAddProperty(pilot, properties_Astra[property]);
end;
	

properties_El = {
  Pilot_1 =		{8,{},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{128,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Piloting_1 =		{2,{},{}},
	Piloting_2 =		{16,{"Piloting_1"},{}},
	Piloting_3 =		{32,{"Piloting_2"},{}},
	Gunnery_1 =		{2,{},{}},
	Gunnery_2 =		{16,{"Gunnery_1"},{}},
	Gunnery_3 =		{32,{"Gunnery_2"},{}},
	Missiles_Rockets =	{2,{},{}},
	Missiles_2 =		{16,{"Missiles_Rockets"},{}},
	Missiles_3 =		{32,{"Missiles_2"},{}},
	Elite =			{256,{"Missiles_3", "Gunnery_3", "Piloting_3"},{}},
	hack_berserk_1 =	{2,{},{}},
	summon_berserk_1 =	{16,{"hack_ship_1", "hack_berserk_1"},{}},
	summon_berserk_2 =	{32,{"summon_berserk_1"},{}},
	summon_berserk_3 =	{64,{"summon_berserk_2"},{}},
	summon_berserk_4 =	{128,{"summon_berserk_3"},{}},
	hack_ship_1 =	{4,{},{}},
	hack_ship_2 =	{32,{"hack_ship_1"},{}},
	hack_ship_3 =	{128,{"hack_ship_2"},{}},
	Systems_1 =		{2,{},{}},
	Systems_2 =		{32,{"Systems_1"},{}},
	Systems_3 =		{64,{"Systems_2"},{}},
	Systems_4 =		{128,{"Systems_3"},{}},
	Countermeasures =	{8,{"Systems_1"},{}},
	Countermeasures_Exp = {32,{"Countermeasures"},{}},
	Repairman =		{8,{"Systems_1"},{}},
	Repairman_Exp =	{32,{"Repairman"},{}},
	Shields_Op =		{16,{"Countermeasures"},{}},
	Shields_Exp =	{64,{"Shields_Op"},{}},
	Engine_Op =		{16,{"Repairman"},{}},
	Engine_Exp =	{64,{"Engine_Op"},{}},
	Fearless = 		{4,{},{}},
	AI =			{0,{},{}}
	};

function GetPropertyCost_El(property)
	return GetPropertyCost(properties_El[property]);
end;

function CanAddProperty_El(pilot, property)
	return CanAddProperty(pilot, properties_El[property]);
end;

---------------------------------
-- Функции развития ГГ-пилота. --
---------------------------------
properties_Hero_pil = {
	Piloting_1 =		{2,{},{}},
	Piloting_2 =		{20,{"Piloting_1"},{}},
	Piloting_3 =		{50,{"Piloting_2"},{}},
	Piloting_4 =		{75,{"Piloting_3"},{}},
	Piloting_5 =		{150,{"Piloting_4"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Tactics =		{50,{"Piloting_2"},{}},
	Tactics_Exp =	{150,{"Tactics"},{}},
	Elite =			{250,{"Piloting_5", "Tactics_Exp", "Criticals_1"},{}},
	Hard_to_Kill =	{200,{"Piloting_3"},{}},
	snake_attack_1 =	{30,{"Piloting_2"},{}},
	snake_attack_2 =	{75,{"snake_attack_1"},{}},
	snake_attack_3 =	{200,{"snake_attack_2"},{}},
	Learner =		{10,{},{}},
	Learner_Exp =	{50,{"Learner"},{}},
	lucky_1 =		{10,{},{}},
	Black_Market =	{75,{"lucky_1"},{}},
	F_of_Merchant =	{50,{"lucky_1"},{}},
	lucky_2 =		{200,{"lucky_1"},{}},
	Gunnery_1 =		{5,{},{}},
	Gunnery_2 =		{50,{"Gunnery_1"},{}},
	Gunnery_3 =		{150,{"Gunnery_2"},{}},
	Criticals_1 =		{200,{"Gunnery_3"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets =	{5,{},{}},
	Missiles_2 =		{75,{"Missiles_Rockets"},{}},
	Missiles_3 =		{200,{"Missiles_2"},{}},
	Rockets_1 =		{50,{"Missiles_Rockets"},{}},
	Systems_1 =		{5,{},{}},
	Systems_2 =		{200,{"Systems_1"},{}},
	Countermeasures =	{35,{"Systems_1"},{}},
	Repairman =		{35,{"Systems_1"},{}},
	Shields_Op =		{75,{"Systems_1"},{}},
	Engine_Op =		{75,{"Systems_1"},{}}
	};

function GetPropertyCost_Hero_pil(property)
	return GetPropertyCost(properties_Hero_pil[property]);
end;

function CanAddProperty_Hero_pil(pilot, property)
	return CanAddProperty(pilot, properties_Hero_pil[property]);
end;

----------------------------------
-- Функции развития ГГ-стрелка. --
----------------------------------
properties_Hero_gun = {
	Piloting_1 =		{5,{},{}},
	Piloting_2 =		{25,{"Piloting_1"},{}},
	Piloting_3 =		{50,{"Piloting_2"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Hard_to_Kill =	{150,{"Piloting_3"},{}},
	Tactics =		{100,{"Piloting_3"},{}},
	Tactics_Exp =	{250,{"Tactics"},{}},
	Learner =		{10,{},{}},
	Learner_Exp =	{50,{"Learner"},{}},
	lucky_1 =		{10,{},{}},
	F_of_Merchant =	{50,{"lucky_1"},{}},
	Black_Market =	{75,{"lucky_1"},{}},
	lucky_2 =		{200,{"lucky_1"},{}},
	Elite =			{250,{"Gunnery_5", "Tactics_Exp"},{}},
	Gunnery_1 =		{2,{},{}},
	Gunnery_2 =		{10,{"Gunnery_1"},{}},
	Gunnery_3 =		{35,{"Gunnery_2"},{}},
	Gunnery_4 =		{75,{"Gunnery_3"},{}},
	Gunnery_5 =		{200,{"Gunnery_4"},{}},
	F_Weapon_HC = 	{30,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{30,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{30,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Criticals_1 =		{35,{"Gunnery_2"},{}},
	Criticals_2 =		{75,{"Criticals_1"},{}},
	Criticals_3 =		{200,{"Criticals_2"},{}},
	burst_1 =		{25,{"Gunnery_2"},{}},
	burst_2 =		{75,{"burst_1"},{}},
	burst_3 =		{200,{"burst_2"},{}},
	snipeOut_1 = 		{35,{"Gunnery_2"},{}},
	snipeOut_2 = 		{100,{"snipeOut_1"},{}},
	snipeOut_3 = 		{200,{"snipeOut_2"},{}},
	Missiles_Rockets =	{5,{},{}},
	Missiles_2 =		{75,{"Missiles_Rockets"},{}},
	Systems_1 =		{5,{},{}},
	Systems_2 =		{200,{"Systems_1"},{}},
	Countermeasures =	{35,{"Systems_1"},{}},
	Repairman =		{35,{"Systems_1"},{}},
	Shields_Op =		{75,{"Systems_1"},{}},
	Engine_Op =		{75,{"Systems_1"},{}},
	Master_Mind = {0,{},{}}
	};

function GetPropertyCost_Hero_gun(property)
	return GetPropertyCost(properties_Hero_gun[property]);
end;

function CanAddProperty_Hero_gun(pilot, property)
	return CanAddProperty(pilot, properties_Hero_gun[property]);
end;

------------------------------------
-- Функции развития ГГ-ракетчика. --
------------------------------------
properties_Hero_mis = {
	Piloting_1 =		{5,{},{}},
	Piloting_2 =		{25,{"Piloting_1"},{}},
	Piloting_3 =		{50,{"Piloting_2"},{}},
	Tactics =		{100,{"Piloting_3"},{}},
	Tactics_Exp =	{200,{"Tactics"},{}},
	Hard_to_Kill =	{150,{"Piloting_3"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Elite =			{250,{"Missiles_5", "Tactics_Exp"},{}},
	Learner =		{10,{},{}},
	Learner_Exp =	{50,{"Learner"},{}},
	lucky_1 =		{10,{},{}},
	F_of_Merchant =	{50,{"lucky_1"},{}},
	Black_Market =	{75,{"lucky_1"},{}},
	lucky_2 =		{200,{"lucky_1"},{}},
	Gunnery_1 =		{5,{},{}},
	Gunnery_2 =		{50,{"Gunnery_1"},{}},
	Gunnery_3 =		{150,{"Gunnery_2"},{}},
	Criticals_1 =		{200,{"Gunnery_3"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets =	{2,{},{}},
	Missiles_2 =		{10,{"Missiles_Rockets"},{}},
	Missiles_3 =		{25,{"Missiles_2"},{}},
	Missiles_4 =		{75,{"Missiles_3"},{}},
	Missiles_5 =		{200,{"Missiles_4"},{}},
	Rockets_1 =		{25,{"Missiles_Rockets"},{}},
	Rockets_2 =		{75,{"Rockets_1"},{}},
	missile_salvo_1 =	{25,{"Missiles_2"},{}},
	missile_salvo_2 =	{75,{"missile_salvo_1"},{}},
	missile_salvo_3 =	{200,{"missile_salvo_2"},{}},
	weak_spot_1 = 	{25,{"Missiles_2"},{}},
	weak_spot_2 = 	{60,{"weak_spot_1"},{}},
	weak_spot_3 = 	{125,{"weak_spot_2"},{}},
	Systems_1 =		{5,{},{}},
	Systems_2 =		{200,{"Systems_1"},{}},
	Countermeasures =	{35,{"Systems_1"},{}},
	Repairman =		{35,{"Systems_1"},{}},
	Shields_Op =		{75,{"Systems_1"},{}},
	Engine_Op =		{75,{"Systems_1"},{}}
	};

function GetPropertyCost_Hero_mis(property)
	return GetPropertyCost(properties_Hero_mis[property]);
end;

function CanAddProperty_Hero_mis(pilot, property)
	return CanAddProperty(pilot, properties_Hero_mis[property]);
end;

-------------------------------------
-- Функции развития ГГ-системщика. --
-------------------------------------
properties_Hero_sys = {
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{35,{"Piloting_1"},{}},
	Piloting_3 = 		{75,{"Piloting_2"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Tactics = 		{100,{"Piloting_3"},{}},
	Tactics_Exp =	{200,{"Tactics"},{}},
	Hard_to_Kill =	{200,{"Piloting_3"},{}},
	Elite = 			{250,{"Tactics_Exp", "Systems_3"},{}},
	Learner = 		{10,{},{}},
	Learner_Exp =	{50,{"Learner"},{}},
	lucky_1 =		{10,{},{}},
	F_of_Merchant =	{50,{"lucky_1"},{}},
	Black_Market =	{75,{"lucky_1"},{}},
	lucky_2 =		{200,{"lucky_1"},{}},
	Gunnery_1 =		{5,{},{}},
	Gunnery_2 =		{50,{"Gunnery_1"},{}},
	Gunnery_3 =		{150,{"Gunnery_2"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Criticals_1 =		{200,{"Gunnery_3"},{}},
	Missiles_Rockets =	{5,{},{}},
	Missiles_2 =		{75,{"Missiles_Rockets"},{}},
	Missiles_3 =		{200,{"Missiles_2"},{}},
	Rockets_1 =		{50,{"Missiles_Rockets"},{}},
	hack_ship_1 =	{15,{},{}},
	hack_ship_2 =	{50,{"hack_ship_1"},{}},
	hack_ship_3 =	{150,{"hack_ship_2"},{}},
	Systems_1 =		{2,{},{}},
	Systems_2 =		{25,{"Systems_1"},{}},
	Systems_3 =		{100,{"Systems_2"},{}},
	Systems_4 =		{200,{"Systems_3"},{}},
	Countermeasures =	{10,{"Systems_1"},{}},
	Countermeasures_Exp = {75,{"Countermeasures"},{}},
	Repairman =		{10,{"Systems_1"},{}},
	Repairman_Exp =	{75,{"Repairman"},{}},
	Shields_Op =		{25,{"Systems_2"},{}},
	Shields_Exp =	{75,{"Shields_Op"},{}},
	Engine_Op =		{25,{"Systems_2"},{}},
	Engine_Exp =	{75,{"Engine_Op"},{}}
	};

function GetPropertyCost_Hero_sys(property)
	return GetPropertyCost(properties_Hero_sys[property]);
end;

function CanAddProperty_Hero_sys(pilot, property)
	return CanAddProperty(pilot, properties_Hero_sys[property]);
end;

----------------------------
-- Функции развития Ласточки --
----------------------------
properties_Lastochka = {
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{35,{"Piloting_1"},{}},
	Piloting_3 = 		{100,{"Piloting_2"},{}},
	R_Wingman = 	{50,{"Piloting_1"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{20,{"Gunnery_1"},{}},
	Gunnery_3 =		{50,{"Gunnery_2"},{}},
	Gunnery_4 = 		{75,{"Gunnery_3"},{}},
	Gunnery_5 = 		{200,{"Gunnery_4"},{}},
	Elite = 			{250,{"Piloting_3", "Gunnery_5"},{}},
	F_Weapon_HC = 	{35,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{35,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{35,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	finesse_1 = 		{40,{"Gunnery_2"},{}},
	finesse_2 = 		{75,{"finesse_1"},{}},
	finesse_3 = 		{200,{"finesse_2"},{}},
	Criticals_1 = 		{40,{"Gunnery_2"},{}},
	Criticals_2 = 		{75,{"Criticals_1"},{}},
	Criticals_3 = 		{150,{"Criticals_2"},{}},
	snipeOut_1 = 	{30,{"Gunnery_1"},{}},
	snipeOut_2 = 	{50,{"snipeOut_1"},{}},
	snipeOut_3 = 	{100,{"snipeOut_2"},{}},
	snipeOut_4 = 	{200,{"snipeOut_3"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{100,{"Missiles_Rockets"},{}},
	Rockets_1 = 		{50,{"Missiles_Rockets"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{45,{"Systems_1"},{}},
	Countermeasures = {35,{"Systems_1"},{}},
	Gun_Range = 	{75,{"Systems_2"},{}},
	Gun_Dispersion = 	{200,{"Gun_Range"},{}},
	Tech_Adaptation =	{50,{"Systems_2"},{}},
	Tech_Adaptation_Prec =	{75,{"Tech_Adaptation"},{}},
	summon_prec_1 = 	{25,{},{}},
	summon_prec_2 = 	{50,{"summon_prec_1"},{}},
	summon_prec_3 = 	{150,{"summon_prec_2"},{}}
	};

function GetPropertyCost_Lastochka(property)
	return GetPropertyCost(properties_Lastochka[property]);
end;

function CanAddProperty_Lastochka(pilot, property)
	return CanAddProperty(pilot, properties_Lastochka[property]);
end;

function GetPropertyCost_Lastochka2(property)
	return GetPropertyCost(properties_Lastochka[property]);
end;

function CanAddProperty_Lastochka2(pilot, property)
	return CanAddProperty(pilot, properties_Lastochka[property]);
end;

-------------------------------
-- Функции развития Sedoy --
-------------------------------
properties_Sedoy = {
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},
	Piloting_4 = 		{100,{"Piloting_3"},{}},
	Tactics = 		{75,{"Piloting_3"},{}},
	Tactics_Exp = 	{150,{"Tactics"},{}},
	Hard_to_Kill =	{150,{"Piloting_4"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Lone_Wolf = 		{75,{"Piloting_2"},{}},
	Instructor = 		{30,{},{}},
	Instructor_Exp =	{100,{"Instructor"},{}},
	Elite = 			{250,{"Tactics_Exp", "cdg_2", "Gunnery_5"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{50,{"Missiles_Rockets"},{}},
	Rockets_1 = 		{50,{"Missiles_Rockets"},{}},
	F_Weapon_HC = 	{30,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{30,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{30,{"Gunnery_2"},{"F_Weapon_HC","F_Weapon_AC"}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{20,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	Gunnery_4 = 		{75,{"Gunnery_3"},{}},
	Gunnery_5 = 		{200,{"Gunnery_4"},{}},
	Criticals_1 = 		{75,{"Gunnery_3"},{}},
	cdg_1 = 		{50,{"Gunnery_2"},{}},
	cdg_2 = 		{150,{"cdg_1", "Criticals_1"},{}},
	burst_1 = 		{25,{"Gunnery_1", "Systems_1"},{}},
	burst_2 = 		{50,{"burst_1"},{}},
	burst_3 = 		{150,{"burst_2"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{75,{"Systems_1"},{}},
	Systems_3 = 		{150,{"Systems_2"},{}},
	Countermeasures = {25,{"Systems_1"},{}},
	Shields_Op = 	{75,{"Systems_2"},{}},
	Engine_Op = 	{75,{"Systems_2"},{}}
	};

function GetPropertyCost_Sedoy(property)
	return GetPropertyCost(properties_Sedoy[property]);
end;

function CanAddProperty_Sedoy(pilot, property)
	return CanAddProperty(pilot, properties_Sedoy[property]);
end;

-----------------------------
-- Функции развития Viper ---- истребитель
-----------------------------
properties_Viper = {
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Gunnery_1 =		{5,{},{}},
	Gunnery_2 = 		{10,{"Gunnery_1"},{}},
	Gunnery_3 = 		{25,{"Gunnery_2"},{}},
	Gunnery_4 = 		{50,{"Gunnery_3"},{}},
	F_Weapon_HC = 	{25,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{25,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{25,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Criticals_1 = 		{100,{"Gunnery_3"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{35,{"Missiles_Rockets"},{}},
	summon_navy_1 = 	{25,{"Tactics"},{}},
	summon_navy_2 = 	{50,{"summon_navy_1"},{}},
	summon_navy_3 = 	{150,{"summon_navy_2"},{}},
	R_Wingman = 	{5,{},{}},
	Tactics = 		{20,{"Piloting_1", "R_Wingman"},{}},
	Tactics_Exp = 	{100,{"Tactics"},{}},
	Instructor = 		{25,{"Tactics"},{}},
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{15,{"Piloting_1"},{}},
	Piloting_3 = 		{35,{"Piloting_2"},{}},
	Piloting_4 = 		{75,{"Piloting_3"},{}},
	Piloting_5 = 		{200,{"Piloting_4"},{}},
	Elite = 			{250,{"Piloting_5", "Tactics_Exp"},{}},
	snake_attack_1 = 	{50,{"Piloting_3", "boost_1"},{}},
	snake_attack_2 = 	{200,{"snake_attack_1"},{}},
	boost_1 = 		{25,{"Piloting_2", "Engine_Op"},{}},
	boost_2 = 		{150,{"boost_1", "Engine_Exp"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{75,{"Systems_1"},{}},
	Systems_3 = 		{150,{"Systems_2"},{}},
	Engine_Op = 		{25,{"Systems_1"},{}},
	Engine_Exp = 	{75,{"Engine_Op"},{}},
	Countermeasures = 	{25,{"Systems_1"},{}},
	Countermeasures_Exp = {75,{"Countermeasures"},{}}
	};

function GetPropertyCost_Viper(property)
	return GetPropertyCost(properties_Viper[property]);
end;

function CanAddProperty_Viper(pilot, property)
	return CanAddProperty(pilot, properties_Viper[property]);
end;

-------------------------------
-- Функции развития Клерика. --
-------------------------------
properties_Cleric = {
	Piloting_1 =		{5,{},{}},
	Piloting_2 =		{25,{"Piloting_1"},{}},
	Piloting_3 =		{100,{"Piloting_2"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Lone_Wolf = 		{25,{"Piloting_1"},{}},
	Learner = 		{50,{"Lone_Wolf"},{}},
	Learner_Exp = 	{100,{"Learner"},{}},
	Gunnery_1 =		{5,{},{}},
	Gunnery_2 =		{25,{"Gunnery_1"},{}},
	Gunnery_3 =		{75,{"Gunnery_2"},{}},
	F_Weapon_HC = 	{100,{"Gunnery_3"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{100,{"Gunnery_3"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{100,{"Gunnery_3"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets =	{5,{},{}},
	Missiles_2 =		{50,{"Missiles_Rockets"},{}},
	Missiles_3 =		{100,{"Missiles_2","Countermeasures_Exp"},{}},
	Elite =			{250,{"Piloting_3", "Gunnery_3", "hack_ship_3"},{}},
	Systems_1 =		{5,{},{}},
	Systems_2 =		{30,{"Systems_1"},{}},
	Systems_3 =		{75,{"Systems_2"},{}},
	Systems_4 =		{200,{"Systems_3"},{}},
	hack_ship_1 =	{20,{"Systems_1"},{}},
	hack_ship_2 =	{40,{"hack_ship_1"},{}},
	hack_ship_3 =	{75,{"hack_ship_2"},{}},
	Countermeasures =	{40,{"hack_ship_1"},{}},
	Countermeasures_Exp =	{100,{"Countermeasures"},{}},
	Shields_Op =		{75,{"hack_ship_2","Systems_2"},{}},
	Shields_Exp =		{150,{"Shields_Op"},{}},
	jinxed_1 = 		{20,{"Systems_1"},{}},
	jinxed_2 = 		{75,{"jinxed_1"},{}},
	Engine_Op =		{40,{"jinxed_1"},{}},
	hack_berserk_1 =	{100,{"Systems_2","jinxed_2"},{}}
	};

function GetPropertyCost_Cleric(property)
	return GetPropertyCost(properties_Cleric[property]);
end;

function CanAddProperty_Cleric(pilot, property)
	return CanAddProperty(pilot, properties_Cleric[property]);
end;

---------------------------
-- Функции развития Яны. --
---------------------------
properties_Yana = {
	Piloting_1 = 		{10,{},{}},
	Piloting_2 = 		{35,{"Piloting_1"},{}},
	Piloting_3 = 		{75,{"Piloting_2"},{}},
	Hard_to_Kill = 	{200,{"Piloting_3"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Learner = 		{25,{"Piloting_1"},{}},
	Learner_Exp = 	{50,{"Learner"},{}},
	Gunnery_1 = 		{15,{},{}},
	Gunnery_2 = 		{40,{"Gunnery_1"},{}},
	Gunnery_3 = 		{150,{"Gunnery_2"},{}},
	burst_1 = 		{50,{"Gunnery_2"},{}},
	burst_2 = 		{100,{"burst_1"},{}},
	F_Weapon_HC = 	{75,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{75,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{75,{"Gunnery_2"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets =	{15,{},{}},
	Missiles_2 = 		{40,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{100,{"Missiles_2"},{}},
	Rockets_1 = 		{40,{"Missiles_Rockets"},{}},
	Elite = 		{250,{"Hard_to_Kill", "Gunnery_3", "Systems_4"},{}},
	Systems_1 = 		{15,{},{}},
	Systems_2 = 		{35,{"Systems_1"},{}},
	Systems_3 = 		{75,{"Systems_2"},{}},
	Systems_4 = 		{150,{"Systems_3"},{}},
	Repairman = 		{30,{"Systems_1"},{}},
	Repairman_Exp = 	{50,{"Repairman"},{}},
	Engine_Op = 		{50,{"Repairman"},{}},
	Engine_Exp = 	{75,{"Engine_Op"},{}},
	Countermeasures =	{30,{"Systems_1"},{}},
	Countermeasures_Exp = {50,{"Countermeasures"},{}},
	Shields_Op = 		{50,{"Countermeasures"},{}},
	Shields_Exp = 	{75,{"Shields_Op"},{}},
	Tech_Adaptation = 	{75,{"Systems_3"},{}},
	Tech_Adaptation_Alien =	{100,{"Tech_Adaptation"},{}}
	};

function GetPropertyCost_Yana(property)
	return GetPropertyCost(properties_Yana[property]);
end;

function CanAddProperty_Yana(pilot, property)
	return CanAddProperty(pilot, properties_Yana[property]);
end;
--------------------------------
-- Функции развития Валидола. --
--------------------------------
properties_Validol = {
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{75,{"Piloting_2"},{}},
	Tactics = 		{100,{"Piloting_3"},{}},
	R_Wingman = 	{150,{"Piloting_3"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Elite = 		{250,{"R_Wingman", "Gunnery_3", "Missiles_5"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{25,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	F_Weapon_HC = 	{75,{"Gunnery_3"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{75,{"Gunnery_3"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{75,{"Gunnery_3"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets =	{5,{},{}},
	Missiles_2 = 		{10,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{25,{"Missiles_2"},{}},
	Missiles_4 = 		{75,{"Missiles_3"},{}},
	Missiles_5 = 		{200,{"Missiles_4"},{}},
	Rockets_1 = 		{20,{"Missiles_Rockets"},{}},
	Rockets_2 = 		{40,{"Rockets_1"},{}},
	missile_salvo_1 = 	{25,{"Missiles_Rockets"},{}},
	missile_salvo_2 = 	{50,{"missile_salvo_1"},{}},
	missile_salvo_3 = 	{75,{"missile_salvo_2"},{}},
	missile_salvo_4 = 	{200,{"missile_salvo_3"},{}},
	weak_spot_1 = 	{50,{"missile_salvo_1"},{}},
	weak_spot_2 = 	{75,{"weak_spot_1"},{}},
	weak_spot_3 = 	{200,{"weak_spot_2", "missile_salvo_4", "Countermeasures_Exp"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{35,{"Systems_1"},{}},
	Engine_Op =		{50,{"Systems_2"},{}},
	Engine_Exp =		{100,{"Engine_Op"},{}},
	Countermeasures =	{50,{"Systems_2"},{}},
	Countermeasures_Exp = {100,{"Countermeasures"},{}},
	Missile_Range = 	{150,{"Countermeasures"},{}}
	};

function GetPropertyCost_Validol(property)
	return GetPropertyCost(properties_Validol[property]);
end;

function CanAddProperty_Validol(pilot, property)
	return CanAddProperty(pilot, properties_Validol[property]);
end;

--------------------------------
-- Функции развития Alex. --
--------------------------------
properties_Alex = {
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{75,{"Piloting_2"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Learner = 		{25,{"Piloting_1"},{}},
	R_Wingman = 	{75,{"Learner","Piloting_2"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{45,{"Gunnery_1"},{}},
	Gunnery_3 = 		{150,{"Gunnery_2"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_2"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{25,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{50,{"Missiles_2"},{}},
	Missiles_4 = 		{75,{"Missiles_3"},{}},
	Missiles_5 = 		{200,{"Missiles_4"},{}},
	Elite = 			{250,{"Piloting_3", "Gunnery_3","Missiles_5"},{}},
	Rockets_1 = 		{25,{"Missiles_Rockets"},{}},
	missile_salvo_1 = 	{25,{"Missiles_Rockets"},{}},
	missile_salvo_2 = 	{35,{"missile_salvo_1"},{}},
	missile_salvo_3 = 	{75,{"missile_salvo_2"},{}},
	missile_salvo_4 = 	{200,{"missile_salvo_3"},{}},
	weak_spot_1 = 	{50,{"missile_salvo_1"},{}},
	weak_spot_2 = 	{75,{"weak_spot_1"},{}},
	weak_spot_3 = 	{200,{"weak_spot_2", "missile_salvo_4"},{}},
	polarization_1 = 	{20,{"Systems_1"},{}},
	polarization_2 = 	{35,{"polarization_1"},{}},
	polarization_3 = 	{50,{"polarization_2"},{}},
	depolarization_1 = 	{50,{"polarization_2"},{}},
	depolarization_2 = 	{100,{"depolarization_1"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{50,{"Systems_1"},{}},
	Systems_3 =		{100,{"Systems_2"},{}},
	Countermeasures = 	{30,{"Systems_1"},{}},
	Repairman = 		{30,{"Systems_1"},{}},
	Shields_Op = 		{50,{"Systems_2"},{}},
	Engine_Op = 		{50,{"Systems_2"},{}},
	Black_Market =	{5,{},{}},
	};

function GetPropertyCost_Alex(property)
	return GetPropertyCost(properties_Alex[property]);
end;

function CanAddProperty_Alex(pilot, property)
	return CanAddProperty(pilot, properties_Alex[property]);
end;

-------------------------------
-- Функции развития Che ---- истребитель
-------------------------------
properties_Che = {
	Piloting_1 = 		{2,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},
	Piloting_4 = 		{100,{"Piloting_3"},{}},
	Hard_to_Kill = 	{200,{"Piloting_4"},{}},
	Lone_Wolf = 		{75,{"Piloting_2"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{35,{"Missiles_Rockets"},{}},
	Rockets_1 = 		{35,{"Missiles_Rockets"},{}},
	Gunnery_1 = 		{1,{},{}},
	Gunnery_2 = 		{5,{"Gunnery_1"},{}},
	Gunnery_3 = 		{25,{"Gunnery_2"},{}},
	Criticals_1 = 		{75,{"Gunnery_3"},{}},
	cdg_1 = 		{75,{"Gunnery_2"},{}},
	cdg_2 = 		{200,{"cdg_1", "Criticals_1"},{}},
	F_Weapon_HC = 	{30,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{30,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{30,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Elite = 			{250,{"Hard_to_Kill", "cdg_2","snake_attack_2"},{}},
	burst_1 = 		{30,{"Gunnery_1"},{}},
	burst_2 = 		{75,{"burst_1"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{50,{"Systems_1"},{}},
	Systems_3 = 		{200,{"Systems_2"},{}},
	Countermeasures = 	{25,{"Systems_1"},{}},
	Countermeasures_Exp = {100,{"Countermeasures"},{}},
	Shields_Op =		{75,{"Systems_2"},{}},
	Shields_Exp =		{150,{"Shields_Op"},{}},
	Engine_Op = 		{25,{"Systems_1"},{}},
	snake_attack_1 = 	{50,{"Engine_Op"},{}},
	snake_attack_2 = 	{150,{"snake_attack_1"},{}},
	boost_1 = 		{50,{"Engine_Op"},{}},
	boost_2 = 		{150,{"boost_1"},{}}
	};

function GetPropertyCost_Che(property)
	return GetPropertyCost(properties_Che[property]);
end;

function CanAddProperty_Che(pilot, property)
	return CanAddProperty(pilot, properties_Che[property]);
end;

-------------------------------
-- Функции развития Alisa ---- Ракетчик
-------------------------------
properties_Alisa = {
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},	
	Lone_Wolf = 		{150,{"Piloting_3"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{50,{"Gunnery_1"},{}},
	Criticals_1 = 		{150,{"Gunnery_2"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_2"},{"F_Weapon_HC","F_Weapon_AC"}},
	Learner = 		{25,{"Piloting_1","Gunnery_1"},{}},
	Learner_Exp = 	{50,{"Learner"},{}},
	Elite = 			{250,{"Lone_Wolf", "Missiles_4"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{35,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{75,{"Missiles_2"},{}},
	Missiles_4 = 		{200,{"Missiles_3"},{}},
	Rockets_1 = 		{35,{"Missiles_Rockets"},{}},
	Rockets_2 = 		{70,{"Rockets_1"},{}},
	weak_spot_1 = 	{50,{"Missiles_2"},{}},
	weak_spot_2 = 	{100,{"weak_spot_1"},{}},
	weak_spot_3 = 	{200,{"weak_spot_2","Missile_Range","missile_salvo_3"},{}},
	missile_salvo_1 = 	{50,{"Missiles_2"},{}},
	missile_salvo_2 = 	{75,{"missile_salvo_1"},{}},
	missile_salvo_3 = 	{200,{"missile_salvo_2"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{25,{"Systems_1"},{}},
	Countermeasures = {50,{"Systems_2"},{}},
	Missile_Range = {100,{"Countermeasures"},{}},
	Shields_Op =		{30,{"Systems_1"},{}},
	Shields_Exp =		{100,{"Shields_Op"},{}}
	};

function GetPropertyCost_Alisa(property)
	return GetPropertyCost(properties_Alisa[property]);
end;

function CanAddProperty_Alisa(pilot, property)
	return CanAddProperty(pilot, properties_Alisa[property]);
end;

-------------------------------
-- Функции развития Josef ---- техник-стрелок
-------------------------------
properties_Josef = {
	Piloting_1 = 		{2,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},	
	Piloting_4 = 		{100,{"Piloting_3"},{}},	
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Learner = 		{10,{"Piloting_1"},{}},
	Learner_Exp = 	{25,{"Learner"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{25,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	Gunnery_4 = 		{150,{"Gunnery_3"},{}},
	Criticals_1 = 		{25,{"Gunnery_2"},{}},
	Criticals_2 = 		{50,{"Criticals_1"},{}},
	burst_1 = 		{25,{"Gunnery_2"},{}},
	burst_2 = 		{50,{"burst_1"},{}},
	Lone_Wolf = 		{75,{"Piloting_3"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{25,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{50,{"Missiles_2"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{25,{"Systems_1"},{}},
	Systems_3 = 		{75,{"Systems_2"},{}},
	Systems_4 = 		{150,{"Systems_3"},{}},
	Repairman = 		{35,{"Systems_1"},{}},
	Repairman_Exp = 	{100,{"Repairman"},{}},
	Tech_Adaptation = {25,{"Systems_3"},{}},
	Tech_Adaptation_Alien = {50,{"Tech_Adaptation"},{}},
	Tech_Adaptation_Prec = {75,{"Tech_Adaptation_Alien"},{}},		
	Elite = 			{250,{"Piloting_4", "Missiles_3","Gunnery_4"},{}}
	};

function GetPropertyCost_Josef(property)
	return GetPropertyCost(properties_Josef[property]);
end;

function CanAddProperty_Josef(pilot, property)
	return CanAddProperty(pilot, properties_Josef[property]);
end;

-------------------------------
-- Функции развития Aia ---- Снайпер
-------------------------------
properties_Aia = {
	Piloting_1 = 		{2,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},	
	Piloting_4 = 		{75,{"Piloting_3"},{}},	
	Piloting_5 = 		{150,{"Piloting_4"},{}},	
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},	
	Learner = 		{15,{},{}},
	Lone_Wolf = 		{30,{"Learner"},{}},
	Fearless = 		{100,{"Lone_Wolf","Piloting_3"},{}},
	Hard_to_Kill = 	{200,{"Fearless"},{}},
	Gunnery_1 = 		{1,{},{}},		
	Gunnery_2 = 		{35,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	Gunnery_4 = 		{75,{"Gunnery_3"},{}},
	Gunnery_5 = 		{200,{"Gunnery_4"},{}},
	Criticals_1 = 		{35,{"Gunnery_2"},{}},
	Criticals_2 = 		{75,{"Criticals_1"},{}},
	snipeOut_1 = 		{75,{"Gunnery_3"},{}},
	snipeOut_2 = 		{150,{"snipeOut_1"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{25,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{75,{"Missiles_2"},{}},
	Systems_1 = 		{2,{},{}},
	Systems_2 = 		{50,{"Systems_1"},{}},	
	Countermeasures = 	{40,{"Systems_1"},{}},	
	Repairman = 		{40,{"Systems_1"},{}},
	Shields_Op = 		{40,{"Systems_1"},{}},	
	Engine_Op = 		{40,{"Systems_1"},{}},
	Elite = 			{250,{"Piloting_5", "Gunnery_5"},{}}
	};

function GetPropertyCost_Aia(property)
	return GetPropertyCost(properties_Aia[property]);
end;

function CanAddProperty_Aia(pilot, property)
	return CanAddProperty(pilot, properties_Aia[property]);
end;

-------------------------------
-- Функции развития Tramp ---- Промежуточный пилот
-------------------------------
properties_Tramp = {
	Piloting_1 = 		{2,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},	
	Piloting_4 = 		{75,{"Piloting_3"},{}},	
	Piloting_5 = 		{150,{"Piloting_4"},{}},	
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},	
	Tactics = 		{25,{"Piloting_2"},{}},
	Tactics_Exp = 	{100,{"Tactics"},{}},
	Learner = 		{50,{"Piloting_3","Tactics"},{}},
	snake_attack_1 = 	{25,{"Piloting_2"},{}},		
	snake_attack_2 = 	{50,{"snake_attack_1"},{}},
	snake_attack_3 = 	{100,{"snake_attack_2"},{}},
	summon_navy_1= {25,{"Tactics"},{}},
	summon_navy_2= {50,{"summon_navy_1"},{}},
	summon_navy_3= {100,{"summon_navy_2"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{25,{"Missiles_Rockets"},{}},
	Rockets_1 = 		{35,{"Missiles_Rockets"},{}},
	Gunnery_1 = 		{5,{},{}},		
	Gunnery_2 = 		{25,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	F_Weapon_HC = 	{30,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{30,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{30,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	cdg_1 =  		{75,{"Gunnery_3"},{}},
	cdg_2 =  		{100,{"cdg_1"},{}},
	snipeOut_1 = 		{35,{"Gunnery_2"},{}},
	snipeOut_2 = 		{100,{"snipeOut_1"},{}},
	Criticals_1 = 		{35,{"Gunnery_2"},{}},
	Criticals_2 = 		{100,{"Criticals_1","cdg_1"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{50,{"Systems_1"},{}},	
	Gun_Dispersion = 	{150,{"snipeOut_2","Systems_2"},{}},
	Elite = 			{250,{"Piloting_5", "Tactics_Exp", "Learner"},{}}
	};

function GetPropertyCost_Tramp(property)
	return GetPropertyCost(properties_Tramp[property]);
end;

function CanAddProperty_Tramp(pilot, property)
	return CanAddProperty(pilot, properties_Tramp[property]);
end;

-------------------------------
-- Функции развития Alexandra ---- Промежностный пилот
-------------------------------
properties_Alexandra = {
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},	
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{10,{"Gunnery_1"},{}},
	Gunnery_3 = 		{35,{"Gunnery_2"},{}},
	Gunnery_4 = 		{75,{"Gunnery_3"},{}},
	F_Weapon_HC = 	{25,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{25,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{25,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Criticals_1 = 		{100,{"Gunnery_4"},{}},
	finesse_1 = 		{25,{"Gunnery_2", "F_Weapon_HC"},{}},
	finesse_2 = 		{50,{"finesse_1"},{}},
	finesse_3 = 		{100,{"finesse_2"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{35,{"Missiles_Rockets"},{}},
	R_Wingman = 	{5,{},{}},
	Tactics = 		{25,{"Piloting_1", "R_Wingman"},{}},
	Tactics_Exp = 	{150,{"Tactics"},{}},
	Instructor = 		{50,{"R_Wingman"},{}},
	summon_kfni_1 = 	{25,{"Tactics"},{}},
	summon_kfni_2 = 	{50,{"summon_kfni_1"},{}},
	summon_kfni_3 = 	{100,{"summon_kfni_2"},{}},
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{10,{"Piloting_1"},{}},
	Piloting_3 = 		{25,{"Piloting_2"},{}},
	Piloting_4 = 		{50,{"Piloting_3"},{}},
	Piloting_5 = 		{150,{"Piloting_4"},{}},
	Elite = 			{250,{"Piloting_5", "Tactics_Exp"},{}},
	snake_attack_1 = 	{50,{"Piloting_3", "boost_1"},{}},
	snake_attack_2 = 	{150,{"snake_attack_1"},{}},
	boost_1 = 		{25,{"Piloting_2", "Engine_Op"},{}},
	boost_2 = 		{150,{"boost_1", "Engine_Exp"},{}},
	Systems_1 = 		{2,{},{}},
	Systems_2 = 		{75,{"Systems_1"},{}},
	Systems_3 = 		{150,{"Systems_2"},{}},
	Engine_Op = 		{25,{"Systems_1"},{}},
	Engine_Exp = 	{100,{"Engine_Op"},{}},
	Countermeasures = 	{25,{"Systems_1"},{}},
	Countermeasures_Exp = {100,{"Countermeasures"},{}}
	};

function GetPropertyCost_Alexandra(property)
	return GetPropertyCost(properties_Alexandra[property]);
end;

function CanAddProperty_Alexandra(pilot, property)
	return CanAddProperty(pilot, properties_Alexandra[property]);
end;

-------------------------------
-- Функции развития Kalem ---- Системщик
-------------------------------
properties_Kalem = {	
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{30,{"Piloting_1"},{}},
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},
	Learner = 		{15,{"Piloting_1"},{}},
	Learner_Exp = 	{50,{"Learner"},{}},	
	Hard_to_Kill = 	{150,{"Piloting_2","Learner_Exp"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{30,{"Gunnery_1"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_2"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_2"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{35,{"Missiles_Rockets"},{}},
	Systems_1 = 		{2,{},{}},
	Systems_2 = 		{20,{"Systems_1"},{}},
	Systems_3 = 		{50,{"Systems_2"},{}},
	Systems_4 = 		{100,{"Systems_3"},{}},
	Countermeasures = {20,{"Systems_1"},{}},
	Countermeasures_Exp = {50,{"Countermeasures"},{}},
	Shields_Op = 		{20,{"Systems_1"},{}},
	Shields_Exp = 	{75,{"Shields_Op","Systems_2"},{}},
	Engine_Op = 		{20,{"Systems_1"},{}},
	Engine_Exp = 	{75,{"Engine_Op","Systems_2"},{}},
	Repairman = 		{20,{"Systems_1"},{}},
	Repairman_Exp = 	{75,{"Repairman"},{}},
	polarization_1 =	{75,{"Systems_3","Shields_Exp"},{}},
	polarization_2 =	{100,{"polarization_1"},{}},
	polarization_3 =	{150,{"polarization_2"},{}},
	depolarization_1 =	{150,{"polarization_1"},{}},
	depolarization_2 =	{200,{"depolarization_1"},{}},
	Elite = 			{250,{"Hard_to_Kill", "Gunnery_2", "Systems_3"},{}}
	};

function GetPropertyCost_Kalem(property)
	return GetPropertyCost(properties_Kalem[property]);
end;

function CanAddProperty_Kalem(pilot, property)
	return CanAddProperty(pilot, properties_Kalem[property]);
end;

-------------------------------
-- Функции развития Uel ---- Системщик - интелекта
-------------------------------
properties_Uel = {
	Piloting_1 =		{4,{},{}},
	Piloting_2 =		{32,{"Piloting_1"},{}},
	Piloting_3 =		{64,{"Piloting_2"},{}},
	Pilot_1 =		{16,{"Piloting_1"},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{128,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Gunnery_1 =		{4,{},{}},
	Gunnery_2 =		{32,{"Gunnery_1"},{}},
	Gunnery_3 =		{128,{"Gunnery_2"},{}},
	Missiles_Rockets =	{4,{},{}},
	Missiles_2 =		{32,{"Missiles_Rockets"},{}},
	Missiles_3 =		{128,{"Missiles_2"},{}},
	Elite =			{256,{"Piloting_3", "Gunnery_3", "Missiles_3"},{}},
	hack_berserk_1 =	{16,{},{}},
	jinxed_1 =		{16,{},{}},
	jinxed_2 =		{64,{"jinxed_1"},{}},
	polarization_1 =	{64,{"Systems_2"},{}},
	polarization_2 =	{128,{"polarization_1"},{}},
	summon_berserk_1 =	{32,{"jinxed_1", "hack_berserk_1"},{}},
	summon_berserk_2 =	{64,{"summon_berserk_1"},{}},
	summon_berserk_3 =	{128,{"summon_berserk_2"},{}},
	summon_berserk_4 =	{256,{"summon_berserk_3"},{}},
	Systems_1 =		{4,{},{}},
	Systems_2 =		{32,{"Systems_1"},{}},
	Systems_3 =		{64,{"Systems_2"},{}},
	Systems_4 =		{128,{"Systems_3"},{}},
	Countermeasures =	{16,{"Systems_1"},{}},
	Countermeasures_Exp =	{64,{"Countermeasures"},{}},
	Shields_Op =		{32,{"Countermeasures"},{}},
	Shields_Exp =		{128,{"Shields_Op"},{}},
	Repairman =		{16,{"Systems_1"},{}},
	Repairman_Exp =	{64,{"Repairman"},{}},
	Engine_Op =		{32,{"Repairman"},{}},
	Engine_Exp =		{128,{"Engine_Op"},{}},
	Fearless =		{4,{},{}},
	AI =			{4,{},{}}
	};

function GetPropertyCost_Uel(property)
	return GetPropertyCost(properties_Uel[property]);
end;

function CanAddProperty_Uel(pilot, property)
	return CanAddProperty(pilot, properties_Uel[property]);
end;

-------------------------------
-- Функции развития Uel2 ---- стрелок
-------------------------------
properties_Uel2 = {
	Piloting_1 =		{4,{},{}},
	Piloting_2 =		{16,{"Piloting_1"},{}},
	Piloting_3 =		{32,{"Piloting_2"},{}},
	Piloting_4 =		{64,{"Piloting_3"},{}},
	Hard_to_Kill = 	{128,{"Piloting_4"},{}},
	Pilot_1 =		{16,{"Piloting_1"},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{64,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Missiles_Rockets =	{4,{},{}},
	Missiles_2 =		{16,{"Missiles_Rockets"},{}},
	Missiles_3 =		{64,{"Missiles_2"},{}},
	Gunnery_1 =		{4,{},{}},
	Gunnery_2 =		{16,{"Gunnery_1"},{}},
	Gunnery_3 =		{32,{"Gunnery_2"},{}},
	Gunnery_4 =		{64,{"Gunnery_3"},{}},
	Gunnery_5 =		{256,{"Gunnery_4"},{}},
	Elite =			{256,{"Hard_to_Kill", "Gunnery_5", "Missiles_3"},{}},
	F_Weapon_HC = 	{16,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{16,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{16,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	finesse_1 = 		{32,{"Gunnery_2"},{}},
	finesse_2 = 		{64,{"finesse_1"},{}},
	finesse_3 = 		{128,{"finesse_2"},{}},
	burst_1 = 		{32,{"Gunnery_2"},{}},
	burst_2 = 		{64,{"burst_1"},{}},
	burst_3 = 		{128,{"burst_2"},{}},
	burst_4 = 		{256,{"burst_3","finesse_3"},{}},
	Systems_1 =		{4,{},{}},
	Systems_2 =		{32,{"Systems_1"},{}},
	Systems_3 =		{64,{"Systems_2"},{}},
	Gun_Dispersion = 	{256,{"Systems_3"},{}},
	Countermeasures =	{16,{"Systems_1"},{}},
	Repairman =		{16,{"Systems_1"},{}},
	Shields_Op =		{32,{"Systems_2"},{}},
	Engine_Op =		{32,{"Systems_2"},{}},
	Fearless =		{4,{},{}},
	AI =			{4,{},{}}
	};

function GetPropertyCost_Uel2(property)
	return GetPropertyCost(properties_Uel2[property]);
end;

function CanAddProperty_Uel2(pilot, property)
	return CanAddProperty(pilot, properties_Uel2[property]);
end;

-------------------------------
-- Функции развития Uel3 ---- ракетчик
-------------------------------
properties_Uel3 = {
	Piloting_1 =		{4,{},{}},
	Piloting_2 =		{16,{"Piloting_1"},{}},
	Piloting_3 =		{32,{"Piloting_2"},{}},
	Hard_to_Kill = 	{128,{"Piloting_3"},{}},
	Pilot_1 =		{16,{"Piloting_1"},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{64,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Gunnery_1 =		{4,{},{}},
	Gunnery_2 =		{16,{"Gunnery_1"},{}},
	Gunnery_3 =		{64,{"Gunnery_2"},{}},
	Criticals_1 =		{64,{"Gunnery_3"},{}},
	Missiles_Rockets =	{4,{},{}},
	Missiles_2 =		{16,{"Missiles_Rockets"},{}},
	Missiles_3 =		{32,{"Missiles_2"},{}},
	Missiles_4 =		{128,{"Missiles_3"},{}},
	Rockets_1 = 		{16,{"Missiles_Rockets"},{}},
	Rockets_2 = 		{32,{"Rockets_1"},{}},
	missile_salvo_1 = 	{16,{"Missiles_Rockets"},{}},
	missile_salvo_2 = 	{32,{"missile_salvo_1"},{}},
	missile_salvo_3 = 	{64,{"missile_salvo_2"},{}},
	missile_salvo_4 = 	{256,{"missile_salvo_3"},{}},
	weak_spot_1 = 	{64,{"Missiles_3"},{}},
	weak_spot_2 = 	{128,{"weak_spot_1"},{}},
	weak_spot_3 = 	{256,{"weak_spot_2","missile_salvo_4"},{}},
	Elite =			{256,{"Hard_to_Kill", "Criticals_1", "Missiles_4"},{}},
	Systems_1 =		{4,{},{}},
	Systems_2 =		{32,{"Systems_1"},{}},
	Systems_3 =		{64,{"Systems_2"},{}},
	Missile_Range = 	{128,{"Systems_3"},{}},
	Countermeasures =	{16,{"Systems_1"},{}},
	Repairman =		{16,{"Systems_1"},{}},
	Shields_Op =		{32,{"Systems_2"},{}},
	Engine_Op =		{32,{"Systems_2"},{}},
	Fearless =		{4,{},{}},
	AI =			{4,{},{}}
	};

function GetPropertyCost_Uel3(property)
	return GetPropertyCost(properties_Uel3[property]);
end;

function CanAddProperty_Uel3(pilot, property)
	return CanAddProperty(pilot, properties_Uel3[property]);
end;

-------------------------------
-- Функции развития Uel4 ---- системщик
-------------------------------
properties_Uel4 = {
	Piloting_1 =		{4,{},{}},
	Piloting_2 =		{32,{"Piloting_1"},{}},
	Piloting_3 =		{64,{"Piloting_2"},{}},
	Pilot_1 =		{16,{"Piloting_1"},{}},
	Pilot_2 =		{32,{"Pilot_1"},{}},
	Pilot_3 =		{64,{"Pilot_2"},{}},
	Pilot_4 =		{256,{"Pilot_3"},{}},
	Gunnery_1 =		{4,{},{}},
	Gunnery_2 =		{32,{"Gunnery_1"},{}},
	Gunnery_3 =		{64,{"Gunnery_2"},{}},
	Missiles_Rockets =	{4,{},{}},
	Missiles_2 =		{32,{"Missiles_Rockets"},{}},
	Missiles_3 =		{64,{"Missiles_2"},{}},
	Elite =			{256,{"Piloting_3", "Gunnery_3", "Missiles_3"},{}},
	hack_ship_1 =	{32,{},{}},
	hack_ship_2 =	{64,{"hack_ship_1"},{}},
	hack_ship_3 =	{128,{"hack_ship_2"},{}},
	polarization_1 =	{16,{"Systems_1"},{}},
	polarization_2 =	{32,{"polarization_1"},{}},
	polarization_3 =	{64,{"polarization_2","Systems_2"},{}},
	polarization_4 =	{128,{"polarization_3","Systems_3"},{}},
	Systems_1 =		{4,{},{}},
	Systems_2 =		{32,{"Systems_1"},{}},
	Systems_3 =		{64,{"Systems_2"},{}},
	Systems_4 =		{128,{"Systems_3"},{}},
	Countermeasures =	{16,{"Systems_1"},{}},
	Countermeasures_Exp =	{64,{"Countermeasures"},{}},
	Shields_Op =		{32,{"Countermeasures"},{}},
	Shields_Exp =		{128,{"Shields_Op"},{}},
	Repairman =		{16,{"Systems_1"},{}},
	Repairman_Exp =	{64,{"Repairman"},{}},
	Engine_Op =		{32,{"Repairman"},{}},
	Engine_Exp =		{128,{"Engine_Op"},{}},
	Fearless =		{4,{},{}},
	AI =			{0,{},{}}
	};

function GetPropertyCost_Uel4(property)
	return GetPropertyCost(properties_Uel4[property]);
end;

function CanAddProperty_Uel4(pilot, property)
	return CanAddProperty(pilot, properties_Uel4[property]);
end;

-------------------------------
-- Функции развития Natali ---- стрелок
-------------------------------
properties_Natali = {
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},	
	Piloting_1 = 		{5,{},{}},
	Piloting_2 = 		{35,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},
	Piloting_4 = 		{100,{"Piloting_3"},{}},
	Hard_to_Kill = 	{150,{"Piloting_4"},{}},
	Tactics = 		{50,{"Piloting_2"},{}},
	Tactics_Exp = 	{100,{"Tactics"},{}},
	Gunnery_1 = 		{5,{},{}},
	Gunnery_2 = 		{20,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	Gunnery_4 = 		{75,{"Gunnery_3"},{}},
	Gunnery_5 = 		{150,{"Gunnery_4"},{}},
	F_Weapon_HC = 	{35,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{35,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{35,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	finesse_1 = 		{40,{"Gunnery_2"},{}},
	finesse_2 = 		{75,{"finesse_1"},{}},
	finesse_3 = 		{150,{"finesse_2"},{}},
	Criticals_1 = 		{40,{"Gunnery_2"},{}},
	Criticals_2 = 		{100,{"Criticals_1"},{}},
	cdg_1 = 		{100,{"Criticals_2"},{}},
	cdg_2 = 		{200,{"cdg_1"},{}},
	snipeOut_1 = 		{30,{"Gunnery_2"},{}},
	snipeOut_2 = 		{50,{"snipeOut_1"},{}},
	snipeOut_3 = 		{100,{"snipeOut_2"},{}},
	snipeOut_4 = 		{200,{"snipeOut_3"},{}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{100,{"Missiles_Rockets"},{}},
	Elite = 			{250,{"Hard_to_Kill", "Gunnery_5"},{}},
	Systems_1 = 		{5,{},{}},
	Systems_2 = 		{45,{"Systems_1"},{}},
	Gun_Range = 	{75,{"Systems_2"},{}},
	Gun_Dispersion = 	{100,{"Gun_Range"},{}},
	Shields_Op = 		{35,{"Systems_1"},{}},
	Countermeasures = 	{35,{"Systems_1"},{}},
	};

function GetPropertyCost_Natali(property)
	return GetPropertyCost(properties_Natali[property]);
end;

function CanAddProperty_Natali(pilot, property)
	return CanAddProperty(pilot, properties_Natali[property]);
end;

-------------------------------
-- Функции развития Blade
-------------------------------
properties_Blade = {
	Piloting_1 = 		{2,{},{}},
	Piloting_2 = 		{25,{"Piloting_1"},{}},
	Piloting_3 = 		{50,{"Piloting_2"},{}},	
	Piloting_4 = 		{75,{"Piloting_3"},{}},	
	Piloting_5 = 		{200,{"Piloting_4"},{}},	
	Pilot_1 =		{10,{"Piloting_1"},{}},
	Pilot_2 =		{30,{"Pilot_1"},{}},
	Pilot_3 =		{100,{"Pilot_2"},{}},
	Pilot_4 =		{300,{"Pilot_3"},{}},	
	Learner = 		{15,{},{}},
	Lone_Wolf = 		{30,{"Learner"},{}},
	Fearless = 		{100,{"Lone_Wolf","Piloting_3"},{}},
	Hard_to_Kill = 	{150,{"Fearless"},{}},
	Gunnery_1 = 		{1,{},{}},		
	Gunnery_2 = 		{35,{"Gunnery_1"},{}},
	Gunnery_3 = 		{50,{"Gunnery_2"},{}},
	Gunnery_4 = 		{75,{"Gunnery_3"},{}},
	Gunnery_5 = 		{200,{"Gunnery_4"},{}},
	Criticals_1 = 		{35,{"Gunnery_2"},{}},
	snipeOut_1 = 		{75,{"Gunnery_3"},{}},
	snipeOut_2 = 		{150,{"snipeOut_1"},{}},
	F_Weapon_HC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_AC"}},
	F_Weapon_AC = 	{50,{"Gunnery_1"},{"F_Weapon_Laser","F_Weapon_HC"}},
	F_Weapon_Laser = 	{50,{"Gunnery_1"},{"F_Weapon_HC","F_Weapon_AC"}},
	Missiles_Rockets = 	{5,{},{}},
	Missiles_2 = 		{25,{"Missiles_Rockets"},{}},
	Missiles_3 = 		{50,{"Missiles_2"},{}},
	Missiles_4 =		{150,{"Missiles_3"},{}},
	Rockets_1 = 		{25,{"Missiles_Rockets"},{}},
	Systems_1 = 		{2,{},{}},
	Systems_2 = 		{50,{"Systems_1"},{}},	
	Countermeasures = 	{40,{"Systems_1"},{}},	
	Repairman = 		{40,{"Systems_1"},{}},
	Shields_Op = 		{40,{"Systems_1"},{}},	
	Engine_Op = 		{40,{"Systems_1"},{}},
	Elite = 			{250,{"Piloting_5", "Gunnery_5", "Missiles_4"},{}}
	};

function GetPropertyCost_Blade(property)
	return GetPropertyCost(properties_Blade[property]);
end;

function CanAddProperty_Blade(pilot, property)
	return CanAddProperty(pilot, properties_Blade[property]);
end;
