Files @ 730fdc8be55f
Branch filter:

Location: games/Awakening/main.lua - annotation

Silverwing
Progress on dlg rewrite; Svetlova dlg rewrite
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
9c3e0fecdb92
a2b2af954b81
fda22c203ad5
fda22c203ad5
fda22c203ad5
c1561bd81710
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
38a48ac67d2a
6e7519136e47
6e7519136e47
38a48ac67d2a
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
cc071a887ee2
507610e7f1cb
407f6de160dd
8e0d5d6edd8f
387d673c520d
eaf92b073787
f75538f0cc0b
4dea9ce5157f
c4b207ce4252
fb3d92b396c9
9ffe176b5005
ed3e36144593
ed3e36144593
387d673c520d
81de15cefa8f
81de15cefa8f
3564e85ac89c
6942b6162aff
6942b6162aff
81de15cefa8f
81de15cefa8f
81de15cefa8f
81de15cefa8f
81de15cefa8f
c4b207ce4252
6e7519136e47
e0c40d16812c
e0c40d16812c
515b20cf25e0
e0c40d16812c
e0c40d16812c
e0c40d16812c
49542c019655
4dea9ce5157f
4dea9ce5157f
4dea9ce5157f
bbb250d91321
bbb250d91321
bbb250d91321
bbb250d91321
712baf728ed1
712baf728ed1
712baf728ed1
712baf728ed1
712baf728ed1
712baf728ed1
6ed973c10053
6ed973c10053
6ed973c10053
fce8b5c6be31
fce8b5c6be31
6ed973c10053
6ed973c10053
ec336e394222
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
5c21237a618f
c4b207ce4252
c4b207ce4252
cf7c4cd40054
cf7c4cd40054
c4b207ce4252
5c21237a618f
6e7519136e47
6e7519136e47
5c21237a618f
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
dd1707453c3e
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
f02901977ca4
95c7d8d4730c
6e7519136e47
f02901977ca4
6e7519136e47
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
6e7519136e47
c4b207ce4252
c4b207ce4252
c4b207ce4252
c4b207ce4252
6e7519136e47
6e7519136e47
6e7519136e47
9c3e0fecdb92
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6ed973c10053
6e7519136e47
6e7519136e47
4dea9ce5157f
7a77759c31ff
7a77759c31ff
1dca24259b66
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
e713ba125275
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
c47efa94913b
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"

-- Код и ядро
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"
-- Часть 2
dofile "leviathan.lua"
dofile "atlantis.lua"
dofile "atlantis_ignis.lua"
dofile "atlantis_dlg.lua"
dofile "atlantis_intro.lua"
dofile "atlantis_ignis_on_fire.lua"
dofile "atlantis_looking_for_clues.lua"
dofile "atlantis_from_the_ashes.lua"
dofile "atlantis_iyhehevjiarr.lua"
dofile "atlantis_catching_the_tail.lua"
-- Часть 3
dofile "journey_venaedanotrr.lua"
dofile "journey_zayslanotrr.lua"
dofile "journey_zayslanotrr_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";
--dofile "final_scene.lua";
--dofile "final_battle.lua";
--dofile "first_city_inner_rim.lua"
--dofile "first_city_middle_rim.lua"
--dofile "first_city_outer_rim.lua"

global {
	warehouse18_found = false;
	warehouse32_found = false;
    warehouse32_visited = false;   
	dock_found = false;
	leviathan_discovered = false;
	atlantis_found = false;
	temple_found = false;
	nearest_cities_found = false;
	iraaphaanotrr_temple_found = false;
	dypatreanotrr_temple_found = false;
    venaedanotrr_temple_found = false;
    zayslanotrr_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;
    
    dt_code = {};
    dt_buttons = {};
};



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', 
	};
	
	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
	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 = "atlantis_intro_dock";
    
    ---leviathan
    --pl.where = "leviathan_airlock";
    --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;
	--[[
	---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;
	atl_iyh_state = 7;
	--]]
	
	--- 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;