Changeset - fdd1761f4692
[Not reviewed]
default
0 2 42
Silverwing - 6 years ago 2019-01-08 23:46:08

final battle and deep tample battle graphics
44 files changed with 37 insertions and 0 deletions:
images/fb_pylon.png
bin+new file
0 comments (0 inline, 0 general)
images/deep_temple_bg.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_1.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_2.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_3.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_4.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_5.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_6.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_7.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_leviathan_8.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_1_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_1_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_1_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_1_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_2_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_2_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_2_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_2_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_3_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_3_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_3_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_3_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_4_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_4_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_4_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_4_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_5_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_5_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_5_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_5_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_6_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_6_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_6_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_6_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_7_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_7_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_7_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_7_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_8_healthy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_8_heavy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_8_light.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/dt_tentacle_8_medium.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/fb_drake.png
Show inline comments
 
binary diff not shown
Show images
images/fb_pylon.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
journey_temple.lua
Show inline comments
 
@@ -829,387 +829,424 @@ dt_wires_room = dlg {
 
        {
 
            tag = "w2", always = true, 
 
            function(s)
 
                local connect = "не подключен";
 
                if (dt_wires_room.connections[3] ~= nil) then
 
                    connect = dt_wire_colors[dt_wires_room.connections[3]] .. " разъем";
 
                    return "Отсоединить зеленый провод (".. connect .. ")";
 
                else
 
                    return "Выбрать зеленый провод (".. connect .. ")";
 
                end;
 
                
 
            end, function(s)
 
                if (dt_wires_room.connections[3] ~= nil) then
 
                    dt_wires_room.connections[3] = nil;
 
                    return "Вы отсоединяете провод";
 
                else
 
                    dt_wires_room.selected = 3;
 
                    dt_wires_room:choose_socket();
 
                    return "Куда подключить?";
 
                end;
 
            end
 
        };
 
        {
 
            tag = "w3", always = true, 
 
            function(s)
 
                local connect = "не подключен";
 
                if (dt_wires_room.connections[4] ~= nil) then
 
                    connect = dt_wire_colors[dt_wires_room.connections[4]] .. " разъем";
 
                    return "Отсоединить желтый провод (".. connect .. ")";
 
                else
 
                    return "Выбрать желтый провод (".. connect .. ")";
 
                end;
 
                
 
            end, function(s)
 
                if (dt_wires_room.connections[4] ~= nil) then
 
                    dt_wires_room.connections[4] = nil;
 
                    return "Вы отсоединяете провод";
 
                else
 
                    dt_wires_room.selected = 4;
 
                    dt_wires_room:choose_socket();
 
                    return "Куда подключить?";
 
                end;
 
            end
 
        };
 
        {
 
            tag = "w4", always = true, 
 
            function(s)
 
                local connect = "не подключен";
 
                if (dt_wires_room.connections[5] ~= nil) then
 
                    connect = dt_wire_colors[dt_wires_room.connections[5]] .. " разъем";
 
                    return "Отсоединить оранжевый провод (".. connect .. ")";
 
                else
 
                    return "Выбрать оранжевый провод (".. connect .. ")";
 
                end;
 
                
 
            end, function(s)
 
                if (dt_wires_room.connections[5] ~= nil) then
 
                    dt_wires_room.connections[5] = nil;
 
                    return "Вы отсоединяете провод";
 
                else
 
                    dt_wires_room.selected = 5;
 
                    dt_wires_room:choose_socket();
 
                    return "Куда подключить?";
 
                end;
 
            end
 
        };
 
        {
 
            tag = "w5", always = true, 
 
            function(s)
 
                local connect = "не подключен";
 
                if (dt_wires_room.connections[6] ~= nil) then
 
                    connect = dt_wire_colors[dt_wires_room.connections[6]] .. " разъем";
 
                    return "Отсоединить красный провод (".. connect .. ")";
 
                else
 
                    return "Выбрать красный провод (".. connect .. ")";
 
                end;
 
                
 
            end, function(s)
 
                if (dt_wires_room.connections[6] ~= nil) then
 
                    dt_wires_room.connections[6] = nil;
 
                    return "Вы отсоединяете провод";
 
                else
 
                    dt_wires_room.selected = 6;
 
                    dt_wires_room:choose_socket();
 
                    return "Куда подключить?";
 
                end;
 
            end
 
        };
 
        {
 
            tag = "leave", always = true, "Отойти от панели", code = [[ walk("dt_temple_entrance"); ]]
 
        };
 
        {tag="socket"};
 
        {
 
            tag = "s0", always = true,
 
            "В фиолетовый разъем", function(s)
 
                dt_wires_room.connections[dt_wires_room.selected] = 1;
 
                psub("wire");
 
                return "Провод подключен";
 
            end
 
        };
 
        {
 
            tag = "s1", always = true,
 
            "В синий разъем", function(s)
 
                dt_wires_room.connections[dt_wires_room.selected] = 2;
 
                psub("wire");
 
                return "Провод подключен";
 
            end
 
        };
 
        {
 
            tag = "s2", always = true,
 
            "В зеленый разъем", function(s)
 
                dt_wires_room.connections[dt_wires_room.selected] = 3;
 
                psub("wire");
 
                return "Провод подключен";
 
            end
 
        };
 
        {
 
            tag = "s3", always = true,
 
            "В желтый разъем", function(s)
 
                dt_wires_room.connections[dt_wires_room.selected] = 4;
 
                psub("wire");
 
                return "Провод подключен";
 
            end
 
        };
 
        {
 
            tag = "s4", always = true,
 
            "В оранжевый разъем", function(s)
 
                dt_wires_room.connections[dt_wires_room.selected] = 5;
 
                psub("wire");
 
                return "Провод подключен";
 
            end
 
        };
 
        {
 
            tag = "s5", always = true,
 
            "В красный разъем", function(s)
 
                dt_wires_room.connections[dt_wires_room.selected] = 6;
 
                psub("wire");
 
                return "Провод подключен";
 
            end
 
        };
 
    };   
 
};
 

	
 
dt_temple = room {
 
    var {
 
        state = 0;
 
    };
 
    nam = "dt_temple";
 
    disp = "Древний храм";
 
    dsc = [[Вы находитесь в огромном зале, высеченном в скале древними навьярами. ]];
 
    obj = {
 
        "dt_walls",
 
        "dt_pedestal",
 
        "dt_screens",
 
        "item_naethvjirr_key"
 
    };
 
    way = {
 
        kh_vroom("Выйти", "dt_temple_entrance");
 
    };
 
};
 

	
 
dt_walls = obj {
 
    nam = "dt_walls";
 
    dsc = [[Стены зала, освещенные такими же лампами, как и внешнее помещение, украшены множеством предостерегающих рисунков и символов. ]];
 
};
 

	
 
dt_pedestal = obj {
 
    nam = "dt_pedestal";
 
    dsc = [[В центре зала установлен массивный металлический пьедестал. ]];
 
};
 

	
 
dt_screens = obj {
 
    nam = "dt_screens";
 
    dsc = [[Вокруг пьедестала расположено множество экранов, на которых цветными полосами навьярского языка горят предупреждения об опасности использования предмета, хранящегося в этом зале. ]];
 
}
 

	
 
dt_fight_intro = cutscene('Левиафан', 'Левиафан', [[Оказавшись внутри Левиафана, вы со всех ног бросаетесь в рубку, чтобы увести корабль подальше от опасности, но не тут то было. Громадная туша нависла над Левиафаном, преграждая своими щупальцами пути отхода. ]], 'dt_fight');
 

	
 
dt_fight = room {
 
    var {
 
        state = 0;
 
        has_shot = false;
 
        rotation = 90;
 
        dir = 0;
 
        tentacles = {
 
            {hp=200, dir=0, away = 0 };
 
            {hp=200, dir=1, away = 0 };
 
            {hp=200, dir=2, away = 0 };
 
            {hp=200, dir=3, away = 0 };
 
            {hp=200, dir=4, away = 0 };
 
        };
 
    };
 

	
 
    positions = {
 
        {80, 0},
 
        {160, 0},
 
        {160, 80},
 
        {160, 160},
 
        {80, 160},
 
        {0, 160},
 
        {0, 80},
 
        {0, 0}
 
    };
 

	
 
    nam = "dt_fight";
 
    pic = function(s)
 
        local pic = 'images/deep_temple_bg.png';
 

	
 
        for i = 1, #s.tentacles do
 
            if s.tentacles[i].away == 0 then
 
                local pos = s.positions[s.tentacles[i].dir + 1];
 
                local status;
 
                if (s.tentacles[i].hp <= 70) then
 
                    status = 'heavy';
 
                elseif (s.tentacles[i].hp <= 140) then
 
                    status = 'medium';
 
                elseif (s.tentacles[i].hp < 200) then
 
                    status = 'light';
 
                else
 
                    status = 'healthy';
 
                end;
 
                pic = pic .. ';images/dt_tentacle_' .. tostring(s.tentacles[i].dir + 1) .. '_' .. status .. '.png@' .. pos[1] .. ',' .. pos[2];
 
            end;
 
        end;
 

	
 
        pic = pic .. ';images/dt_leviathan_' .. tostring(s.dir + 1) .. '.png@80,80'
 

	
 
        return pic;
 
    end;
 
    disp = "Левиафан, рубка";
 
    not_follow = true;
 
    nosave = true;
 
    forcedsc = true;
 
    entered = function(s)
 
        s:maketurn();
 
        if (s.state == 0) then
 
            s.state = 1;
 
            local dirs = {0,1,2,3,4,5,6,7};
 
            for i = 1, #s.tentacles do
 
                local cd = rnd(#dirs);
 
                s.tentacles[i].dir = dirs[cd];
 
                table.remove(dirs, cd);
 
            end;
 
        end;
 
    end;
 
    eval_tentacle = function(s, tentacle)
 
        if (tentacle.hp <= 70) then
 
            return [[Серьезно раненое щупальце ]];
 
        elseif (tentacle.hp <= 140) then
 
            return [[Раненое щупальце ]];
 
        elseif (tentacle.hp < 200) then
 
            return [[Легко раненое щупальце ]];
 
        else
 
            return [[Щупальце ]];
 
        end;
 
    end;
 
    dsc = function(s)
 
        local fr = s.dir + 1;
 
        local r = s.dir + 2;
 
        local br = s.dir + 3;
 
        local b = s.dir + 4;
 
        local fl = s.dir - 1;
 
        local l = s.dir - 2;
 
        local bl = s.dir - 3;
 
        if (fr > 7) then
 
            fr = fr - 8;
 
        end;
 
        if (r > 7) then
 
            r = r - 8;
 
        end;
 
        if (br > 7) then
 
            br = br - 8;
 
        end;
 
        if (b > 7) then
 
            b = b - 8;
 
        end;
 
        if (fl < 0) then
 
            fl = fl + 8;
 
        end;
 
        if (l < 0) then
 
            l = l + 8;
 
        end;
 
        if (bl < 0) then
 
            bl = bl + 8;
 
        end;
 
--        for i = 1, #s.tentacles do
 
--            pr(s.tentacles[i].hp .. " ");
 
--        end;
 
--        pr("^");
 
        pr [[Щупальца кракена тянутся к Левиафану. ]];
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == s.dir and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится прямо перед субмариной. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == fr and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится спереди и справа от субмарины. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == fl and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится спереди и слева от субмарины. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == r and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится справа по борту. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == l and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится слева по борту. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == b and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится сзади. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == bl and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится сзади и слева. ]]);
 
            end;
 
        end;
 
        for i = 1, #s.tentacles do 
 
            if (s.tentacles[i].hp > 0 and s.tentacles[i].dir == br and s.tentacles[i].away == 0) then
 
                pr(s:eval_tentacle(s.tentacles[i]) .. [[ находится сзади и справа. ]]);
 
            end;
 
        end;
 
    end;
 
    maketurn = function(s)
 
        local dcnt = 0;
 
        if (s.has_shot) then
 
            local fr = s.dir + 1;
 
            local r = s.dir + 2;
 
            local br = s.dir + 3;
 
            local b = s.dir + 4;
 
            local fl = s.dir - 1;
 
            local l = s.dir - 2;
 
            local bl = s.dir - 3;
 
            if (fr > 7) then
 
                fr = fr - 8;
 
            end;
 
            if (r > 7) then
 
                r = r - 8;
 
            end;
 
            if (br > 7) then
 
                br = br - 8;
 
            end;
 
            if (b > 7) then
 
                b = b - 8;
 
            end;
 
            if (fl < 0) then
 
                fl = fl + 8;
 
            end;
 
            if (l < 0) then
 
                l = l + 8;
 
            end;
 
            if (bl < 0) then
 
                bl = bl + 8;
 
            end;
 
            s.has_shot = false;
 
            s.rotation = 90;
 
            for i = 1, #s.tentacles do 
 
                if (s.tentacles[i].hp > 0) then
 
                    if (s.tentacles[i].away > 0) then
 
                        s.tentacles[i].away = s.tentacles[i].away - 1;
 
                        if (s.tentacles[i].away == 0) then
 
                            --TODO show up somewhere
 
                            local dirs = {};
 
                            for j = 1, #s.tentacles do 
 
                                if (s.tentacles[j].hp > 0 and s.tentacles[j].away == 0) then
 
                                    table.insert(dirs, s.tentacles[j].dir);
 
                                end;
 
                            end;
 
                            local newdir;
 
                            repeat 
 
                                newdir = rnd(8) - 1;
 
                            until ArrayUtils.indexOf(dirs, newdir) == 0;
 
                            s.tentacles[i].dir = newdir;
 
                            
 
                            if (s.tentacles[i].hp <= 70) then
 
                                pr [[Серьезно раненое щупальце ]];
 
                            elseif (s.tentacles[i].hp <= 140) then
 
                                pr [[Раненое щупальце ]];
 
                            elseif (s.tentacles[i].hp < 200) then
 
                                pr [[Легко раненое щупальце ]];
 
                            end;
 
                            if (newdir == f) then
 
                                pr [[подтягивается спереди. ]];
 
                            elseif (newdir == fr) then
 
                                pr [[подтягивается спереди справа. ]];
 
                            elseif (newdir == fl) then
 
                                pr [[подтягивается спереди слева. ]];
 
                            elseif (newdir == r) then
 
                                pr [[подтягивается справа. ]];
 
                            elseif (newdir == l) then
 
                                pr [[подтягивается слева. ]];
 
                            elseif (newdir == br) then
 
                                pr [[подтягивается сзади справа. ]];
 
                            elseif (newdir == bl) then
 
                                pr [[подтягивается сзади слева. ]];
 
                            elseif (newdir == b) then
 
                                pr [[подтягивается сзади. ]];
 
                            end;
 
                        end;
 
                    else
 
                        --TODO hit leviathan or hide up
 
                        if (rnd(8) > 1) then
 
                            submarine_leviathan.hull_integrity = submarine_leviathan.hull_integrity - 5;
 
                            pr [[Кракен ударяет Левиафан щупальцем. ]];
 
                        else
 
                            s.tentacles[i].away = 1;
 
                            pr [[Кракен отдергивает одно из щупалец. ]];
 
                        end;
 
                    end;
 
                else
 
                    dcnt = dcnt + 1;
 
                end;
 
            end;
 
        end;
 
        if (dcnt > 2) then
 
            walk("dt_kraken_victory");
0 comments (0 inline, 0 general)