| 51 | |
| 52 | |
| 53 | std::unique_ptr<AlgorithmBase> CreateAlgorithm(std::string_view name) { |
| 54 | if (Utils::StrICmp(name, RpgRtImproved::name) == 0) { |
| 55 | return std::make_unique<RpgRtImproved>(); |
| 56 | } |
| 57 | if (Utils::StrICmp(name, RpgRtCompat::name) != 0) { |
| 58 | static bool warned = false; |
| 59 | if (!warned) { |
| 60 | Output::Debug("Invalid AutoBattle algo name `{}' falling back to {} ...", name, RpgRtCompat::name); |
| 61 | warned = true; |
| 62 | } |
| 63 | } |
| 64 | return std::make_unique<RpgRtCompat>(); |
| 65 | } |
| 66 | |
| 67 | void AlgorithmBase::SetEnemyAiAction(Game_Enemy& source) { |
| 68 | vSetEnemyAiAction(source); |