1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

* support for multiple retaliations per turn, unlimited retaliations, counterstrike spell

* stack is not resurrected when it is under a living stack
This commit is contained in:
mateuszb
2009-08-17 11:22:29 +00:00
parent e892913635
commit 072c1f8d12
3 changed files with 31 additions and 4 deletions

View File

@ -528,6 +528,15 @@ CStack::CStack(CCreature * C, int A, int O, int I, bool AO, int S)
:ID(I), creature(C), amount(A), baseAmount(A), firstHPleft(C->hitPoints), owner(O), slot(S), attackerOwned(AO), position(-1),
counterAttacks(1), shots(C->shots), features(C->abilities)
{
//additional retaliations
for(int h=0; h<C->abilities.size(); ++h)
{
if(C->abilities[h].type == StackFeature::ADDITIONAL_RETALIATION)
{
counterAttacks += C->abilities[h].value;
}
}
//alive state indication
state.insert(ALIVE);
}