diff --git a/config/skills.json b/config/skills.json index 8107c6537..baccfd0cf 100644 --- a/config/skills.json +++ b/config/skills.json @@ -1,7 +1,53 @@ { + "pathfinding" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.pathfinding", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 25, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.pathfinding", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 50, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.pathfinding", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 75, + "valueType" : "BASE_NUMBER" + } + ] + } + }, "estates" : { "basic" : { - "description" : "Hero generates 250 gold each day.", + "description" : "", + "effects" : [ + { + "subtype" : "skill.estates", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 125, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", "effects" : [ { "subtype" : "skill.estates", @@ -11,8 +57,8 @@ } ] }, - "advanced" : { - "description" : "Hero generates 500 gold each day.", + "expert" : { + "description" : "", "effects" : [ { "subtype" : "skill.estates", @@ -21,17 +67,6 @@ "valueType" : "BASE_NUMBER" } ] - }, - "expert" : { - "description" : "Hero generates 1000 gold each day.", - "effects" : [ - { - "subtype" : "skill.estates", - "type" : "SECONDARY_SKILL_PREMY", - "val" : 1000, - "valueType" : "BASE_NUMBER" - } - ] } } } diff --git a/lib/CSkillHandler.cpp b/lib/CSkillHandler.cpp index 4423973d0..6a02ecdd7 100644 --- a/lib/CSkillHandler.cpp +++ b/lib/CSkillHandler.cpp @@ -217,6 +217,8 @@ const std::shared_ptr CSkillHandler::defaultBonus(SecondarySkill skill, i switch (skill) { + case SecondarySkill::PATHFINDING: + bonusVal = 25 * level; break; case SecondarySkill::ARCHERY: bonusVal = 5 + 5 * level * level; break; case SecondarySkill::LOGISTICS: diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index ac1532225..d8416638b 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -87,7 +87,7 @@ ui32 CGHeroInstance::getTileCost(const TerrainTile &dest, const TerrainTile &fro else if(ti->nativeTerrain != from.terType && !ti->hasBonusOfType(Bonus::NO_TERRAIN_PENALTY, from.terType)) { ret = VLC->heroh->terrCosts[from.terType]; - ret -= getSecSkillLevel(SecondarySkill::PATHFINDING) * 25; + ret -= valOfBonuses(Selector::typeSubtype(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::PATHFINDING)); if(ret < GameConstants::BASE_MOVEMENT_COST) ret = GameConstants::BASE_MOVEMENT_COST; }