如果是飞艇的话,1号开关打开才可以降落
class Game_Vehicle < Game_Character def land_ok?(x, y, d) if @type == :airship return false unless $game_map.airship_land_ok?(x, y) return false unless $game_map.events_xy(x, y).empty? return false unless $game_switches[1] else x2 = $game_map.round_x_with_direction(x, d) y2 = $game_map.round_y_with_direction(y, d) return false unless $game_map.valid?(x2, y2) return false unless $game_map.passable?(x2, y2, reverse_dir(d)) return false if collide_with_characters?(x2, y2) end return true end end
class Game_Vehicle < Game_Character
def land_ok?(x, y, d)
if @type == :airship
return false unless $game_map.airship_land_ok?(x, y)
return false unless $game_map.events_xy(x, y).empty?
return false unless $game_switches[1]
else
x2 = $game_map.round_x_with_direction(x, d)
y2 = $game_map.round_y_with_direction(y, d)
return false unless $game_map.valid?(x2, y2)
return false unless $game_map.passable?(x2, y2, reverse_dir(d))
return false if collide_with_characters?(x2, y2)
end
return true
end
end
|