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

made fire/air/water/earth magic skills bonus-based

This commit is contained in:
Henning Koehler 2017-08-27 19:37:54 +12:00
parent 25e6b5cc07
commit 0153d0fc78
3 changed files with 183 additions and 1 deletions

View File

@ -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"
}
]
}
}
}

View File

@ -247,6 +247,11 @@ std::vector<std::shared_ptr<Bonus>> 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:

View File

@ -825,7 +825,9 @@ ui8 CGHeroInstance::getSpellSchoolLevel(const CSpell * spell, int *outSelectedSc
spell->forEachSchool([&, this](const SpellSchoolInfo & cnf, bool & stop)
{
int thisSchool = std::max<int>(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<int>(
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;