diff --git a/config/skills.json b/config/skills.json index 9b8257e3e..10ebbcce7 100644 --- a/config/skills.json +++ b/config/skills.json @@ -270,6 +270,105 @@ ] } }, + "mysticism" : { + "basic" : { + "description" : "", + "effects" : [ + { + "type" : "MANA_REGENERATION", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "type" : "MANA_REGENERATION", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "type" : "MANA_REGENERATION", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } + }, + "luck" : { + "basic" : { + "description" : "", + "effects" : [ + { + "type" : "LUCK", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "type" : "LUCK", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "type" : "LUCK", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } + }, + "ballistics" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.ballistics", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.ballistics", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.ballistics", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } + }, "estates" : { "basic" : { "description" : "", diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index d69e867fa..6840e2fc2 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -1079,7 +1079,7 @@ si32 CGHeroInstance::manaRegain() const if (hasBonusOfType(Bonus::FULL_MANA_REGENERATION)) return manaLimit(); - return 1 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, 8) + valOfBonuses(Bonus::MANA_REGENERATION); //1 + Mysticism level + return 1 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::MYSTICISM) + valOfBonuses(Bonus::MANA_REGENERATION); //1 + Mysticism level } si32 CGHeroInstance::getManaNewTurn() const diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 329e5b5a0..21d1992e5 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -4070,7 +4070,7 @@ bool CGameHandler::makeBattleAction(BattleAction &ba) CHeroHandler::SBallisticsLevelInfo sbi; if(stack->getCreature()->idNumber == CreatureID::CATAPULT) - sbi = VLC->heroh->ballistics.at(attackingHero->getSecSkillLevel(SecondarySkill::BALLISTICS)); + sbi = VLC->heroh->ballistics.at(attackingHero->valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::BALLISTICS)); else //may need to use higher ballistics level for creatures in future for some cases to match original H3 (upgraded cyclops etc) { sbi = VLC->heroh->ballistics.at(1);