1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

Fix spellcasters with massive spells

This commit is contained in:
Ivan Savenko 2023-03-25 01:02:56 +02:00
parent dc099b2a35
commit 9a19feaf4a
2 changed files with 7 additions and 0 deletions

View File

@ -480,6 +480,9 @@ bool BattleActionsController::actionIsLegal(PossiblePlayerBattleAction action, B
case PossiblePlayerBattleAction::SHOOT:
return owner.curInt->cb->battleCanShoot(owner.stacksController->getActiveStack(), targetHex);
case PossiblePlayerBattleAction::NO_LOCATION:
return false;
case PossiblePlayerBattleAction::ANY_LOCATION:
return isCastingPossibleHere(action.spell().toSpell(), owner.stacksController->getActiveStack(), targetStack, targetHex);

View File

@ -10,6 +10,8 @@
#include "../GameConstants.h"
VCMI_LIB_NAMESPACE_BEGIN
class PossiblePlayerBattleAction // actions performed at l-click
{
public:
@ -72,3 +74,5 @@ public:
return action == other.action && spellToCast == other.spellToCast;
}
};
VCMI_LIB_NAMESPACE_END