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

Function SetEnemyAction

src/enemyai.cpp:152–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void SetEnemyAction(Game_Enemy& enemy, const lcf::rpg::EnemyAction& action, bool emulate_bugs) {
153 auto algo = MakeAction(enemy, action, emulate_bugs);
154
155 if (algo) {
156 if (action.switch_on) {
157 algo->SetSwitchEnable(action.switch_on_id);
158 }
159 if (action.switch_off) {
160 algo->SetSwitchDisable(action.switch_off_id);
161 }
162 }
163
164 enemy.SetBattleAlgorithm(std::move(algo));
165}
166
167
168bool IsSkillEffectiveOn(const lcf::rpg::Skill& skill,

Callers 1

Calls 4

MakeActionFunction · 0.85
SetSwitchEnableMethod · 0.80
SetSwitchDisableMethod · 0.80
SetBattleAlgorithmMethod · 0.80

Tested by

no test coverage detected