Files @ 88fdd49344af
Branch filter:

Location: games/Awakening/main.lua - annotation

Silverwing
If goldman is exposed, darkstar behaves less stupid
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
9c3e0fecdb92
a2b2af954b81
08bed57892a3
fda22c203ad5
fda22c203ad5
fda22c203ad5
c1561bd81710
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
2867813436d4
38a48ac67d2a
6e7519136e47
6e7519136e47
38a48ac67d2a
c4b207ce4252
c4b207ce4252
c4b207ce4252
08bed57892a3
2867813436d4
c4b207ce4252
cc071a887ee2
507610e7f1cb
407f6de160dd
8e0d5d6edd8f
3c9ea1c7eb21
3c9ea1c7eb21
387d673c520d
eaf92b073787
f75538f0cc0b
2867813436d4
fb3d92b396c9
2fc4000a2c67
2fc4000a2c67
ed3e36144593
2867813436d4
81de15cefa8f
81de15cefa8f
3564e85ac89c
6942b6162aff
6942b6162aff
c4b207ce4252
6e7519136e47
e0c40d16812c
e0c40d16812c
515b20cf25e0
e0c40d16812c
e0c40d16812c
e0c40d16812c
49542c019655
188f1d172d1b
188f1d172d1b
4dea9ce5157f
4dea9ce5157f
bbb250d91321
2fc4000a2c67
bbb250d91321
bbb250d91321
712baf728ed1
78650918a2a3
712baf728ed1
712baf728ed1
712baf728ed1
712baf728ed1
d4316fe4f08a
6ed973c10053
6ed973c10053
6ed973c10053
baac509ebec7
baac509ebec7
3678b5720d85
3678b5720d85
baac509ebec7
257f0b23a44b
257f0b23a44b
3678b5720d85
baac509ebec7
fce8b5c6be31
fce8b5c6be31
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
6ed973c10053
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
6ed973c10053
ec336e394222
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
c4b207ce4252
c4b207ce4252
cf7c4cd40054
cf7c4cd40054
c4b207ce4252
5c21237a618f
cb66c223cac3
5c21237a618f
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
d11f99371ee3
9122330d184d
f02901977ca4
9122330d184d
6e7519136e47
c4b207ce4252
c4b207ce4252
f02901977ca4
c4b207ce4252
c4b207ce4252
c4b207ce4252
ec336e394222
ec336e394222
c4b207ce4252
c4b207ce4252
6e7519136e47
6e7519136e47
c4b207ce4252
6e7519136e47
6e7519136e47
e88b85b9fc9f
e88b85b9fc9f
e88b85b9fc9f
284cdc6e9b2a
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
e88b85b9fc9f
284cdc6e9b2a
e88b85b9fc9f
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
6e7519136e47
9122330d184d
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
6e7519136e47
e9529cbb3629
6e7519136e47
6e7519136e47
9c3e0fecdb92
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6d1c26ddce2b
6d1c26ddce2b
92951c9baca4
55536ddb8f01
55536ddb8f01
55536ddb8f01
55536ddb8f01
55536ddb8f01
009e9668a348
009e9668a348
009e9668a348
009e9668a348
009e9668a348
562595d8bd6f
019326f8da11
08bed57892a3
8ddae614e425
0e5d86b9d2f5
0e5d86b9d2f5
6d1c26ddce2b
6d1c26ddce2b
a1f4d4cbf1bd
6d1c26ddce2b
1dca24259b66
08bed57892a3
08bed57892a3
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
2a6cebe6e43e
8ddae614e425
08bed57892a3
8ddae614e425
08bed57892a3
08bed57892a3
08bed57892a3
08bed57892a3
8ddae614e425
08bed57892a3
4dea9ce5157f
4dea9ce5157f
c47efa94913b
c47efa94913b
c47efa94913b
c47efa94913b
4dea9ce5157f
c47efa94913b
0bbb7a374b5d
f16f3ae5a5b1
f16f3ae5a5b1
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
0bbb7a374b5d
f16f3ae5a5b1
4dea9ce5157f
f16f3ae5a5b1
24a46a8a6715
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
2e4d690ed90b
e7a1a4243786
f16f3ae5a5b1
e7a1a4243786
f16f3ae5a5b1
f16f3ae5a5b1
f16f3ae5a5b1
24a46a8a6715
af3387eae943
245867e8665e
24a46a8a6715
24a46a8a6715
24a46a8a6715
245867e8665e
cf7c4cd40054
24a46a8a6715
24a46a8a6715
24a46a8a6715
4e0d4ea990a7
245867e8665e
245867e8665e
f16f3ae5a5b1
4dea9ce5157f
e8d1e9d9d258
39940ecc871b
f16f3ae5a5b1
38255c2dc001
38255c2dc001
38255c2dc001
e8d1e9d9d258
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
39940ecc871b
e8d1e9d9d258
-- $Name: Пробуждение$
-- $Version: 1.0$
-- $Author: Khaelenmore Thaal$

instead_version "1.9.1"
require "para"
require "dash"
require "quotes"
require "hideinv"
require "kbd"
require "timer"
require "click"

-- Код и ядро
dofile "utils.lua"
dofile "battlefield.lua";
-- Общее
dofile "items.lua"
dofile "party.lua"
dofile "game_over.lua";
-- Часть 1: Лондон
dofile "london.lua"
dofile "wright.lua"
dofile "travel.lua"
dofile "dock2.lua"
dofile "warehouse18.lua"
dofile "warehouse32.lua"
dofile "leviathan.lua"
dofile "london_dice.lua"
-- Часть 2: Атлантида
dofile "atlantis.lua"
dofile "atlantis_ignis.lua"
dofile "atlantis_dlg.lua"
dofile "atlantis_intro.lua"
dofile "atlantis_ignis_on_fire.lua"
dofile "atlantis_iraa.lua"
dofile "atlantis_dyp.lua"
dofile "atlantis_looking_for_clues.lua"
dofile "atlantis_from_the_ashes.lua"
dofile "atlantis_iyhehevjiarr.lua"
-- Часть 3: Путь в Лсэрианотр
dofile "journey_venaedanotrr.lua"
dofile "journey_nleyyslanotrr.lua"
dofile "journey_nleyyslanotrr_temple.lua"
dofile "journey_temple.lua"
-- Часть 4: Пробуждение. Эпилог
dofile "lseryanotrr_intro.lua"
dofile "lseryanotrr_locations.lua"
dofile "lse_service_tunnels.lua"
dofile "lse_powerplant.lua";
dofile "lse_final_battle.lua";

global {
	warehouse18_found = false;
	warehouse32_found = false;
    warehouse32_visited = false;   
	dock_found = false;
	leviathan_discovered = false;
	atlantis_found = false;
	temple_found = false;
	iraaphaanotrr_found = false;
    dypatreanotrr_found = false;
	iraaphaanotrr_temple_found = false;
	dypatreanotrr_temple_found = false;
    venaedanotrr_temple_found = false;
    nleyyslanotrr_temple_found = false;
    deep_temple_found = false;
    lseryanotrr_found = false;
	
    rel_phaetlarr = 0;
	rel_walter = 0;
	rel_learr = 0;
	rel_anna = 0;
	rel_jack = 0;
    language_known = false;
    
    dt_code = {};
    dt_buttons = {};
    
    --Глобальные состояния(для концовок)
    conflict_resolved = false; -- Решен ли конфликт между навьярами
    artifacts_returned = false; -- Вернили ли артефакты из храма навьярам?
    wright_state = 0; -- был взят Райт на борт или нет
    goldman_state = 0; -- 0 - Голдман не раскрыт, 1 - Голдман казнен, 2 - Голдман задержан, 3 - Голдман изгнан
    leroy_state = 0; -- 0 - Леруа не раскрыт, 1 - Леруа казнен, 2 - Леруа задержан, 3 - Леруа изгнан
    iraa_scepter = false; -- был ли возвращен скипетр в Ираафаанотр
    svetlova_help = 0; -- Дополнительная помощь, оказанная Светловой в исследовании навьяров --увеличивается, если показать ей КНО и скипетр
};

game.enable_save = function ()
    if here().nosave then
        return false;
    end;
    return true;
end;

game.enable_autosave = function ()
    if here().noautosave then
        return false;
    end;
    return true;
end;

player_drake = player {
    var {
        hp = 10;
        has_light = false;
        party = {--[["learr", "radcliffe", "phaetlarr", "wright"]]};
        companion = nil;
        money = 200;
    };
	nam = "player";
	disp = "Дэвид Дрейк";
    disp2 = "Дрейка";
    disp3 = "Дрейку";
	where = 'port';
	
	obj = {'item_umbrella', 'item_charts', 'item_note_1', 'item_money', "item_bankbook"};
	
	pay = function(s, c)
		if (s.money >= c) then
			s.money = s.money - c;
			return true;
		else
			return false;
		end;
	end;
};

intro = room {
	nam = "intro";
	hideinv = true;
	disp = "Вступление";
	dsc = [[
		ВНИМАНИЕ: Это специальная предварительная версия игры. Ни один фрагмент игры не является финальным.^^
		Действие игры происходит в конце 19-го века. Вы играете за Дэвида Дрейка -- единственного сына богатого и уважаемого владельца транспортной компании "Вестхейвен Трансоушен". ^
		Несколько лет назад, когда Дэвиду было 10 лет, Уильям таинственным образом бесследно пропал. Полицейское расследование вскоре зашло в тупик и было прекращено. Через несколько месяцев компания, оставшаяся без своего владельца, обанкротилась, ее имущество распродается. ^
		После исчезновения отца Дэвид жил в Вашингтоне с бабушкой. Он пошел по стопам отца и выучился на инженера-кораблестроителя. Несколько дней назад в доме, где он жил, был обнаружен тайник, хранящий секретные документы отца -- карты, указывающие, по-видимому, на какие-то тайники Уильяма и записка с адресом и именем.^
		Одержимый идеей узнать больше, Дэвид отправляется в Лондон...
	]];
	obj = {
		vway("Начать игру", "{Начать игру}", 'aurora_borealis');
	}
};

pl = player_drake;

game.nam = "Пробуждение";
game.dsc = [[
	Действие игры происходит в конце 19-го века. Вы играете за Дэвида Дрейка, сына владельца крупной транспортной компании "Вестхейвен Трансоушен". Несколько лет назад Уильям Дрейк, отец главного героя бесследно пропадает. Компания вскоре разваливается. Поиски ни к чему не приводят. Когда казалось бы уже все потеряно, в доме Дрейков находят тайник с документами Уильяма. Несколько схем строений, принадлежащих компании и клочок бумаги с адресом некоего Майкла Райта в Лондоне. Естественно, Дэвид как можно скорее отправляется в Великобританию...
	Вам предстоит отыскать подводную лодку, посетить подводную станцию, построенную Уильямом, встретить древнюю расу подводных жителей, поучаствовать в событиях, описанных древними легендами этой расы и узнать, что стало с Уильямом Дрейком.
]];

game_act_phrases = {
	"Вы не знаете, что с этим делать. ";
	"Вам нет смысла это трогать. ";
	"Вам это ничем не поможет. ";
	"Это бессмысленно. ";
	"Незачем это трогать. ";
};

game_use_phrases = {
	"Вам это ничем не поможет. ";
	"Это бессмысленно. ";
	"Вы не знаете, как это сделать. "
};

game.act = function(s)
	return game_act_phrases[rnd(#game_act_phrases)];
end;

game.use = function(s)
	return game_use_phrases[rnd(#game_use_phrases)];
end;
game.inv = "INV: Если вы видите это сообщение -- это баг. ";

require "dbg"

function init()
	---modules init
    atlantis_init();
	leviathan_init();
	warehouse18_init();
	warehouse32_init();
    
    local nums = {1,2,3,4,5,6};
    for i = 1, 4 do 
        local index = rnd(#nums);
        table.insert(dt_code, nums[index]);
        table.remove(nums, index);
    end;
    nums = {1,2,3,4,5,6};
    for i = 1, 3 do 
        local index = rnd(#nums);
        table.insert(dt_buttons, nums[index]);
        table.remove(nums, index);
    end;
    ---game init
    pl.where = intro;
    ---debug
    --pl.where = "dyp_obelisk_puzzle";
    --language_known = true;
    --put("item_toolbox", pl);
    --put("item_electric_lamp", pl);
    --put("item_dynamo", pl);
    --put("item_toolbox", pl);
    --put("item_cogs", pl);
    --put("item_ducttape", pl);
    --put("item_electrodes", pl);
    --pl.where = dock_2;
    --pl.where = warehouse_32;
    --put(item_lamp, pl);
    --language_known = true;
    --pl.where = "leviathan_airlock";
    --move(submarine_leviathan, "iyh_rear_entrance_foot");
    --put(item_suit, pl);
    --put(item_suit, pl);

    --pl.where = "atlantis_intro_dock";

    ---leviathan
    --submarine_leviathan.airpump = false;
    --[[
    leviathan_airlock.has_light = true;
    leviathan_wardroom.has_light = true;
    leviathan_wheelhouse.has_light = true;
    leviathan_corridor.has_light = true;
    leviathan_cabin_1.has_light = true;
    leviathan_cabin_2.has_light = true;
    leviathan_cabin_3.has_light = true;
    leviathan_cabin_4.has_light = true;
    leviathan_cabin_5.has_light = true;
    leviathan_captains_cabin.has_light = true;
    leviathan_cargo_hold.has_light = true;
    leviathan_engines.has_light = true;
    leviathan_lower_deck.has_light = true;
    leviathan_life_support.has_light = true;
    submarine_leviathan.air_level = 432000;
    submarine_leviathan.battery = true; 
    submarine_leviathan.battery_charge = 100;
    submarine_leviathan.circuit_breaks = 0;
    submarine_leviathan.valves_to_replace = 0;
    submarine_leviathan.power_on = true
    pl.party = {'wright', 'learr'};
    char_learr.follow = true;
    atlantis_found = true;--]]
    --take(item_colt);
    --take(item_harpoon);
   -- checkers_game:reset();
    --pl.where = "checkers_game";
    --- iraaphaanotrr
   --move(submarine_leviathan, "iraa_temple_entrance");
	--[[
	---IYH
	lifeon(char_learr);
	lifeon(char_wright);
	lifeon(char_radcliffe);
	lifeon(char_anna);
	lifeon(char_aikerjarr_lev);
	pl.party = {'learr', 'wright', 'radcliffe', 'anna'};
	atlantis_found = true;
	move(submarine_leviathan, "ctt_dyp_temple_entrance");
	--move(submarine_leviathan, "iyh_far_from_entrance_foot");
	pl.where = leviathan_wheelhouse;
	submarine_leviathan.battery = true; -- Состояние батареи 
	submarine_leviathan.battery_charge = 100; -- Уровень заряда батареи
	submarine_leviathan.circuit_breaks = 0; -- Разрывы цепи
	submarine_leviathan.valves_to_replace = 0; -- Количество клапанов, которые нужно заменить для полноценной работы
	submarine_leviathan.power_on = true; -- включена ли энергия
	submarine_leviathan.air_level = 432000; -- запас воздуха. Максимум - 5 дней(5 * 24 * 60 * 60 = 432000)
	submarine_leviathan.airpump = false;
	leviathan_airlock.has_light = true;
	leviathan_wardroom.has_light = true;
	leviathan_wheelhouse.has_light = true;
	leviathan_corridor.has_light = true;
	leviathan_cabin_1.has_light = true;
	leviathan_cabin_2.has_light = true;
	leviathan_cabin_3.has_light = true;
	leviathan_cabin_4.has_light = true;
	leviathan_cabin_5.has_light = true;
	leviathan_captains_cabin.has_light = true;
	leviathan_cargo_hold.has_light = true;
	leviathan_engines.has_light = true;
	leviathan_lower_deck.has_light = true;
	leviathan_life_support.has_light = true;
	--]]
	
	--- Chapter 1: Atlantis
	--[[submarine_leviathan.battery = true; -- Состояние батареи 
	submarine_leviathan.battery_charge = 100; -- Уровень заряда батареи
	submarine_leviathan.circuit_breaks = 0; -- Разрывы цепи
	submarine_leviathan.valves_to_replace = 0; -- Количество клапанов, которые нужно заменить для полноценной работы
	submarine_leviathan.power_on = true; -- включена ли энергия
	submarine_leviathan.air_level = 432000; -- запас воздуха. Максимум - 5 дней(5 * 24 * 60 * 60 = 432000)
	submarine_leviathan.airpump = false;
	leviathan_airlock.has_light = true;
	leviathan_wardroom.has_light = true;
	leviathan_wheelhouse.has_light = true;
	leviathan_corridor.has_light = true;
	leviathan_cabin_1.has_light = true;
	leviathan_cabin_2.has_light = true;
	leviathan_cabin_3.has_light = true;
	leviathan_cabin_4.has_light = true;
	leviathan_cabin_5.has_light = true;
	leviathan_captains_cabin.has_light = true;
	leviathan_cargo_hold.has_light = true;
	leviathan_engines.has_light = true;
	leviathan_lower_deck.has_light = true;
	leviathan_life_support.has_light = true;
	
	pl.party = {'wright'};
	put(item_toolbox, pl);
	put(item_ducttape, pl);
	pl.where = "leviathan_airlock";
	atlantis_found = true;
	move(submarine_leviathan, "atl_aqua_leviathan_dock");
    submarine_leviathan:enable();   ]]
    	   
    --ven_temple_l1.position = "66";   
    --put(item_ven_tablet, pl);
    --put(item_harpoon, pl);
    --put(item_colt, pl);
    --ven_shark.position = "55";
	--pl.where = "za_plaetlarr_fight";
    --pl.where = "lse_final_battle";
    --move(submarine_leviathan, "za_temple_back_entrance_foot");
    --char_anna.follow = true;
    --pl.where = "ven_chest_look";
    --move(ven_shark, "ven_temple_l1");
    
	--put(item_suit, pl);
	
	-- pl.where = warehouse_32;
	-- pl.where = w32_mgr;
	
	-- put(item_cogs, pl);
	-- put(item_pump_details, pl);
	-- put(item_electrodes, pl);
	--put(item_lamp, pl);
	-- pl.where = aurora_borealis;
	-- move(submarine_leviathan, first_city_entrance);
	-- move(submarine_leviathan, first_city_outer_east);
	-- walk(final_scene);
	-- walk(leviathan_wardroom);
	-- walk(leviathan_wardroom);
	-- put("char_learr", "leviathan_wardroom");
	-- put("char_phaetlarr", "leviathan_engines");
	-- put("char_radcliffe", "leviathan_engines");
	-- put("char_wright", "leviathan_wardroom");
	-- pl.where = leviathan_airlock;
	-- pl.where = hotel_street;
	-- pl.where = warehouse_32_entry;
	-- dock_found = true;
end;