mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
CSpell: !isMagical() -> no sorcery and no generic spell dmg reduction
Other bonus are still applied.
This commit is contained in:
parent
a639bd2606
commit
3bbff0588d
@ -603,7 +603,9 @@ int64_t CGHeroInstance::getSpellBonus(const spells::Spell * spell, int64_t base,
|
||||
{
|
||||
//applying sorcery secondary skill
|
||||
|
||||
base = static_cast<int64_t>(base * (valOfBonuses(Bonus::SPELL_DAMAGE)) / 100.0);
|
||||
if(spell->isMagical())
|
||||
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;
|
||||
|
@ -403,8 +403,8 @@ int64_t CSpell::adjustRawDamage(const spells::Caster * caster, const battle::Uni
|
||||
|
||||
CSelector selector = Selector::type()(Bonus::SPELL_DAMAGE_REDUCTION).And(Selector::subtype()(-1));
|
||||
|
||||
//general spell dmg reduction
|
||||
if(bearer->hasBonus(selector))
|
||||
//general spell dmg reduction, works only on magical effects
|
||||
if(bearer->hasBonus(selector) && isMagical())
|
||||
{
|
||||
ret *= 100 - bearer->valOfBonuses(selector);
|
||||
ret /= 100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user