diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 3e38e1b..48cca82 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -44,6 +44,7 @@ taskEvent_m : '任务描述' EvalString_Multi? BGNL? Newline '需完成的最低子任务数' Int BGNL? Newline tasksList+ Newline + '接取任务后事件' BGNL? Newline action+ Newline '完成奖励' BGNL? Newline action+ @@ -51,7 +52,7 @@ taskEvent_m colour : this.tasksColor default :["任务描述",1] EvalString_Multi_0=EvalString_Multi_0?(',"text": "'+EvalString_Multi_0+'"'): ''; -var code = '{"type":"taskEvent"'+EvalString_Multi_0+',"n":'+Int_0+',"info":['+tasksList_0+'\n]'+', "action": [\n' + action_0 + ']}\n' +var code = '{"type":"taskEvent"'+EvalString_Multi_0+',"n":'+Int_0+',"info":['+tasksList_0+'\n]'+', "beforeAction": [\n' + action_0 +'], "action": [\n' + action_1 + ']}\n' return code; */; diff --git a/_server/MotaActionParser.js b/_server/MotaActionParser.js index 2d047b4..864ffbf 100644 --- a/_server/MotaActionParser.js +++ b/_server/MotaActionParser.js @@ -2,7 +2,9 @@ MotaActionParser = function () { function ActionParser() {} ActionParser.prototype.parse = function (obj, type) { + switch (type) { + case "taskEvent": // 设置任务 if (!obj) obj = {"type":"taskEvent","text": "任务描述","n":1,"info":[ {"type":"checkItem","checkItem":"yellowKey","operator":">=","count":0}, @@ -11,11 +13,12 @@ MotaActionParser = function () { {"type":"checkBlock","checkBlock":"bat","floorId":["MT1","MT2"],"operator":"<=","count":0}, {"type":"kill","operator":">=","count":0}, {"type":"killLocs", "loc": [[1,1]],"floorId":"MT1","operator":">=","count":1}, - {"type":"killSpecial","killSpecial":"61","floorId":["61"],"operator":">=","count":1}, + {"type":"killSpecial","killSpecial":"61","floorId":["MT1", "MT2"],"operator":">=","count":1}, {"type":"killAll","floorId":["MT1"]}, {"type":"specialBlock","floorId":["MT1"],"specialBlock":"血网伤害","operator":"<","count":1}, {"type":"gosthFloor","floorId":["MT1"],"operator":"<","count":1}, {"type":"arrival","floorId":"MT1"}, + ], "beforeAction": [ ], "action": [ ]}; var that=this @@ -82,8 +85,8 @@ MotaActionParser = function () { ]); }else if(one.type==="killSpecial"){ res = MotaActionBlocks["killSpecial"].xmlText([ - one.floorId.join(","), one.killSpecial, + one.floorId.join(","), one.operator, one.count, one.text||"", @@ -121,7 +124,7 @@ MotaActionParser = function () { } return res; }; - return MotaActionBlocks['taskEvent_m'].xmlText([obj.text||"",obj.n,bulidTaskList(obj.info),this.insertActionList(obj.action)]); + return MotaActionBlocks['taskEvent_m'].xmlText([obj.text||"",obj.n,bulidTaskList(obj.info),this.insertActionList(obj.beforeAction),this.insertActionList(obj.action)]); case "event": if (!obj) obj = {}; if (typeof obj === typeof "") obj = { data: [obj] }; diff --git a/_server/table/comment.js b/_server/table/comment.js index 38208ee..8c11405 100644 --- a/_server/table/comment.js +++ b/_server/table/comment.js @@ -740,7 +740,21 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_range": "thiseval <= Number.MAX_SAFE_INTEGER && thiseval>=0", "_docs": "宝石血瓶效果", "_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。" - } + }, + "setTasks": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_docs": "任务接取坐标", + "_data": "格式为{新手任务:[1,1],task1:[0,3]}" + }, + "mitTasks": { + "_leaf": true, + "_type": "textarea", + "_range": "thiseval instanceof Object && !(thiseval instanceof Array)", + "_docs": "任务提交坐标", + "_data": "格式为{新手任务:[1,1],task1:[0,3]}" + }, } }, "loc": { @@ -861,6 +875,8 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "afterOpenDoor": {}, "autoEvent": {}, "cannotMove": {}, + "setTasks": {}, + "mitTasks": {}, "cannotMoveIn": {} } } diff --git a/project/data.js b/project/data.js index 2dd0db7..7b3ad5f 100644 --- a/project/data.js +++ b/project/data.js @@ -53,6 +53,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "HPGaugeEnemy_B.webp", "LOGO.webp", "aiy00010_06.webp", + "aiy00030_00.png", + "aiy00030_01.png", "background.webp", "backgroundvertical.webp", "bg_0000.png", @@ -458,6 +460,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "lr.webp", "maba.webp", "miwu.webp", + "noTask.png", "null.webp", "other_0001.webp", "other_0002.webp", @@ -467,7 +470,9 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "sound.webp", "status.webp", "statusBackground.webp", + "sucessTask.png", "suiji.webp", + "task.png", "tati_020101.webp", "tati_020101a.webp", "tati_020101y.webp", diff --git a/project/events.js b/project/events.js index 5f74cad..795ae81 100644 --- a/project/events.js +++ b/project/events.js @@ -11814,7 +11814,8 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 = "type": "killSpecial", "killSpecial": "61", "floorId": [ - "61" + "MT1", + "MT2" ], "operator": ">=", "count": 1 @@ -11843,6 +11844,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 = "count": 1 } ], + "beforeAction": [], "action": [] }, "task1": { @@ -11899,7 +11901,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 = "type": "killSpecial", "killSpecial": "61", "floorId": [ - "61" + "MT1" ], "operator": ">=", "count": 1 @@ -11928,6 +11930,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 = "count": 1 } ], + "beforeAction": [], "action": [] } } diff --git a/project/floors/Caimhome.js b/project/floors/Caimhome.js index da785fe..0531b3d 100644 --- a/project/floors/Caimhome.js +++ b/project/floors/Caimhome.js @@ -140,5 +140,7 @@ main.floors.Caimhome= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/KTV.js b/project/floors/KTV.js index 32c14ea..c2bae07 100644 --- a/project/floors/KTV.js +++ b/project/floors/KTV.js @@ -134,5 +134,7 @@ main.floors.KTV= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0,71701,71702, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/KTVF2.js b/project/floors/KTVF2.js index 62626a0..b367216 100644 --- a/project/floors/KTVF2.js +++ b/project/floors/KTVF2.js @@ -106,5 +106,7 @@ main.floors.KTVF2= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/bihusuo.js b/project/floors/bihusuo.js index 1d26579..b3f1142 100644 --- a/project/floors/bihusuo.js +++ b/project/floors/bihusuo.js @@ -98,5 +98,7 @@ main.floors.bihusuo= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/changguan1.js b/project/floors/changguan1.js index 259206f..9ea23dc 100644 --- a/project/floors/changguan1.js +++ b/project/floors/changguan1.js @@ -136,5 +136,7 @@ main.floors.changguan1= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/changguan2.js b/project/floors/changguan2.js index c0b3065..1e6952e 100644 --- a/project/floors/changguan2.js +++ b/project/floors/changguan2.js @@ -172,5 +172,7 @@ main.floors.changguan2= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/chushi.js b/project/floors/chushi.js index 2ca6465..193bc7a 100644 --- a/project/floors/chushi.js +++ b/project/floors/chushi.js @@ -125,5 +125,7 @@ main.floors.chushi= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/goldkey.js b/project/floors/goldkey.js index 9fe3cdf..47d49e8 100644 --- a/project/floors/goldkey.js +++ b/project/floors/goldkey.js @@ -106,5 +106,7 @@ main.floors.goldkey= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/guangchang.js b/project/floors/guangchang.js index 01e5f9f..e8f8a8f 100644 --- a/project/floors/guangchang.js +++ b/project/floors/guangchang.js @@ -352,5 +352,7 @@ main.floors.guangchang= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/guangchang2.js b/project/floors/guangchang2.js index 00672b7..847dba4 100644 --- a/project/floors/guangchang2.js +++ b/project/floors/guangchang2.js @@ -129,5 +129,7 @@ main.floors.guangchang2= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/guangchang3.js b/project/floors/guangchang3.js index cefe2e9..c67c3ae 100644 --- a/project/floors/guangchang3.js +++ b/project/floors/guangchang3.js @@ -128,5 +128,7 @@ main.floors.guangchang3= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/guangchang4.js b/project/floors/guangchang4.js index 614798d..3556198 100644 --- a/project/floors/guangchang4.js +++ b/project/floors/guangchang4.js @@ -134,5 +134,7 @@ main.floors.guangchang4= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/guangchang5.js b/project/floors/guangchang5.js index ef4ce33..64a5348 100644 --- a/project/floors/guangchang5.js +++ b/project/floors/guangchang5.js @@ -150,5 +150,7 @@ main.floors.guangchang5= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/guangchang6.js b/project/floors/guangchang6.js index 76c7208..1e1fb1d 100644 --- a/project/floors/guangchang6.js +++ b/project/floors/guangchang6.js @@ -112,5 +112,7 @@ main.floors.guangchang6= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/jiaocheng01.js b/project/floors/jiaocheng01.js index 98b85b0..28bf577 100644 --- a/project/floors/jiaocheng01.js +++ b/project/floors/jiaocheng01.js @@ -281,5 +281,7 @@ main.floors.jiaocheng01= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/jiaocheng02.js b/project/floors/jiaocheng02.js index 0aa7b43..1d48d80 100644 --- a/project/floors/jiaocheng02.js +++ b/project/floors/jiaocheng02.js @@ -336,5 +336,7 @@ main.floors.jiaocheng02= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/jiaocheng03.js b/project/floors/jiaocheng03.js index 085352a..0875996 100644 --- a/project/floors/jiaocheng03.js +++ b/project/floors/jiaocheng03.js @@ -171,5 +171,7 @@ main.floors.jiaocheng03= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/jiaotang.js b/project/floors/jiaotang.js index 2981c56..f731de1 100644 --- a/project/floors/jiaotang.js +++ b/project/floors/jiaotang.js @@ -123,5 +123,7 @@ main.floors.jiaotang= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/jiuguan.js b/project/floors/jiuguan.js index 523052a..21effbb 100644 --- a/project/floors/jiuguan.js +++ b/project/floors/jiuguan.js @@ -119,5 +119,7 @@ main.floors.jiuguan= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/shengnvhome.js b/project/floors/shengnvhome.js index 7e66e25..606847a 100644 --- a/project/floors/shengnvhome.js +++ b/project/floors/shengnvhome.js @@ -98,5 +98,7 @@ main.floors.shengnvhome= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/shinvhome.js b/project/floors/shinvhome.js index cbced38..0fb2e17 100644 --- a/project/floors/shinvhome.js +++ b/project/floors/shinvhome.js @@ -98,5 +98,7 @@ main.floors.shinvhome= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/street01.js b/project/floors/street01.js index 6f291a7..39e5f28 100644 --- a/project/floors/street01.js +++ b/project/floors/street01.js @@ -128,5 +128,7 @@ main.floors.street01= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "mitTasks": {}, + "setTasks": {} } \ No newline at end of file diff --git a/project/floors/street02.js b/project/floors/street02.js index 9bce79d..a3c7182 100644 --- a/project/floors/street02.js +++ b/project/floors/street02.js @@ -66,5 +66,7 @@ main.floors.street02= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/xiaoxiang01.js b/project/floors/xiaoxiang01.js index 88b502b..48a51df 100644 --- a/project/floors/xiaoxiang01.js +++ b/project/floors/xiaoxiang01.js @@ -113,5 +113,7 @@ main.floors.xiaoxiang01= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/xiaoxiang02.js b/project/floors/xiaoxiang02.js index cd94f20..38f3727 100644 --- a/project/floors/xiaoxiang02.js +++ b/project/floors/xiaoxiang02.js @@ -94,5 +94,7 @@ main.floors.xiaoxiang02= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/xiaoxiang3.js b/project/floors/xiaoxiang3.js index 06871b2..af9689e 100644 --- a/project/floors/xiaoxiang3.js +++ b/project/floors/xiaoxiang3.js @@ -196,5 +196,7 @@ main.floors.xiaoxiang3= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu1.js b/project/floors/yiqu1.js index e7227a7..2caa3db 100644 --- a/project/floors/yiqu1.js +++ b/project/floors/yiqu1.js @@ -117,5 +117,7 @@ main.floors.yiqu1= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu10.js b/project/floors/yiqu10.js index b276418..126cb0e 100644 --- a/project/floors/yiqu10.js +++ b/project/floors/yiqu10.js @@ -49,5 +49,7 @@ main.floors.yiqu10= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu11.js b/project/floors/yiqu11.js index e23219f..c377639 100644 --- a/project/floors/yiqu11.js +++ b/project/floors/yiqu11.js @@ -49,5 +49,7 @@ main.floors.yiqu11= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu12.js b/project/floors/yiqu12.js index b8b62bf..f9879d6 100644 --- a/project/floors/yiqu12.js +++ b/project/floors/yiqu12.js @@ -49,5 +49,7 @@ main.floors.yiqu12= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu13.js b/project/floors/yiqu13.js index 1710543..7617524 100644 --- a/project/floors/yiqu13.js +++ b/project/floors/yiqu13.js @@ -49,5 +49,7 @@ main.floors.yiqu13= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu2.js b/project/floors/yiqu2.js index eaa6c56..324ec76 100644 --- a/project/floors/yiqu2.js +++ b/project/floors/yiqu2.js @@ -136,5 +136,7 @@ main.floors.yiqu2= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu3.js b/project/floors/yiqu3.js index edd9b2b..551efe4 100644 --- a/project/floors/yiqu3.js +++ b/project/floors/yiqu3.js @@ -126,5 +126,7 @@ main.floors.yiqu3= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu4.js b/project/floors/yiqu4.js index d7ac2b0..9f2476f 100644 --- a/project/floors/yiqu4.js +++ b/project/floors/yiqu4.js @@ -100,5 +100,7 @@ main.floors.yiqu4= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu5.js b/project/floors/yiqu5.js index e1260f1..4bb6901 100644 --- a/project/floors/yiqu5.js +++ b/project/floors/yiqu5.js @@ -182,5 +182,7 @@ main.floors.yiqu5= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu6.js b/project/floors/yiqu6.js index 19a2d62..0d684d2 100644 --- a/project/floors/yiqu6.js +++ b/project/floors/yiqu6.js @@ -72,5 +72,7 @@ main.floors.yiqu6= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu7.js b/project/floors/yiqu7.js index 7e9f3a6..7868f76 100644 --- a/project/floors/yiqu7.js +++ b/project/floors/yiqu7.js @@ -57,5 +57,7 @@ main.floors.yiqu7= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu8.js b/project/floors/yiqu8.js index 71c2a6f..523ac02 100644 --- a/project/floors/yiqu8.js +++ b/project/floors/yiqu8.js @@ -49,5 +49,7 @@ main.floors.yiqu8= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yiqu9.js b/project/floors/yiqu9.js index 0bab892..cacee16 100644 --- a/project/floors/yiqu9.js +++ b/project/floors/yiqu9.js @@ -49,5 +49,7 @@ main.floors.yiqu9= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/yushou.js b/project/floors/yushou.js index 5abf05c..f5c6ca1 100644 --- a/project/floors/yushou.js +++ b/project/floors/yushou.js @@ -58,5 +58,7 @@ main.floors.yushou= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/floors/zhujuejia.js b/project/floors/zhujuejia.js index e2cb6bd..1cc5b30 100644 --- a/project/floors/zhujuejia.js +++ b/project/floors/zhujuejia.js @@ -102,5 +102,7 @@ main.floors.zhujuejia= ], "fg2map": [ -] +], + "setTasks": {}, + "mitTasks": {} } \ No newline at end of file diff --git a/project/images/noTask.png b/project/images/noTask.png new file mode 100644 index 0000000..c759821 Binary files /dev/null and b/project/images/noTask.png differ diff --git a/project/images/sucessTask.png b/project/images/sucessTask.png new file mode 100644 index 0000000..a8cccda Binary files /dev/null and b/project/images/sucessTask.png differ diff --git a/project/images/task.png b/project/images/task.png new file mode 100644 index 0000000..90ced94 Binary files /dev/null and b/project/images/task.png differ diff --git a/project/plugins.js b/project/plugins.js index 9104444..98a5a5a 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -3028,7 +3028,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.overupdate() if (main.dom.saveLoad && main.dom.saveLoad.style.display === "block") core.saveLoad.update(); - if (core.status.event.data?.type == "menu") core.menu.update() + if (core.status.event?.data?.type == "menu") core.menu.update() }; class StatusBar { @@ -11914,26 +11914,27 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = "text": "任务描述", "n": 1, "info": [ - { "type": "checkItem", "checkItem": "yellowKey", "operator": ">=", "count": 0 }, - { "type": "checkStatus", "checkStatus": "atk", "operator": ">=", "count": 10 }, + { "type": "checkItem", "checkItem": "yellowKey", "operator": ">=", "count": 0 }, + { "type": "checkStatus", "checkStatus": "atk", "operator": ">=", "count": 10 }, { "type": "checkFlag", "checkFlag": "flag1", "operator": "=", "count": "\"value\"" }, - { "type": "checkBlock", "checkBlock": "bat", "floorId": ["MT1", "MT2"], "operator": "<=", "count": 0 }, - { "type": "kill", "operator": ">=", "count": 0 }, + { "type": "checkBlock", "checkBlock": "bat", "floorId": ["MT1", "MT2"], "operator": "<=", "count": 0 }, + { "type": "kill", "operator": ">=", "count": 0 }, { "type": "killLocs", "loc": [ [1, 1] ], "floorId": "MT1", - "operator": ">=", + "operator": ">=", "count": 1 }, - { "type": "killSpecial", "killSpecial": "61", "floorId": ["61"], "operator": ">=", "count": 1 }, + { "type": "killSpecial", "killSpecial": "61", "floorId": ["MT1", "MT2"], "operator": ">=", "count": 1 }, { "type": "killAll", "floorId": ["MT1"] }, - { "type": "specialBlock", "floorId": ["MT1"], "specialBlock": "血网伤害", "operator": "<", "count": 1 }, - { "type": "gosthFloor", "floorId": ["MT1"], "operator": "<", "count": 1 }, + { "type": "specialBlock", "floorId": ["MT1"], "specialBlock": "血网伤害", "operator": "<", "count": 1 }, + { "type": "gosthFloor", "floorId": ["MT1"], "operator": "<", "count": 1 }, { "type": "arrival", "floorId": "MT1" }, ], + "beforeAction": [], "action": [] }, "taskEvent" @@ -12356,6 +12357,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = "text1": "新手任务", "text2": "task1,task2", "condition": "'新手任务'.split(',').some(v=>core.plugin.可接取任务.includes(v))||'task1,task2,'.split(',').some(v=>core.taskSystem.tasksInfo.findIndex(a => a.name ===v.name))", + "beforeAction": [], "action": [ ] @@ -28259,6 +28261,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = if (task && core.plugin.可接取任务.includes(name)) { this.tasksInfo.push({ name, text: task.text, n: task.n, action: task.action, tasks: task.info.map(v => new Task(v)) }) this.tasksInfo[this.tasksInfo.length - 1].complter = this.checkTask(this.tasksInfo.length - 1) + if (task.beforeAction.length > 0) core.insertAction(task.beforeAction) } } checkTask(index) { @@ -28291,7 +28294,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = trymitTask(index) { if (index < 0 || index > this.tasksInfo.length - 1) return if (this.checkTask(index)) { - if (this.tasksInfo[i].action) core.insertAction(this.tasksInfo[i].action) + if (this.tasksInfo[i].action.length > 0) core.insertAction(this.tasksInfo[i].action) core.plugin.已提交任务.push(this.tasksInfo[i].name) this.removeTask(index) } @@ -28301,7 +28304,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = const index = this.tasksInfo.findIndex(v => v.name === name) if (index < 0 || index > this.tasksInfo.length - 1) return if (this.checkTask(index)) { - if (this.tasksInfo[i].action) core.insertAction(this.tasksInfo[i].action) + if (this.tasksInfo[i].action.length > 0) core.insertAction(this.tasksInfo[i].action) core.plugin.已提交任务.push(name) this.removeTask(index) } @@ -29086,5 +29089,75 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = }; })(); } +}, + "任务提示": function () { + // 在此增加新插件 + let time = 0 + let ctx + let alpha = 0 + let add = 1 + core.registerAnimationFrame("taskPic", true, (timestemp) => { + if (timestemp - time < 50) return + time = timestemp + if (!ctx) ctx = core.createCanvas("taskPic", 0, 0, 416, 416, 141) + let floorId + if (core.status.lockControl && core.status.event.id == "viewMaps") { + ctx.canvas.style.zIndex = 141 + floorId = core.floorIds[core.status.event.data?.index] + } else { + ctx.canvas.style.zIndex = 66 + floorId = core.status.floorId + } + if (!floorId) return + let setTasks = core.floors[floorId].setTasks + let mitTasks = core.floors[floorId].mitTasks + let settask = [] + let notask = [] + let seccesstask = [] + + core.plugin.可接取任务.forEach(v => { + if (setTasks[v]) { + if (!settask.some(a => a[0] === setTasks[v][0] && a[1] === setTasks[v][1])) settask.push(setTasks[v]) + } + }) + let task = core.taskSystem.tasksInfo + task.forEach((v, i) => { + if (mitTasks[v.name]) { + + if (!settask.some(a => a[0] === setTasks[v.name][0] && a[1] === setTasks[v.name][1])) { + let success = task.checkTask(i) + if (success && !seccesstask.some(a => a[0] === mitTasks[v.name][0] && a[1] === mitTasks[v.name][1])) { + seccesstask.push(mitTasks[v.name]) + } + if (!success && !notask.some(a => a[0] === mitTasks[v.name][0] && a[1] === mitTasks[v.name][1])) { + notask.push(mitTasks[v.name]) + } + } + } + }) + core.clearMap(ctx) + core.setAlpha(ctx, alpha) + alpha += 0.05 * add + if (alpha >= 1) add = -1 + if (alpha <= 0) add = 1 + settask.forEach(v => { + let block = core.getBlockCls(v[0], v[1], floorId) + if (!block) return + if (block === "npcs") core.drawImage(ctx, "task.png", v[0] * 32 + 4, v[1] * 32 - 20, 24, 24) + if (block === "npc48") core.drawImage(ctx, "task.png", v[0] * 32 + 4, v[1] * 32 - 36, 24, 24) + }) + seccesstask.forEach(v => { + let block = core.getBlockCls(v[0], v[1], floorId) + if (!block) return + if (block === "npcs") core.drawImage(ctx, "sucessTask.png", v[0] * 32 + 4, v[1] * 32 - 20, 24, 24) + if (block === "npc48") core.drawImage(ctx, "sucessTask.png", v[0] * 32 + 4, v[1] * 32 - 36, 24, 24) + }) + notask.forEach(v => { + let block = core.getBlockCls(v[0], v[1], floorId) + if (!block) return + if (block === "npcs") core.drawImage(ctx, "noTask.png", v[0] * 32 + 4, v[1] * 32 - 20, 24, 24) + if (block === "npc48") core.drawImage(ctx, "noTask.png", v[0] * 32 + 4, v[1] * 32 - 36, 24, 24) + }) + }) } } \ No newline at end of file diff --git a/project/table/task_comment.js b/project/table/task_comment.js index c8ae3f6..5b4aae9 100644 --- a/project/table/task_comment.js +++ b/project/table/task_comment.js @@ -78,7 +78,7 @@ var task_comment = { "type": "killSpecial", "killSpecial": "61", "floorId": [ - "61" + "MT1","MT2" ], "operator": ">=", "count": 1 @@ -106,7 +106,7 @@ var task_comment = { "operator": "<", "count": 1 } - ], + ],"beforeAction":[], "action": [ { "type": "setmusics"