瞬移穿过绿点&短距离瞬移录像
This commit is contained in:
parent
e11532ed3c
commit
d5888c49fd
@ -1588,7 +1588,8 @@ control.prototype._replayAction_moveDirectly = function (action) {
|
|||||||
var pos=action.substring(5).split(":");
|
var pos=action.substring(5).split(":");
|
||||||
var x=parseInt(pos[0]), y=parseInt(pos[1]);
|
var x=parseInt(pos[0]), y=parseInt(pos[1]);
|
||||||
var nowx=core.getHeroLoc('x'), nowy=core.getHeroLoc('y');
|
var nowx=core.getHeroLoc('x'), nowy=core.getHeroLoc('y');
|
||||||
if (!core.moveDirectly(x, y)) return false;
|
var ignoreSteps = core.canMoveDirectly(x, y);
|
||||||
|
if (!core.moveDirectly(x, y, ignoreSteps)) return false;
|
||||||
if (core.status.replay.speed == 24) {
|
if (core.status.replay.speed == 24) {
|
||||||
core.replay();
|
core.replay();
|
||||||
return true;
|
return true;
|
||||||
@ -1596,10 +1597,12 @@ control.prototype._replayAction_moveDirectly = function (action) {
|
|||||||
|
|
||||||
core.ui.drawArrow('ui', 32*nowx+16-core.bigmap.offsetX, 32*nowy+16-core.bigmap.offsetY,
|
core.ui.drawArrow('ui', 32*nowx+16-core.bigmap.offsetX, 32*nowy+16-core.bigmap.offsetY,
|
||||||
32*x+16-core.bigmap.offsetX, 32*y+16-core.bigmap.offsetY, '#FF0000', 3);
|
32*x+16-core.bigmap.offsetX, 32*y+16-core.bigmap.offsetY, '#FF0000', 3);
|
||||||
|
var timeout = this.__replay_getTimeout();
|
||||||
|
if (ignoreSteps < 10) timeout = timeout * ignoreSteps / 10;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
core.clearMap('ui');
|
core.clearMap('ui');
|
||||||
core.replay();
|
core.replay();
|
||||||
}, core.control.__replay_getTimeout());
|
}, timeout);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
libs/maps.js
19
libs/maps.js
@ -638,7 +638,12 @@ maps.prototype._canMoveDirectly_bfs = function (sx, sy, locs, number, ans) {
|
|||||||
// if (nx == ex && ny == ey) return visited[nindex];
|
// if (nx == ex && ny == ey) return visited[nindex];
|
||||||
for (var i in ans) {
|
for (var i in ans) {
|
||||||
if (locs[i][0] == nx && locs[i][1] == ny && ans[i] == null) {
|
if (locs[i][0] == nx && locs[i][1] == ny && ans[i] == null) {
|
||||||
|
// 不可以绿点为终点
|
||||||
|
if (blocksObj[nx + "," + ny] && blocksObj[nx + "," + ny].event.trigger) {
|
||||||
|
ans[i] = -1;
|
||||||
|
} else {
|
||||||
ans[i] = visited[nindex];
|
ans[i] = visited[nindex];
|
||||||
|
}
|
||||||
number--;
|
number--;
|
||||||
if (number == 0) return ans;
|
if (number == 0) return ans;
|
||||||
}
|
}
|
||||||
@ -655,9 +660,17 @@ maps.prototype._canMoveDirectly_bfs = function (sx, sy, locs, number, ans) {
|
|||||||
|
|
||||||
maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y) {
|
maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y) {
|
||||||
var index = x + "," + y;
|
var index = x + "," + y;
|
||||||
// 该点是否有事件
|
// 该点是否不可通行或有脚本
|
||||||
if (blocksObj[index] && (blocksObj[index].event.trigger || blocksObj[index].event.noPass
|
if (blocksObj[index] && (blocksObj[index].event.noPass || blocksObj[index].event.script))
|
||||||
|| blocksObj[index].event.script)) return false;
|
return false;
|
||||||
|
// 该点是否是绿点可触发
|
||||||
|
if (blocksObj[index] && blocksObj[index].event.trigger) {
|
||||||
|
if (blocksObj[index].event.trigger != 'changeFloor') return false;
|
||||||
|
var ignore = core.flags.ignoreChangeFloor;
|
||||||
|
if (blocksObj[index].event.data && blocksObj[index].event.data.ignoreChangeFloor != null)
|
||||||
|
ignore = blocksObj[index].event.data.ignoreChangeFloor;
|
||||||
|
if (!ignore) return false;
|
||||||
|
}
|
||||||
// 是否存在阻激夹域伤害
|
// 是否存在阻激夹域伤害
|
||||||
if (core.status.checkBlock.damage[index]) return false;
|
if (core.status.checkBlock.damage[index]) return false;
|
||||||
// 是否存在捕捉
|
// 是否存在捕捉
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user