]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.cpp
removed some outdated TODOs
[l2e.git] / src / battle / BattleState.cpp
index d0bb108da3a65256ce0b9846a8eb6557cc663364..84d1a497240da814a105eb64301889b412c7650e 100644 (file)
@@ -211,7 +211,6 @@ void BattleState::ExitState(Application &ctrl, SDL_Surface *screen) {
 }
 
 void BattleState::ResumeState(Application &ctrl, SDL_Surface *screen) {
-       // TODO: check for victory or defeat
        if (ranAway) {
                ctrl.PopState(); // quit the battle scene
                return;
@@ -390,6 +389,14 @@ void BattleState::ApplyDamage() {
        }
 }
 
+AttackChoice &BattleState::CurrentAttackAttackChoice() {
+       if (CurrentAttack().isMonster) {
+               return monsterAttacks[CurrentAttack().index];
+       } else {
+               return AttackChoiceAt(CurrentAttack().index);
+       }
+}
+
 void BattleState::ClearAllAttacks() {
        attackCursor = -1;
        activeHero = -1;