diff --git a/lib/spells/BattleSpellMechanics.cpp b/lib/spells/BattleSpellMechanics.cpp index 9420a45ce..76eba1d1c 100644 --- a/lib/spells/BattleSpellMechanics.cpp +++ b/lib/spells/BattleSpellMechanics.cpp @@ -172,8 +172,16 @@ ESpellCastProblem::ESpellCastProblem DispellMechanics::canBeCasted(const CBattle ESpellCastProblem::ESpellCastProblem DispellMechanics::isImmuneByStack(const CGHeroInstance * caster, const CStack * obj) const { - //DISPELL ignores all immunities - return ESpellCastProblem::OK; + //DISPELL ignores all immunities, so do not call default + std::stringstream cachingStr; + cachingStr << "source_" << Bonus::SPELL_EFFECT; + + if(obj->hasBonus(Selector::sourceType(Bonus::SPELL_EFFECT), cachingStr.str())) + { + return ESpellCastProblem::OK; + } + + return ESpellCastProblem::WRONG_SPELL_TARGET; } ///EarthquakeMechanics diff --git a/lib/spells/CDefaultSpellMechanics.cpp b/lib/spells/CDefaultSpellMechanics.cpp index bd265cb7d..0bc9d15e1 100644 --- a/lib/spells/CDefaultSpellMechanics.cpp +++ b/lib/spells/CDefaultSpellMechanics.cpp @@ -216,7 +216,6 @@ bool DefaultSpellMechanics::applyAdventureEffects(const SpellCastEnvironment * e } } - void DefaultSpellMechanics::battleCast(const SpellCastEnvironment * env, BattleSpellCastParameters & parameters) const { BattleSpellCast sc;