1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Formatting

This commit is contained in:
edeksumo 2015-11-04 23:37:53 +01:00
parent 75a76c0bf0
commit dd525da153
3 changed files with 18 additions and 3 deletions

View File

@ -235,6 +235,7 @@ std::string CDefenceAnimation::getMySound()
if (vstd::contains(stack->state, EBattleStackState::DEFENDING_ANI))
return battle_sound(stack->getCreature(), defend);
return battle_sound(stack->getCreature(), wince);
}
@ -245,6 +246,7 @@ CCreatureAnim::EAnimType CDefenceAnimation::getMyAnimType()
if (vstd::contains(stack->state, EBattleStackState::DEFENDING_ANI))
return CCreatureAnim::DEFENCE;
return CCreatureAnim::HITTED;
}

View File

@ -432,8 +432,21 @@ namespace EMarketMode
namespace EBattleStackState
{
enum EBattleStackState{ALIVE = 180, SUMMONED, CLONED, DEAD_CLONE, HAD_MORALE, WAITING, MOVED, DEFENDING, FEAR,
DRAINED_MANA /*remember to drain mana only once per turn*/, DEFENDING_ANI/*only for animation*/};
enum EBattleStackState
{
ALIVE = 180,
SUMMONED, CLONED,
DEAD_CLONE,
HAD_MORALE,
WAITING,
MOVED,
DEFENDING,
FEAR,
//remember to drain mana only once per turn
DRAINED_MANA,
//only for defending animation
DEFENDING_ANI
};
}
namespace ECommander

View File

@ -1332,7 +1332,7 @@ DLL_LINKAGE void StartAction::applyGs( CGameState *gs )
switch(ba.actionType)
{
case Battle::DEFEND:
st->state.insert(EBattleStackState::DEFENDING);
st->state.insert(EBattleStackState::DEFENDING);
st->state.insert(EBattleStackState::DEFENDING_ANI);
break;
case Battle::WAIT: