1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merge pull request #4654 from dydzio0614/any-hex-shooting

Allow targeting empty hex by shooters with multi-tile SPELL_LIKE_ABILITY
This commit is contained in:
Ivan Savenko
2024-09-27 19:23:33 +03:00
committed by GitHub
15 changed files with 156 additions and 48 deletions

View File

@@ -862,7 +862,8 @@ std::vector<const CStack *> BattleStacksController::selectHoveredStacks()
spell = owner.actionsController->getCurrentSpell(hoveredHex);
caster = owner.actionsController->getCurrentSpellcaster();
if(caster && spell && owner.actionsController->currentActionSpellcasting(hoveredHex) ) //when casting spell
//casting spell or in explicit spellcasting mode that also handles SPELL_LIKE_ATTACK
if(caster && spell && (owner.actionsController->currentActionSpellcasting(hoveredHex) || owner.actionsController->creatureSpellcastingModeActive()))
{
spells::Target target;
target.emplace_back(hoveredHex);