if (d == 2 or d == 8)and(event.x == new_x or event.x + 1 == new_x or event.x == new_x + 1) and (event.y == new_y or event.y - 1 == new_y ) or ((d == 4 or d == 6)and(event.x == new_x or event.x + 1 == new_x ) and (event.y == new_y or event.y - 1 == new_y or event.y == new_y - 1))
# 穿透为 ON
unless event.through
# 自己就是事件的情况下
if self != $game_player
# 不能通行
return false
end
# 自己是主角、对方的图形是角色的情况下
if event.character_name != ""
# 不能通行
return false
end
end
end
end
# 主角的坐标与移动目标坐标一致的情况下
if (d == 2 or d == 8)and($game_player.x == new_x or $game_player.x + 1 == new_x or $game_player.x == new_x + 1) and ($game_player.y == new_y or $game_player.y - 1 == new_y ) or ((d == 4 or d == 6)and($game_player.x == new_x or $game_player.x + 1 == new_x ) and ($game_player.y == new_y or $game_player.y - 1 == new_y or $game_player.y == new_y - 1))