1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-09 07:13:54 +02:00

DISPELL should ignore all immunities

This commit is contained in:
AlexVinS 2015-04-03 01:52:20 +03:00
parent 67f917edbb
commit 1747b5af9a
2 changed files with 7 additions and 1 deletions

View File

@ -170,6 +170,11 @@ ESpellCastProblem::ESpellCastProblem DispellMechanics::canBeCasted(const CBattle
return ESpellCastProblem::NO_APPROPRIATE_TARGET;
}
ESpellCastProblem::ESpellCastProblem DispellMechanics::isImmuneByStack(const CGHeroInstance * caster, const CStack * obj) const
{
//DISPELL ignores all immunities
return ESpellCastProblem::OK;
}
///EarthquakeMechanics
void EarthquakeMechanics::applyBattleEffects(const SpellCastEnvironment * env, BattleSpellCastParameters & parameters, SpellCastContext & ctx) const

View File

@ -40,7 +40,8 @@ class DLL_LINKAGE DispellMechanics : public DefaultSpellMechanics
{
public:
DispellMechanics(CSpell * s): DefaultSpellMechanics(s){};
ESpellCastProblem::ESpellCastProblem isImmuneByStack(const CGHeroInstance * caster, const CStack * obj) const override;
void applyBattle(BattleInfo * battle, const BattleSpellCast * packet) const override final;
ESpellCastProblem::ESpellCastProblem canBeCasted(const CBattleInfoCallback * cb, PlayerColor player) const override;
};