1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

vcmi: remove FULL_HP_REGENERATION bonus

Just set HP_REGENERATION to high number
(in OH3 doubled stack health is sufficient)
This commit is contained in:
Konstantin 2023-03-05 03:13:47 +03:00
parent 62e579f672
commit 496c1def12
11 changed files with 15 additions and 32 deletions

View File

@ -200,8 +200,6 @@
"core.bonus.FLYING.description": "Can Fly (ignores obstacles)",
"core.bonus.FREE_SHOOTING.name": "Shoot Close",
"core.bonus.FREE_SHOOTING.description": "Can shoot in Close Combat",
"core.bonus.FULL_HP_REGENERATION.name": "Regeneration",
"core.bonus.FULL_HP_REGENERATION.description": "May regenerate to full health",
"core.bonus.GARGOYLE.name": "Gargoyle",
"core.bonus.GARGOYLE.description": "Cannot be rised or healed",
"core.bonus.GENERAL_DAMAGE_REDUCTION.name": "Reduce Damage (${val}%)",
@ -211,7 +209,7 @@
"core.bonus.HEALER.name": "Healer",
"core.bonus.HEALER.description": "Heals allied units",
"core.bonus.HP_REGENERATION.name": "Regeneration",
"core.bonus.HP_REGENERATION.description": "Heals ${val} hit points every round",
"core.bonus.HP_REGENERATION.description": "Heals ${SHval} hit points every round",
"core.bonus.JOUSTING.name": "Champion Charge",
"core.bonus.JOUSTING.description": "+${val}% damage per hex travelled",
"core.bonus.KING.name": "King",

View File

@ -198,8 +198,6 @@
"core.bonus.FLYING.description": "Kann fliegen (ignoriert Hindernisse)",
"core.bonus.FREE_SHOOTING.name": "Nah schießen",
"core.bonus.FREE_SHOOTING.description": "Kann im Nahkampf schießen",
"core.bonus.FULL_HP_REGENERATION.name": "Regeneration",
"core.bonus.FULL_HP_REGENERATION.description": "Kann auf volle Lebenspunkte regenerieren",
"core.bonus.GARGOYLE.name": "Gargoyle",
"core.bonus.GARGOYLE.description": "Kann nicht aufgerichtet oder geheilt werden",
"core.bonus.GENERAL_DAMAGE_REDUCTION.name": "Schaden vermindern (${val}%)",
@ -209,7 +207,7 @@
"core.bonus.HEALER.name": "Heiler",
"core.bonus.HEALER.description": "Heilt verbündete Einheiten",
"core.bonus.HP_REGENERATION.name": "Regeneration",
"core.bonus.HP_REGENERATION.description": "Heilt ${val} Trefferpunkte jede Runde",
"core.bonus.HP_REGENERATION.description": "Heilt ${SHval} Trefferpunkte jede Runde",
"core.bonus.JOUSTING.name": "Champion Charge",
"core.bonus.JOUSTING.description": "+${val}% Schaden pro zurückgelegtem Feld",
"core.bonus.KING1.name": "König 1",

View File

@ -128,8 +128,6 @@
"core.bonus.FLYING.description": "Może latać (ignoruje przeszkody)",
"core.bonus.FREE_SHOOTING.name": "Bliski Strzał",
"core.bonus.FREE_SHOOTING.description": "Może strzelać w zasięgu walki wręcz",
"core.bonus.FULL_HP_REGENERATION.name": "Regeneracja",
"core.bonus.FULL_HP_REGENERATION.description": "Może zregenerować się do pełni zdrowia",
"core.bonus.GARGOYLE.name": "Gargulec",
"core.bonus.GARGOYLE.description": "Nie może być wskrzeszony lub uleczony",
"core.bonus.GENERAL_DAMAGE_REDUCTION.name": "Zmniejsz obrażenia (${val}%)",
@ -139,7 +137,7 @@
"core.bonus.HEALER.name": "Uzdrowiciel",
"core.bonus.HEALER.description": "Leczy sprzymierzone jednostki",
"core.bonus.HP_REGENERATION.name": "Regeneracja",
"core.bonus.HP_REGENERATION.description": "Leczy ${val} punktów zdrowia każdej rundy",
"core.bonus.HP_REGENERATION.description": "Leczy ${SHval} punktów zdrowia każdej rundy",
"core.bonus.JOUSTING.name": "Szarża Czempiona",
"core.bonus.JOUSTING.description": "+${val}% obrażeń na przebytego heksa",
"core.bonus.KING1.name": "Król 1",

View File

@ -213,8 +213,6 @@
"core.bonus.FLYING.description": "Игнорирует препятствия на поле боя",
"core.bonus.FREE_SHOOTING.name": "Стреляет вблизи",
"core.bonus.FREE_SHOOTING.description": "Может стрелять в ближнем бою",
"core.bonus.FULL_HP_REGENERATION.name": "Регенерация",
"core.bonus.FULL_HP_REGENERATION.description": "Восстанавливает полное здоровье в начале своего хода",
"core.bonus.GARGOYLE.name": "Бескровный",
"core.bonus.GARGOYLE.description": "Не может быть исцелен и воскрешен",
"core.bonus.GENERAL_DAMAGE_REDUCTION.name": "Уменьшение урона (${val}%)",
@ -224,7 +222,7 @@
"core.bonus.HEALER.name": "Целитель",
"core.bonus.HEALER.description": "Исцеляет дружественные юниты",
"core.bonus.HP_REGENERATION.name": "Регенерация",
"core.bonus.HP_REGENERATION.description": "Исцеляет ${val} очков здоровья каждый ход",
"core.bonus.HP_REGENERATION.description": "Исцеляет ${SHval} очков здоровья каждый ход",
"core.bonus.JOUSTING.name": "Разгон",
"core.bonus.JOUSTING.description": "+${val}% урона за каждую пройденную клетку",
"core.bonus.KING.name": "Король",

View File

@ -188,8 +188,6 @@
"core.bonus.FLYING.description" : "Може літати (ігнорує перешкоди)",
"core.bonus.FREE_SHOOTING.name" : "Стріляє впритул",
"core.bonus.FREE_SHOOTING.description" : "Може стріляти в ближньому бою",
"core.bonus.FULL_HP_REGENERATION.name" : "Регенерація",
"core.bonus.FULL_HP_REGENERATION.description" : "Може регенерувати до повного здоров'я",
"core.bonus.GARGOYLE.name" : "Горгулья",
"core.bonus.GARGOYLE.description" : "Не може бути відроджена або зцілена",
"core.bonus.GENERAL_DAMAGE_REDUCTION.name" : "Зменшує шкоду (${val}%)",
@ -199,7 +197,7 @@
"core.bonus.HEALER.name" : "Цілитель",
"core.bonus.HEALER.description" : "Лікує союзників",
"core.bonus.HP_REGENERATION.name" : "Регенерація",
"core.bonus.HP_REGENERATION.description" : "Відновлює ${val} очок здоров'я кожного раунду",
"core.bonus.HP_REGENERATION.description" : "Відновлює ${SHval} очок здоров'я кожного раунду",
"core.bonus.JOUSTING.name" : "Турнірна перевага",
"core.bonus.JOUSTING.description" : "+${val}% шкоди за кожен пройдений гекс",
"core.bonus.KING.name" : "Король",

View File

@ -215,14 +215,6 @@
},
"FULL_HP_REGENERATION":
{
"graphics":
{
"icon": "zvs/Lib1.res/E_TROLL"
}
},
"GARGOYLE":
{
"graphics":

View File

@ -92,8 +92,8 @@
{
"regenerate" :
{
"type" : "FULL_HP_REGENERATION",
"subtype" : 1
"type" : "HP_REGENERATION",
"val" : 50
}
},
"upgrades": ["wraith"],
@ -120,8 +120,8 @@
{
"regenerate" :
{
"type" : "FULL_HP_REGENERATION",
"subtype" : 1
"type" : "HP_REGENERATION",
"val" : 50
},
"drainsMana" :
{

View File

@ -571,7 +571,8 @@
{
"regenerates" :
{
"type" : "FULL_HP_REGENERATION"
"type" : "HP_REGENERATION",
"val" : 50
}
},
"graphics" :

View File

@ -85,6 +85,9 @@ std::string CBonusTypeHandler::bonusToString(const std::shared_ptr<Bonus> & bonu
if (text.find("${MR}") != std::string::npos)
boost::algorithm::replace_all(text, "${MR}", std::to_string(bearer->magicResistance()));
if (text.find("${SHval}") != std::string::npos) //regeneration case
boost::algorithm::replace_all(text, "${SHval}", std::to_string(std::min(static_cast<si32>(bearer->MaxHealth()),bearer->valOfBonuses(Selector::typeSubtype(bonus->type, bonus->subtype)))));
return text;
}

View File

@ -249,7 +249,6 @@ public:
BONUS_NAME(FIRE_SHIELD) \
BONUS_NAME(UNDEAD) \
BONUS_NAME(HP_REGENERATION) /*creature regenerates val HP every new round*/ \
BONUS_NAME(FULL_HP_REGENERATION) /*first creature regenerates all HP every new round; subtype 0 - animation 4 (trolllike), 1 - animation 47 (wightlike)*/ \
BONUS_NAME(MANA_DRAIN) /*value - spell points per turn*/ \
BONUS_NAME(LIFE_DRAIN) \
BONUS_NAME(DOUBLE_DAMAGE_CHANCE) /*value in %, eg. dread knight*/ \

View File

@ -6704,9 +6704,7 @@ void CGameHandler::runBattle()
bte.effect = Bonus::HP_REGENERATION;
const int32_t lostHealth = stack->MaxHealth() - stack->getFirstHPleft();
if(stack->hasBonusOfType(Bonus::FULL_HP_REGENERATION))
bte.val = lostHealth;
else if(stack->hasBonusOfType(Bonus::HP_REGENERATION))
if(stack->hasBonusOfType(Bonus::HP_REGENERATION))
bte.val = std::min(lostHealth, stack->valOfBonuses(Bonus::HP_REGENERATION));
if(bte.val) // anything to heal