mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
obstacle: correct logic as in OH3
Obstacle spells should not be cast if they are affected by native terrain and enemy have at least one stack with native terrain
This commit is contained in:
parent
705afbb898
commit
edc9812559
@ -121,6 +121,9 @@ void Obstacle::adjustAffectedHexes(std::set<BattleHex> & hexes, const Mechanics
|
||||
|
||||
bool Obstacle::applicable(Problem & problem, const Mechanics * m) const
|
||||
{
|
||||
if(hidden && m->battle()->battleHasNativeStack(m->battle()->otherSide(m->casterSide)))
|
||||
return m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem);
|
||||
|
||||
return LocationEffect::applicable(problem, m);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user