1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

More comments about dispell special cases.

This commit is contained in:
AlexVinS 2015-10-13 07:11:49 +03:00
parent 2677d4a677
commit eeb100d6a4
2 changed files with 3 additions and 1 deletions

View File

@ -1465,6 +1465,8 @@ DLL_LINKAGE void StacksHealedOrResurrected::applyGs( CGameState *gs )
auto selector = [](const Bonus * b)
{
const CSpell *s = b->sourceSpell();
//Special case: DISRUPTING_RAY is "immune" to dispell
//Other even PERMANENT effects can be removed
return (s != nullptr) && s->isNegative() && (s->id != SpellID::DISRUPTING_RAY);
};
changedStack->popBonuses(selector);

View File

@ -139,7 +139,7 @@ void DefaultSpellMechanics::applyBattle(BattleInfo * battle, const BattleSpellCa
//check for each bonus if it should be removed
const bool isSpellEffect = Selector::sourceType(Bonus::SPELL_EFFECT)(b);
const int spellID = isSpellEffect ? b->sid : -1;
//No exceptions, ANY spell can be countered, even if it can`t be dispelled.
return isSpellEffect && vstd::contains(owner->counteredSpells, spellID);
});
}