init: add workspace files

This commit is contained in:
2026-05-26 16:41:20 +08:00
commit f4f2393f72
1041 changed files with 67405 additions and 0 deletions

72
world/obj/food/drink.js Normal file
View File

@@ -0,0 +1,72 @@
this.inherits(OBJ);
this.unit = "壶";
this.name = "米酒";
this.value = 200;
this.combined = true;
this.desc = "一壶醉仙楼的米酒喝掉后每5秒恢复100点内力。";
this.action_msg = "喝";
this.distime = 60000;
this.recover_mp = 100;
this.transable = true;
this.on_use = function (me) {
me.send_room("$N仰头灌下一" + this.unit + this.name + "。");
me.add_status({
id: "drink",
name: this.name,
desc: this.desc,
recover_mp: this.recover_mp,
on_interval: function (me) {
if (me.mp < me.max_mp) {
me.add_mp(this.recover_mp);
me.send('<blu>你恢复了' + this.recover_mp + '内力。</blu>');
}
},
duration_count: 10,
duration: 5000
});
}
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;
this.set(OBJS[lv]);
}
const OBJS = [{
name: "米酒",
value: 200,
recover_mp: 100,
desc: "一壶醉仙楼的米酒喝掉后每5秒恢复100点内力。",
unit: "壶"
}, {
name: "花雕酒",
value: 400,
recover_mp: 200,
desc: "一壶醉仙楼产的花雕酒喝掉后每5秒恢复200点内力。",
unit: "壶"
}, {
name: "女儿红",
value: 1000,
recover_mp: 400,
desc: "醉仙楼特酿女儿红每5秒回复400点内力",
unit: "壶"
}, {
name: "醉仙酿",
value: 10000,
recover_mp: 1000,
desc: "醉仙楼的招牌据说连神仙喝了都会醉倒每5秒回复1000点内力",
unit: "壶",
grade: 1
}, {
name: "醉八仙",
value: 20000,
recover_mp: 5000,
desc: "蓬莱酒楼的招牌据说连神仙喝了都会醉倒每5秒回复5000点内力",
unit: "壶",
grade: 2
}];