1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

* defensive stance implemented (bug #342 fixed)

This commit is contained in:
mateuszb
2011-01-18 17:23:31 +00:00
parent 8a063b88e5
commit 98494a5e6f
4 changed files with 46 additions and 11 deletions

View File

@@ -3033,6 +3033,15 @@ bool CGameHandler::makeBattleAction( BattleAction &ba )
break;
}
case BattleAction::DEFEND: //defend
{
//defensive stance
SetStackEffect sse;
sse.effect = Bonus(Bonus::STACK_GETS_TURN, Bonus::PRIMARY_SKILL, Bonus::OTHER, 20, -1, PrimarySkill::DEFENSE, Bonus::PERCENT_TO_ALL);
sse.stacks.push_back(ba.stackNumber);
sendAndApply(&sse);
//don't break - we share code with next case
}
case BattleAction::WAIT: //wait
{
sendAndApply(&StartAction(ba));