mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
Remove overly strict condition
This commit is contained in:
parent
50b412b35b
commit
5dda4aa0f0
@ -737,16 +737,14 @@ bool CBattleInfoCallback::battleCanTargetEmptyHex(const battle::Unit * attacker)
|
|||||||
{
|
{
|
||||||
auto bonus = attacker->getBonus(Selector::type()(BonusType::SPELL_LIKE_ATTACK));
|
auto bonus = attacker->getBonus(Selector::type()(BonusType::SPELL_LIKE_ATTACK));
|
||||||
const CSpell * spell = bonus->subtype.as<SpellID>().toSpell();
|
const CSpell * spell = bonus->subtype.as<SpellID>().toSpell();
|
||||||
if(spell->isDamage())
|
|
||||||
{
|
|
||||||
spells::BattleCast cast(this, attacker, spells::Mode::SPELL_LIKE_ATTACK, spell);
|
spells::BattleCast cast(this, attacker, spells::Mode::SPELL_LIKE_ATTACK, spell);
|
||||||
BattleHex dummySpellTarget = BattleHex(50); //check arbitrary hex for general spell range since currently there is no general way to access amount of hexes
|
BattleHex dummySpellTarget = BattleHex(50); //check arbitrary hex for general spell range since currently there is no general way to access amount of hexes
|
||||||
|
|
||||||
if(spell->battleMechanics(&cast)->rangeInHexes(dummySpellTarget).size() > 1)
|
if(spell->battleMechanics(&cast)->rangeInHexes(dummySpellTarget).size() > 1)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user