| 256 | } |
| 257 | |
| 258 | double CalcNormalAttackAutoBattleRank(const Game_Actor& source, Game_Battler::Weapon weapon, const lcf::rpg::System::BattleCondition cond, bool apply_variance, bool emulate_bugs) { |
| 259 | double rank = 0.0; |
| 260 | std::vector<Game_Battler*> targets; |
| 261 | Main_Data::game_enemyparty->GetBattlers(targets); |
| 262 | |
| 263 | if (!emulate_bugs && source.HasAttackAll(weapon)) { |
| 264 | for (auto* target: targets) { |
| 265 | auto target_rank = CalcNormalAttackAutoBattleTargetRank(source, *target, weapon, cond, apply_variance, emulate_bugs); |
| 266 | rank += target_rank; |
| 267 | DebugLog("AUTOBATTLE: Actor {} Check Attack Party Enemy {} Rank : {} -> {}", source.GetName(), target->GetName(), rank, target_rank); |
| 268 | } |
| 269 | } else { |
| 270 | for (auto* target: targets) { |
| 271 | auto target_rank = CalcNormalAttackAutoBattleTargetRank(source, *target, weapon, cond, apply_variance, emulate_bugs); |
| 272 | rank = std::max(rank, target_rank); |
| 273 | DebugLog("AUTOBATTLE: Actor {} Check Attack Single Enemy {} Rank : {} -> {}", source.GetName(), target->GetName(), rank, target_rank); |
| 274 | } |
| 275 | } |
| 276 | return rank; |
| 277 | } |
| 278 | |
| 279 | void SelectAutoBattleAction(Game_Actor& source, |
| 280 | Game_Battler::Weapon weapon, |
no test coverage detected