Changeset - 1e95a4dfb8ba
[Not reviewed]
snapshots
0 1 0
Silverwing - 5 years ago 2019-07-10 11:33:34

Improve snapshot behaviour in dypatreanotrr at night
1 file changed with 17 insertions and 1 deletions:
0 comments (0 inline, 0 general)
atlantis_dyp_night.lua
Show inline comments
 
@@ -178,6 +178,9 @@ dyp_night_chief_house_2nd_floor = room {
 
    disp = 'Дипатреанотр, дом вождя, второй этаж';
 
    dsc = [[Коридор второго этажа пуст. Слабый свет водорослей, покрывающих пол и стены позволяет вам легко ориентироваться внутри. Справа от вас расположена дверь. Впереди коридор поворачивает направо. ]];
 
    nolamp = true;
 
    entered = function(s)
 
        make_snapshot();
 
    end;
 
    way = {
 
        kh_vroom('За угол', 'dyp_night_chief_house_2nd_floor2');
 
        kh_vroom('На первый этаж', 'dyp_night_chief_house_hall');
 
@@ -202,6 +205,7 @@ dyp_night_chief_guard = obj {
 
    canshoot = true;
 
    onshoot = function(s)
 
        s.state = 1;
 
        lifeoff(dyp_night_chief_house_2nd_floor2);
 
        return [[Вы убиваете охранника. ]];
 
    end
 
};
 
@@ -216,13 +220,25 @@ dyp_night_chief_house_2nd_floor2 = room 
 
    dsc = [[Слабый свет водорослей, покрывающих пол и стены позволяет вам легко ориентироваться внутри. Перед вами расположена дверь. ]];
 
    nolamp = true;
 
    entered = function(s)
 
        make_snapshot();
 
        if dyp_night_chief_guard.state == 0 then
 
            s.state = 2;
 
            lifeon(s);
 
        end;
 
    end;
 
    exit = function(s)
 
        lifeoff(s);
 
        if dyp_night_chief_guard.state == 0 then
 
            walk("game_over_dyp_night_caught");
 
        end;
 
    end;
 
    life = function(s)
 
        if dyp_night_chief_guard.state == 0 then
 
            s.state = s.state - 1;
 
            if s.state == 0 then
 
                walk("game_over_dyp_night_caught");
 
            end
 
        end;
 
    end;
 
    obj = {
 
        'dyp_night_chief_guard';
 
    };
0 comments (0 inline, 0 general)