| 150 | } |
| 151 | |
| 152 | void 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 | |
| 168 | bool IsSkillEffectiveOn(const lcf::rpg::Skill& skill, |
no test coverage detected