unit upgrades;

interface

uses constants, upgrade_window, files_names;

procedure SetTowersUpgrades;

implementation

procedure SetBonuses;
begin
with all_upgrades[0][1] do
  begin
    price_credits := 500;
    price_score := 30;
    name := 'Максимальное здоровье +20';
    add_params.max_weapons_aviable := 20;
    button := gui_cancel_id;
  end;
with all_upgrades[0][2] do
  begin
    price_credits := 700;
    price_score := 40;
    name := 'Здоровье +15';
    add_params.weapons_aviable := 15;
    button := gui_cancel_id;
  end;
with all_upgrades[0][3] do
  begin
    price_credits := 50;
    price_score := 0;
    name := 'Контроль времени +1';
    add_params.light_radius := 1;
    button := gui_time_scale_id;
  end;
total_upgrades[0] := 3;
end;

procedure SetSmallUpgrades;
begin
with all_upgrades[1][1] do
  begin
    price_credits := 10;
    price_score := 0;
    name := 'Установка факелов';
    add_params.light_radius := 2;
    button := gui_light_id;
  end;

with all_upgrades[1][2] do
  begin
    price_credits := 50;
    price_score := 0;
    name := 'Улучшенное вооружение';
    button := gui_target_id;
    with add_params.weapons[1] do
      begin
        damage_h := 0.4;
        speed := 0.2;
      end;
  end;

with all_upgrades[1][3] do
  begin
    price_credits := 150;
    price_score := 2;
    name := 'Удвоенный гарнизон';
    button := gui_two_id;
    add_params.weapons_aviable := 1;
  end;

with all_upgrades[1][4] do
  begin
    price_credits := 200;
    price_score := 3;
    name := 'Меткость';
    button := gui_target_id;
    add_params.weapons[1].radius := 1;
  end;

with all_upgrades[1][5] do
  begin
    price_credits := 250;
    price_score := 3;
    name := 'Отравленные стрелы';
    button := gui_damage_id;
    add_params.weapons[1].damage_d := 0.5;
  end;

with all_upgrades[1][6] do
  begin
    price_credits := 200;
    price_score := 5;
    name := 'Парализующие стрелы';
    button := gui_speed_id;
    add_params.weapons[1].damage_s := 0.5;
  end;

with all_upgrades[1][7] do
  begin
    price_credits := 300;
    price_score := 10;
    name := 'Разрывные стрелы';
    button := gui_health_id;
    add_params.weapons[1].damage_h := 1.4;
  end;

with all_upgrades[1][8] do
  begin
    price_credits := 550;
    price_score := 12;
    name := 'Обучение снайперов';
    button := gui_target_id;
    add_params.weapons[1].damage_h := 1;
    add_params.weapons[1].speed := 3;
  end;

total_upgrades[1] := 8;
end;

//MIDDLE

procedure SetMiddleUpgrades;
begin
with all_upgrades[2][1] do
  begin
    price_credits := 20;
    price_score := 0;
    name := 'Установка факелов';
    add_params.light_radius := 4;
    button := gui_light_id;
  end;

with all_upgrades[2][2] do
  begin
    price_credits := 100;
    price_score := 1;
    name := 'Улучшенное вооружение';
    button := gui_target_id;
    with add_params.weapons[1] do
      begin
        damage_h := 0.5;
        speed := 0.4;
      end;
  end;

with all_upgrades[2][3] do
  begin
    price_credits := 150;
    price_score := 2;
    name := 'Удвоенный гарнизон';
    button := gui_two_id;
    add_params.weapons_aviable := 1;
  end;

with all_upgrades[2][4] do
  begin
    price_credits := 180;
    price_score := 3;
    name := 'Меткость';
    button := gui_target_id;
    add_params.weapons[1].radius := 1;
  end;

with all_upgrades[2][5] do
  begin
    price_credits := 200;
    price_score := 3;
    name := 'Отравленные стрелы';
    button := gui_damage_id;
    add_params.weapons[1].damage_d := 0.5;
  end;

with all_upgrades[2][6] do
  begin
    price_credits := 230;
    price_score := 5;
    name := 'Парализующие стрелы';
    button := gui_speed_id;
    add_params.weapons[1].damage_s := 0.5;
  end;

with all_upgrades[2][7] do
  begin
    price_credits := 300;
    price_score := 10;
    name := 'Разрывные стрелы';
    button := gui_health_id;
    add_params.weapons[1].damage_h := 1.4;
  end;

with all_upgrades[2][8] do
  begin
    price_credits := 500;
    price_score := 15;
    name := 'Магические стрелы';
    button := gui_speed_id;
    add_params.weapons[1].damage_d := 1.5;
    add_params.weapons[1].damage_s := 1.5;
  end;

total_upgrades[2] := 8;
end;

//BIG
procedure SetBigUpgrades;
begin
with all_upgrades[3][1] do
  begin
    price_credits := 15;
    price_score := 0;
    name := 'Установка факелов';
    add_params.light_radius := 3;
    button := gui_light_id;
  end;

with all_upgrades[3][2] do
  begin
    price_credits := 80;
    price_score := 1;
    name := 'Улучшенное вооружение';
    button := gui_target_id;
    with add_params.weapons[1] do
      begin
        damage_h := 0.6;
        speed := 0.4;
      end;
  end;

with all_upgrades[3][3] do
  begin
    price_credits := 150;
    price_score := 2;
    name := 'Удвоенный гарнизон';
    button := gui_two_id;
    add_params.weapons_aviable := 1;
  end;

with all_upgrades[3][4] do
  begin
    price_credits := 220;
    price_score := 3;
    name := 'Меткость';
    button := gui_target_id;
    add_params.weapons[1].radius := 1;
  end;

with all_upgrades[3][5] do
  begin
    price_credits := 250;
    price_score := 3;
    name := 'Отравленные стрелы';
    button := gui_damage_id;
    add_params.weapons[1].damage_d := 0.5;
  end;

with all_upgrades[3][6] do
  begin
    price_credits := 300;
    price_score := 5;
    name := 'Парализующие стрелы';
    button := gui_speed_id;
    add_params.weapons[1].damage_s := 0.5;
  end;

with all_upgrades[3][7] do
  begin
    price_credits := 350;
    price_score := 10;
    name := 'Разрывные стрелы';
    button := gui_health_id;
    add_params.weapons[1].damage_h := 1.5;
  end;

with all_upgrades[3][8] do
  begin
    price_credits := 500;
    price_score := 15;
    name := 'Утроенный гарнизон';
    button := gui_three_id;
    add_params.weapons_aviable := 1;
  end;

with all_upgrades[3][9] do
  begin
    price_credits := 800;
    price_score := 20;
    name := 'Вооружение арбалетами';
    button := gui_health_id;
    add_params.weapons[1].damage_h := 3.5;
    add_params.weapons[1].damage_d := 0.3;
  end;

total_upgrades[3] := 9;
end;

procedure SetTowersUpgrades;
begin
SetBonuses;
SetSmallUpgrades;
SetMiddleUpgrades;
SetBigUpgrades;
end;

end.
