任务指引/任务提示图标
This commit is contained in:
parent
725b4ad583
commit
fd9e250bc9
@ -44,15 +44,17 @@ taskEvent_m
|
|||||||
: '任务描述' EvalString_Multi? BGNL? Newline
|
: '任务描述' EvalString_Multi? BGNL? Newline
|
||||||
'需完成的最低子任务数' Int BGNL? Newline
|
'需完成的最低子任务数' Int BGNL? Newline
|
||||||
tasksList+ Newline
|
tasksList+ Newline
|
||||||
|
'任务接取楼层' IdString 'x,y'EvalString'执行楼层(用于任务指引)'EvalString?'提交楼层'IdString 'x,y'EvalString BGNL? Newline
|
||||||
'接取任务后事件' BGNL? Newline action+ Newline
|
'接取任务后事件' BGNL? Newline action+ Newline
|
||||||
'完成奖励' BGNL? Newline action+
|
'完成奖励' '奖励道具(仅用于任务绘制,例:itemId1:1,itemId2:3)' EvalString? BGNL? Newline action+
|
||||||
|
|
||||||
|
|
||||||
/* taskEvent_m
|
/* taskEvent_m
|
||||||
colour : this.tasksColor
|
colour : this.tasksColor
|
||||||
default :["任务描述",1]
|
allFloorIds : ['IdString_0','IdString_1']
|
||||||
|
default :["任务描述",1,"MT1","1,1","MT1,MT2","MT1","1,1","yellowKey:1,redGem:3"]
|
||||||
EvalString_Multi_0=EvalString_Multi_0?(',"text": "'+EvalString_Multi_0+'"'): '';
|
EvalString_Multi_0=EvalString_Multi_0?(',"text": "'+EvalString_Multi_0+'"'): '';
|
||||||
var code = '{"type":"taskEvent"'+EvalString_Multi_0+',"n":'+Int_0+',"info":['+tasksList_0+'\n]'+', "beforeAction": [\n' + action_0 +'], "action": [\n' + action_1 + ']}\n'
|
var code = '{"type":"taskEvent"'+EvalString_Multi_0+',"n":'+Int_0+',"info":['+tasksList_0+'\n]'+',"setFloor":"'+IdString_0+'","setxy":['+EvalString_0.split(",")+'],"tarFloor":"'+EvalString_1+'","mitFloor":"'+IdString_1+'","mitxy":['+EvalString_2.split(",")+'], "beforeAction": [\n' + action_0 +'],"reward":"'+EvalString_1+'", "action": [\n' + action_1 + ']}\n'
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
@ -2916,16 +2918,15 @@ return code;
|
|||||||
*/;
|
*/;
|
||||||
|
|
||||||
setq_s
|
setq_s
|
||||||
: '设置任务目标楼层'IdString?'不填为清空当前任务指引' Newline
|
: '设置任务追踪'EvalString?'不填为清空当前任务指引' Newline
|
||||||
|
|
||||||
/* setq_s
|
/* setq_s
|
||||||
tooltip : setq:设置任务目标楼层(显示在小地图)
|
tooltip : setq:设置任务目标楼层(显示在小地图)
|
||||||
helpUrl : /_docs/#/instruction
|
helpUrl : /_docs/#/instruction
|
||||||
default : [""]
|
default : [""]
|
||||||
allFloorIds : ['IdString_0']
|
|
||||||
colour : this.soundColor
|
colour : this.soundColor
|
||||||
IdString_0 = IdString_0 ? (', "id": "'+IdString_0+'"') : '';
|
EvalString_0 = EvalString_0 ? (', "name": "'+EvalString_0+'"') : '';
|
||||||
var code = '{"type": "setq"'+IdString_0+'},\n';
|
var code = '{"type": "setq"'+EvalString_0+'},\n';
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
@ -3578,7 +3579,7 @@ tooltip : 选项的选择
|
|||||||
helpUrl : /_docs/#/instruction
|
helpUrl : /_docs/#/instruction
|
||||||
default : ["新手任务","task1,task2"]
|
default : ["新手任务","task1,task2"]
|
||||||
colour : this.subColor
|
colour : this.subColor
|
||||||
var condition = ', "condition": "\''+EvalString_0+'\'.split(\',\').some(v=>core.plugin.可接取任务.includes(v))||\''+EvalString_1+'\'.split(\',\').some(v=>core.taskSystem.tasksInfo.find(a => a.name ===v.name))"';
|
var condition = ', "condition": "\''+EvalString_0+'\'.split(\',\').some(v=>core.plugin.可接取任务.includes(v))||\''+EvalString_1+'\'.split(\',\').some(v=>core.taskSystem.tasksInfo.find(a => a.name ===v))"';
|
||||||
var collapsed=block.isCollapsed()?', "_collapsed": true':'';
|
var collapsed=block.isCollapsed()?', "_collapsed": true':'';
|
||||||
var disabled=block.isEnabled()?'':', "_disabled": true';
|
var disabled=block.isEnabled()?'':', "_disabled": true';
|
||||||
var code = '{"type":"taskContext","text":"任务","text1": "'+EvalString_0+'","text2":"'+EvalString_1+'"'+condition+collapsed+disabled+', "action": [\n'+action_0+']},\n';
|
var code = '{"type":"taskContext","text":"任务","text1": "'+EvalString_0+'","text2":"'+EvalString_1+'"'+condition+collapsed+disabled+', "action": [\n'+action_0+']},\n';
|
||||||
|
@ -18,8 +18,9 @@ MotaActionParser = function () {
|
|||||||
{"type":"specialBlock","floorId":["MT1"],"specialBlock":"血网伤害","operator":"<","count":1},
|
{"type":"specialBlock","floorId":["MT1"],"specialBlock":"血网伤害","operator":"<","count":1},
|
||||||
{"type":"gosthFloor","floorId":["MT1"],"operator":"<","count":1},
|
{"type":"gosthFloor","floorId":["MT1"],"operator":"<","count":1},
|
||||||
{"type":"arrival","floorId":"MT1"},
|
{"type":"arrival","floorId":"MT1"},
|
||||||
], "beforeAction": [
|
],"setFloor":"MT1","setxy":[1,1],"tarFloor":"MT1,MT2","mitFloor":"MT1","mitxy":[1,2],
|
||||||
], "action": [
|
"beforeAction": [
|
||||||
|
],"reward":"yellowKey:1,redGem:3","action": [
|
||||||
]};
|
]};
|
||||||
var that=this
|
var that=this
|
||||||
var bulidTaskList = function (obj) {
|
var bulidTaskList = function (obj) {
|
||||||
@ -124,7 +125,7 @@ MotaActionParser = function () {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
return MotaActionBlocks['taskEvent_m'].xmlText([obj.text||"",obj.n,bulidTaskList(obj.info),this.insertActionList(obj.beforeAction),this.insertActionList(obj.action)]);
|
return MotaActionBlocks['taskEvent_m'].xmlText([obj.text||"",obj.n,bulidTaskList(obj.info),obj.setFloor,obj.setxy.join(","),obj.tarFloor,obj.mitFloor,obj.mitxy.join(","),this.insertActionList(obj.beforeAction),obj.reward,this.insertActionList(obj.action)]);
|
||||||
case "event":
|
case "event":
|
||||||
if (!obj) obj = {};
|
if (!obj) obj = {};
|
||||||
if (typeof obj === typeof "") obj = { data: [obj] };
|
if (typeof obj === typeof "") obj = { data: [obj] };
|
||||||
@ -739,7 +740,7 @@ MotaActionParser = function () {
|
|||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
case "setq":
|
case "setq":
|
||||||
this.next = MotaActionBlocks["setq_s"].xmlText([data.id, this.next]);
|
this.next = MotaActionBlocks["setq_s"].xmlText([data.name, this.next]);
|
||||||
break;
|
break;
|
||||||
case "setcgs":
|
case "setcgs":
|
||||||
this.next = MotaActionBlocks["setcgs_s"].xmlText([data.img, this.next]);
|
this.next = MotaActionBlocks["setcgs_s"].xmlText([data.img, this.next]);
|
||||||
@ -2751,7 +2752,7 @@ MotaActionParser = function () {
|
|||||||
case "trymitTask": // 尝试提交第n项任务
|
case "trymitTask": // 尝试提交第n项任务
|
||||||
this.next = MotaActionBlocks['trymitTask_s'].xmlText([data.index,this.next ]);
|
this.next = MotaActionBlocks['trymitTask_s'].xmlText([data.index,this.next ]);
|
||||||
break;
|
break;
|
||||||
case "trymitTaskTaskByName": // 尝试提交某一任务
|
case "trymitTaskByName": // 尝试提交某一任务
|
||||||
this.next = MotaActionBlocks['trymitTaskByName_s'].xmlText([data.name,this.next ]);
|
this.next = MotaActionBlocks['trymitTaskByName_s'].xmlText([data.name,this.next ]);
|
||||||
break;
|
break;
|
||||||
case "clearTask": // 删除所有任务
|
case "clearTask": // 删除所有任务
|
||||||
|
@ -740,21 +740,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
|||||||
"_range": "thiseval <= Number.MAX_SAFE_INTEGER && thiseval>=0",
|
"_range": "thiseval <= Number.MAX_SAFE_INTEGER && thiseval>=0",
|
||||||
"_docs": "宝石血瓶效果",
|
"_docs": "宝石血瓶效果",
|
||||||
"_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。"
|
"_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": {
|
"loc": {
|
||||||
|
@ -12780,82 +12780,22 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
|
|||||||
"type": "checkItem",
|
"type": "checkItem",
|
||||||
"checkItem": "yellowKey",
|
"checkItem": "yellowKey",
|
||||||
"operator": ">=",
|
"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": "killLocs",
|
|
||||||
"loc": [
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"floorId": "MT1",
|
|
||||||
"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
|
"count": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"setFloor": "yiqu1",
|
||||||
|
"setxy": [
|
||||||
|
2,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"tarFloor": "MT1,MT2",
|
||||||
|
"mitFloor": "yiqu1",
|
||||||
|
"mitxy": [
|
||||||
|
8,
|
||||||
|
7
|
||||||
|
],
|
||||||
"beforeAction": [],
|
"beforeAction": [],
|
||||||
|
"reward": "yellowKey:1,redGem:3",
|
||||||
"action": []
|
"action": []
|
||||||
},
|
},
|
||||||
"task1": {
|
"task1": {
|
||||||
@ -12941,7 +12881,19 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
|
|||||||
"count": 1
|
"count": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"setFloor": "MT1",
|
||||||
|
"setxy": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"tarFloor": "MT1,MT2",
|
||||||
|
"mitFloor": "MT1",
|
||||||
|
"mitxy": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
"beforeAction": [],
|
"beforeAction": [],
|
||||||
|
"reward": "yellowKey:1,redGem:3",
|
||||||
"action": []
|
"action": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,5 @@ main.floors.jiaocheng01=
|
|||||||
],
|
],
|
||||||
"fg2map": [
|
"fg2map": [
|
||||||
|
|
||||||
],
|
]
|
||||||
"setTasks": {},
|
|
||||||
"mitTasks": {}
|
|
||||||
}
|
}
|
@ -1466,7 +1466,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"updateStatusBar": function () {
|
"updateStatusBar": function () {
|
||||||
|
core.taskSystem.checkAll()
|
||||||
// 更新状态栏
|
// 更新状态栏
|
||||||
core.ui.statusBar.update();
|
core.ui.statusBar.update();
|
||||||
// 更新阻激夹域的伤害值
|
// 更新阻激夹域的伤害值
|
||||||
|
@ -2,6 +2,19 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
{
|
{
|
||||||
"init": function () {
|
"init": function () {
|
||||||
this._afterLoadResources = function () {
|
this._afterLoadResources = function () {
|
||||||
|
core.setTaskFloor = {}
|
||||||
|
core.mitTaskFloor = {}
|
||||||
|
core.tarTaskFloor = {}
|
||||||
|
core.taskReward = {}
|
||||||
|
for (const [key, value] of Object.entries(core.events.task)) {
|
||||||
|
if (!core.setTaskFloor[value.setFloor]) core.setTaskFloor[value.setFloor] = {}
|
||||||
|
core.setTaskFloor[value.setFloor][key] = value.setxy
|
||||||
|
core.tarTaskFloor[key] = value.tarFloor.split(",")
|
||||||
|
if (!core.mitTaskFloor[value.mitFloor]) core.mitTaskFloor[value.mitFloor] = {}
|
||||||
|
core.mitTaskFloor[value.mitFloor][key] = value.mitxy
|
||||||
|
core.taskReward[key] = Object.fromEntries((value.reward.split(",").map(v => v.split(":"))).map(v => [v[0], parseInt(v[1])]))
|
||||||
|
}
|
||||||
|
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
function loadFont(_fontName, _fontUrl) {
|
function loadFont(_fontName, _fontUrl) {
|
||||||
// let reg = new RegExp('\\b' + _fontName + '\\b')
|
// let reg = new RegExp('\\b' + _fontName + '\\b')
|
||||||
@ -356,7 +369,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
core.registerEvent("setq", function (data) {
|
core.registerEvent("setq", function (data) {
|
||||||
core.setFlag("任务地点", data.id);
|
core.setFlag("任务指引", data.name);
|
||||||
|
|
||||||
core.doAction();
|
core.doAction();
|
||||||
});
|
});
|
||||||
@ -3822,7 +3835,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
core.isMoving()
|
core.isMoving()
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
core.useFly(true);
|
core.ui._drawViewMaps();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*const equipBox = makeBox([EQUIP_BLOCK_LEFT_VERTICAL, EQUIP_BLOCK_TOP_VERTICAL], [90 * 3, 130 * 3])
|
/*const equipBox = makeBox([EQUIP_BLOCK_LEFT_VERTICAL, EQUIP_BLOCK_TOP_VERTICAL], [90 * 3, 130 * 3])
|
||||||
@ -3840,7 +3853,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
core.isMoving()
|
core.isMoving()
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
core.useFly(true);
|
core.ui._drawViewMaps()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -11914,27 +11927,33 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
"text": "任务描述",
|
"text": "任务描述",
|
||||||
"n": 1,
|
"n": 1,
|
||||||
"info": [
|
"info": [
|
||||||
{ "type": "checkItem", "checkItem": "yellowKey", "operator": ">=", "count": 0 },
|
{ "type": "checkItem", "checkItem": "yellowKey", "operator": ">=", "count": 0 },
|
||||||
{ "type": "checkStatus", "checkStatus": "atk", "operator": ">=", "count": 10 },
|
{ "type": "checkStatus", "checkStatus": "atk", "operator": ">=", "count": 10 },
|
||||||
{ "type": "checkFlag", "checkFlag": "flag1", "operator": "=", "count": "\"value\"" },
|
{ "type": "checkFlag", "checkFlag": "flag1", "operator": "=", "count": "\"value\"" },
|
||||||
{ "type": "checkBlock", "checkBlock": "bat", "floorId": ["MT1", "MT2"], "operator": "<=", "count": 0 },
|
{ "type": "checkBlock", "checkBlock": "bat", "floorId": ["MT1", "MT2"], "operator": "<=", "count": 0 },
|
||||||
{ "type": "kill", "operator": ">=", "count": 0 },
|
{ "type": "kill", "operator": ">=", "count": 0 },
|
||||||
{
|
{
|
||||||
"type": "killLocs",
|
"type": "killLocs",
|
||||||
"loc": [
|
"loc": [
|
||||||
[1, 1]
|
[1, 1]
|
||||||
],
|
],
|
||||||
"floorId": "MT1",
|
"floorId": "MT1",
|
||||||
"operator": ">=",
|
"operator": ">=",
|
||||||
"count": 1
|
"count": 1
|
||||||
},
|
},
|
||||||
{ "type": "killSpecial", "killSpecial": "61", "floorId": ["MT1", "MT2"], "operator": ">=", "count": 1 },
|
{ "type": "killSpecial", "killSpecial": "61", "floorId": ["MT1", "MT2"], "operator": ">=", "count": 1 },
|
||||||
{ "type": "killAll", "floorId": ["MT1"] },
|
{ "type": "killAll", "floorId": ["MT1"] },
|
||||||
{ "type": "specialBlock", "floorId": ["MT1"], "specialBlock": "血网伤害", "operator": "<", "count": 1 },
|
{ "type": "specialBlock", "floorId": ["MT1"], "specialBlock": "血网伤害", "operator": "<", "count": 1 },
|
||||||
{ "type": "gosthFloor", "floorId": ["MT1"], "operator": "<", "count": 1 },
|
{ "type": "gosthFloor", "floorId": ["MT1"], "operator": "<", "count": 1 },
|
||||||
{ "type": "arrival", "floorId": "MT1" },
|
{ "type": "arrival", "floorId": "MT1" },
|
||||||
],
|
],
|
||||||
|
"setFloor": "MT1",
|
||||||
|
"setxy": [1, 1],
|
||||||
|
"tarFloor": "MT1,MT2",
|
||||||
|
"mitFloor": "MT1",
|
||||||
|
"mitxy": [1, 1],
|
||||||
"beforeAction": [],
|
"beforeAction": [],
|
||||||
|
"reward": "yellowKey:1,redGem:3",
|
||||||
"action": []
|
"action": []
|
||||||
},
|
},
|
||||||
"taskEvent"
|
"taskEvent"
|
||||||
@ -12238,7 +12257,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
],
|
],
|
||||||
特效表现: [
|
特效表现: [
|
||||||
MotaActionBlocks["sleep_s"].xmlText(),
|
MotaActionBlocks["sleep_s"].xmlText(),
|
||||||
MotaActionBlocks["setq_s"].xmlText(),
|
|
||||||
MotaActionBlocks["setcgs_s"].xmlText(),
|
MotaActionBlocks["setcgs_s"].xmlText(),
|
||||||
MotaActionBlocks["setmusics_s"].xmlText(),
|
MotaActionBlocks["setmusics_s"].xmlText(),
|
||||||
MotaActionBlocks["changebg_s"].xmlText(),
|
MotaActionBlocks["changebg_s"].xmlText(),
|
||||||
@ -12356,7 +12374,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
"text": "任务",
|
"text": "任务",
|
||||||
"text1": "新手任务",
|
"text1": "新手任务",
|
||||||
"text2": "task1,task2",
|
"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))",
|
"condition": "'新手任务'.split(',').some(v=>core.plugin.可接取任务.includes(v))||'task1,task2,'.split(',').some(v=>core.taskSystem.tasksInfo.findIndex(a => a.name ===v))",
|
||||||
"beforeAction": [],
|
"beforeAction": [],
|
||||||
"action": [
|
"action": [
|
||||||
|
|
||||||
@ -12365,6 +12383,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
|
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
MotaActionBlocks["setq_s"].xmlText(),
|
||||||
MotaActionBlocks['setTask_s'].xmlText(),
|
MotaActionBlocks['setTask_s'].xmlText(),
|
||||||
MotaActionBlocks['removeTask_s'].xmlText(),
|
MotaActionBlocks['removeTask_s'].xmlText(),
|
||||||
MotaActionBlocks['removeTaskByName_s'].xmlText(),
|
MotaActionBlocks['removeTaskByName_s'].xmlText(),
|
||||||
@ -13185,11 +13204,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
let ignoreEnemies = (this.ignoreEnemies = []);
|
let ignoreEnemies = (this.ignoreEnemies = []);
|
||||||
|
|
||||||
let allChangeEntries = Object.entries(defaultChange);
|
let allChangeEntries = Object.entries(defaultChange);
|
||||||
|
|
||||||
this.setq = function (floorId) {
|
|
||||||
core.setFlag("任务地点", floorId);
|
|
||||||
};
|
|
||||||
|
|
||||||
const reset = core.events.resetGame;
|
const reset = core.events.resetGame;
|
||||||
this.bfs = function () {
|
this.bfs = function () {
|
||||||
areas = [];
|
areas = [];
|
||||||
@ -13463,6 +13477,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
sh,
|
sh,
|
||||||
scale = defaultValue.scale
|
scale = defaultValue.scale
|
||||||
) {
|
) {
|
||||||
|
let floorS = []
|
||||||
|
if (flags.任务指引) {
|
||||||
|
if (core.plugin.可接取任务.includes(flags.任务指引)) floorS.push(core.events.task[flags.任务指引].setFloor)
|
||||||
|
else if (core.taskSystem.tasksInfo && core.taskSystem.tasksInfo.find(v => v.name === flags.任务指引))
|
||||||
|
if (!core.taskSystem.checkTaskByName(flags.任务指引)) {
|
||||||
|
floorS = floorS.concat(core.events.task[flags.任务指引].tarFloor.split(","))
|
||||||
|
} else {
|
||||||
|
floorS.push(core.events.task[flags.任务指引].mitFloor)
|
||||||
|
}
|
||||||
|
}
|
||||||
core.clearMap(ctx, sx, sy, sw + 13, sh + 20);
|
core.clearMap(ctx, sx, sy, sw + 13, sh + 20);
|
||||||
if (core.domStyle.isVertical) {
|
if (core.domStyle.isVertical) {
|
||||||
sy += 17;
|
sy += 17;
|
||||||
@ -13517,8 +13541,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
min / 2,
|
min / 2,
|
||||||
min / 2
|
min / 2
|
||||||
);
|
);
|
||||||
if (core.getFlag("任务地点") && core.getFlag("任务地点") === id)
|
if (floorS.includes(id)) ctx.drawImage(tesk, fx + min / 4, fy + min / 4, min / 2, min / 2);
|
||||||
ctx.drawImage(tesk, fx + min / 4, fy + min / 4, min / 2, min / 2);
|
|
||||||
if (id === core.status.floorId)
|
if (id === core.status.floorId)
|
||||||
core.drawImage(
|
core.drawImage(
|
||||||
ctx,
|
ctx,
|
||||||
@ -28248,7 +28272,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
"任务系统": function () {
|
"任务系统": function () {
|
||||||
// 在此增加新插件
|
// 在此增加新插件
|
||||||
//详细的任务信息及要求存放在core.events.task,供TaskSystem使用
|
//详细的任务信息及要求存放在core.events.task,供TaskSystem使用
|
||||||
//以下均为任务名构成的数组,在任务接取或提交时转换
|
|
||||||
this.可接取任务 = ["新手任务"]
|
this.可接取任务 = ["新手任务"]
|
||||||
this.已提交任务 = []
|
this.已提交任务 = []
|
||||||
//当前任务及任务状态在TaskSystem内部,无需数组
|
//当前任务及任务状态在TaskSystem内部,无需数组
|
||||||
@ -28257,11 +28280,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
this.tasksInfo = []
|
this.tasksInfo = []
|
||||||
}
|
}
|
||||||
setTask(name) {
|
setTask(name) {
|
||||||
let task = core.enents.task[name]
|
let task = core.events.task[name]
|
||||||
if (task && core.plugin.可接取任务.includes(name)) {
|
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.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)
|
this.tasksInfo[this.tasksInfo.length - 1].complter = this.checkTask(this.tasksInfo.length - 1)
|
||||||
if (task.beforeAction.length > 0) core.insertAction(task.beforeAction)
|
if (task.beforeAction.length > 0) core.insertAction(task.beforeAction)
|
||||||
|
core.plugin.可接取任务 = core.plugin.可接取任务.filter(v => v !== name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkTask(index) {
|
checkTask(index) {
|
||||||
@ -28269,6 +28293,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (this.tasksInfo[index].success) return true
|
if (this.tasksInfo[index].success) return true
|
||||||
else return this.tasksInfo[index].tasks.reduce((a, b) => a + Number(b.check()), 0) >= this.tasksInfo[index].n
|
else return this.tasksInfo[index].tasks.reduce((a, b) => a + Number(b.check()), 0) >= this.tasksInfo[index].n
|
||||||
}
|
}
|
||||||
|
checkTaskByName(name) {
|
||||||
|
const a = this.tasksInfo.find(v => v.name = name)
|
||||||
|
if (!a) return false
|
||||||
|
if (a.success) return true
|
||||||
|
else return a.tasks.reduce((a, b) => a + Number(b.check()), 0) >= a.n
|
||||||
|
}
|
||||||
removeTaskByName(name) {
|
removeTaskByName(name) {
|
||||||
const index = this.tasksInfo.findIndex(v => v.name === name)
|
const index = this.tasksInfo.findIndex(v => v.name === name)
|
||||||
removeTask(index)
|
removeTask(index)
|
||||||
@ -28280,6 +28310,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
clearTesk() {
|
clearTesk() {
|
||||||
this.tasksInfo = []
|
this.tasksInfo = []
|
||||||
}
|
}
|
||||||
|
setq(name) {
|
||||||
|
flags.任务指引 = name
|
||||||
|
}
|
||||||
|
setqByIndex(index) {
|
||||||
|
flags.任务指引 = this.tasksInfo[index].name
|
||||||
|
}
|
||||||
|
removeq(name) {
|
||||||
|
flags.任务指引 = null
|
||||||
|
}
|
||||||
checkAll() {
|
checkAll() {
|
||||||
for (let i = 0; i < this.tasksInfo.length; i++) {
|
for (let i = 0; i < this.tasksInfo.length; i++) {
|
||||||
this.checkTask(i)
|
this.checkTask(i)
|
||||||
@ -28304,7 +28343,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
const index = this.tasksInfo.findIndex(v => v.name === name)
|
const index = this.tasksInfo.findIndex(v => v.name === name)
|
||||||
if (index < 0 || index > this.tasksInfo.length - 1) return
|
if (index < 0 || index > this.tasksInfo.length - 1) return
|
||||||
if (this.checkTask(index)) {
|
if (this.checkTask(index)) {
|
||||||
if (this.tasksInfo[i].action.length > 0) core.insertAction(this.tasksInfo[i].action)
|
if (this.tasksInfo[index].action.length > 0) core.insertAction(this.tasksInfo[i].action)
|
||||||
core.plugin.已提交任务.push(name)
|
core.plugin.已提交任务.push(name)
|
||||||
this.removeTask(index)
|
this.removeTask(index)
|
||||||
}
|
}
|
||||||
@ -29096,10 +29135,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
let ctx
|
let ctx
|
||||||
let alpha = 0
|
let alpha = 0
|
||||||
let add = 1
|
let add = 1
|
||||||
|
|
||||||
core.registerAnimationFrame("taskPic", true, (timestemp) => {
|
core.registerAnimationFrame("taskPic", true, (timestemp) => {
|
||||||
if (timestemp - time < 50) return
|
if (timestemp - time < 50) return
|
||||||
time = timestemp
|
time = timestemp
|
||||||
if (!ctx) ctx = core.createCanvas("taskPic", 0, 0, 416, 416, 141)
|
if (!core.dymCanvas.taskPic) ctx = core.createCanvas("taskPic", 0, 0, 416, 416, 141)
|
||||||
let floorId
|
let floorId
|
||||||
if (core.status.lockControl && core.status.event.id == "viewMaps") {
|
if (core.status.lockControl && core.status.event.id == "viewMaps") {
|
||||||
ctx.canvas.style.zIndex = 141
|
ctx.canvas.style.zIndex = 141
|
||||||
@ -29109,8 +29149,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
floorId = core.status.floorId
|
floorId = core.status.floorId
|
||||||
}
|
}
|
||||||
if (!floorId) return
|
if (!floorId) return
|
||||||
let setTasks = core.floors[floorId].setTasks
|
let setTasks = core.setTaskFloor[floorId] || []
|
||||||
let mitTasks = core.floors[floorId].mitTasks
|
let mitTasks = core.mitTaskFloor[floorId] || []
|
||||||
let settask = []
|
let settask = []
|
||||||
let notask = []
|
let notask = []
|
||||||
let seccesstask = []
|
let seccesstask = []
|
||||||
@ -29124,12 +29164,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
task.forEach((v, i) => {
|
task.forEach((v, i) => {
|
||||||
if (mitTasks[v.name]) {
|
if (mitTasks[v.name]) {
|
||||||
|
|
||||||
if (!settask.some(a => a[0] === setTasks[v.name][0] && a[1] === setTasks[v.name][1])) {
|
if (!settask.some(a => a[0] === mitTasks[v.name][0] && a[1] === mitTasks[v.name][1])) {
|
||||||
let success = task.checkTask(i)
|
let success = core.taskSystem.checkTask(i)
|
||||||
if (success && !seccesstask.some(a => a[0] === mitTasks[v.name][0] && a[1] === mitTasks[v.name][1])) {
|
if (success && !seccesstask.some(a => a[0] === mitTasks[v.name]?.[0] && a[1] === mitTasks[v.name]?.[1])) {
|
||||||
seccesstask.push(mitTasks[v.name])
|
seccesstask.push(mitTasks[v.name])
|
||||||
}
|
} else if (!success && !notask.some(a => a[0] === mitTasks[v.name][0] && a[1] === mitTasks[v.name][1])) {
|
||||||
if (!success && !notask.some(a => a[0] === mitTasks[v.name][0] && a[1] === mitTasks[v.name][1])) {
|
|
||||||
notask.push(mitTasks[v.name])
|
notask.push(mitTasks[v.name])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,11 +106,9 @@ var task_comment = {
|
|||||||
"operator": "<",
|
"operator": "<",
|
||||||
"count": 1
|
"count": 1
|
||||||
}
|
}
|
||||||
],"beforeAction":[],
|
],"setFloor":"MT1","setxy":[1,1],"tarFloor":"MT1,MT2","mitFloor":"MT1","mitxy":[1,1],
|
||||||
"action": [
|
"beforeAction": [
|
||||||
{
|
],"reward":"yellowKey:1,redGem:3","action": [
|
||||||
"type": "setmusics"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}`,
|
}`,
|
||||||
"_data": "..."
|
"_data": "..."
|
||||||
|
Loading…
Reference in New Issue
Block a user