1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-25 00:37:24 +02:00
This commit is contained in:
AlexVinS
2016-09-24 10:06:24 +03:00
parent 849e3fc04e
commit 7874dffa7d
4 changed files with 17 additions and 0 deletions

View File

@ -1623,6 +1623,18 @@ DLL_LINKAGE void StacksHealedOrResurrected::applyGs( CGameState *gs )
}
vstd::amin(changedStack->firstHPleft, changedStack->MaxHealth());
if(resurrected)
{
//removing all spells effects
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->id != SpellID::DISRUPTING_RAY);
};
changedStack->popBonuses(selector);
}
else if(cure)
{
//removing all effects from negative spells
auto selector = [](const Bonus * b)