mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +02:00
Fix check for Demon Summon targets
This commit is contained in:
parent
1978e6f8e8
commit
9d31830c74
@ -92,7 +92,8 @@ void DemonSummon::apply(ServerCallback * server, const Mechanics * m, const Effe
|
||||
bool DemonSummon::isValidTarget(const Mechanics * m, const battle::Unit * unit) const
|
||||
{
|
||||
if(!unit->isDead())
|
||||
{
|
||||
return false;
|
||||
|
||||
//check if alive unit blocks rising
|
||||
for(const BattleHex & hex : battle::Unit::getHexes(unit->getPosition(), unit->doubleWide(), unit->unitSide()))
|
||||
{
|
||||
@ -104,7 +105,6 @@ bool DemonSummon::isValidTarget(const Mechanics * m, const battle::Unit * unit)
|
||||
if(!blocking.empty())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (unit->isGhost())
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user