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

54
world/map/home/danjian.js Normal file
View File

@@ -0,0 +1,54 @@
this.inherits(ROOM);
this.name = "卧室"
this.desc = "这是你的卧室,房间不大陈设也不多,但是收拾的干净整洁,房间里面除了一张楠木大床,一张书桌,一个箱子就没别的东西了。";
this.exits = { "out": "yz/home" };
this.on_enter = function (me) {
if (me.follower) {
for (var i = 0; i < me.follower.length; i++) {
FOLLOWER.CREATE(me, me.follower[i], this.on_npc_create.bind(this, me));
}
}
if (me.master) {
me.actions = [
{ cmd: "makelove " + me.id, name: "和" + me.name + "双修" }
];
me.master_json = null;
}
me.add_status({
id: "room",
duration: 0,
desc: "你在自己的房间,身心得到放松,提高修炼效率",
name: "静心",
prop: {
study_per: 10,
lianxi_per: 10,
dazuo_per: 10
}
});
}
this.on_leave = function (me) {
if (me.master) {
me.actions = null;
me.master_json = null;
}
me.remove_status("room");
}
this.add_action("store", "打开仓库");
this.add_action("xiulian", "修炼", null);
this.add_action("fenpei", "分配属性", null);
this.allow_store = true;
this.on_npc_create = function (me, npc) {
if (!npc) return;
if (npc.environment && npc.environment.parent.id == "home") return;
if (!npc.hp) npc.hp = 1;
if (npc.state) npc.set_state(null);
npc.moveto(this, npc.name + "离开了。", npc.name + "走了过来。");
npc.on_master_enter && npc.on_master_enter(me);
}
this.add_action("sleep", "睡觉", function (me) {
me.notify("你躺到床上被子一盖,不一会就呼呼的睡着了。");
});

36
world/map/home/huayuan.js Normal file
View File

@@ -0,0 +1,36 @@
this.inherits(ROOM);
this.name = "小花园"
this.no_fight = true;
this.desc = "这是你家的花园,迎面是一个小池塘,池塘里一群群的鱼儿游来游去,边上摆着一些奇形怪状的石头,水池的两旁种满了花花草草,郁郁葱葱,看上去有不少的珍惜品种"
this.exits = { "southwest": "home/yuanzi" };
this.can_diaoyu = true;
this.can_caiyao = true;
this.on_enter = function (me) {
if (me.master) {
me.actions = [
{ cmd: "dc " + me.id + " diao", name: "让" + me.name + "钓鱼" },
{ cmd: "dc " + me.id + " cai", name: "让" + me.name + "采药" }
];
if (me.query_skill('guanshanjue', 0) >= 100) {
me.actions.push({ cmd: "dc " + me.id + " wk", name: "让" + me.name + "挖矿" });
}
me.master_json = null;
}
}
this.on_leave = function (me) {
if (me.master) {
me.actions = null;
me.master_json = null;
}
}
this.add_action("diao", "钓鱼", function (me) {
return WORLD.COMMANDS['diaoyu'].enter(me);
});
this.add_action("xkwk", "挖矿", function (me) {
return WORLD.COMMANDS['wk'].enter(me);
});
this.add_action("cai", "采药", function (me) {
return WORLD.COMMANDS['caiyao'].enter(me);
});

View File

@@ -0,0 +1,35 @@
this.inherits(ROOM);
this.name = "练功房"
this.desc = "这是一间布置的很别致的练功房,房间的北面各种武器玲琅满目,刀枪剑棍,十八般兵器在这里都能找到,四周石壁看上去很坚固,南半部散放着几个蒲团,供诸你打坐吐纳,调气养息,修练内功之用。";
this.exits = { "east": "home/yuanzi" };
this.add_action("xiulian", "修炼", null);
this.add_action("fenpei", "分配属性", null);
this.on_leave = function (me) {
if (me.master) {
me.actions = null;
me.master_json = null;
}
me.remove_status("room");
}
this.on_enter = function (me) {
if (me.master) {
me.actions = [
{ cmd: "dc " + me.id + " dazuo", name: "让" + me.name + "打坐" },
{ cmd: "makelove " + me.id, name: "和" + me.name + "双修" }
];
me.master_json = null;
}
me.add_status({
id: "room",
duration: 0,
desc: "你在练功房,心无旁骛,修炼效率得到提高",
name: "静心",
prop: {
study_per:50,
lianxi_per: 50,
dazuo_per: 50
}
});
}

33
world/map/home/lianyao.js Normal file
View File

@@ -0,0 +1,33 @@
this.inherits(ROOM);
this.name = "炼药房"
this.desc = "这是你的炼药房,还没进入就先闻到一股浓烈的药草香味,房间里面没有多余的设施,一个大大的炼药炉摆在房子中间。";
this.exits = { "west": "home/yuanzi" };
this.can_lianyao = true;
this.add_action("lianyao", "炼药");
//this.add_action("lianyao2", "研制丹药");
this.on_leave = function (me) {
if (me.master) {
me.actions = null;
me.master_json = null;
}
me.remove_status("room");
}
this.on_enter = function (me) {
if (me.master) {
me.actions = [
{ cmd: "dc " + me.id + " lianyao", name: "让" + me.name + "炼药" }
];
me.master_json = null;
}
me.add_status({
id: "room",
duration: 0,
desc: "你在你的炼药房,炼药效率得到提升",
name: "专心",
prop: {
lianyao1: 2
}
});
}

4
world/map/home/store.js Normal file
View File

@@ -0,0 +1,4 @@
this.inherits(ROOM);
this.name = "仓库"
this.desc = "这里是专门存放追随者的仓库。";
this.max_item_count = 10000;

31
world/map/home/woshi.js Normal file
View File

@@ -0,0 +1,31 @@
this.inherits(ROOM);
this.name = "卧室"
this.desc = "这是你的卧室,房间不算大却陈设豪华,地上铺着猩红的羊毛手织地毯,摆着一张楠木花雕大床,一具红松大衣柜,柜顶搁着几只牛皮藤箱子,靠窗处是一张花梨木书桌,旁边一个书架,里面放了一些四书五经之类的儒家书籍。";
this.exits = { "south": "home/yuanzi" };
this.add_action("store", "打开仓库");
this.on_leave = function (me) {
if (me.master) {
me.actions = null;
me.master_json = null;
}
}
this.on_enter = function (me) {
if (me.master) {
me.actions = [
{ cmd: "makelove " + me.id, name: "和" + me.name + "双修" }
];
me.master_json = null;
if (me.random(10) == 1)
me.do_command("makelove", me.master);
}
}
this.add_action("sleep", "睡觉", function (me) {
me.notify("你躺到床上被子一盖,不一会就呼呼的睡着了。");
});
this.allow_store = true;
this.add_action('drop', null, function (me) { return me.notify('自己家里就不要乱丢东西了。'); });

32
world/map/home/yuanzi.js Normal file
View File

@@ -0,0 +1,32 @@
this.inherits(ROOM);
this.name = "院子"
this.desc = "这是你家的大院,迎面是一个假山水池,池上摆着一块奇形怪状的石头,据说是之前人家留下来的,水池两旁种满了花草,东边是一颗槐树,郁郁葱葱,遮盖了大半个院子,背面是你的卧室,西面是练功房";
this.exits = { "out": "yz/home", "west": "home/liangong", north: "home/woshi", "east": "home/lianyao", "northeast": "home/huayuan" };
this.on_enter = function (me) {
if (me.follower && this.owner === me.id) {
for (var i = 0; i < me.follower.length; i++) {
FOLLOWER.CREATE(me, me.follower[i], this.on_npc_create.bind(this, me));
}
}
if (me.master) {
me.actions = [
{ cmd: "dismiss " + me.id, name: "遣散" + me.name }
];
me.master_json = null;
}
}
this.on_npc_create = function (me, npc) {
if (!npc) return;
if (npc.environment && npc.environment.parent.id == "home") return;
if (!npc.hp) npc.hp = 1;
if (npc.state) npc.set_state(null);
npc.moveto(this, npc.name + "离开了。", npc.name + "走了过来。");
npc.on_master_enter && npc.on_master_enter(me);
}
this.on_leave = function (me) {
if (me.master) {
me.actions = null;
me.master_json = null;
}
}