int skill_power(dumb_ptr<map_session_data> sd, SkillID skill_id) { SP stat = skill_stat(skill_id); int stat_value, skill_value; int result; if (stat == SP::ZERO || !skill_pool_is_activated(sd, skill_id)) return 0; stat_value = battle_get_stat(stat, sd); skill_value = sd->status.skill[skill_id].lv; if ((skill_value * 10) - 1 > stat_value) skill_value += (stat_value / 10); else skill_value *= 2; result = (skill_value * stat_value) / 10; return result; }
int skill_power (struct map_session_data *sd, int skill_id) { int stat = skill_stat (skill_id); int stat_value, skill_value; int result; if (stat == 0 || !skill_pool_is_activated (sd, skill_id)) return 0; stat_value = battle_get_stat (stat, &(sd->bl)); skill_value = sd->status.skill[skill_id].lv; if ((skill_value * 10) - 1 > stat_value) skill_value += (stat_value / 10); else skill_value *= 2; result = (skill_value * stat_value) / 10; return result; }