diff --git a/config/skills.json b/config/skills.json index 3ef2d2f24..99595797e 100644 --- a/config/skills.json +++ b/config/skills.json @@ -422,6 +422,41 @@ ] } }, + "necromancy" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.necromancy", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 10, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.necromancy", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 20, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.necromancy", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 30, + "valueType" : "BASE_NUMBER" + } + ] + } + }, "estates" : { "basic" : { "description" : "With Basic Estates, a hero contributes 125 gold per day to your cause.", @@ -456,5 +491,145 @@ } ] } + }, + "fireMagic" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.fireMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.fireMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.fireMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } + }, + "airMagic" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.airMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.airMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.airMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } + }, + "waterMagic" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.waterMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.waterMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.waterMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } + }, + "earthMagic" : { + "basic" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.earthMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 1, + "valueType" : "BASE_NUMBER" + } + ] + }, + "advanced" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.earthMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 2, + "valueType" : "BASE_NUMBER" + } + ] + }, + "expert" : { + "description" : "", + "effects" : [ + { + "subtype" : "skill.earthMagic", + "type" : "SECONDARY_SKILL_PREMY", + "val" : 3, + "valueType" : "BASE_NUMBER" + } + ] + } } } diff --git a/lib/CSkillHandler.cpp b/lib/CSkillHandler.cpp index bfc06e175..05ba079c3 100644 --- a/lib/CSkillHandler.cpp +++ b/lib/CSkillHandler.cpp @@ -247,6 +247,11 @@ std::vector> CSkillHandler::defaultBonus(SecondarySkill s addBonus(10 * level); break; case SecondarySkill::ESTATES: addBonus(125 << (level-1)); break; + case SecondarySkill::FIRE_MAGIC: + case SecondarySkill::AIR_MAGIC: + case SecondarySkill::WATER_MAGIC: + case SecondarySkill::EARTH_MAGIC: + addBonus(level); break; case SecondarySkill::TACTICS: addBonus(1 + 2 * level); break; case SecondarySkill::LEARNING: diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index a49dead50..09445f793 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -825,7 +825,9 @@ ui8 CGHeroInstance::getSpellSchoolLevel(const CSpell * spell, int *outSelectedSc spell->forEachSchool([&, this](const SpellSchoolInfo & cnf, bool & stop) { - int thisSchool = std::max(getSecSkillLevel(cnf.skill), valOfBonuses(Bonus::MAGIC_SCHOOL_SKILL, 1 << ((ui8)cnf.id))); //FIXME: Bonus shouldn't be additive (Witchking Artifacts : Crown of Skies) + int thisSchool = std::max( + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, cnf.skill), + valOfBonuses(Bonus::MAGIC_SCHOOL_SKILL, 1 << ((ui8)cnf.id))); //FIXME: Bonus shouldn't be additive (Witchking Artifacts : Crown of Skies) if(thisSchool > skill) { skill = thisSchool;