mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-09 14:24:30 +08:00
Deploying to gh-pages from @ 33c147421e 🚀
This commit is contained in:
1 parent
d6be843a80
commit
ac208c8a5f
15 files changed
+174
-102
No files matched your search
+2
-39
@@ -1502,7 +1502,6 @@ control.prototype.checkBlock = function () {
|
||||
core.updateStatusBar(false, true);
|
||||
}
|
||||
}
|
||||
this._checkBlock_ambush(core.status.checkBlock.ambush[loc]);
|
||||
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
|
||||
};
|
||||
|
||||
@@ -1533,42 +1532,6 @@ control.prototype._checkBlock_repulse = function (repulse) {
|
||||
core.insertAction(actions);
|
||||
};
|
||||
|
||||
////// 捕捉 //////
|
||||
control.prototype._checkBlock_ambush = function (ambush) {
|
||||
if (!ambush || ambush.length == 0) return;
|
||||
// 捕捉效果
|
||||
var actions = [];
|
||||
ambush.forEach(function (t) {
|
||||
actions.push({
|
||||
type: 'move',
|
||||
loc: [t[0], t[1]],
|
||||
steps: [t[3]],
|
||||
time: 250,
|
||||
keep: false,
|
||||
async: true
|
||||
});
|
||||
});
|
||||
actions.push({ type: 'waitAsync' });
|
||||
// 强制战斗
|
||||
ambush.forEach(function (t) {
|
||||
actions.push({
|
||||
type: 'function',
|
||||
function:
|
||||
'function() { ' +
|
||||
"core.battle('" +
|
||||
t[2] +
|
||||
"', " +
|
||||
t[0] +
|
||||
',' +
|
||||
t[1] +
|
||||
', true, core.doAction); ' +
|
||||
'}',
|
||||
async: true
|
||||
});
|
||||
});
|
||||
core.insertAction(actions);
|
||||
};
|
||||
|
||||
////// 更新全地图显伤 //////
|
||||
control.prototype.updateDamage = function (floorId, ctx) {
|
||||
floorId = floorId || core.status.floorId;
|
||||
@@ -1701,9 +1664,9 @@ control.prototype._updateDamage_extraDamage = function (floorId, onMap) {
|
||||
});
|
||||
} else {
|
||||
// 检查捕捉
|
||||
if (core.status.checkBlock.ambush[x + ',' + y]) {
|
||||
if (core.status.checkBlock.mockery[x + ',' + y]) {
|
||||
core.status.damage.extraData.push({
|
||||
text: '!',
|
||||
text: '嘲',
|
||||
px: 32 * x + 16,
|
||||
py: 32 * (y + 1) - 14,
|
||||
color: '#ffaa33',
|
||||
|
||||
+2
-4
@@ -1077,8 +1077,7 @@ maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y) {
|
||||
// 是否存在阻激夹域伤害
|
||||
if (core.status.checkBlock.damage[index]) return false;
|
||||
if (core.status.checkBlock.repulse[index]) return false;
|
||||
// 是否存在捕捉
|
||||
if (core.status.checkBlock.ambush[index]) return false;
|
||||
if (core.status.checkBlock.mockery[index]) return false;
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -1175,8 +1174,7 @@ maps.prototype._automaticRoute_deepAdd = function (x, y, blocks) {
|
||||
}
|
||||
// 绕过存在伤害的地方
|
||||
deepAdd += (core.status.checkBlock.damage[x + ',' + y] || 0) * 100;
|
||||
// 绕过捕捉
|
||||
if (core.status.checkBlock.ambush[x + ',' + y]) deepAdd += 1000;
|
||||
deepAdd += core.status.checkBlock.mockery[`${x},${y}`] ? 1000 : 0;
|
||||
return deepAdd;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user