Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove UNTIL_BEING_ATTACKED bonuses after any received damage.
  • Loading branch information
alexvins committed Sep 29, 2016
1 parent 245d17a commit 887794e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/NetPacksLib.cpp
Expand Up @@ -1370,6 +1370,7 @@ DLL_LINKAGE void BattleStackAttacked::applyGs( CGameState *gs )
{
CStack * at = gs->curB->getStack(stackAttacked);
assert(at);
at->popBonuses(Bonus::UntilBeingAttacked);
at->count = newAmount;
at->firstHPleft = newHP;

Expand Down Expand Up @@ -1440,17 +1441,10 @@ DLL_LINKAGE void BattleAttack::applyGs( CGameState *gs )
attacker->shots--;
}
}
for(BattleStackAttacked stackAttacked : bsa)
for(BattleStackAttacked & stackAttacked : bsa)
stackAttacked.applyGs(gs);

attacker->popBonuses(Bonus::UntilAttack);

for(auto & elem : bsa)
{
CStack * stack = gs->curB->getStack(elem.stackAttacked, false);
if (stack) //cloned stack is already gone
stack->popBonuses(Bonus::UntilBeingAttacked);
}
}

DLL_LINKAGE void StartAction::applyGs( CGameState *gs )
Expand Down

0 comments on commit 887794e

Please sign in to comment.