1
0
Fork 0
mirror of https://gitlab.com/Oreolek/duel.git synced 2024-06-06 18:28:24 +03:00
duel/tools.lua

74 lines
1.2 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 ()
map = obj {
nam = "Карта",
inv = function()
walk('map')
end
}
take(map)
quests = obj {
nam = "Квесты",
inv = function()
walk('quests')
end
}
take(quests)
inventory = obj {
nam = "Инвентарь",
inv = function()
walk('inventory')
end
}
take(inventory)
char.act = nil
end
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
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