Skip to content

Commit

Permalink
Effects Int: Potions: add potions for breath. Closes #1733
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Nov 26, 2024
1 parent 9062cd6 commit 8887028
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ defense_poison=from poison
Health=Health
Speed=Speed
Jump=Jump

Breath=Breathing underwater
Suffocation=Suffocation

# Food
@1@2 to satiety=@1@2 to satiety
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ defense_poison=от отравления
Health=Здоровье
Speed=Скорость
Jump=Прыжок

Breath=Дыхание под водой
Suffocation=Удушье

# Food
@1@2 to satiety=@1@2 к сытости
Expand Down
8 changes: 5 additions & 3 deletions mods/lord/Player/Help/lord_tooltips/src/snippet/potions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ end
--- @param value number
--- @return string
local function value_color(value)
return tonumber(value) > 0 and '#aea' or '#f66'
return value
and (tonumber(value) > 0 and '#aea' or '#f66')
or tt.COLOR_DEFAULT
end


Expand All @@ -38,10 +40,10 @@ return function (item_string)

local tpl = effect.is_periodical and template.periodical or template.general
local effect_name = effect.name:first_to_upper()
local amount = sign(effect.power.amount) .. effect.power.amount
local amount = effect.power.amount and (sign(effect.power.amount) .. effect.power.amount)
local amount_color = value_color(effect.power.amount)
effects_strings[#effects_strings +1] =
'' .. S(tpl, S(effect_name), colorize(amount_color, amount), effect.power.duration)
'' .. S(tpl, S(effect_name), colorize(amount_color, amount or ''), effect.power.duration)

return #effects_strings ~= 0
and ('\n' ..
Expand Down
10 changes: 10 additions & 0 deletions mods/lord/Tools/lord_potions/locale/lord_potions.en.tr
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ Dol Guldur's Fetters=Dol Guldur's Fetters
A dark potion that binds the body=A dark potion that binds the body
like the heavy chains of the dungeons of Dol Guldur.= like the heavy chains of the dungeons of Dol Guldur.
It weighs down your legs, making jumping impossible.=Утяжеляет ноги, делая прыжки невозможными.


Limpë=Limpë
Sacred drink, crafted from the dew of Telperion and Laurelin,=Sacred drink, crafted from the dew of Telperion and Laurelin,
grants ability to hold their breath.= grants ability to hold their breath.
Legends say it was first gifted to the Elves by Ulmo, the Lord of Waters.=Legends say it was first gifted to the Elves by Ulmo, the Lord of Waters.

Breath of Morgoth=Breath of Morgoth
A dangerous potion that blocks breathing and causes suffocation,=A dangerous potion that blocks breathing and causes suffocation,
as if darkness is consuming you from within.= as if darkness is consuming you from within.
10 changes: 10 additions & 0 deletions mods/lord/Tools/lord_potions/locale/lord_potions.ru.tr
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ Dol Guldur's Fetters=Оковы Дол Гулдура
A dark potion that binds the body=Мрачное зелье, сковывающее тело,
like the heavy chains of the dungeons of Dol Guldur.= словно тяжёлые цепи темниц Дол Гулдура.
It weighs down your legs, making jumping impossible.=Утяжеляет ноги, делая прыжки невозможными.


Limpë=Limpë
Sacred drink, crafted from the dew of Telperion and Laurelin,=Cвященный напиток, созданный из капель росы Телпериона и Лаурелина,
grants ability to hold their breath.= наделяет способностью задерживать дыхание.
Legends say it was first gifted to the Elves by Ulmo, the Lord of Waters.=Легенды говорят, что его впервые даровал эльфам Улмо, Владыка Вод.

Breath of Morgoth=Дыхание Моргота
A dangerous potion that blocks breathing and causes suffocation,=Опасное зелье, блокирующее дыхание и вызывающее удушье,
as if darkness is consuming you from within.= как если бы мрак поглощал тебя изнутри.
40 changes: 34 additions & 6 deletions mods/lord/Tools/lord_potions/src/lord_potions/config/potions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local config = {
['+3'] = { amount = 4, duration = 100, },
},
description =
S('An ancient elixir from the West')..'\n'..
S('An ancient elixir from the West')..'\n'..
S(' that restores health and heals wounds.')
,
},
Expand All @@ -41,7 +41,7 @@ local config = {
['-3'] = { amount = -3, duration = 100, },
},
description =
S('Thick toxic brew based on orc pus, corroding both body and spirit.')..'\n'..
S('Thick toxic brew based on orc pus, corroding both body and spirit.')..'\n'..
S('Corrodes the body from the inside and covers it with wounds from the outside.')
},

Expand All @@ -55,7 +55,7 @@ local config = {
['+3'] = { amount = 3, duration = 100, },
},
description =
S('An extremely refreshing and invigorating drink')..'\n'..
S('An extremely refreshing and invigorating drink')..'\n'..
S(' made from the waters of the Metedras springs.')..'\n'..
S('A unique drink that grants the speed of the ancient trees.')
},
Expand All @@ -68,7 +68,7 @@ local config = {
['-3'] = { amount = -3, duration = 100, },
},
description =
S('Created from the venom of Shelob\'s web,')..'\n'..
S('Created from the venom of Shelob\'s web,')..'\n'..
S(' which she uses to paralyze enemies.')..'\n'..
S('A venomous potion that binds the body like Shelob’s web.')
},
Expand All @@ -83,7 +83,7 @@ local config = {
['+3'] = { amount = 4, duration = 100, },
},
description =
S('А strong stimulating drink of the elves.')..'\n'..
S('А strong stimulating drink of the elves.')..'\n'..
S('A potion that allows you to jump higher,')..'\n'..
S(' as if invisible wings were lifting you into the air.')
},
Expand All @@ -96,10 +96,38 @@ local config = {
['-3'] = { amount = -3, duration = 100, },
},
description =
S('A dark potion that binds the body')..'\n'..
S('A dark potion that binds the body')..'\n'..
S(' like the heavy chains of the dungeons of Dol Guldur.')..'\n'..
S('It weighs down your legs, making jumping impossible.')
},

-- BREATH
{
item_name = 'lord_potions:limpe', title = S('Limpë'), color = '#0ff',
effect = lord_effects.BREATH,
powers = {
['+1'] = { duration = 20, },
['+2'] = { duration = 50, },
['+3'] = { duration = 100, },
},
description =
S('Sacred drink, crafted from the dew of Telperion and Laurelin,')..'\n'..
S(' grants ability to hold their breath.')..'\n'..
S('Legends say it was first gifted to the Elves by Ulmo, the Lord of Waters.')
},
{
item_name = 'lord_potions:morgoth_breath', title = S('Breath of Morgoth'), color = '#222',
effect = lord_effects.SUFFOCATION,
is_periodical = true,
powers = {
['-1'] = { amount = -1, duration = 20, },
['-2'] = { amount = -2, duration = 50, },
['-3'] = { amount = -3, duration = 100, },
},
description =
S('A dangerous potion that blocks breathing and causes suffocation,')..'\n'..
S(' as if darkness is consuming you from within.')
},
}


Expand Down

0 comments on commit 8887028

Please sign in to comment.