| 263 | } |
| 264 | |
| 265 | int CalcSelfDestructEffect(const Game_Battler& source, |
| 266 | const Game_Battler& target, |
| 267 | bool apply_variance) { |
| 268 | |
| 269 | auto effect = source.GetAtk() - target.GetDef() / 2; |
| 270 | effect = std::max<int>(0, effect); |
| 271 | |
| 272 | if (apply_variance) { |
| 273 | effect = VarianceAdjustEffect(effect, 4); |
| 274 | } |
| 275 | |
| 276 | return effect; |
| 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; |
no test coverage detected