}
void PerformAttacks::ExitState(Application &c, SDL_Surface *screen) {
+ battle->ClearAllAttacks();
ctrl = 0;
}
CheckAnimations();
if (HasAnimationsRunning()) return;
ResetAnimation();
+ battle->ApplyDamage();
battle->NextAttack();
if (battle->AttacksFinished()) {
- battle->ClearAllAttacks();
ctrl->PopState();
return;
}
battle->CalculateDamage();
if (battle->CurrentAttack().isMonster) {
- const Monster &monster(battle->MonsterAt(battle->CurrentAttack().index));
+ Monster &monster(battle->MonsterAt(battle->CurrentAttack().index));
titleBarText = monster.Name();
- moveAnimation = 0;
+ moveAnimation = monster.AttackAnimation();
} else {
Hero &hero(battle->HeroAt(battle->CurrentAttack().index));
const AttackChoice &ac(battle->AttackChoiceAt(battle->CurrentAttack().index));