Changeset - 65250726f35b
[Not reviewed]
default
0 2 12
Silverwing - 6 years ago 2017-12-10 18:33:46

Dypatreanotrr cave lock
14 files changed with 64 insertions and 1 deletions:
0 comments (0 inline, 0 general)
atlantis_dyp.lua
Show inline comments
 
@@ -303,6 +303,12 @@ dyp_item_stone_red = obj {
 
    inv = [[Небольшой круглый камень, излучающий яркий красный свет. ]];
 
};
 

	
 
dyp_item_wand = obj {
 
    nam = "dyp_item_wand";
 
    disp = "Жезл";
 
    inv = [[Жезл из неизвестного металла, покрытый навьярскими письменами. ]];
 
};
 

	
 
dyp_library_statue = obj {
 
    nam = "dyp_library_statue";
 
    dsc =function(s)
 
@@ -1894,4 +1900,61 @@ dyp_crab_fight = battlefield {
 
    };
 
};
 

	
 
dyp_crab_cave_puzzle = room {
 
    var {
 
        values = {
 
            0, 2, 1, 2, 5 ,4,
 
            1, 1, 2, 4, 0, 5,
 
            1, 3, 2, 4, 0, 3,
 
            0, 2, 0, 3, 5, 4,
 
            5, 0, 4, 1, 3, 3,
 
            3, 5, 5, 1, 4, 2
 
        };
 
        pressed = {
 
            nil,
 
            nil,
 
            nil,
 
            nil,
 
            nil,
 
            nil
 
        };
 
    };
 
    nam = "Пещера";
 
    pic = function(s)
 
        local p = "blank:180x180";
 
        for v = 1, #s.values do
 
            local tx = (v - 1) % 6;
 
            local ty = math.floor((v - 1) / 6);
 
            local lstate = '';
 
            if s.pressed[s.values[v] + 1] and s.pressed[s.values[v] + 1][1] == tx and s.pressed[s.values[v] + 1][2] == ty then
 
                lstate = 'p';
 
            end;
 
            p = p .. ';images/cavelock_' .. tostring(s.values[v]) .. lstate .. '.png@' .. tostring(tx * 30) .. ',' .. tostring(ty * 30);
 
        end;
 
        print(p);
 
        return p;
 
    end;
 
    click = function(s,x,y)
 
        local tx = math.floor(x / 30);
 
        local ty = math.floor(y / 30);
 
        local i = tx + ty * 6 + 1;
 
        local val = s.values[i];
 
        for p = 1, 6 do
 
            if s.pressed[p] and (s.pressed[p][1] == tx or s.pressed[p][2] == ty) then
 
                s.pressed[p] = nil;
 
            end;
 
        end;
 
        s.pressed[val + 1] = {tx, ty};
 
        for p = 1, 6 do
 
            if not s.pressed[p] then
 
                walkin(here());
 
                return;
 
            end;
 
        end;
 
        p("С легким скрежетом сундук открывается. Внутри вы обнаруживаете небольшой жезл с нанесенными цветными символами. Цвета определенно соответствуют навьярским словам, но что значат символы вам неведомо. ");
 
        put(dyp_item_wand, pl);
 
        walk(dyp_crab_cave);
 
    end;
 
};
 

	
 
dyp_crab_cave_win = cutscene("dyp_crab_cave_win", "Пещера", [[Вы расправляетесь с выводком крабов, поселившихся в этой пещере. Чуть поодаль, вы видите тело навьяра, истерзанное этими монстрами. ]], "dyp_crab_cave");
 
\ No newline at end of file
images/cavelock_0.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_0p.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_1.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_1p.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_2.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_2p.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_3.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_3p.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_4.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_4p.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_5.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
images/cavelock_5p.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
main.lua
Show inline comments
 
@@ -198,7 +198,7 @@ function init()
 
    ---game init
 
    pl.where = intro;
 
    ---debug
 
    pl.where = "dyp_obelisk_puzzle";
 
    pl.where = "dyp_crab_cave_puzzle";
 
    --put("item_lamp", pl);
 
    --put("item_pump", pl);
 
    --put("item_toolbox", pl);
0 comments (0 inline, 0 general)