1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00

vcmi: reuse SPELL_DAMAGE for sorcery

Now there is no need for specific spell bonus, and
we need to simply reuse SPELL_DAMAGE, and by using
PERCENT_TO_TARGET_TYPE speciality will work.
This commit is contained in:
Konstantin
2023-02-19 02:29:23 +03:00
parent 6b987275eb
commit a85f3b63ec
9 changed files with 29 additions and 23 deletions
+2 -2
View File
@@ -618,8 +618,8 @@ int64_t CGHeroInstance::getSpellBonus(const spells::Spell * spell, int64_t base,
{
//applying sorcery secondary skill
base = static_cast<int64_t>(base * (100 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::SORCERY)) / 100.0);
base = static_cast<int64_t>(base * (100 + valOfBonuses(Bonus::SPELL_DAMAGE) + valOfBonuses(Bonus::SPECIFIC_SPELL_DAMAGE, spell->getIndex())) / 100.0);
base = static_cast<int64_t>(base * (valOfBonuses(Bonus::SPELL_DAMAGE)) / 100.0);
base = static_cast<int64_t>(base * (100 + valOfBonuses(Bonus::SPECIFIC_SPELL_DAMAGE, spell->getIndex())) / 100.0);
int maxSchoolBonus = 0;