]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.cpp
set targeting mode for weapons in main
[l2e.git] / src / battle / BattleState.cpp
index fe821fc416ad6999a30e314858f9ca84da1ab885..3f28f5cc43e1f74a2f4b9d650a867d7b8aa63961 100644 (file)
@@ -232,7 +232,7 @@ void BattleState::CalculateDamage() {
        // TODO: this only evaluates SWORD type attacks
        if (CurrentAttack().isMonster) {
                const Stats &attackerStats(MonsterAt(CurrentAttack().index).GetStats());
-               if (ts.TargetsEnemies()) {
+               if (ts.TargetsMonsters()) {
                        for (int i(0); i < MaxMonsters(); ++i) {
                                if (ts.IsSelected(i)) {
                                        if (MonsterAt(i).Health() > 0) {
@@ -260,7 +260,7 @@ void BattleState::CalculateDamage() {
        } else {
                const Stats &attackerStats(HeroAt(CurrentAttack().index).GetStats());
                bool hitSome(false);
-               if (ts.TargetsEnemies()) {
+               if (ts.TargetsMonsters()) {
                        for (int i(0); i < MaxMonsters(); ++i) {
                                if (ts.IsSelected(i)) {
                                        if (MonsterAt(i).Health() > 0) {
@@ -332,7 +332,7 @@ void BattleState::ApplyDamage() {
        if (attackCursor < 0) return;
        AttackChoice &ac(CurrentAttack().isMonster ? MonsterAt(CurrentAttack().index).GetAttackChoice() : HeroAt(CurrentAttack().index).GetAttackChoice());
        TargetSelection &ts(ac.Selection());
-       if (ts.TargetsEnemies()) {
+       if (ts.TargetsMonsters()) {
                for (int i(0); i < MaxMonsters(); ++i) {
                        Monster &monster(MonsterAt(i));
                        if (ts.IsBad(i)) {