mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
More comments about dispell special cases.
This commit is contained in:
parent
2677d4a677
commit
eeb100d6a4
@ -1465,6 +1465,8 @@ DLL_LINKAGE void StacksHealedOrResurrected::applyGs( CGameState *gs )
|
|||||||
auto selector = [](const Bonus * b)
|
auto selector = [](const Bonus * b)
|
||||||
{
|
{
|
||||||
const CSpell *s = b->sourceSpell();
|
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);
|
return (s != nullptr) && s->isNegative() && (s->id != SpellID::DISRUPTING_RAY);
|
||||||
};
|
};
|
||||||
changedStack->popBonuses(selector);
|
changedStack->popBonuses(selector);
|
||||||
|
@ -139,7 +139,7 @@ void DefaultSpellMechanics::applyBattle(BattleInfo * battle, const BattleSpellCa
|
|||||||
//check for each bonus if it should be removed
|
//check for each bonus if it should be removed
|
||||||
const bool isSpellEffect = Selector::sourceType(Bonus::SPELL_EFFECT)(b);
|
const bool isSpellEffect = Selector::sourceType(Bonus::SPELL_EFFECT)(b);
|
||||||
const int spellID = isSpellEffect ? b->sid : -1;
|
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);
|
return isSpellEffect && vstd::contains(owner->counteredSpells, spellID);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user