1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Merge pull request #5031 from dydzio0614/empty-hexes-shoot-fix

Fix shooting being priority action for dead creature hexes with empty hex target enabled
This commit is contained in:
Ivan Savenko
2024-12-05 17:41:57 +02:00
committed by GitHub

View File

@@ -275,7 +275,7 @@ void BattleActionsController::reorderPossibleActionsPriority(const CStack * stac
return 2;
break;
case PossiblePlayerBattleAction::SHOOT:
if(targetStack == nullptr || targetStack->unitSide() == stack->unitSide())
if(targetStack == nullptr || targetStack->unitSide() == stack->unitSide() || !targetStack->alive())
return 100; //bottom priority
return 4;