查看: 3732|回复: 16

[原创发布] 实现了烛台的随机掉落

[复制链接]
梦石
0
星屑
35248
在线时间
4171 小时
注册时间
2007-12-15
回帖
9489
发表于 2018-4-26 17:13:37 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 89444640 于 2018-4-26 17:27 编辑

1.gif
重新测时候,发现烛台掉落简直成摆设了。位置难砍不说,掉落也太固定。实用度不高。
然后改了一个烛台成这样。
终于成功的实现了ACT刷刷刷效果,左右两个方向都能砍了。而且掉落也随机了,其实就是个随机变量,以前做这段时候根本不会用变量。
似乎,想的复杂了,还代入角色当XY变量什么的……其实特定位置触发就行,如果嫌打的位置太固定,再加几个就好了。
用同样的素材实现了更好的模拟效果。
似乎应该随机数再大点……

评分

参与人数 5星屑 +30 赞 +4 收起 理由
牛肉面 + 30 塞糖
21世纪游戏吧 + 1 塞糖
W.Q.C. + 1 塞糖
真·可乐 + 1 塞糖
灯笼菜刀王 + 1 塞糖

查看全部评分

梦石
0
星屑
42235
在线时间
6017 小时
注册时间
2006-11-10
回帖
6966
发表于 2018-4-26 17:53:54 | 显示全部楼层
这很恶魔城

又塞个重力脚本?

点评

顺道,废墟肖像的女仆吸尘器有还原,搜下我以前帖子估计能找到,不过别指望吸我主角裙子……我故意没画,只有对话。  发表于 2018-4-28 00:00
理查德也坐过王座,也翘来着,废墟肖像 文森特……不清楚了,反正夏洛特肯定是没翘。这就证明了,恶魔城人物用的一个模板- -b  发表于 2018-4-27 23:58
哪些角色是男的……我画的正面侧面都是双腿并拢的,再说,你看夏诺雅姐翘了吗,玛利亚翘了吗,  发表于 2018-4-27 23:54
当年我说过类似的话,结果某人说教人学坏,所以干脆原曲只有我自己听,反正我不加密,你们随便折腾。可提供场景推荐配乐。用户折腾与我无关  发表于 2018-4-27 23:50
坐在玉座上不翘二郎腿很不恶魔城啊... 德拉库拉就不说了,看看阿鲁卡多,看看西蒙,看看苍真,哪个坐过玉座的没翘腿啊=。=  发表于 2018-4-27 10:05
回复

使用道具 举报

梦石
0
星屑
2109
在线时间
242 小时
注册时间
2018-3-23
回帖
94
发表于 2018-4-26 18:22:49 | 显示全部楼层

这真的是脚本山了
这是要做恶魔城?

点评

这可真是大工程啊  发表于 2018-4-26 21:07
大概连画地图带动作全补完这段做了两年。因为地图太难画,而且我不太毁画地图,都是从0自学……  发表于 2018-4-26 20:20
这个早就做完了,因为测试,顺道修正点东西,这段运行保守估计一个小时四十分钟的高清恶魔城模拟,但是太难做攻击判定,boss战斗直接看片模式。  发表于 2018-4-26 20:19
RMXP天下第一!
回复

使用道具 举报

梦石
0
星屑
35248
在线时间
4171 小时
注册时间
2007-12-15
回帖
9489
 楼主| 发表于 2018-4-26 20:18:16 | 显示全部楼层
本帖最后由 89444640 于 2018-4-26 20:25 编辑
灯笼菜刀王 发表于 2018-4-26 17:53
这很恶魔城

又塞个重力脚本?


这个重力脚本很多年前就放进去了,多亏了rpg_sheep、芯☆淡茹水、STILLIA、RyanBern、soulsaga等程序员帮我修改完善,他们的名字将名留青史!
当年甚至因为脚本不完善,没有开关控制,甚至逼得我只能让玩家手动删脚本除bug。
而且因为脚本的问题,弄的我很多素材都只能用最左边一排来避免显示异常,因为用的地方太多,现在都没往回改、
你可以对比一下当年最早的脚本和当前修正的很完善的脚本。
目前留存的最早的脚本2013年的
[pre lang="ruby"]$ud_ok = true #上下失效
$airjump = 1  #空中连跳
#用插入脚本暂时来消除重力系统bug,就是这个 $ud_ok = true/false
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================

# ————————————————————————————————————
# 全方向ドット移動 Ver ε
# 配布元・サポートURL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ■ Game_Player
#------------------------------------------------------------------------------
#  プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの
# 機能を持っています。このクラスのインスタンスは $game_player で参照されます。
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  UP    = 48                  # 上方向の余裕(0 < UP < 63)
  DOWN  = 16                  # 下方向の余裕(0 < DOWN <63)
  SIDE  = 32                  # 左右方向の余裕(0 < SIDE <63)
  SLANT = false               # 移動ルートの斜め移動時、速度修正
  JUMPMAX = 100              
  JUMPADD = 10              
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader   :event                    # イベント時移動速度
  attr_accessor :move_speed               # 移動速度
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias :update_original :update
  def update
    # @walk:歩行速度 @dash:ダッシュ時移動速度
    # @event:イベント時移動速度(0の時は、イベント時に速度変更をしない)
    @walk  = 4
    @dash  = 5
    @event = 4
    @dot_m = true
    #ダッシュ機能。エンターキーが押されている間、移動速度を変更する。
    unless moving? or $game_system.map_interpreter.running? or
            @move_route_forcing or $game_temp.message_window_showing
      if @walk != @dash
        if Input.press?(Input::C)
          if @move_speed != @dash
            @move_speed = @dash
          end
        else
          if @move_speed != @walk
            @move_speed = @walk
          end
        end
      end
    end
    if @revise_x == nil and @revise_y == nil
      @revise_x = 0
      @revise_y = 0
    end
    unless @dot_m
      update_original
      return
    end
    if @move_route_forcing
      # ローカル変数に移動中かどうかを記憶
      last_moving = moving?
      # ローカル変数に座標を記憶
      last_real_x = @real_x
      last_real_y = @real_y
      # 座標がずれている場合
      if (@revise_x != 0 or @revise_y != 0) and not jumping? and @move == true
        if @revise_x != @real_x - @x * 128 or @revise_y != @real_y - @y * 128
          @revise_x = @real_x - @x * 128
          @revise_y = @real_y - @y * 128
        end
        # 移動距離distance1と目標距離distance2を設定
        distance1 = 2 ** @move_speed
        distance2 = Math.sqrt(@revise_x ** 2 + @revise_y ** 2)
        # 移動距離が目標距離を越えた場合
        if distance1 > distance2
          # 強制的に補正座標を零にする
          @real_x = @real_x - @revise_x
          @real_y = @real_y - @revise_y
          @revise_x = 0
          @revise_y = 0
          anime_update
        # 移動距離が目標距離に達しない場合
        else
          # 移動距離分目標距離に近づく
          @real_x -= (distance1 * @revise_x / distance2).round
          @real_y -= (distance1 * @revise_y / distance2).round
          @revise_x = @real_x - @x * 128
          @revise_y = @real_y - @y * 128
          anime_update
        end
      else
        super
      end
    else
      @move = false
      # 移動中、イベント実行中、移動ルート強制中、
      # メッセージウィンドウ表示中のいずれでもない場合
      unless moving? or $game_system.map_interpreter.running? or
             @move_route_forcing or $game_temp.message_window_showing
        @event_run = false
        # 方向ボタンが押されていれば、その方向へプレイヤーを移動
#---------------------------上下失效-----------------------------------------
      case Input.dir8
        when 1
          $ud_ok ? move_lower_left_p : move_left_p
        when 2
#          $ud_ok ? move_down_p : move_down_aaaagq
          move_down_p if $ud_ok
        when 3
         $ud_ok ? move_lower_right_p : move_right_p
        when 4
          move_left_p
        when 6
          move_right_p
        when 7
         $ud_ok ? move_upper_left_p : move_left_p
        when 8
#         $ud_ok ? move_up_p : move_up_aaaagq
         move_up_p if $ud_ok
        when 9
         $ud_ok ? move_upper_right_p : move_right_p
        end
      end
      # ローカル変数に座標を記憶
      last_real_x = @real_x
      last_real_y = @real_y
      # 移動処理
      @real_x = @x * 128 + @revise_x
      @real_y = @y * 128 + @revise_y
      # ローカル変数に移動中かどうかを記憶
      last_moving = moving?
      # 座標更新
      move_on
      # 現在の座標と以前の座標が異なる場合
      if (last_real_x != @real_x or last_real_y != @real_y)
        @move_distance = 0 if @move_distance == nil
        @move_distance += Math.sqrt((last_real_x - @real_x) ** 2 +
                                      (last_real_y - @real_y) ** 2)
        if @move_distance >= 128
          @move_distance %= 128
          increase_steps
        end
        # アニメーションを更新
        anime_update
      else
        @pattern = 0
      end
    end
    # キャラクターが下に移動し、かつ画面上の位置が中央より下の場合
    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
      # マップを下にスクロール
      $game_map.scroll_down(@real_y - last_real_y)
    end
    # キャラクターが左に移動し、かつ画面上の位置が中央より左の場合
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      # マップを左にスクロール
      $game_map.scroll_left(last_real_x - @real_x)
    end
    # キャラクターが右に移動し、かつ画面上の位置が中央より右の場合
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      # マップを右にスクロール
      $game_map.scroll_right(@real_x - last_real_x)
    end
    # キャラクターが上に移動し、かつ画面上の位置が中央より上の場合
    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
      # マップを上にスクロール
      $game_map.scroll_up(last_real_y - @real_y)
    end
    # 前回プレイヤーが移動中だった場合
    if last_moving
      # 同位置のイベントとの接触によるイベント起動判定
      result = check_event_trigger_here([1,2])
      if result == true
        if (last_real_x / 128.0).round != @x and
            (last_real_y / 128.0).round != @y
          if @direction == 2 or @direction == 8
            if (last_real_x / 128.0).round > @x
              turn_left
            else
              turn_right
            end
          else
            if (last_real_y / 128.0).round > @y
              turn_up
            else
              turn_down
            end
          end
        elsif (last_real_x / 128.0).round > @x
          turn_left
        elsif (last_real_x / 128.0).round < @x
          turn_right
        elsif (last_real_y / 128.0).round > @y
          turn_up
        elsif (last_real_y / 128.0).round < @y
          turn_down
        end
      end
      # 起動したイベントがない場合
      if result == false
        # デバッグモードが ON かつ CTRL キーが押されている場合を除き
        unless $DEBUG and Input.press?(Input::CTRL)
          # エンカウント カウントダウン
          if @encounter_count > 0
            @encounter_count -= 1
          end
        end
      end
    end
#-----------------------按跳跃-----------------------------------------------
# A ボタンが押された場合
    if Input.press?(Input::A) and not $ud_ok
      @twojump = 1 if @twojump == 0 and down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, 5, true)
          if $game_variables[2]==0
           @character_name = "主角 ACT用跳跃"
           $game_variables[2]=1
        end
      if (not @apassed) and @twojump <= $airjump
        @apassed = true
        @jumpnow = JUMPMAX
        @twojump += 1
      else
        @jumpnow += 3        
      end
    else
      @apassed = false
    end
#----------------------自由落体--------------------------------
    if not $ud_ok
      @jumpnow -= 10
      if @jumpnow < 0
        @jumpnow = [@jumpnow, -JUMPMAX].max
        if not down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, -@jumpnow, true)
          @jumpnow = 0
          @twojump = 0
          if $game_variables[2] == 1
           @character_name = "主角 行走 长袖"
          Audio.se_play("Audio/SE/布、袖、旗1.wav")
           $game_variables[2]=0
        end
        end
      elsif @jumpnow > 0
        @jumpnow = [@jumpnow, JUMPMAX].min
        if not up1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, @jumpnow, true)
          @jumpnow = 0
        end
      end
    end
    if Input.trigger?(Input::C)
      # 同位置および正面のイベント起動判定
      check_event_trigger_here([0])
      check_event_trigger_there([0,1,2])
    end
  end
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    @jumpnow = 0
    @twojump = 0
    @apassed = false
    @revise_x = 0
    @revise_y = 0
    @move == false
    super
  end
  #--------------------------------------------------------------------------
  # ● 移動判定
  #--------------------------------------------------------------------------
  def moving?
    unless @dot_m
      result = super
      return result
    end
    # 強制移動の場合オリジナルの判定をさせる
    if @move_route_forcing
      if @move == false
        return false
      end
      super
    # 通常時は現座標が実座標と異なる場合のみ移動中と判定
    else
      return (@x != (@real_x / 128.0).round or @y != (@real_y / 128.0).round)
    end
  end
  #--------------------------------------------------------------------------
  # ● 移動判定
  #--------------------------------------------------------------------------
  def moving_a?
    if @move == false
      if (@move_route.list[@move_route_index].code <= 14 or
          @move_route.list[@move_route_index].code == 25)
        @move = true
      end
      return false
    end
    moving?
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ジャンプ)
  #--------------------------------------------------------------------------
  def update_jump
    # ジャンプカウントを 1 減らす
    @jump_count -= 1
    # 新しい座標を計算
    @real_x = (@real_x * @jump_count + @x * 128) / (@jump_count + 1)
    @real_y = (@real_y * @jump_count + @y * 128) / (@jump_count + 1)
    if @jump_count == 0
      @revise_x = 0
      @revise_y = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● 移動タイプ : カスタム
  #--------------------------------------------------------------------------
  def move_type_custom
    unless @dot_m
      super
      return
    end
    # 停止中でなければ中断
    if jumping? or moving_a?
      return
    end
    # 移動コマンドのリストの最後に到達するまでループ
    while @move_route_index < @move_route.list.size
      # 移動コマンドを取得
      command = @move_route.list[@move_route_index]
      # コマンドコード 0 番 (リストの最後) の場合
      if command.code == 0
        # オプション [動作を繰り返す] が ON の場合
        if @move_route.repeat
          # 移動ルートのインデックスを最初に戻す
          @move_route_index = 0
        end
        # オプション [動作を繰り返す] が OFF の場合
        unless @move_route.repeat
          # 移動ルート強制中の場合
          if @move_route_forcing and not @move_route.repeat
            # 移動ルートの強制を解除
            @move_route_forcing = false
            # オリジナルの移動ルートを復帰
            @move_route = @original_move_route
            @move_route_index = @original_move_route_index
            @original_move_route = nil
          end
          # 停止カウントをクリア
          @stop_count = 0
        end
        return
      end
      # 移動系コマンド (下に移動~ジャンプ) の場合
      if command.code <= 14
        # コマンドコードで分岐
        case command.code
        when 1  # 下に移動
          move_down
        when 2  # 左に移動
          move_left
        when 3  # 右に移動
          move_right
        when 4  # 上に移動
          move_up
        when 5  # 左下に移動
          move_lower_left
        when 6  # 右下に移動
          move_lower_right
        when 7  # 左上に移動
          move_upper_left
        when 8  # 右上に移動
          move_upper_right
        when 9  # ランダムに移動
          move_random
        when 10  # プレイヤーに近づく
          move_toward_player
        when 11  # プレイヤーから遠ざかる
          move_away_from_player
        when 12  # 一歩前進
          move_forward
        when 13  # 一歩後退
          move_backward
        when 14  # ジャンプ
          jump(command.parameters[0], command.parameters[1])
        end
        # オプション [移動できない場合は無視] が OFF で、移動失敗の場合
        if not @move_route.skippable and not moving? and not jumping?
          return
        end
        @move_route_index += 1
        return
      end
      # ウェイトの場合
      if command.code == 15
        # ウェイトカウントを設定
        @wait_count = command.parameters[0] * 2 - 1
        @move_route_index += 1
        return
      end
      # 向き変更系のコマンドの場合
      if command.code >= 16 and command.code <= 26
        # コマンドコードで分岐
        case command.code
        when 16  # 下を向く
          turn_down
        when 17  # 左を向く
          turn_left
        when 18  # 右を向く
          turn_right
        when 19  # 上を向く
          turn_up
        when 20  # 右に 90 度回転
          turn_right_90
        when 21  # 左に 90 度回転
          turn_left_90
        when 22  # 180 度回転
          turn_180
        when 23  # 右か左に 90 度回転
          turn_right_or_left_90
        when 24  # ランダムに方向転換
          turn_random
        when 25  # プレイヤーの方を向く
          turn_toward_player
        when 26  # プレイヤーの逆を向く
          turn_away_from_player
        end
        @move_route_index += 1
        return
      end
      # その他のコマンドの場合
      if command.code >= 27
        # コマンドコードで分岐
        case command.code
        when 27  # スイッチ ON
          $game_switches[command.parameters[0]] = true
          $game_map.need_refresh = true
        when 28  # スイッチ OFF
          $game_switches[command.parameters[0]] = false
          $game_map.need_refresh = true
        when 29  # 移動速度の変更
          @move_speed = command.parameters[0]
        when 30  # 移動頻度の変更
          @move_frequency = command.parameters[0]
        when 31  # 移動時アニメ ON
          @walk_anime = true
        when 32  # 移動時アニメ OFF
          @walk_anime = false
        when 33  # 停止時アニメ ON
          @step_anime = true
        when 34  # 停止時アニメ OFF
          @step_anime = false
        when 35  # 向き固定 ON
          @direction_fix = true
        when 36  # 向き固定 OFF
          @direction_fix = false
        when 37  # すり抜け ON
          @through = true
        when 38  # すり抜け OFF
          @through = false
        when 39  # 最前面に表示 ON
          @always_on_top = true
        when 40  # 最前面に表示 OFF
          @always_on_top = false
        when 41  # グラフィック変更
          @tile_id = 0
          @character_name = command.parameters[0]
          @character_hue = command.parameters[1]
          if @original_direction != command.parameters[2]
            @direction = command.parameters[2]
            @original_direction = @direction
            @prelock_direction = 0
          end
          if @original_pattern != command.parameters[3]
            @pattern = command.parameters[3]
            @original_pattern = @pattern
          end
        when 42  # 不透明度の変更
          @opacity = command.parameters[0]
        when 43  # 合成方法の変更
          @blend_type = command.parameters[0]
        when 44  # SE の演奏
          $game_system.se_play(command.parameters[0])
        when 45  # スクリプト
          result = eval(command.parameters[0])
        end
        @move_route_index += 1
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 下に移動
  #--------------------------------------------------------------------------
  def move_down_p
    # 下を向く
    turn_down
    # 移動距離を算出
    distance = 2 ** @move_speed
    down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  def move_down_aaaagq
    distance = 2 ** @move_speed
    down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 下に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def down1(x, y, distance, down = false)
    result = down2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x, y+1)
      return result
    end
    if @revise_x < -SIDE
      result = down2(x, y + 1, distance, 4)
      result &= down2(x - 1, y, distance)
      if result == false
        if down
          move_lower_right_p
          if @revise_x > SIDE
            @revise_x = SIDE
          end
        end
        return result
      end
    elsif @revise_x > SIDE
      result = down2(x, y + 1, distance, 6)
      result &= down2(x + 1, y, distance)
      if result == false
        if down
          move_lower_left_p
          if @revise_x < -SIDE
            @revise_x = -SIDE
          end
        end
        return result
      end
    end
    # 下に移動可能ならば距離分移動
    @revise_y += distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 下に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def down2(x, y, distance, d = 2)
    if @revise_y + distance > DOWN
      unless passable?(x, y, d)
        if @revise_y < DOWN
          @revise_y = DOWN
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 左に移動
  #--------------------------------------------------------------------------
  def move_left_p
    # 左を向く
    turn_left
    distance = 2 ** @move_speed
    left1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 左に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def left1(x, y, distance, left = false)
    result = left2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x-1, y)
      return result
    end
    if @revise_y < -UP and $ud_ok
      result = left2(x - 1, y, distance, 8)
      result &= left2(x, y - 1, distance)
      if result == false
        if left
          move_lower_left_p
          if @revise_y > DOWN
            @revise_y = DOWN
          end
        end
        return result
      end
    elsif @revise_y > DOWN and $ud_ok
      result = left2(x - 1, y, distance, 2)
      result &= left2(x, y + 1, distance)
      if result == false
        if left
          move_upper_left_p
          if @revise_y < -UP
            @revise_y = -UP
          end
        end
        return result
      end
    end
    @revise_x -= distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 左に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def left2(x, y, distance, d = 4)
    if @revise_x - distance < -SIDE
      unless passable?(x, y, d)
        if @revise_x > -SIDE
          @revise_x = -SIDE
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 右に移動
  #--------------------------------------------------------------------------
  def move_right_p
      # 右を向く
      turn_right
    distance = 2 ** @move_speed
    right1(((@x * 128 + @revise_x) / 128.0).round,
            ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 右に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def right1(x, y, distance, right = false)
    result = right2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x+1, y)
      return result
    end
    if @revise_y < -UP and $ud_ok
      result = right2(x + 1, y, distance, 8)
      result &= right2(x, y - 1, distance)
      if result == false
        if right
          move_lower_right_p
          if @revise_y > DOWN
            @revise_y = DOWN
          end
        end
        return result
      end
    elsif @revise_y > DOWN and $ud_ok
      result = right2(x + 1, y, distance, 2)
      result &= right2(x, y + 1, distance)
      if result == false
        if right
          move_upper_right_p
          if @revise_y < -UP
            @revise_y = -UP
          end
        end
        return result
      end
    end
    @revise_x += distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 右に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def right2(x, y, distance, d = 6)
    if @revise_x + distance > SIDE
      unless passable?(x, y, d)
        if @revise_x < SIDE
          @revise_x = SIDE
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 上に移動
  #--------------------------------------------------------------------------
  def move_up_p
    # 上を向く
    turn_up
    # 下に移動
    distance = 2 ** @move_speed
    up1(((@x * 128 + @revise_x) / 128.0).round,
        ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  def move_up_aaaagq
    distance = 2 ** @move_speed
    up1(((@x * 128 + @revise_x) / 128.0).round,
        ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 上に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def up1(x, y, distance, up = false)
    result = up2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x, y-1)
      return result
    end
    if @revise_x < -SIDE
      result = up2(x, y - 1, distance, 4)
      result &= up2(x - 1, y, distance)
      if result == false
        if up
          move_upper_right_p
          if @revise_x > SIDE
            @revise_x = SIDE
          end
        end
        return result
      end
    elsif @revise_x > SIDE
      result = up2(x, y - 1, distance, 6)
      result &= up2(x + 1, y, distance)
      if result == false
        if up
          move_upper_left_p
          if @revise_x < -SIDE
            @revise_x = -SIDE
          end
        end
        return result
      end
    end
    @revise_y -= distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 上に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def up2(x, y, distance, d = 8)
    if @revise_y - distance < -UP
      unless passable?(x, y, d)
        if @revise_y > -UP
          @revise_y = -UP
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 左下に移動
  #--------------------------------------------------------------------------
  def move_lower_left_p
    # 向き固定でない場合
    unless @direction_fix
      # 右向きだった場合は左を、上向きだった場合は下を向く
      @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
    end
    # 左下に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 2
      turn_left unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_down if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 2, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y > DOWN and -UP > @revise_y - distance
          @revise_y = DOWN
        end
        turn_down unless left1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_left if @event_run
      end
    else
      turn_down unless left1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_left if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 4, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if  @revise_x + distance> SIDE and -SIDE > @revise_x
          @revise_x = -SIDE
        end
        turn_left unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_down if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 右下に移動
  #--------------------------------------------------------------------------
  def move_lower_right_p
    # 向き固定でない場合
    unless @direction_fix
      # 左向きだった場合は右を、上向きだった場合は下を向く
      @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
    end
    # 右下に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 2
      turn_right unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_down if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 2, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y > DOWN and -UP > @revise_y - distance
          @revise_y = DOWN
        end
        turn_down unless right1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_right if @event_run
      end
    else
      turn_down unless right1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_right if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 6, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_x > SIDE and -SIDE > @revise_x - distance
          @revise_x = SIDE
        end
        turn_right unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_down if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 左上に移動
  #--------------------------------------------------------------------------
  def move_upper_left_p
    # 向き固定でない場合
    unless @direction_fix
      # 右向きだった場合は左を、下向きだった場合は上を向く
      @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
    end
    # 左上に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 8
      turn_left unless up1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_up if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 8, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y + distance > DOWN and -UP > @revise_y
          @revise_y = -UP
        end
        turn_up unless left1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_left if @event_run
      end
    else
      turn_up unless left1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_left if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 4, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_x > SIDE and -SIDE > @revise_x - distance
          @revise_x = SIDE
        end
        turn_left unless up1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_up if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 右上に移動
  #--------------------------------------------------------------------------
  def move_upper_right_p
    # 向き固定でない場合
    unless @direction_fix
      # 左向きだった場合は右を、下向きだった場合は上を向く
      @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
    end
    # 右上に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 8
      turn_right unless up1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_up if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 8, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y + distance > DOWN and -UP > @revise_y
          @revise_y = -UP
        end
        turn_up unless right1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_right if @event_run
      end
    else
      turn_up unless right1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_right if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 6, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_x > SIDE and -SIDE > @revise_x - distance
          @revise_x = SIDE
        end
        turn_right unless up1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_up if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 同位置のイベント起動判定
  #--------------------------------------------------------------------------
  def check_event_trigger_here(triggers, run = true)
    result = false
    # イベント実行中の場合
    if $game_system.map_interpreter.running?
      return result
    end
    # 全イベントのループ
    for event in $game_map.events.values
      # イベントの座標とトリガーが一致した場合
      if event.x == ((@x * 128 + @revise_x) / 128.0).round and
          event.y == ((@y * 128 + @revise_y) / 128.0).round and
          triggers.include?(event.trigger)
        # ジャンプ中以外で、起動判定が同位置のイベントなら
        if not event.jumping? and event.over_trigger?
          if event.list.size > 1
            if run == true
              event.start
            end
            result = true
          end
        end
      end
    end
    return result
  end
  #--------------------------------------------------------------------------
  # ● 座標修正
  #--------------------------------------------------------------------------
  def move_on
    if @y < (@y + @revise_y / 128.0).round
      @y += 1
      @revise_y -= 128
    end
    if @x > (@x + @revise_x / 128.0).round
      @x -= 1
      @revise_x += 128
    end
    if @x < (@x + @revise_x / 128.0).round
      @x += 1
      @revise_x -= 128
    end
    if @y > (@y + @revise_y / 128.0).round
      @y -= 1
      @revise_y += 128
    end
  end
  #--------------------------------------------------------------------------
  # ● アニメーションアップデート
  #--------------------------------------------------------------------------
  def anime_update
    # 移動時アニメが ON の場合
    if @walk_anime
      # アニメカウントを 1.5 増やす
      @anime_count += 1.5
    # 移動時アニメが OFF で、停止時アニメが ON の場合
    elsif @step_anime
      # アニメカウントを 1 増やす
      @anime_count += 1
    end
    # アニメカウントが最大値を超えた場合
    # ※最大値は、基本値 18 から移動速度 * 1 を引いた値
    if @anime_count > 18 - @move_speed * 2
      # 停止時アニメが OFF かつ 停止中の場合
      if not @step_anime and @stop_count > 0
        # パターンをオリジナルに戻す
        @pattern = @original_pattern
      # 停止時アニメが ON または 移動中の場合
      else
        # パターンを更新
        @pattern = (@pattern + 1) % 4
      end
      # アニメカウントをクリア
      @anime_count = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● 指定位置に移動
  #--------------------------------------------------------------------------
  # オリジナルのイベントを改名
  alias :moveto_original :moveto
  def moveto(x, y)
    # 補正座標を初期化
    @revise_x = 0
    @revise_y = 0
    # オリジナルのイベントを呼び出し
    moveto_original(x, y)
  end
  #--------------------------------------------------------------------------
  # ● 移動したかどうかの判定
  #--------------------------------------------------------------------------
  def last_move?(x, y, direction, distance)
    if direction == 2 or direction == 6
      distance *= -1
    end
    if (direction == 2 or direction == 8) and
        (y / 128.0).round != ((y - distance) / 128.0).round
      return true
    end
    if (direction == 4 or direction == 6) and
        (x / 128.0).round != ((x - distance) / 128.0).round
      return true
    end
    return false
  end

#==============================================================================
# ■ Game_Character (分割定義 1)
#------------------------------------------------------------------------------
#  キャラクターを扱うクラスです。このクラスは Game_Player クラスと Game_Event
# クラスのスーパークラスとして使用されます。
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # ● フレーム更新 (移動)
  #--------------------------------------------------------------------------
  def update_move
    # 移動速度からマップ座標系での移動距離に変換
    distance = 2 ** @move_speed
    if @x * 128 != @real_x and @y * 128 != @real_y and Game_Player::SLANT
      distance /= Math.sqrt(2)
    end
    # 論理座標が実座標より下の場合
    if @y * 128 > @real_y
      # 下に移動
      @real_y = [@real_y + distance, @y * 128].min
    end
    # 論理座標が実座標より左の場合
    if @x * 128 < @real_x
      # 左に移動
      @real_x = [@real_x - distance, @x * 128].max
    end
    # 論理座標が実座標より右の場合
    if @x * 128 > @real_x
      # 右に移動
      @real_x = [@real_x + distance, @x * 128].min
    end
    # 論理座標が実座標より上の場合
    if @y * 128 < @real_y
      # 上に移動
      @real_y = [@real_y - distance, @y * 128].max
    end
    # 移動時アニメが ON の場合
    if @walk_anime
      # アニメカウントを 1.5 増やす
      @anime_count += 1.5
    # 移動時アニメが OFF で、停止時アニメが ON の場合
    elsif @step_anime
      # アニメカウントを 1 増やす
      @anime_count += 1
    end
  end
end

#==============================================================================
# ■ Game_Event
#------------------------------------------------------------------------------
#  イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
#==============================================================================

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # ● イベント起動
  #--------------------------------------------------------------------------
  def start
    # 実行内容が空でない場合
    if @list.size > 1
      # $game_player.event が0でない場合
      if $game_player.event != 0
        # 移動速度を $game_player.event にする
        $game_player.move_speed = $game_player.event
      end
      @starting = true
    end
  end
end
end

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#============================================================================== [/pre]
目前的
[pre lang="ruby"]#$ud_ok = false #上下失效
#$airjump = 1  #空中连跳
#用全局变量开启重力脚本 $ud_ok = true/false
#重力脚本控制开关为 GRAVITY_ENABLED = xx(开关编号)
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#【排名不分先后】感谢 rpg_sheep、芯☆淡茹水、STILLIA、RyanBern 参与脚本的完善
#感谢soulsaga修正可执行待机跑动切换模式。
# ————————————————————————————————————
# 全方向ドット移動 Ver ε
# 配布元・サポートURL
# http://members.jcom.home.ne.jp/cogwheel/
#==============================================================================
# ■ Game_Player
#------------------------------------------------------------------------------
#  プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの
# 機能を持っています。このクラスのインスタンスは $game_player で参照されます。
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  UP    = 48                  # 上方向の余裕(0 < UP < 63)
  DOWN  = -5                  # 这个是垂直方向微调 下方向の余裕(0 < DOWN <63)
  SIDE  = 32                  # 左右方向の余裕(0 < SIDE <63)
  SLANT = false               # 移動ルートの斜め移動時、速度修正
  JUMPMAX = 100              
  JUMPADD = 10
  GRAVITY_ENABLED = 212       # 重力脚本生效开关编号,打开为生效
  AIRJUMP = 14                # 用14号变量开关控制跳跃次数,1为两段跳
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader   :event                    # イベント時移動速度
  attr_accessor :move_speed               # 移動速度
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias :update_original :update
  def update
    @data_count -= 1 if @data_count and @data_count > 0
    # @walk:歩行速度 @dash:ダッシュ時移動速度
    # @event:イベント時移動速度(0の時は、イベント時に速度変更をしない)
    @walk  = 4
    @dash  = 5
    @event = 4
    @dot_m = $game_switches[GRAVITY_ENABLED]
    #ダッシュ機能。エンターキーが押されている間、移動速度を変更する。
    unless moving? or $game_system.map_interpreter.running? or
            @move_route_forcing or $game_temp.message_window_showing
      if @walk != @dash
        if Input.press?(Input::C)
          if @move_speed != @dash
            @move_speed = @dash
          end
        else
          if @move_speed != @walk
            @move_speed = @walk
          end
        end
      end
    end
    if @revise_x == nil and @revise_y == nil
      @revise_x = 0
      @revise_y = 0
    end
    unless @dot_m
      update_original
      return
    end
    if @move_route_forcing
      # ローカル変数に移動中かどうかを記憶
      last_moving = moving?
      # ローカル変数に座標を記憶
      last_real_x = @real_x
      last_real_y = @real_y
      # 座標がずれている場合
      if (@revise_x != 0 or @revise_y != 0) and not jumping? and @move == true
        if @revise_x != @real_x - @x * 128 or @revise_y != @real_y - @y * 128
          @revise_x = @real_x - @x * 128
          @revise_y = @real_y - @y * 128
        end
        # 移動距離distance1と目標距離distance2を設定
        distance1 = 2 ** @move_speed
        distance2 = Math.sqrt(@revise_x ** 2 + @revise_y ** 2)
        # 移動距離が目標距離を越えた場合
        if distance1 > distance2
          # 強制的に補正座標を零にする
          @real_x = @real_x - @revise_x
          @real_y = @real_y - @revise_y
          @revise_x = 0
          @revise_y = 0
          anime_update
        # 移動距離が目標距離に達しない場合
        else
          # 移動距離分目標距離に近づく
          @real_x -= (distance1 * @revise_x / distance2).round
          @real_y -= (distance1 * @revise_y / distance2).round
          @revise_x = @real_x - @x * 128
          @revise_y = @real_y - @y * 128
          anime_update
        end
      else
        super
      end
    else
      @move = false
      # 移動中、イベント実行中、移動ルート強制中、
      # メッセージウィンドウ表示中のいずれでもない場合
      unless moving? or $game_system.map_interpreter.running? or
             @move_route_forcing or $game_temp.message_window_showing
        @event_run = false
        # 方向ボタンが押されていれば、その方向へプレイヤーを移動
#---------------------------上下失效-----------------------------------------
      case Input.dir8
        when 1
          move_lower_left_p# : move_left_p
        when 2
#          $ud_ok ? move_down_p : move_down_aaaagq
#          move_down_p# if $ud_ok
        when 3
         move_lower_right_p# : move_right_p
        when 4
          move_left_p
        when 6
          move_right_p
        when 7
          move_upper_left_p# : move_left_p
        when 8
#         $ud_ok ? move_up_p : move_up_aaaagq
#          move_up_p# if $ud_ok
        when 9
         move_upper_right_p# : move_right_p
        end
      end
      # ローカル変数に座標を記憶
      last_real_x = @real_x
      last_real_y = @real_y
      # 移動処理
      @real_x = @x * 128 + @revise_x
      @real_y = @y * 128 + @revise_y
      # ローカル変数に移動中かどうかを記憶
      last_moving = moving?
      # 座標更新
      move_on
      # 現在の座標と以前の座標が異なる場合
      if (last_real_x != @real_x or last_real_y != @real_y)
        @move_distance = 0 if @move_distance == nil
        @move_distance += Math.sqrt((last_real_x - @real_x) ** 2 +
                                      (last_real_y - @real_y) ** 2)
        if @move_distance >= 128
          @move_distance %= 128
          increase_steps
        end
        # アニメーションを更新
        anime_update
      else
        @pattern = 0
      end
    end
    # キャラクターが下に移動し、かつ画面上の位置が中央より下の場合
    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
      # マップを下にスクロール
      $game_map.scroll_down(@real_y - last_real_y)
    end
    # キャラクターが左に移動し、かつ画面上の位置が中央より左の場合
    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
      # マップを左にスクロール
      $game_map.scroll_left(last_real_x - @real_x)
    end
    # キャラクターが右に移動し、かつ画面上の位置が中央より右の場合
    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
      # マップを右にスクロール
      $game_map.scroll_right(@real_x - last_real_x)
    end
    # キャラクターが上に移動し、かつ画面上の位置が中央より上の場合
    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
      # マップを上にスクロール
      $game_map.scroll_up(last_real_y - @real_y)
    end
    # 前回プレイヤーが移動中だった場合
    if last_moving
      # 同位置のイベントとの接触によるイベント起動判定
      result = check_event_trigger_here([1,2])
      if result == true
        if (last_real_x / 128.0).round != @x and
            (last_real_y / 128.0).round != @y
          if @direction == 2 or @direction == 8
            if (last_real_x / 128.0).round > @x
              turn_left
            else
              turn_right
            end
          else
            if (last_real_y / 128.0).round > @y
              turn_up
            else
              turn_down
            end
          end
        elsif (last_real_x / 128.0).round > @x
          turn_left
        elsif (last_real_x / 128.0).round < @x
          turn_right
        elsif (last_real_y / 128.0).round > @y
          turn_up
        elsif (last_real_y / 128.0).round < @y
          turn_down
        end
      end
      # 起動したイベントがない場合
      if result == false
        # デバッグモードが ON かつ CTRL キーが押されている場合を除き
        unless $DEBUG and Input.press?(Input::CTRL)
          # エンカウント カウントダウン
          if @encounter_count > 0
            @encounter_count -= 1
          end
        end
      end
    end
    #-----------------------按跳跃-----------------------------------------------
    # A ボタンが押された場合
    if Input.press?(Input::A)# and not $ud_ok
      @twojump = 1 if @twojump == 0 and down1(((@x * 128 + @revise_x) / 128.0).round,
      ((@y * 128 + @revise_y) / 128.0).round, 5, true)
      if (not @apassed) and @twojump <= $game_variables[AIRJUMP]
        @apassed = true
        @jumpnow = JUMPMAX
        se_name = @twojump == 1 ? "ACT 跳02.ogg" : "ACT 跳01.ogg"
        Audio.se_play("Audio/SE/#{se_name}")
        @twojump += 1
      else
        @jumpnow += 3        
      end
    else
      @apassed = false
    end
    #----------------------自由落体--------------------------------
    #if not $ud_ok
      @jumpnow -= 10
      if @jumpnow < 0
        $game_variables[3] = @jumpnow
        $game_switches[1] = true
        @character_name = "主角ACT12下落" if $game_switches[3] != true
        @jumpnow = [@jumpnow, -JUMPMAX].max
        if not down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, -@jumpnow, true)
          @jumpnow = 0
          @twojump = 0
          @character_name = "主角 行走 长袖" if $game_switches[3] != true
          $game_switches[3] = false
        end
      elsif @jumpnow > 0
        @character_name = @twojump == 1 ? "主角 ACT用跳跃" : "主角ACT11两段跳"
        @jumpnow = [@jumpnow, JUMPMAX].min
        if not up1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, @jumpnow, true)
          @jumpnow = 0
        end
      end
    #end
    if @data_name != @character_name
      @data_name = @character_name
      Audio.se_play("Audio/SE/ACT 落地.ogg") if @character_name == "主角 行走 长袖"
    end
    if Input.trigger?(Input::C)
      # 同位置および正面のイベント起動判定
      check_event_trigger_here([0])
      check_event_trigger_there([0,1,2])
    end
  end
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    @jumpnow = 0
    @twojump = 0
    @apassed = false
    @revise_x = 0
    @revise_y = 0
    @move == false
    super
  end
  #--------------------------------------------------------------------------
  # ● 移動判定
  #--------------------------------------------------------------------------
  def moving?
    unless @dot_m
      result = super
      return result
    end
    # 強制移動の場合オリジナルの判定をさせる
    if @move_route_forcing
      if @move == false
        return false
      end
      super
    # 通常時は現座標が実座標と異なる場合のみ移動中と判定
    else
      return (@x != (@real_x / 128.0).round or @y != (@real_y / 128.0).round)
    end
  end
  #--------------------------------------------------------------------------
  # ● 移動判定
  #--------------------------------------------------------------------------
  def moving_a?
    if @move == false
      if (@move_route.list[@move_route_index].code <= 14 or
          @move_route.list[@move_route_index].code == 25)
        @move = true
      end
      return false
    end
    moving?
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ジャンプ)
  #--------------------------------------------------------------------------
  def update_jump
    # ジャンプカウントを 1 減らす
    @jump_count -= 1
    # 新しい座標を計算
    @real_x = (@real_x * @jump_count + @x * 128) / (@jump_count + 1)
    @real_y = (@real_y * @jump_count + @y * 128) / (@jump_count + 1)
    if @jump_count == 0
      @revise_x = 0
      @revise_y = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● 移動タイプ : カスタム
  #--------------------------------------------------------------------------
  def move_type_custom
    unless @dot_m
      super
      return
    end
    # 停止中でなければ中断
    if jumping? or moving_a?
      return
    end
    # 移動コマンドのリストの最後に到達するまでループ
    while @move_route_index < @move_route.list.size
      # 移動コマンドを取得
      command = @move_route.list[@move_route_index]
      # コマンドコード 0 番 (リストの最後) の場合
      if command.code == 0
        # オプション [動作を繰り返す] が ON の場合
        if @move_route.repeat
          # 移動ルートのインデックスを最初に戻す
          @move_route_index = 0
        end
        # オプション [動作を繰り返す] が OFF の場合
        unless @move_route.repeat
          # 移動ルート強制中の場合
          if @move_route_forcing and not @move_route.repeat
            # 移動ルートの強制を解除
            @move_route_forcing = false
            # オリジナルの移動ルートを復帰
            @move_route = @original_move_route
            @move_route_index = @original_move_route_index
            @original_move_route = nil
          end
          # 停止カウントをクリア
          @stop_count = 0
        end
        return
      end
      # 移動系コマンド (下に移動~ジャンプ) の場合
      if command.code <= 14
        # コマンドコードで分岐
        case command.code
        when 1  # 下に移動
          move_down
        when 2  # 左に移動
          move_left
        when 3  # 右に移動
          move_right
        when 4  # 上に移動
          move_up
        when 5  # 左下に移動
          move_lower_left
        when 6  # 右下に移動
          move_lower_right
        when 7  # 左上に移動
          move_upper_left
        when 8  # 右上に移動
          move_upper_right
        when 9  # ランダムに移動
          move_random
        when 10  # プレイヤーに近づく
          move_toward_player
        when 11  # プレイヤーから遠ざかる
          move_away_from_player
        when 12  # 一歩前進
          move_forward
        when 13  # 一歩後退
          move_backward
        when 14  # ジャンプ
          jump(command.parameters[0], command.parameters[1])
        end
        # オプション [移動できない場合は無視] が OFF で、移動失敗の場合
        if not @move_route.skippable and not moving? and not jumping?
          return
        end
        @move_route_index += 1
        return
      end
      # ウェイトの場合
      if command.code == 15
        # ウェイトカウントを設定
        @wait_count = command.parameters[0] * 2 - 1
        @move_route_index += 1
        return
      end
      # 向き変更系のコマンドの場合
      if command.code >= 16 and command.code <= 26
        # コマンドコードで分岐
        case command.code
        when 16  # 下を向く
          turn_down
        when 17  # 左を向く
          turn_left
        when 18  # 右を向く
          turn_right
        when 19  # 上を向く
          turn_up
        when 20  # 右に 90 度回転
          turn_right_90
        when 21  # 左に 90 度回転
          turn_left_90
        when 22  # 180 度回転
          turn_180
        when 23  # 右か左に 90 度回転
          turn_right_or_left_90
        when 24  # ランダムに方向転換
          turn_random
        when 25  # プレイヤーの方を向く
          turn_toward_player
        when 26  # プレイヤーの逆を向く
          turn_away_from_player
        end
        @move_route_index += 1
        return
      end
      # その他のコマンドの場合
      if command.code >= 27
        # コマンドコードで分岐
        case command.code
        when 27  # スイッチ ON
          $game_switches[command.parameters[0]] = true
          $game_map.need_refresh = true
        when 28  # スイッチ OFF
          $game_switches[command.parameters[0]] = false
          $game_map.need_refresh = true
        when 29  # 移動速度の変更
          @move_speed = command.parameters[0]
        when 30  # 移動頻度の変更
          @move_frequency = command.parameters[0]
        when 31  # 移動時アニメ ON
          @walk_anime = true
        when 32  # 移動時アニメ OFF
          @walk_anime = false
        when 33  # 停止時アニメ ON
          @step_anime = true
        when 34  # 停止時アニメ OFF
          @step_anime = false
        when 35  # 向き固定 ON
          @direction_fix = true
        when 36  # 向き固定 OFF
          @direction_fix = false
        when 37  # すり抜け ON
          @through = true
        when 38  # すり抜け OFF
          @through = false
        when 39  # 最前面に表示 ON
          @always_on_top = true
        when 40  # 最前面に表示 OFF
          @always_on_top = false
        when 41  # グラフィック変更
          @tile_id = 0
          @character_name = command.parameters[0]
          @character_hue = command.parameters[1]
          if @original_direction != command.parameters[2]
            @direction = command.parameters[2]
            @original_direction = @direction
            @prelock_direction = 0
          end
          if @original_pattern != command.parameters[3]
            @pattern = command.parameters[3]
            @original_pattern = @pattern
          end
        when 42  # 不透明度の変更
          @opacity = command.parameters[0]
        when 43  # 合成方法の変更
          @blend_type = command.parameters[0]
        when 44  # SE の演奏
          $game_system.se_play(command.parameters[0])
        when 45  # スクリプト
          result = eval(command.parameters[0])
        end
        @move_route_index += 1
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 下に移動
  #--------------------------------------------------------------------------
  def move_down_p
    # 下を向く
    turn_down
    # 移動距離を算出
    distance = 2 ** @move_speed
    down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  def move_down_aaaagq
    distance = 2 ** @move_speed
    down1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 下に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def down1(x, y, distance, down = false)
    result = down2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x, y+1)
      return result
    end
    if @revise_x < -SIDE
      result = down2(x, y + 1, distance, 4)
      result &= down2(x - 1, y, distance)
      if result == false
        if down
          move_lower_right_p
          if @revise_x > SIDE
            @revise_x = SIDE
          end
        end
        return result
      end
    elsif @revise_x > SIDE
      result = down2(x, y + 1, distance, 6)
      result &= down2(x + 1, y, distance)
      if result == false
        if down
          move_lower_left_p
          if @revise_x < -SIDE
            @revise_x = -SIDE
          end
        end
        return result
      end
    end
    # 下に移動可能ならば距離分移動
    @revise_y += distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 下に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def down2(x, y, distance, d = 2)
    if @revise_y + distance > DOWN
      unless passable?(x, y, d)
        if @revise_y < DOWN
          @revise_y = DOWN
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 左に移動
  #--------------------------------------------------------------------------
  def move_left_p
    # 左を向く
    turn_left
    distance = 2 ** @move_speed
    left1(((@x * 128 + @revise_x) / 128.0).round,
          ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 左に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def left1(x, y, distance, left = false)
    result = left2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x-1, y)
      return result
    end
    if @revise_y < -UP and $ud_ok
      result = left2(x - 1, y, distance, 8)
      result &= left2(x, y - 1, distance)
      if result == false
        if left
          move_lower_left_p
          if @revise_y > DOWN
            @revise_y = DOWN
          end
        end
        return result
      end
    elsif @revise_y > DOWN and $ud_ok
      result = left2(x - 1, y, distance, 2)
      result &= left2(x, y + 1, distance)
      if result == false
        if left
          move_upper_left_p
          if @revise_y < -UP
            @revise_y = -UP
          end
        end
        return result
      end
    end
    @revise_x -= distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 左に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def left2(x, y, distance, d = 4)
    if @revise_x - distance < -SIDE
      unless passable?(x, y, d)
        if @revise_x > -SIDE
          @revise_x = -SIDE
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 右に移動
  #--------------------------------------------------------------------------
  def move_right_p
      # 右を向く
      turn_right
    distance = 2 ** @move_speed
    right1(((@x * 128 + @revise_x) / 128.0).round,
            ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 右に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def right1(x, y, distance, right = false)
    result = right2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x+1, y)
      return result
    end
    if @revise_y < -UP and $ud_ok
      result = right2(x + 1, y, distance, 8)
      result &= right2(x, y - 1, distance)
      if result == false
        if right
          move_lower_right_p
          if @revise_y > DOWN
            @revise_y = DOWN
          end
        end
        return result
      end
    elsif @revise_y > DOWN and $ud_ok
      result = right2(x + 1, y, distance, 2)
      result &= right2(x, y + 1, distance)
      if result == false
        if right
          move_upper_right_p
          if @revise_y < -UP
            @revise_y = -UP
          end
        end
        return result
      end
    end
    @revise_x += distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 右に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def right2(x, y, distance, d = 6)
    if @revise_x + distance > SIDE
      unless passable?(x, y, d)
        if @revise_x < SIDE
          @revise_x = SIDE
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 上に移動
  #--------------------------------------------------------------------------
  def move_up_p
    # 上を向く
    turn_up
    # 下に移動
    distance = 2 ** @move_speed
    up1(((@x * 128 + @revise_x) / 128.0).round,
        ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  def move_up_aaaagq
    distance = 2 ** @move_speed
    up1(((@x * 128 + @revise_x) / 128.0).round,
        ((@y * 128 + @revise_y) / 128.0).round, distance, true)
  end
  #--------------------------------------------------------------------------
  # ● 上に移動可能かどうかの判定1
  #--------------------------------------------------------------------------
  def up1(x, y, distance, up = false)
    result = up2(x, y, distance)
    if result == false
      @event_run = check_event_trigger_touch(x, y-1)
      return result
    end
    if @revise_x < -SIDE
      result = up2(x, y - 1, distance, 4)
      result &= up2(x - 1, y, distance)
      if result == false
        if up
          move_upper_right_p
          if @revise_x > SIDE
            @revise_x = SIDE
          end
        end
        return result
      end
    elsif @revise_x > SIDE
      result = up2(x, y - 1, distance, 6)
      result &= up2(x + 1, y, distance)
      if result == false
        if up
          move_upper_left_p
          if @revise_x < -SIDE
            @revise_x = -SIDE
          end
        end
        return result
      end
    end
    @revise_y -= distance
    return result
  end
  #--------------------------------------------------------------------------
  # ● 上に移動可能かどうかの判定2
  #--------------------------------------------------------------------------
  def up2(x, y, distance, d = 8)
    if @revise_y - distance < -UP
      unless passable?(x, y, d)
        if @revise_y > -UP
          @revise_y = -UP
        end
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # ● 左下に移動
  #--------------------------------------------------------------------------
  def move_lower_left_p
    # 向き固定でない場合
    unless @direction_fix
      # 右向きだった場合は左を、上向きだった場合は下を向く
      @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
    end
    # 左下に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 2
      turn_left unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_down if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 2, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y > DOWN and -UP > @revise_y - distance
          @revise_y = DOWN
        end
        turn_down unless left1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_left if @event_run
      end
    else
      turn_down unless left1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_left if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 4, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if  @revise_x + distance> SIDE and -SIDE > @revise_x
          @revise_x = -SIDE
        end
        turn_left unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_down if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 右下に移動
  #--------------------------------------------------------------------------
  def move_lower_right_p
    # 向き固定でない場合
    unless @direction_fix
      # 左向きだった場合は右を、上向きだった場合は下を向く
      @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
    end
    # 右下に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 2
      turn_right unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_down if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 2, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y > DOWN and -UP > @revise_y - distance
          @revise_y = DOWN
        end
        turn_down unless right1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_right if @event_run
      end
    else
      turn_down unless right1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_right if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 6, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_x > SIDE and -SIDE > @revise_x - distance
          @revise_x = SIDE
        end
        turn_right unless down1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_down if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 左上に移動
  #--------------------------------------------------------------------------
  def move_upper_left_p
    # 向き固定でない場合
    unless @direction_fix
      # 右向きだった場合は左を、下向きだった場合は上を向く
      @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
    end
    # 左上に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 8
      turn_left unless up1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_up if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 8, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y + distance > DOWN and -UP > @revise_y
          @revise_y = -UP
        end
        turn_up unless left1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_left if @event_run
      end
    else
      turn_up unless left1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_left if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 4, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_x > SIDE and -SIDE > @revise_x - distance
          @revise_x = SIDE
        end
        turn_left unless up1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_up if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 右上に移動
  #--------------------------------------------------------------------------
  def move_upper_right_p
    # 向き固定でない場合
    unless @direction_fix
      # 左向きだった場合は右を、下向きだった場合は上を向く
      @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
    end
    # 右上に移動
    distance = (2 ** @move_speed) / Math.sqrt(2)
    if @direction == 8
      turn_right unless up1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_up if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 8, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_y + distance > DOWN and -UP > @revise_y
          @revise_y = -UP
        end
        turn_up unless right1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_right if @event_run
      end
    else
      turn_up unless right1(((@x * 128 + @revise_x) / 128.0).round,
                            ((@y * 128 + @revise_y) / 128.0).round, distance)
      turn_right if @event_run
      unless @event_run
        if last_move?(@real_x, @real_y, 6, distance)
          result = check_event_trigger_here([1,2], false)
          if result == true
            return
          end
        end
        move_on
        if @revise_x > SIDE and -SIDE > @revise_x - distance
          @revise_x = SIDE
        end
        turn_right unless up1(((@x * 128 + @revise_x) / 128.0).round,
                              ((@y * 128 + @revise_y) / 128.0).round, distance)
        turn_up if @event_run
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 同位置のイベント起動判定
  #--------------------------------------------------------------------------
  def check_event_trigger_here(triggers, run = true)
    result = false
    # イベント実行中の場合
    if $game_system.map_interpreter.running?
      return result
    end
    # 全イベントのループ
    for event in $game_map.events.values
      # イベントの座標とトリガーが一致した場合
      if event.x == ((@x * 128 + @revise_x) / 128.0).round and
          event.y == ((@y * 128 + @revise_y) / 128.0).round and
          triggers.include?(event.trigger)
        # ジャンプ中以外で、起動判定が同位置のイベントなら
        if not event.jumping? and event.over_trigger?
          if event.list.size > 1
            if run == true
              event.start
            end
            result = true
          end
        end
      end
    end
    return result
  end
  #--------------------------------------------------------------------------
  # ● 座標修正
  #--------------------------------------------------------------------------
  def move_on
    if @y < (@y + @revise_y / 128.0).round
      @y += 1
      @revise_y -= 128
    end
    if @x > (@x + @revise_x / 128.0).round
      @x -= 1
      @revise_x += 128
    end
    if @x < (@x + @revise_x / 128.0).round
      @x += 1
      @revise_x -= 128
    end
    if @y > (@y + @revise_y / 128.0).round
      @y -= 1
      @revise_y += 128
    end
  end
  #--------------------------------------------------------------------------
  # ● アニメーションアップデート
  #--------------------------------------------------------------------------
  def anime_update
    # 移動時アニメが ON の場合
    if @walk_anime
      # アニメカウントを 1.5 増やす
      @anime_count += 1.5
    # 移動時アニメが OFF で、停止時アニメが ON の場合
    elsif @step_anime
      # アニメカウントを 1 増やす
      @anime_count += 1
    end
    # アニメカウントが最大値を超えた場合
    # ※最大値は、基本値 18 から移動速度 * 1 を引いた値
    if @anime_count > 18 - @move_speed * 2
      # 停止時アニメが OFF かつ 停止中の場合
      if not @step_anime and @stop_count > 0
        # パターンをオリジナルに戻す
        @pattern = @original_pattern
      # 停止時アニメが ON または 移動中の場合
      else
        # パターンを更新
        @pattern = (@pattern + 1) % 4
      end
      # アニメカウントをクリア
      @anime_count = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● 指定位置に移動
  #--------------------------------------------------------------------------
  # オリジナルのイベントを改名
  alias :moveto_original :moveto
  def moveto(x, y)
    # 補正座標を初期化
    @revise_x = 0
    @revise_y = 0
    # オリジナルのイベントを呼び出し
    moveto_original(x, y)
  end
  #--------------------------------------------------------------------------
  # ● 移動したかどうかの判定
  #--------------------------------------------------------------------------
  def last_move?(x, y, direction, distance)
    if direction == 2 or direction == 6
      distance *= -1
    end
    if (direction == 2 or direction == 8) and
        (y / 128.0).round != ((y - distance) / 128.0).round
      return true
    end
    if (direction == 4 or direction == 6) and
        (x / 128.0).round != ((x - distance) / 128.0).round
      return true
    end
    return false
  end

#==============================================================================
# ■ Game_Character (分割定義 1)
#------------------------------------------------------------------------------
#  キャラクターを扱うクラスです。このクラスは Game_Player クラスと Game_Event
# クラスのスーパークラスとして使用されます。
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # ● フレーム更新 (移動)
  #--------------------------------------------------------------------------
  def update_move
    # 移動速度からマップ座標系での移動距離に変換
    distance = 2 ** @move_speed
    if @x * 128 != @real_x and @y * 128 != @real_y and Game_Player::SLANT
      distance /= Math.sqrt(2)
    end
    # 論理座標が実座標より下の場合
    if @y * 128 > @real_y
      # 下に移動
      @real_y = [@real_y + distance, @y * 128].min
    end
    # 論理座標が実座標より左の場合
    if @x * 128 < @real_x
      # 左に移動
      @real_x = [@real_x - distance, @x * 128].max
    end
    # 論理座標が実座標より右の場合
    if @x * 128 > @real_x
      # 右に移動
      @real_x = [@real_x + distance, @x * 128].min
    end
    # 論理座標が実座標より上の場合
    if @y * 128 < @real_y
      # 上に移動
      @real_y = [@real_y - distance, @y * 128].max
    end
    # 移動時アニメが ON の場合
    if @walk_anime
      # アニメカウントを 1.5 増やす
      @anime_count += 1.5
    # 移動時アニメが OFF で、停止時アニメが ON の場合
    elsif @step_anime
      # アニメカウントを 1 増やす
      @anime_count += 1
    end
  end
end

#==============================================================================
# ■ Game_Event
#------------------------------------------------------------------------------
#  イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
#==============================================================================
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # ● イベント起動
  #--------------------------------------------------------------------------
  def start
    # 実行内容が空でない場合
    if @list.size > 1
      # $game_player.event が0でない場合
      if $game_player.event != 0
        # 移動速度を $game_player.event にする
        $game_player.move_speed = $game_player.event
      end
      @starting = true
    end
  end
end
end

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
[/pre]

点评

嘛~扬长避短~扬长避短~,突然想起来我有斜下滑铲动作没做对应地形……弄个出来走过场去。  发表于 2018-4-27 10:52
咱没有研究过重力脚本,原因有二,一素材苦手,二动作苦手... 咱是头脑型玩家XD  发表于 2018-4-27 10:07
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部