1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

change MANA_PER_KNOWLEGDE to percentage

This commit is contained in:
Kris-Ja
2024-03-23 19:57:56 +01:00
parent 6381a6f601
commit 05bbb45824
9 changed files with 13 additions and 13 deletions

View File

@@ -390,7 +390,7 @@ void CGHeroInstance::initHero(CRandomGenerator & rand)
// load base hero bonuses, TODO: per-map loading of base hero bonuses
// must be done separately from global bonuses since recruitable heroes in taverns
// are not attached to global bonus node but need access to some global bonuses
// e.g. MANA_PER_KNOWLEDGE for correct preview and initial state after recruit for(const auto & ob : VLC->modh->heroBaseBonuses)
// e.g. MANA_PER_KNOWLEDGE_PERCENTAGE for correct preview and initial state after recruit for(const auto & ob : VLC->modh->heroBaseBonuses)
// or MOVEMENT to compute initial movement before recruiting is finished
const JsonNode & baseBonuses = VLC->settings()->getValue(EGameSettings::BONUSES_PER_HERO);
for(const auto & b : baseBonuses.Struct())
@@ -1082,7 +1082,7 @@ std::string CGHeroInstance::nodeName() const
si32 CGHeroInstance::manaLimit() const
{
return si32(getPrimSkillLevel(PrimarySkill::KNOWLEDGE)
* (valOfBonuses(BonusType::MANA_PER_KNOWLEDGE)));
* (valOfBonuses(BonusType::MANA_PER_KNOWLEDGE_PERCENTAGE))) / 100;
}
HeroTypeID CGHeroInstance::getPortraitSource() const