浏览代码

Teleport: check immunities in applicable()

Attempt to fix #2677
Konstantin P 2 年之前
父节点
当前提交
08967efd91
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/spells/effects/Teleport.cpp

+ 1 - 1
lib/spells/effects/Teleport.cpp

@@ -49,7 +49,7 @@ void Teleport::adjustTargetTypes(std::vector<TargetType> & types) const
 bool Teleport::applicable(Problem & problem, const Mechanics * m, const EffectTarget & target) const
 {
 	if(target.size() == 1) //Assume, this is check only for selecting a unit
-		return UnitEffect::applicable(problem, m);
+		return UnitEffect::applicable(problem, m, target);
 
 	if(target.size() != 2)
 		return m->adaptProblem(ESpellCastProblem::WRONG_SPELL_TARGET, problem);