mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix: getting additional damage from destination obstacles
When the stack was selected to pass through 2 field in moat, first hex stopped him but then he got also additional damage from destination obstacle.
This commit is contained in:
@@ -1368,10 +1368,11 @@ int CGameHandler::moveStack(int stack, BattleHex dest)
|
||||
{
|
||||
for(auto & i : obs)
|
||||
{
|
||||
handleDamageFromObstacle(*i, curStack);
|
||||
//if stack die in explosion or interrupted by obstacle, abort movement
|
||||
if(i->stopsMovement() || !curStack->alive())
|
||||
stackIsMoving = false;
|
||||
else if(stackIsMoving)
|
||||
handleDamageFromObstacle(*i, curStack);
|
||||
i.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user