MCPcopy Create free account
hub / github.com/EasyRPG/Player / CreateAlgorithm

Function CreateAlgorithm

src/enemyai.cpp:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52
53std::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
67void AlgorithmBase::SetEnemyAiAction(Game_Enemy& source) {
68 vSetEnemyAiAction(source);

Callers 1

StartMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected