Files
wsmud/world/obj/drug/limit_mp.js
2026-05-26 16:41:20 +08:00

53 lines
1.8 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
this.inherits(OBJ);
this.set({
unit: "粒",
name: "培元丹",
grade: 1,
desc: "江湖中各大门派用来给弟子们拓展经脉的丹药使用后会增加你10点内力上限",
value: 10000,
add_mp: 10,
});
this.transable = true;
this.on_use = function (me) {
me.send_room("<hir>$N吞下了一颗培元丹。</hir>");
me.limit_mp += this.add_mp;
me.notify("<hiw>你的内力上限增加了" + this.add_mp + "。</hiw>");
}
this.on_create = function (path, par) {
if (!par) {
this.path = path + "#0";
return;
}
par = par.substr(1);
var lv = parseInt(par);
if (!(lv > 0 && lv < 5)) return;
switch (lv) {
case 1:
this.add_mp = 20;
this.value = 10000;
this.desc = "江湖中各大门派用来给弟子们拓展经脉的丹药使用后会增加你20点内力上限";
break;
case 2:
this.add_mp = 50;
this.value = 25000;
this.desc = "江湖中各大门派用来给弟子们拓展经脉的丹药使用后会增加你50点内力上限";
break;
case 3:
this.add_mp = 100;
this.value = 50000;
this.desc = "江湖中各大门派用来给弟子们拓展经脉的丹药使用后会增加你100点内力上限";
break;
case 4:
this.add_mp = 200;
this.value = 100000;
this.desc = "江湖中各大门派用来给弟子们拓展经脉的丹药使用后会增加你200点内力上限";
break;
default:
this.add_mp = 10;
this.value = 5000;
this.desc = "江湖中各大门派用来给弟子们拓展经脉的丹药使用后会增加你10点内力上限";
break;
}
this.grade = lv + 1;
}