MCPcopy Create free account
hub / github.com/EasyRPG/Player / CalcSelfDestructEffect

Function CalcSelfDestructEffect

src/algo.cpp:265–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265int 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
279int CalcSkillCost(const lcf::rpg::Skill& skill, int max_sp, bool half_sp_cost) {
280 const auto div = half_sp_cost ? 2 : 1;

Callers 2

vExecuteMethod · 0.85
algo.cppFile · 0.85

Calls 3

VarianceAdjustEffectFunction · 0.85
GetAtkMethod · 0.80
GetDefMethod · 0.80

Tested by

no test coverage detected