diff --git a/lib/spells/effects/Sacrifice.cpp b/lib/spells/effects/Sacrifice.cpp index 4ca9ca73a..dbe864fe1 100644 --- a/lib/spells/effects/Sacrifice.cpp +++ b/lib/spells/effects/Sacrifice.cpp @@ -76,12 +76,7 @@ bool Sacrifice::applicable(Problem & problem, const Mechanics * m) const } if(!(targetExists && targetToSacrificeExists)) - { - MetaString text; - text.addTxt(MetaString::GENERAL_TXT, 185); - problem.add(std::move(text), Problem::NORMAL); - return false; - } + return m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem); return true; } diff --git a/lib/spells/effects/UnitEffect.cpp b/lib/spells/effects/UnitEffect.cpp index e2ef48402..80fa4acd7 100644 --- a/lib/spells/effects/UnitEffect.cpp +++ b/lib/spells/effects/UnitEffect.cpp @@ -46,13 +46,7 @@ bool UnitEffect::applicable(Problem & problem, const Mechanics * m) const auto targets = m->battle()->battleGetUnitsIf(mainFilter); vstd::erase_if(targets, predicate); if(targets.empty()) - { - MetaString text; - text.addTxt(MetaString::GENERAL_TXT, 185); - problem.add(std::move(text), Problem::NORMAL); - return false; - } - + return m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem); return true; }