Fix PushBox Bug
This commit is contained in:
parent
998ed9ddc2
commit
b5d8cf5e3f
@ -119,6 +119,7 @@ events.prototype.setInitData = function (hard) {
|
|||||||
if (hard=='Hard') { // 困难难度
|
if (hard=='Hard') { // 困难难度
|
||||||
core.setFlag('hard', 3); // 可以用flag:hard来获得当前难度
|
core.setFlag('hard', 3); // 可以用flag:hard来获得当前难度
|
||||||
}
|
}
|
||||||
|
this.afterLoadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
////// 游戏获胜事件 //////
|
////// 游戏获胜事件 //////
|
||||||
@ -947,7 +948,7 @@ events.prototype.pushBox = function (data) {
|
|||||||
|
|
||||||
var direction = core.getHeroLoc('direction'), nx=data.x+scan[direction].x, ny=data.y+scan[direction].y;
|
var direction = core.getHeroLoc('direction'), nx=data.x+scan[direction].x, ny=data.y+scan[direction].y;
|
||||||
|
|
||||||
if (nx<0||nx>=12||ny<0||ny>=12) return;
|
if (nx<0||nx>12||ny<0||ny>12) return;
|
||||||
|
|
||||||
var block = core.getBlock(nx, ny, null, false);
|
var block = core.getBlock(nx, ny, null, false);
|
||||||
if (block!=null && !(core.isset(block.block.event) && block.block.event.id=='flower'))
|
if (block!=null && !(core.isset(block.block.event) && block.block.event.id=='flower'))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user