peterburg/main3.lua

141 lines
3.2 KiB
Lua
Raw Normal View History

--$Name: Полёт в Петербург$
2021-08-20 18:24:57 +03:00
--$Version: 1.3.14$
2020-12-21 10:55:56 +02:00
--$Author:Александр Яковлев$
require "fmt"
if instead.tiny then
function iface:tab()
return ' '
end
end
if not instead.tiny then
require "theme"
end
fmt.dash = true
fmt.quotes = true
2021-01-14 14:32:01 +02:00
if std.SOURCES_DIRS == nil then
std.SOURCES_DIRS = { 'parser', 'rooms' }
end
2020-12-21 10:55:56 +02:00
require 'parser/mp-ru'
2021-01-08 17:07:41 +02:00
mp.undo = 3
mp.auto_animate = false
2020-12-21 10:55:56 +02:00
function set_pic(f)
if instead.tiny then
return
end
2020-12-21 12:08:22 +02:00
--if theme.get('scr.gfx.bg') ~= f then
2020-12-21 10:55:56 +02:00
theme.gfx.bg('bgr/'..f)
2020-12-21 12:08:22 +02:00
--end
2020-12-21 10:55:56 +02:00
end
2020-12-22 16:36:52 +02:00
global {
score = 0,
2021-01-05 19:11:11 +02:00
maxscore = 3
2020-12-22 16:36:52 +02:00
}
2020-12-21 10:55:56 +02:00
game.dsc = ''
2020-12-21 12:08:22 +02:00
player.description = "Здесь нет зеркал. Но хотя бы ноги выглядят прекрасно.";
2020-12-21 10:55:56 +02:00
pl.plural = false
pl.pronouns = 'fem'
pl.strpronouns = 'она/её'
2020-12-21 10:55:56 +02:00
2020-12-22 16:36:52 +02:00
function givepoint()
score = score + 1;
pn 'Ваш счёт увеличился на 1 очко.';
end
2020-12-21 10:55:56 +02:00
dofile('custom_parser.lua')
2020-12-21 15:00:29 +02:00
dofile('rooms/end.lua')
dofile('rooms/objects.lua')
2020-12-21 10:55:56 +02:00
dofile('rooms/pantry.lua')
2020-12-21 10:55:56 +02:00
dlg {
nam = 'main';
decor = function(here)
if not (here:visited()) then
pn(fmt.b('Полёт в Петербург'));
pn 'Фантастическая зарисовка^^';
pn(fmt.b('Выберите свои местоимения^'));
pn(fmt.em('Это - парсерная игра. Введите номер ответа и нажмите Enter. Игра управляется только с клавиатуры.^'));
pn('Выбор позднее можно сменить командой «местоимения». Чтобы прочитать справку, наберите «помощь».');
end
end;
continue = function()
walk('pantry');
end;
title = function(here)
if not (here:visited()) then
return ''
end
return 'Выберите местоимения (сейчас -- "'.. pl.strpronouns ..'")'
2020-12-21 12:08:22 +02:00
end;
2020-12-21 10:55:56 +02:00
phr = {
{
nam = 'phr_she',
cond = true,
2021-01-08 19:04:47 +02:00
'она/ты',
2020-12-21 10:55:56 +02:00
function()
pl.plural = false;
pl.pronouns = 'fem';
2021-01-08 19:04:47 +02:00
pl.strpronouns = 'она/ты';
std.player.word = 'ты/жр,2л';
here().continue();
2020-12-21 10:55:56 +02:00
end
};
{
nam = 'phr_he',
cond = true,
2021-01-08 19:04:47 +02:00
'он/ты',
2020-12-21 10:55:56 +02:00
function()
pl.plural = false;
pl.pronouns = 'masc';
2021-01-08 19:04:47 +02:00
pl.strpronouns = 'он/ты';
std.player.word = 'ты/мр,2л';
here().continue();
2020-12-21 10:55:56 +02:00
end
};
{
nam = 'phr_theysingle',
cond = true,
2021-01-08 19:04:47 +02:00
'оно/ты',
2020-12-21 10:55:56 +02:00
function()
pl.plural = false;
pl.pronouns = 'other';
2021-01-08 19:04:47 +02:00
pl.strpronouns = 'оно/ты';
std.player.word = 'ты/cр,2л';
here().continue();
end
};
--[[
{
nam = 'phr_theyplural',
cond = true,
'оно/вы',
function()
pl.plural = true;
pl.pronouns = 'other';
pl.strpronouns = 'оно/вы';
std.player.word = 'вы/cр,2л';
here().continue();
2020-12-21 10:55:56 +02:00
end
};
]]
{
2021-01-08 19:04:47 +02:00
nam = 'phr_plural',
cond = true,
2021-01-08 19:04:47 +02:00
'они/вы',
2020-12-21 10:55:56 +02:00
function()
pl.plural = true;
pl.pronouns = 'other';
2021-01-08 19:04:47 +02:00
pl.strpronouns = 'они/вы';
std.player.word = 'вы/cр,мн,2л';
here().continue();
2020-12-21 10:55:56 +02:00
end
}
2020-12-21 10:55:56 +02:00
}
}