File diff a0f2ce067bf9 → fdd1761f4692
journey_temple.lua
Show inline comments
 
@@ -1018,9 +1018,46 @@ dt_fight = room {
 
            {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();