1
0
Fork 0
mirror of https://gitlab.com/Oreolek/duel.git synced 2024-06-26 03:50:55 +03:00
duel/tools.lua
2017-03-06 18:42:27 +07:00

118 lines
2.3 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

init = function ()
std.dlg.noinv = true
game.player = menu_player {}
char.quests = {}
take(menu {
nam = "Карта",
menu = function()
walk('map')
end
})
take(menu {
nam = "Квесты",
menu = function()
walk('quests')
end
})
take(menu {
nam = "Инвентарь",
menu = function()
walk('inventory')
end
})
char.act = nil
place( proxy_menu {
disp = 'ОСМОТРЕТЬ';
acts = { inv = 'exam' };
sources = { scene = true, inv = false }; -- осмотр инвентаря вынесен отдельно
}, me())
place( proxy_menu {
disp = 'ВЗЯТЬ';
acts = { inv = 'take' };
sources = { scene = true, inv = false };
}, me())
place( proxy_menu {
disp = 'ВЫБРОСИТЬ';
acts = { inv = 'drop' };
sources = { scene = false, inv = true };
}, me())
place( proxy_menu {
disp = 'ОТКРЫТЬ';
acts = { inv = 'open' };
sources = { scene = false, inv = true };
}, me())
place( proxy_menu {
disp = 'ЗАКРЫТЬ';
acts = { inv = 'close' };
sources = { scene = false, inv = true };
}, me())
place( proxy_menu {
disp = 'ГОВОРИТЬ С';
acts = { inv = 'talk' };
sources = { scene = true, inv = false };
}, me())
end
game.after_take = function(s, w)
take(w)
end
game.after_drop = function(s, w)
drop(w)
end
game.exam = 'Ничего необычного.'
engineer = function()
if char.plural == true then
return 'инженеры'
end
return 'инженер'
end
that = function()
if char.plural == true then
return 'те'
end
return 'тот'
end
pronoun_3 = function()
if char.gender == 'she' then
return 'она'
end
if char.gender == 'he' then
return 'он'
end
if char.gender == 'it' then
return 'оно'
end
return 'они'
end
pronoun_1 = function()
if char.plural == true then
return 'мы'
end
return 'я'
end
endings = function()
if char.plural == true then
return 'и'
end
if char.gender == 'she' then
return 'а'
end
return ''
end
plural = function(a, b)
if char.plural == true then
return b
end
return a
end
rndstr = function(strings)
return strings[rnd(stead.table.maxn(strings))];
end
rndalt = function(yes, no)
if rnd(2) == 1 then
return yes
end
return no
end