Fix dead zone

This commit is contained in:
ckcz123 2018-08-27 18:35:28 +08:00
parent 09d4a65292
commit ddb85de997

View File

@ -276,7 +276,7 @@ maps.prototype.canMoveHero = function(x,y,direction,floorId) {
}
// 检查将死的领域
if (core.status.hero.hp <= core.status.checkBlock.damage[nx+core.bigmap.width*ny] && !core.flags.canGoDeadZone)
if (core.status.hero.hp <= core.status.checkBlock.damage[nx+core.bigmap.width*ny] && !core.flags.canGoDeadZone && core.getBlock(nx, ny, floorId)==null)
return false;
return true;