| 42 | } |
| 43 | |
| 44 | static void testNormalSkill(bool expect_enemy, bool expect_ally, lcf::rpg::Skill& skill, const Game_Battler& target, bool bugs) { |
| 45 | CAPTURE(bugs); |
| 46 | CAPTURE(target.IsDead()); |
| 47 | CAPTURE(target.IsHidden()); |
| 48 | CAPTURE(target.HasState(2)); |
| 49 | CAPTURE(skill.scope); |
| 50 | |
| 51 | skill.scope = lcf::rpg::Skill::Scope_enemy; |
| 52 | REQUIRE_EQ(expect_enemy, EnemyAi::IsSkillEffectiveOn(skill, target, bugs)); |
| 53 | |
| 54 | skill.scope = lcf::rpg::Skill::Scope_enemies; |
| 55 | REQUIRE_EQ(expect_enemy, EnemyAi::IsSkillEffectiveOn(skill, target, bugs)); |
| 56 | |
| 57 | skill.scope = lcf::rpg::Skill::Scope_self; |
| 58 | REQUIRE_EQ(expect_ally, EnemyAi::IsSkillEffectiveOn(skill, target, bugs)); |
| 59 | |
| 60 | skill.scope = lcf::rpg::Skill::Scope_ally; |
| 61 | REQUIRE_EQ(expect_ally, EnemyAi::IsSkillEffectiveOn(skill, target, bugs)); |
| 62 | |
| 63 | skill.scope = lcf::rpg::Skill::Scope_party; |
| 64 | REQUIRE_EQ(expect_ally, EnemyAi::IsSkillEffectiveOn(skill, target, bugs)); |
| 65 | } |
| 66 | |
| 67 | TEST_CASE("IsSkillEffectiveOn") { |
| 68 | const MockActor m; |
no test coverage detected