1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

If original movement rules are on, it is not possible to attack guards

from visitable object directly
This commit is contained in:
Ivan Savenko
2024-05-23 18:46:48 +00:00
parent ef29c47408
commit d7f5d24b99

View File

@@ -267,6 +267,9 @@ PathfinderBlockingRule::BlockingReason MovementAfterDestinationRule::getBlocking
return BlockingReason::DESTINATION_BLOCKED;
case EPathNodeAction::BATTLE:
if (config->options.originalFlyRules && destination.nodeObject && source.node->layer == EPathfindingLayer::AIR)
return BlockingReason::DESTINATION_BLOCKED;
/// Movement after BATTLE action only possible from guarded tile to guardian tile
if(destination.guarded)
{