class Game_Character < Game_CharacterBase
  #--------------------------------------------------------------------------
  # ● キャラクターから遠ざかる
  #--------------------------------------------------------------------------
  def move_away_from_character(character)
    sx = distance_x_from(character.x)
    sy = distance_y_from(character.y)
    if sx.abs > sy.abs
      move_straight(sx > 0 ? 6 : 4)
      move_straight(sy > 0 ? 2 : 8) if !@move_succeed 
      move_straight(sy > 0 ? 8 : 2) if !@move_succeed
    elsif sy != 0
      move_straight(sy > 0 ? 2 : 8)
      move_straight(sx > 0 ? 6 : 4) if !@move_succeed 
      move_straight(sx > 0 ? 4 : 6) if !@move_succeed
    end
  end
end  