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:
parent
25e6b5cc07
commit
0153d0fc78
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user