Support Reborn

This commit is contained in:
oc 2018-03-03 23:46:21 +08:00
parent f97495a6b6
commit dcce32f931
4 changed files with 15 additions and 12 deletions

View File

@ -1880,7 +1880,7 @@ control.prototype.loadData = function (data, callback) {
core.changeFloor(data.floorId, null, data.hero.loc, 0, function() {
if (core.isset(callback)) callback();
});
}, true);
}
////// 设置勇士属性 //////

View File

@ -536,8 +536,8 @@ core.prototype.trigger = function (x, y) {
}
////// 楼层切换 //////
core.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback) {
core.events.changeFloor(floorId, stair, heroLoc, time, callback);
core.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback, fromLoad) {
core.events.changeFloor(floorId, stair, heroLoc, time, callback, fromLoad);
}
////// 清除地图 //////

View File

@ -801,7 +801,7 @@ events.prototype.trigger = function (x, y) {
}
////// 楼层切换 //////
events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback) {
events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback, fromLoad) {
var displayAnimate=!(time==0) && !core.status.replay.replaying;
@ -879,12 +879,15 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback
}
else core.setWeather();
core.status.maps[floorId].blocks.forEach(function(block) {
if (core.isset(block.enable) && !block.enable && core.isset(block.event) && block.event.cls=='enemys'
&& core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23)) {
block.enable = true;
}
})
// 检查重生
if (!core.isset(fromLoad)) {
core.status.maps[floorId].blocks.forEach(function(block) {
if (core.isset(block.enable) && !block.enable && core.isset(block.event) && block.event.cls=='enemys'
&& core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23)) {
block.enable = true;
}
})
}
core.drawMap(floorId, function () {
setTimeout(function() {

View File

@ -722,7 +722,7 @@ maps.prototype.removeBlock = function (x, y, floorId) {
maps.prototype.removeBlockById = function (index, floorId) {
var blocks = core.status.maps[floorId].blocks, block = blocks[index];
var x=blocks.x, y=blocks.y;
var x=block.x, y=block.y;
// 检查该点是否存在事件
var event = core.floors[floorId].events[x+","+y];
@ -740,7 +740,7 @@ maps.prototype.removeBlockById = function (index, floorId) {
blocks.splice(index,1);
return;
}
blocks[index].enable = false;
block.enable = false;
}
////// 一次性删除多个block //////