Changeset - 93308919b9f7
[Not reviewed]
default
1 6 0
silverwing - 4 years ago 2019-11-24 13:26:25

Rebalance combats
7 files changed with 57 insertions and 31 deletions:
0 comments (0 inline, 0 general)
atlantis_dyp.lua
Show inline comments
 
@@ -3049,7 +3049,7 @@ dyp_king_crab = combatant {
 
    var {
 
        x = 4;
 
        y = 1;
 
        hp = 4;
 
        hp = 6;
 
    };
 
    pic = "images/king_crab.png";
 
    shootHit = "Вы стреляете в краба и попадаете в него. ";
 
@@ -3136,7 +3136,7 @@ dyp_little_crab = function(nam, index, x
 
        var {
 
            x = x;
 
            y = y;
 
            hp = 2;
 
            hp = 4;
 
        };
 
        pic = "images/little_crab_".. index ..".png";
 
        shootHit = "Вы стреляете в детеныша краба и попадаете в него. ";
images/navjiarr_guard.png
Show inline comments
 
deleted file
 
binary diff not shown
Show images
images/navjiarr_guard3.png
Show inline comments
 
binary diff not shown
Show images
images/navjiarr_guard4.png
Show inline comments
 
binary diff not shown
Show images
items.lua
Show inline comments
 
@@ -490,7 +490,6 @@ item_harpoon = obj {
 
        local canshoot = false;
 
        if (type(o.canshoot) == "function") then
 
            canshoot, noshootmsg = o:canshoot();
 
            print(canshoot, noshootmsg);
 
        else
 
            canshoot = o.canshoot;
 
        end;
lse_confrontation.lua
Show inline comments
 
@@ -915,7 +915,7 @@ lse_cmbt_anna = combatant {
 
    end;
 
};
 

	
 
lse_cmbt_guard = function(nam, index, x, y, spear)
 
lse_cmbt_guard = function(nam, index, x, y, spear, hp)
 
    return combatant {
 
        nam = nam;
 
        disp = "стражник " .. tostring(index);
 
@@ -924,7 +924,7 @@ lse_cmbt_guard = function(nam, index, x,
 
        var {
 
            x = x;
 
            y = y;
 
            hp = 4;
 
            hp = hp;
 
            hasSpear = spear;
 
        };
 
        pic = "images/navjiarr_guard".. index ..".png";
 
@@ -1039,12 +1039,12 @@ lse_cmbt_guard = function(nam, index, x,
 
    };
 
end;
 

	
 
lse_cmbt_guard1 = lse_cmbt_guard("lse_cmbt_guard1", 1, 3, 1, false);
 
lse_cmbt_guard2 = lse_cmbt_guard("lse_cmbt_guard2", 2, 5, 1, false);
 
lse_cmbt_guard3 = lse_cmbt_guard("lse_cmbt_guard3", 3, 3, 3, true);
 
lse_cmbt_guard4 = lse_cmbt_guard("lse_cmbt_guard4", 4, 5, 3, true);
 
lse_cmbt_guard5 = lse_cmbt_guard("lse_cmbt_guard5", 5, 3, 5, false);
 
lse_cmbt_guard6 = lse_cmbt_guard("lse_cmbt_guard6", 6, 5, 5, false);
 
lse_cmbt_guard1 = lse_cmbt_guard("lse_cmbt_guard1", 1, 3, 1, false, 4);
 
lse_cmbt_guard2 = lse_cmbt_guard("lse_cmbt_guard2", 2, 5, 1, false, 4);
 
lse_cmbt_guard3 = lse_cmbt_guard("lse_cmbt_guard3", 3, 3, 3, true, 5);
 
lse_cmbt_guard4 = lse_cmbt_guard("lse_cmbt_guard4", 4, 5, 3, true, 5);
 
lse_cmbt_guard5 = lse_cmbt_guard("lse_cmbt_guard5", 5, 3, 5, false, 4);
 
lse_cmbt_guard6 = lse_cmbt_guard("lse_cmbt_guard6", 6, 5, 5, false, 4);
 

	
 
lse_prison_fight_victory = dlg {
 
    nam = "lse_prison_fight_victory";
lse_final_battle.lua
Show inline comments
 
@@ -9,8 +9,8 @@ lse_pre_fb_learr = cutscene('Лсэрианотр, зал Наэтвьирра', 'Лсэрианотр, зал Наэтвьирра', [[Леарр втыкает копье в один из генераторов и тот затихает. Наэтвьирр испускает мощную волну, отбрасывая Леарр к стене. Она остается неподвижно лежать там, где упала. ]], function(s)
 
    end;
 
end);
 

	
 
lse_pre_fb_jack = cutscene('Лсэрианотр, зал Наэтвьирра', 'Лсэрианотр, зал Наэтвьирра', [[Джек Райт атакует Аэдхиарра, выводя его из боя. Мощный электрический разряд вырывается из руки Наэтвьирра и попадает в Райта. Джек падает на пол и остается неподвижно лежать. ]], function(s)
 
    lse_aedhyarr.hp = 0;
 
lse_pre_fb_jack = cutscene('Лсэрианотр, зал Наэтвьирра', 'Лсэрианотр, зал Наэтвьирра', [[Джек Райт стреляет в один из проводов, соединяющих трон в центре зала с генераторами. Сноп искр вырывается из поврежденного места. Наэтвьирр испускает в Райта мощный электрический разряд из своей руки. Джек падает на пол и остается неподвижно лежать. ]], function(s)
 
    lse_throne.rechargeThrow = 5;
 
    if ArrayUtils.indexOf(pl.party, 'anna') ~= 0 then
 
        return 'lse_pre_fb_anna';
 
    else
 
@@ -487,6 +487,7 @@ lse_naethvjirr = combatant {
 
        x = 4;
 
        y = 4;
 
        hp = 5;
 
        rechargeThrow = 4;
 
    };
 
    pic = "images/fb_naethvjirr.png";
 
    enemy = true;
 
@@ -570,7 +571,7 @@ lse_naethvjirr = combatant {
 
                pl.hp = pl.hp - 1;
 
            end;
 
        elseif (lse_generators_chThrow <= 0) then
 
            lse_generators_chThrow = 5;
 
            lse_generators_chThrow = s.rechargeThrow;
 
            p("Наэтвьирр отправляет в вас мощную волну воздуха, которая отбрасывает вас в сторону. ");
 
                local plX = here().plX;
 
                local plY = here().plY;
 
@@ -743,28 +744,54 @@ lse_aedhyarr = combatant {
 
        if here() ~= lse_final_battle then
 
            return
 
        end;
 
        -- Аэдхиарр будет пытаться всеми силами париблизиться к игроку на расстояние выстрела и не будет отступать. 
 

	
 
        local dist = math.sqrt((s.x - here().plX) * (s.x - here().plX) + (s.y - here().plY) * (s.y - here().plY));
 
        if (dist < 4 and here():canShoot(s.x, s.y, here().plX, here().plY)) then
 
            -- shoot
 
            if (rnd(2) > dist - 2) then
 
                pl.hp = pl.hp - 1;
 
                p("Аэдхиарр стреляет в вас и попадает. ");
 
            else
 
                p("Аэдхиарр стреляет в вас, но промахивается. ");
 
            end;
 
        else
 
            local path = here():getWalkDistance(s.x, s.y, pl.x, pl.y);
 

	
 
            if path then
 
                s.x = path.p[2][1];
 
                s.y = path.p[2][2];
 

	
 
                p("Аэдхиарр приближается к вам. ");
 
        if (dist < 6) then
 
            if (dist < 4) then
 
                -- try to run away
 
                local x = s.x;
 
                local y = s.y;
 
                if (math.abs(x - pl.x) > math.abs(y - pl.y)) then
 
                    if (x > pl.x) then
 
                        x = x + 1;
 
                    else
 
                        x = x - 1;
 
                    end;
 
                elseif (math.abs(x - pl.x) < math.abs(y - pl.y)) then
 
                    if (y > pl.y) then
 
                        y = y + 1;
 
                    else
 
                        y = y - 1;
 
                    end;
 
                else
 
                    if (rnd(2) > 1) then
 
                        if (here():isPassable(x, y + 1)) then
 
                            y = y + 1;
 
                        else
 
                            x = x + 1;
 
                        end;
 
                    else
 
                        if (here():isPassable(x + 1, y)) then
 
                            x = x + 1;
 
                        else
 
                            y = y + 1;
 
                        end;
 
                    end;
 
                end;
 
                if (here():isPassable(x, y)) then
 
                    s.x = x;
 
                    s.y = y;
 
                    p("Аэдхиарр отступает. ");
 
                else
 
                    p("Аэдхиарр ждет. ");
 
                end;
 
            else
 
                p("Аэдхиарр ждет. ");
 
            end;
 
        else 
 
            p("Аэдхиарр ждет. ");
 
        end;
 

	
 
end;
 
};
 

	
0 comments (0 inline, 0 general)