| 277 | } |
| 278 | |
| 279 | int CalcSkillCost(const lcf::rpg::Skill& skill, int max_sp, bool half_sp_cost) { |
| 280 | const auto div = half_sp_cost ? 2 : 1; |
| 281 | return (Player::IsRPG2k3() && skill.sp_type == lcf::rpg::Skill::SpType_percent) |
| 282 | ? max_sp * skill.sp_percent / 100 / div |
| 283 | : (skill.sp_cost + static_cast<int>(half_sp_cost)) / div; |
| 284 | } |
| 285 | |
| 286 | int CalcSkillHpCost(const lcf::rpg::Skill& skill, int max_hp) { |
| 287 | return (Player::IsRPG2k3() && skill.easyrpg_hp_type == lcf::rpg::Skill::HpType_percent) |
no outgoing calls
no test coverage detected