|
97 1 8: 此主题共有3帖 此页3帖 每页12帖 | |
|
帖子主题: 内力上限计算公式 | |
|
内力上限计算公式
int query_neili_limit()
{ string *skill_names; mapping skills; int neili_limit; int base_lvl, lvl; int tmp; int i; string fam;
skills = this_object()->query_skills(); if (! mapp(skills)) return 0;
skill_names = keys(skills);
base_lvl = ((int) skills["force"]) / 2; neili_limit = base_lvl * 10; for (i = 0; i < sizeof(skill_names); i++) { if (file_size(SKILL_D(skill_names[i]) + ".c") == -1) { // No such skill continue; }
if (! SKILL_D(skill_names[i])->valid_enable("force")) continue;
lvl = (int) skills[skill_names[i]]; tmp = (base_lvl + lvl) * 10; tmp += (int) SKILL_D(skill_names[i])->query_neili_improve(this_object()); if (tmp > neili_limit) neili_limit = tmp; }
neili_limit += neili_limit * query("improve/neili") / 100; if (query("breakup")) neili_limit += neili_limit * 3 / 10;
if (query("special_skill/mystery")) neili_limit += query("con") * 15;
fam = query("family/family_name"); if (query("class") == "bonze" && (fam == "大轮寺" || fam == "少林派" || fam == "峨嵋派" || fam == "血刀门")) neili_limit += 500;
return neili_limit;
}
int query_current_neili_limit()
{ int neili; string force; string fam;
force = query_skill_mapped("force"); neili = (int)query_skill("force", 1) / 2 * 10; if (stringp(force) && force != "") { neili += (int)query_skill(force, 1) * 10; neili += SKILL_D(force)->query_neili_improve(this_object()); }
neili += neili * query("improve/neili") / 100; if (query("breakup")) neili += neili * 3 / 10;
if (query("special_skill/mystery")) neili += query("con") * 15;
fam = query("family/family_name"); if (query("class") == "bonze" && (fam == "大轮寺" || fam == "少林派" || fam == "峨嵋派" || fam == "血刀门")) neili += 500;
return neili; |
[ 这个贴子最后由ivy在2006-3-21 17:44:08编辑过 ]
|