diff --git a/xinshoucun/cunzhongyang.json b/xinshoucun/cunzhongyang.json index 0564aca..2676bee 100644 --- a/xinshoucun/cunzhongyang.json +++ b/xinshoucun/cunzhongyang.json @@ -5,7 +5,8 @@ "no_fight" : 1 }, "exits": { - "west" : "xinshoucun/cunkou" + "west" : "xinshoucun/cunkou", + "south" : "xinshoucun/daguchang" }, "objs" : { "xinshoucun/npc/laocunzhang" : 1 diff --git a/xinshoucun/daguchang.json b/xinshoucun/daguchang.json new file mode 100644 index 0000000..157024a --- /dev/null +++ b/xinshoucun/daguchang.json @@ -0,0 +1,10 @@ +{ + "name":"打谷场", + "desc":"位于小村落南部地势较高的一处平地,被村民们用作打谷场,晾晒着各种收获,因此也招来山里的老鼠光顾,老鼠活动的痕迹简直随处可见。", + "exits": { + "north" : "xinshoucun/cunzhongyang" + }, + "objs" : { + "xinshoucun/npc/rat" : 6 + } +} \ No newline at end of file diff --git a/xinshoucun/npc/boar.js b/xinshoucun/npc/boar.js index 690f3a8..0de9c56 100644 --- a/xinshoucun/npc/boar.js +++ b/xinshoucun/npc/boar.js @@ -1,8 +1,11 @@ var fm = require('framework'); var boar = fm.extend(function() { + if (!(this instanceof boar)) + return new boar(); + this.name = "野猪"; - this.desc = "" -}, fm.NPC); + this.desc = ""; +}, fm.ANIMAL); module.exports = boar; \ No newline at end of file diff --git a/xinshoucun/npc/laocunzhang.js b/xinshoucun/npc/laocunzhang.js index 9991027..e643264 100644 --- a/xinshoucun/npc/laocunzhang.js +++ b/xinshoucun/npc/laocunzhang.js @@ -4,9 +4,10 @@ var laocunzhang = fm.extend(function() { this.name = "老村长"; this.desc = "" this.quests = { - first : { + kill_rat : { + key : "kill_rat", target : "xingshoucun/npc/boar", - desc : "村南山脚的田地里经常有山里的野猪出没,请帮助村民们猎杀#s(HIR)$count$#e(HIR)只野猪吧。", + desc : "村子南边的打谷场上是村民们晒谷子的地方,经常有老鼠光顾,请帮助村民们捕杀$(HIR) $count$ $NOR只老鼠吧。", type : "kill", count : 4, reward : { @@ -15,7 +16,7 @@ var laocunzhang = fm.extend(function() { } } } - this.add_inquiry("kill_boar", "帮助猎杀野猪", this.kill_boar_quest); + this.add_inquiry("kill_boar", "帮助捕杀老鼠", this.inquiry_kill_boar); }, fm.NPC); laocunzhang.prototype.visiable_inquiry = function(id, who) { @@ -24,9 +25,8 @@ laocunzhang.prototype.visiable_inquiry = function(id, who) { return 0; } -laocunzhang.prototype.kill_boar_quest = function(who) { - var desc = _daemons.questd.quest_desc(this.quests['first'], who); - FUNCTIONS.message_vision("$N对$n说到:" + desc, this, who); +laocunzhang.prototype.inquiry_kill_boar = function(who) { + _daemons.questd.accept_quest(this, who, this.quests['kill_rat']); } module.exports = laocunzhang; \ No newline at end of file diff --git a/xinshoucun/npc/rat.js b/xinshoucun/npc/rat.js new file mode 100644 index 0000000..640c3d2 --- /dev/null +++ b/xinshoucun/npc/rat.js @@ -0,0 +1,17 @@ +var fm = require('framework'); + +var rat = fm.extend(function() { + if (!(this instanceof rat)) + return new rat(); + + this.name = "硕鼠"; + this.desc = "肥肥胖胖的,个头超过了兔子,哪里还像一只老鼠。"; + + this.str = 1; + this.con = 1; + this.cor = 1; + + this.setup_char(); +}, fm.ANIMAL); + +module.exports = rat; \ No newline at end of file