Changeset - c059af80a136
[Not reviewed]
default
0 2 0
Silverwing - 6 years ago 2019-02-07 17:05:43

leviathan state is restored after battle with shockfish
2 files changed with 13 insertions and 1 deletions:
0 comments (0 inline, 0 general)
atlantis_iyhehevjiarr.lua
Show inline comments
 
@@ -185,27 +185,35 @@ iyh_fight = room {
 
        end;
 
        if (submarine_leviathan.hull_integrity < 30) then
 
            pr "Обшивка Левиафана сильно повреждена. ";
 
        elseif (submarine_leviathan.hull_integrity < 70) then
 
            pr "Обшивка Левиафана повреждена. ";
 
        end;
 
    end;
 
    maketurn = function(s)
 
        if (s.distance > 1000) then
 
            if (s.shockfish_health < 20 or atl_iyh_entrance_destroyed) then
 
                pr "Скат уплывает и вы остаетесь одни. ";
 
                atl_iyh_shockfish_left = true;
 
                s.shockfish_health = 100;
 
                submarine_leviathan.hull_integrity = 100;
 
                submarine_leviathan.electric_integrity = 100;
 
                submarine_leviathan.torpedoes = 2;
 
                walk("iyh_far_from_entrance");
 
            else
 
                pr "Вы удаляетесь достаточно далеко и скат возвращается к себе в жилище. ";
 
                s.shockfish_health = 100;
 
                submarine_leviathan.hull_integrity = 100;
 
                submarine_leviathan.electric_integrity = 100;
 
                submarine_leviathan.torpedoes = 2;
 
                walk("iyh_far_from_entrance");
 
            end;
 
        end;
 
        if (s.shockfish_health < 20 or (atl_iyh_entrance_destroyed and s.shockfish_health < 70)) then
 
            if (s.distance < 0) then
 
                s.distance = s.distance - 75;
 
            else
 
                s.distance = s.distance + 75;
 
            end;
 
            pr "Скат пытается сбежать от вас. ";
 
        else
 
            if (math.abs(s.distance) <= 75) then
 
@@ -301,24 +309,29 @@ iyh_fight_torpedo = obj {
 
            return [[Цель слишком далеко. ]];
 
        else
 
            if (iyh_fight.shockfish_health > 70) then
 
                local meters = 25 * rnd(3) + 25;
 
                iyh_fight.shockfish_health = iyh_fight.shockfish_health - 70;
 
                if (iyh_fight.distance >= 0) then
 
                    iyh_fight.distance = iyh_fight.distance + meters;
 
                else
 
                    iyh_fight.distance = iyh_fight.distance - meters;
 
                end;
 
                pr("Вы стреляете торпедой в ската. Торпеда достигает цели. Ската отбрасывает назад на ".. tostring(meters) .. " метров. ");
 
            else
 
                iyh_fight.shockfish_health = 100;
 
                submarine_leviathan.hull_integrity = 100;
 
                submarine_leviathan.electric_integrity = 100;
 
                submarine_leviathan.torpedoes = 2;
 
 
                iyh_fight.shockfish_health = 0;
 
                atl_iyh_shockfish_dead = true;
 
                pr "Вы стреляете торпедой в ската. Торпеда взрывается достигнув цели и разрывает ската. Вода краснеет от крови, а вы теперь можете безопасно приблизиться к храму. ";
 
 
                if (ArrayUtils.indexOf(pl.party, 'learr') ~= 0) then
 
                    pr [[Леарр в ярости поднимается в рубку и кричит на вас: "Что ты делаешь ненавистный-a'rr?!"^Она с неприязнью смотрит на вас и удаляется к себе в каюту. ]];
 
                    rel_learr = -99;
 
                    atl_rep_iraa = atl_rep_iraa - 1;
 
                    atl_rep_dyp = atl_rep_dyp - 1;
 
                    remove(char_learr, char_learr.home);
 
                    char_learr.home = "leviathan_cabin_3";
 
leviathan.lua
Show inline comments
 
@@ -13,25 +13,24 @@
 
Можно включить или выключить внешнее освещение
 
 
Скафандры придется зарабатывать на Атлантиде
 
]]
 
 
-- TODO персонажи не должны обсуждать личные темы по телефону, только при встрече
 
 
submarine_leviathan = obj {
 
	var {
 
		hull_integrity = 100; -- Целостность корпуса
 
		electric_integrity = 100; -- Целостность электросистем
 
		torpedoes = 2; -- Количество заряженных торпед
 
		suits = 2; -- Количество водолазных костюмов.
 
		battery = false; -- Состояние батареи 
 
		circuit_breaks = 2; -- Разрывы цепи
 
		power_on = false; -- включена ли энергия
 
		air_level = 0; -- запас воздуха. Максимум - 5 дней(5 * 24 * 60 * 60 = 432000)
 
		airpump = false;
 
        refit = false;
 
	};
 
	nam = "submarine_leviathan";
 
	disp = "Левиафан";
 
	dsc = function(s)
 
        --[[
 
            atl_aqua_leviathan_dock
0 comments (0 inline, 0 general)