-- $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;