| 204 | } |
| 205 | |
| 206 | static void testAgi(int src, int tgt, int res) { |
| 207 | auto& source = *MakeAgiActor(0, src); |
| 208 | auto& target = *MakeAgiEnemy(0, tgt); |
| 209 | |
| 210 | REQUIRE_EQ(res, Algo::CalcNormalAttackToHit(source, target, Game_Battler::WeaponAll, lcf::rpg::System::BattleCondition_none, true)); |
| 211 | REQUIRE_EQ(res, Algo::CalcSkillToHit(source, target, lcf::Data::skills[0], lcf::rpg::System::BattleCondition_none, false)); |
| 212 | REQUIRE_EQ(res, Algo::CalcSkillToHit(source, target, lcf::Data::skills[1], lcf::rpg::System::BattleCondition_none, false)); |
| 213 | for (int i = 2; i < 6; ++i) { |
| 214 | CAPTURE(i); |
| 215 | REQUIRE_EQ(90, Algo::CalcSkillToHit(source, target, lcf::Data::skills[i], lcf::rpg::System::BattleCondition_none, false)); |
| 216 | |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | TEST_CASE("HitRateAgi") { |
| 221 | const MockBattle mb; |
no test coverage detected