设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3432|回复: 7

[已经解决] RTAB系统连击显示61行出现Result too large错误

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
51 小时
注册时间
2011-4-23
帖子
54
发表于 2011-5-6 11:26:51 | 显示全部楼层 |阅读模式
本帖最后由 禾西 于 2011-5-6 17:49 编辑

我用的是http://www.66rpg.com/htm/news562.htm这个上的RTAB系统。我自己有个横版的战斗系统,就是这个
  1. =begin
  2.   #--------------------------------------------------------------------------
  3.  # ● 人物行走图做战斗图像(附加动画) ver1.02
  4.   #--------------------------------------------------------------------------
  5.   制作者 らい
  6.   翻译:忧郁的涟漪
  7.   Rtab整合:人品高,精灵使者
  8.   针对NKX私人整合系统的整合:暴动冲锋
  9.   
  10.   图像文件的规格
  11.   
  12.   ● 巴特勒图像(似乎指的是战斗图像)
  13.   
  14.   使用步行图片。
  15.    
  16.   ● 武器的图像
  17.   
  18.   就是武器图标的图像(ICO图)  
  19.       
  20. =end

  21. module Side_view
  22.   #--------------------------------------------------------------------------
  23.   # ● 是否与RATB并用 ☆自动识别(这到是不错~省了~)
  24.   #    在Scene_Battle计算方法是否是方法synthe?
  25.   #    在自动不想认识的时候,请重写。
  26.   #--------------------------------------------------------------------------
  27.   if Scene_Battle.method_defined?("synthe?")
  28.     RTAB = true
  29.   else
  30.     RTAB = false
  31.   end
  32.   #--------------------------------------------------------------------------
  33.   # ● 改正RATB中的位置误差 ☆自动识别
  34.   #    在自动不想认识的时候,请重写。
  35.   #--------------------------------------------------------------------------
  36.   def camera_correctness
  37.     return false if !RTAB
  38.     begin
  39.       return $scene.drive
  40.     rescue
  41.       return false
  42.     end
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 队伍中的最大人数
  46.   #--------------------------------------------------------------------------
  47.   Party_max = 4
  48.   #--------------------------------------------------------------------------
  49.   # ● 战斗图的扩大率(1.0的时候是保持原有大小)
  50.   #--------------------------------------------------------------------------
  51.   CHAR_ZOOM = 1.0
  52.   #--------------------------------------------------------------------------
  53.   # ● 光标的位置修正(基本不需要改~)
  54.   #--------------------------------------------------------------------------
  55.   ARROW_OX = 0
  56.   ARROW_OY = 64
  57.   #--------------------------------------------------------------------------
  58.   # ● 名状态作为飞行管理的排列(不知道什么意思....)
  59.   #--------------------------------------------------------------------------
  60.   FLY_STATES = ["飛行"]
  61.   #--------------------------------------------------------------------------
  62.   # ● 战斗画面的位置
  63.   #--------------------------------------------------------------------------
  64.   PARTY_X = 480     # 队伍 X 位置
  65.   PARTY_Y = 120     # 队伍 Y 位置
  66.   FORMATION_X = 32  # 各个角色之间的间隔 X
  67.   FORMATION_Y = 48  # 各个角色之间的间隔 Y
  68.   #--------------------------------------------------------------------------
  69.   # ● 自定义常数
  70.   #--------------------------------------------------------------------------
  71.   NORMAL   = "NORMAL"
  72.   WALK_R   = "WALK_R"
  73.   WALK_L   = "WALK_L"
  74.   ATTACK   = "ATTACK"
  75.   ATTACK_R = "ATTACK_R"
  76.   ATTACK_L = "ATTACK_L"
  77.   MAGIC    = "MAGIC"
  78.   ITEM     = "ITEM"
  79.   # 动画的设定
  80.   ANIME = {
  81.     # [画像ID,是否循环,アニメスピード,动画速度,不能指向动画,武器放在右手or左手]
  82.     NORMAL            => [1,true , 0,false, true ,""    ], # 通常待击
  83.     WALK_R            => [2,true , 2,false, false,""    ], # 右移动
  84.     WALK_L            => [1,true , 2,false, false,""    ], # 左移动
  85.     ATTACK_R          => [1,false, 2,true , false,"右手"], # 右手攻击
  86.     ATTACK_L          => [1,false, 2,true , false,"左手"], # 左手攻击
  87.     MAGIC             => [1,false, 2,false, false,""    ], # 右手攻击
  88.     ITEM              => [1,false, 2,false, false,""    ], # 左手攻击
  89.     }
  90.    
  91.   # 债务不履行声明价值的设定(一个字一个字翻译的,不知道啥意思)  
  92.   ANIME.default = [1,false,12,false,"",""]
  93.   
  94.   # 在行动设定的时候 右手攻击 or 左手攻击 辨别を(这个不知道什么意思)的ANIME
  95.   # "角色动画变更#ATTACK"在玩了と(还是不知道啥意思..)的时候,辨别ATTACK_R或者ATTACK_L
  96.   DUAL_WEAPONS_ANIME = [ATTACK]
  97.   
  98.   #--------------------------------------------------------------------------
  99.   # ● 摇晃的设定
  100.   #--------------------------------------------------------------------------
  101.   SHAKE_FILE = "摇晃"  # 文件名
  102.   SHAKE_POWER = 5          # 强度
  103.   SHAKE_SPEED = 5          # 速度
  104.   SHAKE_DURATION = 5      # 时间
  105.   #--------------------------------------------------------------------------
  106.   # ● 上下反转地的设定
  107.   #--------------------------------------------------------------------------
  108.   UPSIDE_DOWN_FILE = "上下反转" # 文件名
  109.   #--------------------------------------------------------------------------
  110.   # ● 左右反转地的设定
  111.   #--------------------------------------------------------------------------
  112.   REVERSE_FILE = "左右反转" # 文件名
  113.   #--------------------------------------------------------------------------
  114.   # ● 回转地的设定
  115.   #--------------------------------------------------------------------------
  116.   TURNING_FILE = "回转" # 文件名
  117.   TURNING_DIRECTION = 1 # 方向(1.逆时针,-1.顺时针)(|||-_-汗..怎么还有用-1做带入值的...)
  118.   TURNING_SPEED = 40    # 速度
  119.   TURNING_DURATION = 1  # 回转数
  120.   #--------------------------------------------------------------------------
  121.   # ● 移动的设定
  122.   #--------------------------------------------------------------------------
  123.   MOVE_FILE = "移动"             # 文件名
  124.   MOVE_RETURN = 1                # 回到原来的位置吗?(光写了个1,也不知道不回到该怎么写?0?)
  125.   MOVE_SPEED = 32                # 速度
  126.   MOVE_COORDINATES = [0,-640]    # 原来位置的相对坐标
  127.   #--------------------------------------------------------------------------
  128.   # ● 动画追加的设定
  129.   #--------------------------------------------------------------------------
  130.   ADD_ANIME_FILE = "动画追加"  # 文件名
  131.   ADD_ANIME_ID = 0               # 动画的ID
  132.   #--------------------------------------------------------------------------
  133.   # ● 债务不履行声明和RTAB的数据转换
  134.   #--------------------------------------------------------------------------
  135.   def convert_battler
  136.     return RTAB ? @active_actor : @active_battler
  137.   end
  138.   #--------------------------------------------------------------------------
  139.   # ● 债务不履行声明和RTAB的数据转换2
  140.   #--------------------------------------------------------------------------
  141.   def convert_battler2(*arg)
  142.     return RTAB ? arg[0] : @active_battler
  143.   end
  144. end

  145. #--------------------------------------------------------------------------
  146. # ● 行动設定
  147. #--------------------------------------------------------------------------
  148. module BattleActions
  149.   
  150.   # 下のものはあくまでも一例なので
  151.   # 独自に作ってください。

  152.   Actions = {

  153.   "通常攻撃" => [
  154.   
  155.   "閃きアニメ",
  156.   "アクターアニメ変更#WALK_L",
  157.   "移動#target,32,0,64,0",
  158.   "行動アニメ",
  159.   "アクターアニメ変更#ATTACK",
  160.   "遠距離アニメ",
  161.   "対象アニメ",
  162.   "アクターアニメ変更#WALK_L",
  163.   "SEの演奏#016-Jump02,80,100",
  164.   "移動#self,0,0,48,32",
  165.   "終了"
  166.   ],
  167.   
  168.   "エネミー攻撃" => [
  169.   
  170.   "閃きアニメ",
  171.   "アクターアニメ変更#WALK_L",
  172.   "移動#self,-36,0,12,0",
  173.   "行動アニメ",
  174.   "アクターアニメ変更#ATTACK",
  175.   "遠距離アニメ",
  176.   "対象アニメ",
  177.   "アクターアニメ変更#WALK_L",
  178.   "移動#self,0,0,12,0",
  179.   "終了"
  180.   ],
  181.   
  182.   
  183.   "術発動" => [
  184.   
  185.   "閃きアニメ",
  186.   "アクターアニメ変更#WALK_L",
  187.   "移動#self,-32,0,4,0",
  188.   "アクターアニメ変更#MAGIC",
  189.   "行動アニメ",
  190.   "ウエイト#15",
  191.   "遠距離アニメ",
  192.   "対象アニメ",
  193.   "アクターアニメ変更#WALK_L",
  194.   "移動#self,0,0,4,2",
  195.   "終了"
  196.   ],

  197.   "アイテム使用" => [
  198.   
  199.   "閃きアニメ",
  200.   "アクターアニメ変更#WALK_L",
  201.   "移動#self,-32,0,4,0",
  202.   "行動アニメ",
  203.   "アクターアニメ変更#ITEM",
  204.   "ウエイト#15",
  205.   "遠距離アニメ",
  206.   "対象アニメ",
  207.   "アクターアニメ変更#WALK_L",
  208.   "移動#self,0,0,4,2",
  209.   "終了"
  210.   ],
  211.   
  212.   "払い抜け" => [
  213.   
  214.   "閃きアニメ",
  215.   "アクターアニメ変更#WALK_L",
  216.   "移動#target_near,50,0,48,30",  
  217.   "左右反転",
  218.   "アクターアニメ固定#ATTACK#3",
  219.   "行動アニメ",
  220.   "SEの演奏#135-Light01,100,100",
  221.   "アニメーションの表示#self,42",
  222.   "ウエイト#15",
  223.   "左右反転",
  224.   "残像表示",
  225.   "移動#target_far,-50,0,48,0",
  226.   "対象アニメ",
  227.   "残像消去",
  228.   "アニメ固定解除",
  229.   "アクターアニメ変更#WALK_L",
  230.   "移動#self,0,0,48,1,0",
  231.   "終了"
  232.   ],
  233.   } # ここで終わり 消さないでください

  234. end
  235.   
  236. module RPG
  237.   class Weapon
  238.     #--------------------------------------------------------------------------
  239.     # ● アクション設定
  240.     #--------------------------------------------------------------------------
  241.     def battle_actions
  242.       case @id
  243.       when 1 # ブロンズソード
  244.         return BattleActions::Actions["通常攻撃"]
  245.       end
  246.       return BattleActions::Actions["通常攻撃"]
  247.     end
  248.   end
  249.   class Skill
  250.     #--------------------------------------------------------------------------
  251.     # ● アクション設定
  252.     #--------------------------------------------------------------------------
  253.     def battle_actions
  254.       if self.magic?
  255.         return BattleActions::Actions["術発動"]
  256.       else
  257.         return BattleActions::Actions["払い抜け"]
  258.       end
  259.     end
  260.   end
  261.   class Item
  262.     #--------------------------------------------------------------------------
  263.     # ● アクション設定
  264.     #--------------------------------------------------------------------------
  265.     def battle_actions
  266.       return BattleActions::Actions["アイテム使用"]
  267.     end
  268.   end
  269. end
  270. class Game_Enemy < Game_Battler
  271.   #--------------------------------------------------------------------------
  272.   # ● アクション設定
  273.   #--------------------------------------------------------------------------
  274.   def battle_actions
  275.     return BattleActions::Actions["エネミー攻撃"]
  276.   end
  277. end
  278. =begin
  279. #--------------------------------------------------------------------------
  280. # ● 遠距離アニメーション
  281. #--------------------------------------------------------------------------
  282.  ☆ 説明
  283.   
  284.    行動者から対象者にアニメを飛ばします。
  285.    飛ばすアニメを データベース‐アニメーション で作ります。
  286.     [アニメーションID, スピード, 往復するか?,直線(false)or曲線(true)] で指定します。


  287.   ● カスタマイズ方法
  288.    
  289.     case @id
  290.     when 17,18,19,20
  291.       return [101,32,false,false]
  292.     when 21,22,23,24
  293.       return [102,32,false,false]
  294.     end
  295.     return 0
  296.    
  297.     のように描くとID別に指定可能です。
  298.    
  299.    
  300.   ● アニメーションID
  301.   
  302.   飛ばすアニメーションIDです。短い場合は繰り返しで表示されます。
  303.   
  304.    
  305.   ● スピード
  306.   
  307.   大きいほうが早い(0だとアニメは移動しません)
  308.   
  309.   1 = 1フレームで1ドット進むと考えてください。
  310.   
  311.   ● 往復するか?
  312.   
  313.   true とした場合、ブーメランのようにアニメが戻ります。
  314.   
  315.   ● 直線(false)or曲線(true)
  316.   
  317.   true  = 対象に向かって曲線で、アニメが飛びます。(修正の余地ありですが???)
  318.   false = 対象に向かって直線で、アニメが飛びます。
  319.    
  320. =end
  321. module RPG
  322.   class Weapon
  323.     #--------------------------------------------------------------------------
  324.     # ● 遠距離アニメーション
  325.     #--------------------------------------------------------------------------
  326.     def flying_anime
  327.       # ID 指定 の例
  328.       #case @id
  329.       #when 34 # ブーメランっぽいやつ
  330.       #  return [103,32,true,true]
  331.       #when 17,18,19,20
  332.       #  return [101,32,false,false]
  333.       #when 21,22,23,24
  334.       #  return [102,32,false,false]
  335.       #end
  336.       return [0,0,false,false]
  337.     end
  338.   end
  339.   class Skill
  340.     #--------------------------------------------------------------------------
  341.     # ● 遠距離アニメーション
  342.     #--------------------------------------------------------------------------
  343.     def flying_anime
  344.       return [0,0,false,false]
  345.     end
  346.   end
  347.   class Item
  348.     #--------------------------------------------------------------------------
  349.     # ● 遠距離アニメーション
  350.     #--------------------------------------------------------------------------
  351.     def flying_anime
  352.       return [0,0,false,false]
  353.     end
  354.   end
  355. end

  356. class Game_Enemy < Game_Battler
  357.   #--------------------------------------------------------------------------
  358.   # ● 遠距離アニメーション
  359.   #--------------------------------------------------------------------------
  360.   def flying_anime
  361.     return [0,0,false,false]
  362.   end
  363. end
  364. #==============================================================================
  365. # ■ Game_Battler
  366. #==============================================================================
  367. class Game_Battler
  368.   include Side_view
  369.   #--------------------------------------------------------------------------
  370.   # ● 追加?公開インスタンス変数
  371.   #--------------------------------------------------------------------------
  372.   attr_accessor :height                  # 画像の高さ
  373.   attr_accessor :real_x                  # X座標補正
  374.   attr_accessor :real_y                  # Y座標補正
  375.   attr_accessor :real_zoom               # 拡大率
  376.   attr_accessor :wait_count              # アニメーション 待ち時間
  377.   attr_accessor :wait_count2             # アニメーション 待ち時間2
  378.   attr_accessor :pattern                 # アニメーション カウント(キャラ)
  379.   attr_accessor :shake                   # シェイク開始フラッグ
  380.   attr_accessor :reverse                 # 左右反転フラッグ
  381.   attr_accessor :shadow                  # 残像フラッグ
  382.   attr_accessor :flash_flag              # 閃きフラッグ
  383.   attr_reader   :ox                      # X座標補正
  384.   attr_reader   :oy                      # Y座標補正
  385.   attr_reader   :flying_x                # 遠距離アニメX座標
  386.   attr_reader   :flying_y                # 遠距離アニメY座標
  387.   attr_reader   :flying_anime            # 遠距離アニメ
  388.   attr_reader   :animation1_on           # 行動アニメ開始フラッグ
  389.   attr_reader   :animation2_on           # 対象アニメ開始フラッグ
  390.   #--------------------------------------------------------------------------
  391.   # ● デフォルトのアニメーション待ち時間を取得
  392.   #--------------------------------------------------------------------------
  393.   def animation_duration=(animation_duration)
  394.     @_animation_duration = animation_duration
  395.   end
  396.   #--------------------------------------------------------------------------
  397.   # ● バトル開始時のセットアップ
  398.   #--------------------------------------------------------------------------
  399.   def start_battle
  400.     @height = 0
  401.     @real_x = 0
  402.     @real_y = 0
  403.     @real_zoom = 1.0
  404.     @battler_condition = ""
  405.     @action = nil
  406.     @battle_actions = []
  407.     @battler_action = false
  408.     @step = 0
  409.     @anime_on = false
  410.     @wait_count = 0
  411.     @wait_count2 = 0
  412.     @ox = 0
  413.     @oy = 0
  414.     @pattern = 0
  415.     @pattern_log = true
  416.     @pattern_freeze = false
  417.     @condition_freeze = false
  418.     @active = false
  419.     @move_distance = nil
  420.     @move_wait = 0
  421.     @move_coordinates = [0,0,0,0]
  422.     @flying_distance = nil
  423.     @flying_wait = 0
  424.     @flying_x = 0
  425.     @flying_y = 0
  426.     @flash_flag = {}
  427.     self.flying_clear
  428.   end
  429.   #--------------------------------------------------------------------------
  430.   # ● 移動中判定
  431.   #--------------------------------------------------------------------------
  432.   def moving?
  433.     # X座標補正または、Y座標補正が0でなければ、移動中
  434.     return (@ox != 0 or @oy != 0)
  435.   end
  436.   #--------------------------------------------------------------------------
  437.   # ● 移動終了判定
  438.   #--------------------------------------------------------------------------
  439.   def move_end?
  440.     return (@ox == @move_coordinates[0] and @oy == @move_coordinates[1])
  441.   end
  442.   #--------------------------------------------------------------------------
  443.   # ● アクション開始設定
  444.   #--------------------------------------------------------------------------
  445.   def action(flag = true)
  446.     @battler_action = flag
  447.     @animation1_on = false
  448.     @animation2_on = false
  449.     @step = "setup"
  450.   end   
  451.   #--------------------------------------------------------------------------
  452.   # ● アクション中判定
  453.   #--------------------------------------------------------------------------
  454.   def action?
  455.     return @battler_action
  456.   end
  457.   #--------------------------------------------------------------------------
  458.   # ● 閃き判定
  459.   #--------------------------------------------------------------------------
  460.   def flash?
  461.     return @flash_flg
  462.   end
  463.   #--------------------------------------------------------------------------
  464.   # ● 戦闘不能判定
  465.   #--------------------------------------------------------------------------
  466.   def anime_dead?
  467.     if $game_temp.in_battle and !RTAB
  468.       if [2,3,4,5].include?($scene.phase4_step)
  469.         return @last_dead
  470.       end
  471.     end
  472.     return @last_dead = self.dead?
  473.   end
  474.   #--------------------------------------------------------------------------
  475.   # ● ピンチ状態判定
  476.   #--------------------------------------------------------------------------
  477.   def crisis?
  478.     if $game_temp.in_battle and !RTAB
  479.       if [2,3,4,5].include?($scene.phase4_step)
  480.         return @last_crisis
  481.       end
  482.     end
  483.     return @last_crisis = (self.hp <= self.maxhp / 4 or badstate?)
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ● バッドステート判定
  487.   #--------------------------------------------------------------------------
  488.   def badstate?
  489.     for i in @states
  490.       unless $data_states[i].nonresistance
  491.         return true
  492.       end
  493.     end
  494.     return false
  495.   end
  496.   #--------------------------------------------------------------------------
  497.   # ● 飛行
  498.   #--------------------------------------------------------------------------
  499.   def fly
  500.     if @fly != nil
  501.       return @fly
  502.     end
  503.     for id in @states
  504.       if FLY_STATES.include?($data_states[id].name)
  505.         return 60
  506.       end
  507.     end
  508.     return 0
  509.   end
  510.   #--------------------------------------------------------------------------
  511.   # ● 遠距離アニメ目標座標の計算
  512.   #--------------------------------------------------------------------------
  513.   def flying_setup
  514.     # 二度目は実行しない
  515.     return if @flying_distance != nil && !camera_correctness
  516.     if RTAB
  517.       targets = @target
  518.     else
  519.       targets = $scene.target_battlers
  520.     end
  521.     # 目的座標を計算
  522.     @f_target_x = 0
  523.     @f_target_y = 0
  524.     for t in targets
  525.       @f_target_x += t.screen_x
  526.       @f_target_y += t.screen_y
  527.     end
  528.     if targets != []
  529.       @f_target_x /= targets.size
  530.       @f_target_y /= targets.size
  531.     else
  532.       @flying_distance = 0
  533.       return
  534.     end
  535.     # 距離の計算
  536.     @flying_distance = (self.screen_x - @f_target_x).abs + (self.screen_y - @f_target_y).abs
  537.   end
  538.   #--------------------------------------------------------------------------
  539.   # ● 遠距離アニメ
  540.   #--------------------------------------------------------------------------
  541.   def flying_animation
  542.     # 戻る
  543.     if @step != "flying" or @flying_distance.nil?
  544.       return [false,true]
  545.     end
  546.     # あらかじめ計算
  547.     self_x = self.screen_x
  548.     self_y = self.screen_y
  549.     @flying_distance = @flying_distance == 0 ? 1 : @flying_distance
  550.     n1 = @flying_wait / @flying_distance.to_f
  551.     if @flying_distance - @flying_wait > @flying_distance / 2
  552.       n2 = 1.0 + 10.0 * @flying_wait / @flying_distance.to_f
  553.     else
  554.       n2 = 1.0 + 10.0 * (@flying_distance - @flying_wait) / @flying_distance.to_f
  555.     end
  556.     if !@flying_anime[4]
  557.       # 直線移動
  558.       x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  559.       y = (self_y + 1.0 * (@f_target_y - self_y) * n1).to_i
  560.     else
  561.       # 曲線移動
  562.       if !@flying_proceed_end
  563.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  564.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 - n2**2).to_i
  565.       else
  566.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  567.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 + n2**2).to_i
  568.       end
  569.     end
  570.     # 座標代入
  571.     @flying_x = x
  572.     @flying_y = y
  573.     # ウエイト
  574.     if !@flying_proceed_end
  575.       # 開始
  576.       @flying_proceed_start = @flying_wait == 0
  577.       @flying_wait += @flying_anime[1]
  578.       @flying_wait = [@flying_wait,@flying_distance].min
  579.       @flying_proceed_end = @flying_wait == @flying_distance
  580.     else
  581.       # 開始
  582.       @flying_return_start = @flying_wait == @flying_distance
  583.       @flying_wait -= @flying_anime[1]
  584.       @flying_wait = [@flying_wait,0].max
  585.       @flying_return_end = @flying_wait == 0
  586.     end
  587.     if @flying_anime[1] == 0
  588.       @flying_end = true
  589.     elsif !@flying_anime[2]
  590.       @flying_end = @flying_proceed_end
  591.     else
  592.       @flying_end = @flying_return_end
  593.     end
  594.     # 値を返す(アニメ開始,アニメ終了)
  595.     return [@flying_proceed_start,@flying_end]
  596.   end
  597.   #--------------------------------------------------------------------------
  598.   # ● 遠距離アニメ初期化
  599.   #--------------------------------------------------------------------------
  600.   def flying_clear
  601.     @flying_proceed_start = false
  602.     @flying_proceed_end = false
  603.     @flying_return_start = false
  604.     @flying_return_end = false
  605.     @flying_end = false
  606.     @flying_anime = [0,0,false]
  607.   end
  608.   #--------------------------------------------------------------------------
  609.   # ● 移動
  610.   #--------------------------------------------------------------------------
  611.   def move
  612.     # 距離の計算
  613.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  614.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  615.     if @move_distance > 0
  616.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  617.       array = @move_coordinates
  618.       # ジャンプ補正値の計算
  619.       if @move_distance - @move_wait > @move_distance / 2
  620.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2
  621.       else
  622.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  623.       end
  624.       jump = @move_action[4] > 0 ? -jump : jump
  625.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  626.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  627.       # ウエイト
  628.       @move_wait -= @move_action[3]
  629.       @move_wait = [@move_wait,0].max
  630.     end
  631.   end
  632.   #--------------------------------------------------------------------------
  633.   # ● 移動アクションの取得
  634.   #--------------------------------------------------------------------------
  635.   def get_move_action
  636.     string = @action.split(/#/)[1]
  637.     string = string.split(/,/)
  638.     @move_action = [string[0],string[1].to_i,string[2].to_i,string[3].to_i,string[4].to_i,string[5].to_i]
  639.   end
  640.   #--------------------------------------------------------------------------
  641.   # ● アクションの取得
  642.   #--------------------------------------------------------------------------
  643.   def get_step
  644.     if @action.nil?
  645.       @step = "finish"
  646.       return
  647.     end
  648.     string = @action.split(/#/)[0]
  649.     if string =~ "移動"
  650.       @step = "moving_setup"
  651.     elsif string =~ "アクターアニメ実行"
  652.       @step = "action"
  653.     elsif string =~ "遠距離アニメ"
  654.       @step = "flying"
  655.     elsif string =~ "アクターアニメ変更"
  656.       @step = "change"
  657.     elsif string =~ "行動アニメ"
  658.       @step = "animation1"
  659.     elsif string =~ "対象アニメ"
  660.       @step = "animation2"
  661.     elsif string =~ "ウエイト"
  662.       @step = "wait"
  663.     elsif string =~ "左右反転"
  664.       @step = "reverse"
  665.     elsif string =~ "閃きアニメ"
  666.       @step = "flash"
  667.     elsif string =~ "残像表示"
  668.       @step = "shadow_on"
  669.     elsif string =~ "残像消去"
  670.       @step = "shadow_off"
  671.     elsif string =~ "アクターアニメ固定"
  672.       @step = "freeze"
  673.     elsif string =~ "アニメ固定解除"
  674.       @step = "freeze_lifting"
  675.     elsif string =~ "アニメーションの表示"
  676.       @step = "animation_start"
  677.     elsif string =~ "SEの演奏"
  678.       @step = "play_se"
  679.     else
  680.       @step = "finish"
  681.     end
  682.   end
  683.   #--------------------------------------------------------------------------
  684.   # ● フレーム更新 (次のアクションへ)
  685.   #--------------------------------------------------------------------------
  686.   def update_next
  687.     @action = @battle_actions.shift
  688.     @step = get_step
  689.   end
  690.   #--------------------------------------------------------------------------
  691.   # ● フレーム更新 (動作取得)
  692.   #--------------------------------------------------------------------------
  693.   def update_setup
  694.     # アクションの取得
  695.     self.get_actions
  696.     @action = @battle_actions.shift
  697.     @step = get_step
  698.   end
  699.   #--------------------------------------------------------------------------
  700.   # ● フレーム更新 (移動取得)
  701.   #--------------------------------------------------------------------------
  702.   def update_moving_setup
  703.     # 移動アクションの取得
  704.     self.get_move_action
  705.     # 移動目標の設定
  706.     self.move_setup
  707.     @step = "moving"
  708.   end
  709.   #--------------------------------------------------------------------------
  710.   # ● フレーム更新 (移動)
  711.   #--------------------------------------------------------------------------
  712.   def update_moving
  713.     # 移動
  714.     self.move
  715.     self.condition = @battler_condition
  716.     # 移動完了したら次のステップへ
  717.     if move_end?
  718.       @wait_count = 2
  719.       @action = @battle_actions.shift
  720.       @step = get_step
  721.     end
  722.   end
  723.   #--------------------------------------------------------------------------
  724.   # ● フレーム更新 (アニメ実行)
  725.   #--------------------------------------------------------------------------
  726.   def update_action
  727.     con = @action.split(/#/)[1]
  728.     # 右手?左手を分ける
  729.     if DUAL_WEAPONS_ANIME.include?(con)
  730.       if !@first_weapon and @second_weapon
  731.         con = con + "_L"
  732.       else
  733.         con = con + "_R"
  734.       end
  735.     end
  736.     # アニメ変更
  737.     self.condition = con
  738.     # ループか否か
  739.     if !ANIME[@battler_condition][1]
  740.       self.anime_on
  741.     end
  742.     @action = @battle_actions.shift
  743.     @step = get_step
  744.   end
  745.   #--------------------------------------------------------------------------
  746.   # ● フレーム更新 (遠距離アニメ)
  747.   #--------------------------------------------------------------------------
  748.   def update_flying
  749.     # 目標の設定
  750.     self.flying_setup
  751.     # 遠距離アニメ終了
  752.     if @flying_end
  753.       self.flying_clear
  754.       @action = @battle_actions.shift
  755.       @step = get_step
  756.     end
  757.   end
  758.   #--------------------------------------------------------------------------
  759.   # ● フレーム更新 (アニメ変更)
  760.   #--------------------------------------------------------------------------
  761.   def update_change
  762.     con = @action.split(/#/)[1]
  763.     # 右手?左手を分ける
  764.     if DUAL_WEAPONS_ANIME.include?(con)
  765.       if !@first_weapon and @second_weapon
  766.         con = con + "_L"
  767.       else
  768.         con = con + "_R"
  769.       end
  770.     end
  771.     # アニメ変更
  772.     self.condition = con
  773.     # ループか否か
  774.     if !ANIME[@battler_condition][1]
  775.       self.anime_on
  776.     end
  777.     @action = @battle_actions.shift
  778.     @step = get_step
  779.   end
  780.   #--------------------------------------------------------------------------
  781.   # ● フレーム更新 (行動アニメ)
  782.   #--------------------------------------------------------------------------
  783.   def update_animation1
  784.     @animation1_on = true
  785.     # 行動アニメの後に行動を開始する
  786.     if $scene.phase4_step == 3
  787.       id = RTAB ? @anime1 : $scene.animation1_id
  788.       animation = $data_animations[id]
  789.       frame_max = animation != nil ? animation.frame_max : 0
  790.       @wait_count2 = frame_max * 2
  791.       return
  792.     end
  793.     @action = @battle_actions.shift
  794.     @step = get_step
  795.   end
  796.   #--------------------------------------------------------------------------
  797.   # ● フレーム更新 (対象アニメ)
  798.   #--------------------------------------------------------------------------
  799.   def update_animation2
  800.     @animation2_on = true
  801.     # 行動アニメの後に行動を開始する
  802.     if $scene.phase4_step == 4
  803.       id = RTAB ? @anime2 : $scene.animation2_id
  804.       animation = $data_animations[id]
  805.       frame_max = animation != nil ? animation.frame_max : 0
  806.       @wait_count2 = frame_max * 2
  807.       return
  808.     end
  809.     @action = @battle_actions.shift
  810.     @step = get_step
  811.   end
  812.   #--------------------------------------------------------------------------
  813.   # ● フレーム更新 (ウエイト)
  814.   #--------------------------------------------------------------------------
  815.   def update_wait
  816.     @wait_count2 = @action.split(/#/)[1].to_i
  817.     @action = @battle_actions.shift
  818.     @step = get_step
  819.   end
  820.   #--------------------------------------------------------------------------
  821.   # ● フレーム更新 (残像表示)
  822.   #--------------------------------------------------------------------------
  823.   def update_shadow_on
  824.     @shadow = true
  825.     @action = @battle_actions.shift
  826.     @step = get_step
  827.   end
  828.   #--------------------------------------------------------------------------
  829.   # ● フレーム更新 (残像消去)
  830.   #--------------------------------------------------------------------------
  831.   def update_shadow_off
  832.     @shadow = false
  833.     @action = @battle_actions.shift
  834.     @step = get_step
  835.   end
  836.   #--------------------------------------------------------------------------
  837.   # ● フレーム更新 (左右反転)
  838.   #--------------------------------------------------------------------------
  839.   def update_reverse
  840.     @reverse = @reverse ? false : true
  841.     @action = @battle_actions.shift
  842.     @step = get_step
  843.   end
  844.   #--------------------------------------------------------------------------
  845.   # ● フレーム更新 (閃きアニメ)
  846.   #--------------------------------------------------------------------------
  847.   def update_flash
  848.     # 閃きアニメの後に行動を開始する
  849.     if @flash_flag["normal"]
  850.       @wait_count = $scene.flash_duration
  851.       @flash_flag["normal"] = false
  852.       return
  853.     end
  854.     @action = @battle_actions.shift
  855.     @step = get_step
  856.   end
  857.   #--------------------------------------------------------------------------
  858.   # ● フレーム更新 (SEの演奏)
  859.   #--------------------------------------------------------------------------
  860.   def update_play_se
  861.     data = @action.split(/#/)[1]
  862.     data = data.split(/,/)
  863.     # SE を演奏
  864.     Audio.se_play("Audio/SE/" + data[0], data[1].to_i, data[2].to_i)
  865.     @action = @battle_actions.shift
  866.     @step = get_step
  867.   end
  868.   #--------------------------------------------------------------------------
  869.   # ● フレーム更新 (アクターアニメ固定)
  870.   #--------------------------------------------------------------------------
  871.   def update_freeze
  872.     con = @action.split(/#/)[1]
  873.     # 右手?左手を分ける
  874.     if DUAL_WEAPONS_ANIME.include?(con)
  875.       if !@first_weapon and @second_weapon
  876.         con = con + "_L"
  877.       else
  878.         con = con + "_R"
  879.       end
  880.     end
  881.     # アニメ変更
  882.     self.condition = con
  883.     @pattern = @action.split(/#/)[2].to_i
  884.     @pattern_freeze = true
  885.     @condition_freeze = true
  886.     @action = @battle_actions.shift
  887.     @step = get_step
  888.   end
  889.   #--------------------------------------------------------------------------
  890.   # ● フレーム更新 (アクターアニメ固定解除)
  891.   #--------------------------------------------------------------------------
  892.   def update_freeze_lifting
  893.     @pattern_freeze = false
  894.     @condition_freeze = false
  895.     @action = @battle_actions.shift
  896.     @step = get_step
  897.   end
  898.   #--------------------------------------------------------------------------
  899.   # ● フレーム更新 (アニメーションの表示)
  900.   #--------------------------------------------------------------------------
  901.   def update_animation_start
  902.     data = @action.split(/#/)[1]
  903.     data = data.split(/,/)
  904.     target = data[0]
  905.     animation_id = data[1].to_i
  906.     if RTAB
  907.       case target
  908.       when "self"
  909.         @animation.push([animation_id,true])
  910.       when "target"
  911.         for tar in @target
  912.           tar.animation.push([animation_id, true])
  913.         end
  914.       end
  915.     else
  916.       case target
  917.       when "self"
  918.         @animation_id = animation_id
  919.         @animation_hit = true
  920.       when "target"
  921.         for tar in $scene.target_battlers
  922.           tar.animation_id = animation_id
  923.           tar.animation_hit = true
  924.         end
  925.       end
  926.     end
  927.     @action = @battle_actions.shift
  928.     @step = get_step
  929.   end
  930.   #--------------------------------------------------------------------------
  931.   # ● フレーム更新 (動作終了)
  932.   #--------------------------------------------------------------------------
  933.   def update_finish
  934.     # 動作終了
  935.     @battler_action = false
  936.     @step = "setup"
  937.   end
  938.   #--------------------------------------------------------------------------
  939.   # ● バトラーの状態 変更(バトラーグラフィックのタイプ)
  940.   #--------------------------------------------------------------------------
  941.   def condition=(condition)
  942.     return if @condition_freeze
  943.     @battler_condition = condition
  944.     @wait_count = ANIME[condition][2]
  945.   end
  946.   #--------------------------------------------------------------------------
  947.   # ● バトラーの状態(バトラーグラフィックのタイプ)
  948.   #--------------------------------------------------------------------------
  949.   def condition
  950.     return @battler_condition
  951.   end
  952.   #--------------------------------------------------------------------------
  953.   # ● フレーム更新
  954.   #--------------------------------------------------------------------------
  955.   def update
  956.     # ウェイト中の場合
  957.     if @wait_count > 0
  958.       return
  959.     end
  960.     # パターン更新
  961.     self.char_animation
  962.     # ウェイト中の場合
  963.     if @wait_count2 > 0
  964.       return
  965.     end
  966.    
  967.     # 行動アニメーション
  968.     if @battler_action
  969.       method("update_" + @step).call
  970.       return
  971.     end
  972.    
  973.     # データ初期化
  974.     @animation1_on = false
  975.     @animation2_on = false
  976.     @action = nil
  977.     @battle_actions = []
  978.     @move_wait = 0
  979.     @move_distance = nil
  980.     @flying_wait = 0
  981.     @flying_distance = nil
  982.     @flash = false

  983.     # RTAB対応
  984.     # 通常?待機
  985.     return self.condition = NORMAL
  986.   end
  987.   #--------------------------------------------------------------------------
  988.   # ● アクションの取得
  989.   #--------------------------------------------------------------------------
  990.   def get_actions
  991.     skill = $data_skills[self.current_action.skill_id]
  992.     item = $data_items[self.current_action.item_id]
  993.     kind = self.current_action.kind
  994.     # 動作取得
  995.     @battle_actions = []
  996.     # スキル
  997.     if skill != nil && kind == 1
  998.       @battle_actions = skill.battle_actions.dup
  999.       @flying_anime = skill.flying_anime
  1000.     # アイテム
  1001.     elsif item != nil && kind == 2
  1002.       @battle_actions = item.battle_actions.dup
  1003.       @flying_anime = item.flying_anime
  1004.     # 左手攻撃
  1005.     elsif !@first_weapon and @second_weapon and self.is_a?(Game_Actor)
  1006.       @battle_actions = self.battle_actions2.dup
  1007.       @flying_anime = self.flying_anime2
  1008.     # 右手攻撃
  1009.     elsif self.current_action.basic == 0 and
  1010.       self.is_a?(Game_Actor) and self.current_action.kind == 0
  1011.       @battle_actions = self.battle_actions1.dup
  1012.       @flying_anime = self.flying_anime1
  1013.     # 通常攻撃
  1014.     elsif self.current_action.basic == 0 and self.current_action.kind == 0
  1015.       @battle_actions = self.battle_actions.dup
  1016.       @flying_anime = self.flying_anime
  1017.     else
  1018.       @battle_actions = ["終了"]
  1019.       @flying_anime = [0,0,false,false]
  1020.     end
  1021.   end
  1022.   #--------------------------------------------------------------------------
  1023.   # ● ループしないアニメのセット
  1024.   #--------------------------------------------------------------------------
  1025.   def anime_on
  1026.     @pattern = 0
  1027.     @pattern_log = true
  1028.     return
  1029.   end
  1030.   #--------------------------------------------------------------------------
  1031.   # ● パターン更新
  1032.   #--------------------------------------------------------------------------
  1033.   def char_animation
  1034.     # パタン固定の場合もどる
  1035.     return if @pattern_freeze
  1036.     # ループしないアニメの場合 1234 で止まる
  1037.     if !ANIME[@battler_condition][1] && @pattern == 3
  1038.       return
  1039.     end
  1040.     # アニメさせない場合 1 で止まる
  1041.     if ANIME[@battler_condition][4]
  1042.       @pattern = 0
  1043.       return
  1044.     end
  1045.     @pattern = (@pattern + 1) % 4
  1046.   end
  1047.   #--------------------------------------------------------------------------
  1048.   # ● アニメタイプ
  1049.   #--------------------------------------------------------------------------
  1050.   def anime_type
  1051.     return ANIME[self.condition] != nil ? ANIME[self.condition][0] : 0
  1052.   end
  1053. end
  1054. #==============================================================================
  1055. # ■ Game_Actor
  1056. #==============================================================================
  1057. class Game_Actor < Game_Battler
  1058.   include Side_view
  1059.   #--------------------------------------------------------------------------
  1060.   # ● セットアップ
  1061.   #--------------------------------------------------------------------------
  1062.   alias side_view_setup setup
  1063.   def setup(actor_id)
  1064.     side_view_setup(actor_id)
  1065.     start_battle
  1066.   end
  1067.   #--------------------------------------------------------------------------
  1068.   # ● 二刀武器のID取得 ※エラー回避用
  1069.   #--------------------------------------------------------------------------
  1070.   def weapon2_id
  1071.     return @weapon2_id != nil ? @weapon2_id : 0
  1072.   end
  1073.   #--------------------------------------------------------------------------
  1074.   # ● X方向 ポジション 取得 (陣形スクリプト拡張用)
  1075.   #--------------------------------------------------------------------------
  1076.   def position
  1077.     return $data_classes[@class_id].position
  1078.   end
  1079.   #--------------------------------------------------------------------------
  1080.   # ● Y方向 ポジション 取得 (陣形スクリプト拡張用)
  1081.   #--------------------------------------------------------------------------
  1082.   def position2
  1083.     return self.index
  1084.   end
  1085.   #--------------------------------------------------------------------------
  1086.   # ● 武器アニメタイプ
  1087.   #--------------------------------------------------------------------------
  1088.   def weapon_anime_type(type)
  1089.     file_name  = weapon_anime_type0(type)
  1090.     visible   = weapon_anime_type1(type)
  1091.     z         = weapon_anime_type2(type)
  1092.     return [file_name,visible,z]
  1093.   end
  1094.   # 武器アイコン取得
  1095.   def weapon_anime_type0(type)
  1096.     type = ANIME[type][5]
  1097.     return weapon_anime1 if type == "右手"
  1098.     return weapon_anime2 if type == "左手"
  1099.     return nil
  1100.   end
  1101.   # 表示?非表示の取得
  1102.   def weapon_anime_type1(type)
  1103.     return ANIME[type][3]
  1104.   end
  1105.   # バトラーより上に表示するかどうか
  1106.   def weapon_anime_type2(type)
  1107.     type = ANIME[type][5]
  1108.     return true if type == "左手"
  1109.     return false
  1110.   end
  1111.   #--------------------------------------------------------------------------
  1112.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1113.   #--------------------------------------------------------------------------
  1114.   def true_x
  1115.     return PARTY_X + position * FORMATION_X + @ox
  1116.   end
  1117.   #--------------------------------------------------------------------------
  1118.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1119.   #--------------------------------------------------------------------------
  1120.   def true_y
  1121.     # パーティ内の並び順から Y 座標を計算して返す
  1122.     if self.index != nil
  1123.       y = position2 * FORMATION_Y + PARTY_Y + @oy - @height / 2
  1124.       return y
  1125.     else
  1126.       return 0
  1127.     end
  1128.   end
  1129.   #--------------------------------------------------------------------------
  1130.   # ● バトル画面 X 座標の取得
  1131.   #--------------------------------------------------------------------------
  1132.   def screen_x(true_x = self.true_x)
  1133.     return 320 + (true_x - 320) * @real_zoom + @real_x
  1134.   end
  1135.   #--------------------------------------------------------------------------
  1136.   # ● バトル画面 Y 座標の取得
  1137.   #--------------------------------------------------------------------------
  1138.   def screen_y(true_y = self.true_y)
  1139.     return true_y * @real_zoom + @real_y
  1140.   end
  1141.   #--------------------------------------------------------------------------
  1142.   # ● バトル画面 Z 座標の取得
  1143.   #--------------------------------------------------------------------------
  1144.   def screen_z
  1145.     return screen_y + 1000
  1146.   end
  1147.   #--------------------------------------------------------------------------
  1148.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1149.   #--------------------------------------------------------------------------
  1150.   def base_x
  1151.     return 320 + (true_x - @ox - 320) * @real_zoom + @real_x
  1152.   end
  1153.   #--------------------------------------------------------------------------
  1154.   # ● バトル画面 Y 座標の取得
  1155.   #--------------------------------------------------------------------------
  1156.   def base_y
  1157.     return (true_y - @oy) * @real_zoom + @real_y
  1158.   end
  1159.   #--------------------------------------------------------------------------
  1160.   # ● バトル画面 拡大率の取得
  1161.   #--------------------------------------------------------------------------
  1162.   def zoom
  1163.     return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) *
  1164.                           (true_x + @fly) / 480 + $scene.zoom_rate[0]
  1165.   end
  1166.   #--------------------------------------------------------------------------
  1167.   # ● 攻撃用、バトル画面 X 座標の取得
  1168.   #--------------------------------------------------------------------------
  1169.   def attack_x(z)
  1170.     return (320 - true_x) * z * 0.75
  1171.   end
  1172.   #--------------------------------------------------------------------------
  1173.   # ● 攻撃用、バトル画面 Y 座標の取得
  1174.   #--------------------------------------------------------------------------
  1175.   def attack_y(z)
  1176.     return (160 - (true_y + fly / 4) * z + @height * zoom * z / 2) * 0.75
  1177.   end
  1178.   #--------------------------------------------------------------------------
  1179.   # ● 閃き待ち時間
  1180.   #--------------------------------------------------------------------------
  1181.   def flash_duration
  1182.     return $scene.flash_duration
  1183.   end
  1184.   #--------------------------------------------------------------------------
  1185.   # ● アニメーション取得
  1186.   #--------------------------------------------------------------------------
  1187.   def battle_actions1
  1188.     weapon = $data_weapons[@weapon_id]
  1189.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1190.   end
  1191.   #--------------------------------------------------------------------------
  1192.   # ● アニメーション取得
  1193.   #--------------------------------------------------------------------------
  1194.   def battle_actions2
  1195.     weapon = $data_weapons[@weapon2_id]
  1196.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1197.   end
  1198.   #--------------------------------------------------------------------------
  1199.   # ● 武器アニメーション取得
  1200.   #--------------------------------------------------------------------------
  1201.   def weapon_anime1
  1202.     weapon = $data_weapons[@weapon_id]
  1203.     return weapon != nil ? weapon.icon_name : ""
  1204.   end
  1205.   #--------------------------------------------------------------------------
  1206.   # ● 武器アニメーション取得
  1207.   #--------------------------------------------------------------------------
  1208.   def weapon_anime2
  1209.     weapon = $data_weapons[@weapon2_id]
  1210.     return weapon != nil ? weapon.icon_name : ""
  1211.   end
  1212.   #--------------------------------------------------------------------------
  1213.   # ● 遠距離アニメーション取得
  1214.   #--------------------------------------------------------------------------
  1215.   def flying_anime1
  1216.     weapon = $data_weapons[@weapon_id]
  1217.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1218.   end
  1219.   #--------------------------------------------------------------------------
  1220.   # ● 遠距離アニメーション取得
  1221.   #--------------------------------------------------------------------------
  1222.   def flying_anime2
  1223.     weapon = $data_weapons[@weapon2_id]
  1224.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1225.   end
  1226.   #--------------------------------------------------------------------------
  1227.   # ● 移動目標座標の計算
  1228.   #--------------------------------------------------------------------------
  1229.   def move_setup
  1230.     if RTAB
  1231.       targets = @target
  1232.     else
  1233.       targets = $scene.target_battlers
  1234.     end
  1235.     case @move_action[0]
  1236.     when "self" # 自分
  1237.       @target_x = self.base_x
  1238.       @target_y = self.base_y
  1239.     when "target_near" # 一番近くのターゲット
  1240.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1241.       targets.reverse!
  1242.       if targets != []
  1243.         @target_x = targets[0].screen_x
  1244.         @target_y = targets[0].screen_y
  1245.       else
  1246.         @target_x = self.base_x
  1247.         @target_y = self.base_y
  1248.       end
  1249.     when "target_far" # 一番遠くのターゲット
  1250.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1251.       if targets != []
  1252.         @target_x = targets[0].screen_x
  1253.         @target_y = targets[0].screen_y
  1254.       else
  1255.         @target_x = self.base_x
  1256.         @target_y = self.base_y
  1257.       end
  1258.     when "target" # ターゲット中央
  1259.       @target_x = 0
  1260.       @target_y = 0
  1261.       for t in targets
  1262.         @target_x += t.screen_x
  1263.         @target_y += t.screen_y
  1264.       end
  1265.       if targets != []
  1266.         @target_x /= targets.size
  1267.         @target_y /= targets.size
  1268.       end
  1269.     when "troop" # "トループ中央"
  1270.       @target_x = 0
  1271.       @target_y = 0
  1272.       for t in $game_troop.enemies
  1273.         @target_x += t.screen_x
  1274.         @target_y += t.screen_y
  1275.       end
  1276.       if $game_troop.enemies != []
  1277.         @target_x /= $game_troop.enemies.size
  1278.         @target_y /= $game_troop.enemies.size
  1279.       end
  1280.     when "party" # "パーティ中央"
  1281.       @target_x = 0
  1282.       @target_y = 0
  1283.       for t in $game_party.actors
  1284.         @target_x += t.screen_x
  1285.         @target_y += t.screen_y
  1286.       end
  1287.       if $game_party.actors != []
  1288.         @target_x /= $game_party.actors.size
  1289.         @target_y /= $game_party.actors.size
  1290.       end
  1291.     when "screen" # "画面"
  1292.       @target_x = self.base_x
  1293.       @target_y = self.base_y
  1294.     end
  1295.     # 補正
  1296.     @target_x += @move_action[1] - self.base_x
  1297.     @target_y += @move_action[2] - self.base_y
  1298.     # 移動目標の座標をセット
  1299.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1300.     # 距離の計算(ウエイトの設定)
  1301.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1302.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1303.   end
  1304. end
  1305. #==============================================================================
  1306. # ■ Game_Enemy
  1307. #==============================================================================
  1308. class Game_Enemy < Game_Battler
  1309.   #--------------------------------------------------------------------------
  1310.   # ● セットアップ
  1311.   #--------------------------------------------------------------------------
  1312.   alias side_view_initialize initialize
  1313.   def initialize(troop_id, member_index)
  1314.     side_view_initialize(troop_id, member_index)
  1315.     start_battle
  1316.   end
  1317.   #--------------------------------------------------------------------------
  1318.   # ● 移動
  1319.   #--------------------------------------------------------------------------
  1320.   def move
  1321.     # 距離の計算
  1322.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1323.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1324.     if @move_distance > 0
  1325.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  1326.       array = @move_coordinates
  1327.       # ジャンプ補正値の計算
  1328.       if @move_distance - @move_wait > @move_distance / 2
  1329.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2
  1330.       else
  1331.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  1332.       end
  1333.       jump = @move_action[4] > 0 ? -jump : jump
  1334.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  1335.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  1336.       # ウエイト
  1337.       @move_wait -= @move_action[3]
  1338.       @move_wait = [@move_wait,0].max
  1339.     end
  1340.   end
  1341.   #--------------------------------------------------------------------------
  1342.   # ● 移動目標座標の計算
  1343.   #--------------------------------------------------------------------------
  1344.   def move_setup
  1345.     if RTAB
  1346.       targets = @target
  1347.     else
  1348.       targets = $scene.target_battlers
  1349.     end
  1350.     case @move_action[0]
  1351.     when "self" # 自分
  1352.       @target_x = self.base_x
  1353.       @target_y = self.base_y
  1354.     when "target_near" # 一番近くのターゲット
  1355.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1356.       if targets != []
  1357.         @target_x = targets[0].screen_x
  1358.         @target_y = targets[0].screen_y
  1359.       else
  1360.         @target_x = self.base_x
  1361.         @target_y = self.base_y
  1362.       end
  1363.     when "target_far" # 一番遠くのターゲット
  1364.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1365.       targets.reverse!
  1366.       if targets != []
  1367.         @target_x = targets[0].screen_x
  1368.         @target_y = targets[0].screen_y
  1369.       else
  1370.         @target_x = self.base_x
  1371.         @target_y = self.base_y
  1372.       end
  1373.     when "target" # ターゲット中央
  1374.       @target_x = 0
  1375.       @target_y = 0
  1376.       for t in targets
  1377.         @target_x += t.screen_x
  1378.         @target_y += t.screen_y
  1379.       end
  1380.       if targets != []
  1381.         @target_x /= targets.size
  1382.         @target_y /= targets.size
  1383.       end
  1384.     when  "party" # "トループ中央"
  1385.       @target_x = 0
  1386.       @target_y = 0
  1387.       for t in $game_troop.enemies
  1388.         @target_x += t.screen_x
  1389.         @target_y += t.screen_y
  1390.       end
  1391.       if $game_troop.enemies != []
  1392.         @target_x /= $game_troop.enemies.size
  1393.         @target_y /= $game_troop.enemies.size
  1394.       end
  1395.     when "troop" # "パーティ中央"
  1396.       @target_x = 0
  1397.       @target_y = 0
  1398.       for t in $game_party.actors
  1399.         @target_x += t.screen_x
  1400.         @target_y += t.screen_y
  1401.       end
  1402.       if $game_party.actors != []
  1403.         @target_x /= $game_party.actors.size
  1404.         @target_y /= $game_party.actors.size
  1405.       end
  1406.     when "screen" # "画面"
  1407.       @target_x = self.base_x
  1408.       @target_y = self.base_y
  1409.     end
  1410.     # 補正
  1411.     @target_x -= @move_action[1] + self.base_x
  1412.     @target_y -= @move_action[2] + self.base_y
  1413.     # 移動目標の座標をセット
  1414.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1415.     # 距離の計算(ウエイトの設定)
  1416.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1417.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1418.   end
  1419.   if RTAB
  1420.   alias original_x true_x
  1421.   alias original_y true_y
  1422.   else
  1423.   alias original_x screen_x
  1424.   alias original_y screen_y
  1425.   end
  1426.   #--------------------------------------------------------------------------
  1427.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1428.   #--------------------------------------------------------------------------
  1429.   def true_x
  1430.     return original_x + @ox
  1431.   end
  1432.   #--------------------------------------------------------------------------
  1433.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1434.   #--------------------------------------------------------------------------
  1435.   def true_y
  1436.     return original_y - @height / 2 + @oy
  1437.   end
  1438.   #--------------------------------------------------------------------------
  1439.   # ● バトル画面 X 座標の取得
  1440.   #--------------------------------------------------------------------------
  1441.   def screen_x(true_x = self.true_x)
  1442.     return true_x * @real_zoom + @real_x
  1443.   end
  1444.   #--------------------------------------------------------------------------
  1445.   # ● バトル画面 Y 座標の取得
  1446.   #--------------------------------------------------------------------------
  1447.   def screen_y(true_y = self.true_y)
  1448.     return true_y * @real_zoom + @real_y
  1449.   end
  1450.   #--------------------------------------------------------------------------
  1451.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1452.   #--------------------------------------------------------------------------
  1453.   def base_x(true_x = self.true_x)
  1454.     return (true_x - @ox) * @real_zoom + @real_x
  1455.   end
  1456.   #--------------------------------------------------------------------------
  1457.   # ● バトル画面 Y 座標の取得(移動などしていない場合)
  1458.   #--------------------------------------------------------------------------
  1459.   def base_y(true_y = self.true_y)
  1460.     return (true_y - @oy) * @real_zoom + @real_y
  1461.   end
  1462. end
  1463. #==============================================================================
  1464. # ■ Game_Party
  1465. #==============================================================================
  1466. class Game_Party
  1467.   #--------------------------------------------------------------------------
  1468.   # ● アクターを加える
  1469.   #     actor_id : アクター ID
  1470.   #--------------------------------------------------------------------------
  1471.   alias side_view_add_actor add_actor
  1472.   def add_actor(actor_id)
  1473.     # アクターを取得
  1474.     actor = $game_actors[actor_id]
  1475.     # サイドビューデータの初期化
  1476.     actor.start_battle
  1477.     # 戻す
  1478.     side_view_add_actor(actor_id)
  1479.   end
  1480. end
  1481. #==============================================================================
  1482. # ■ Scene_Battle
  1483. #==============================================================================
  1484. class Scene_Battle
  1485.   include Side_view
  1486.   #--------------------------------------------------------------------------
  1487.   # ● 公開インスタンス変数
  1488.   #--------------------------------------------------------------------------
  1489.   attr_reader   :phase            # フェーズ
  1490.   attr_reader   :phase4_step      # フェーズ4ステップ
  1491.   attr_reader   :active_battler   # 対象の配列
  1492.   attr_reader   :target_battlers  # 対象の配列
  1493.   attr_reader   :animation1_id    # 行動アニメID
  1494.   attr_reader   :animation2_id    # 対象アニメID
  1495.   #--------------------------------------------------------------------------
  1496.   # ● メイン処理
  1497.   #--------------------------------------------------------------------------
  1498.   alias side_view_main main
  1499.   def main
  1500.     # バトラー初期化
  1501.     for battler in $game_party.actors + $game_troop.enemies
  1502.       battler.start_battle
  1503.     end
  1504.     # 戻す
  1505.     side_view_main
  1506.   end
  1507.   #--------------------------------------------------------------------------
  1508.   # ● 閃き判定
  1509.   #--------------------------------------------------------------------------
  1510.   def flash?
  1511.     return @flash_flag ? true : false
  1512.   end  
  1513.   #--------------------------------------------------------------------------
  1514.   # ● 閃きアニメ待ち時間取得
  1515.   #--------------------------------------------------------------------------
  1516.   def flash_duration
  1517.     animation = nil
  1518.     if FLASH_ANIME
  1519.       animation = $data_animations[FLASH_ANIMATION_ID]
  1520.     end
  1521.     return animation != nil ? animation.frame_max * 2 + 2 : 0
  1522.   end
  1523.   #--------------------------------------------------------------------------
  1524.   # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  1525.   #--------------------------------------------------------------------------
  1526.   alias side_view_update_phase4_step2 update_phase4_step2
  1527.   def update_phase4_step2(*arg)
  1528.     battler = convert_battler2(*arg)
  1529.     battler.action
  1530.     side_view_update_phase4_step2(*arg)
  1531.   end
  1532.   #--------------------------------------------------------------------------
  1533.   # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  1534.   #--------------------------------------------------------------------------
  1535.   alias side_view_update_phase4_step3 update_phase4_step3
  1536.   def update_phase4_step3(*arg)
  1537.     battler = convert_battler2(*arg)
  1538.   #  return if !battler.animation1_on and battler.action? and !battler.flash?
  1539.     if battler.flash? and FLASH_ANIME
  1540.       battler.flash_flag["normal"] = true
  1541.     end
  1542.     side_view_update_phase4_step3(*arg)
  1543.   end
  1544.   #--------------------------------------------------------------------------
  1545.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  1546.   #--------------------------------------------------------------------------
  1547.   alias side_view_update_phase4_step4 update_phase4_step4
  1548.   def update_phase4_step4(*arg)
  1549.     battler = convert_battler2(*arg)
  1550.     targets = RTAB ? battler.target : @target_battlers
  1551.   #  return if !battler.animation2_on and battler.action?
  1552.     side_view_update_phase4_step4(*arg)
  1553.     for target in targets
  1554.       if RTAB
  1555.         value = nil
  1556.         if target.damage_sp.include?(battler)
  1557.           value = target.damage_sp[battler]
  1558.         end
  1559.         if target.damage.include?(battler)
  1560.           if value == nil or value == "Miss"
  1561.             value = target.damage[battler]
  1562.           elsif value.is_a?(Numeric) && value > 0
  1563.             value = target.damage[battler] == "Miss" ? value : target.damage[battler]
  1564.           end
  1565.         end
  1566.       else
  1567.         value = target.damage
  1568.       end
  1569.       if target.is_a?(Game_Actor)
  1570.         # ダメージの場合
  1571.         if value.is_a?(Numeric) && value > 0
  1572.           # シェイクを開始
  1573.           target.shake = true
  1574.         end
  1575.       elsif target.is_a?(Game_Enemy)
  1576.         # ダメージの場合
  1577.         if value.is_a?(Numeric) && value > 0
  1578.           # シェイクを開始
  1579.           target.shake = true
  1580.         end
  1581.       end
  1582.     end
  1583.   end
  1584.   #--------------------------------------------------------------------------
  1585.   # ● プレバトルフェーズ開始
  1586.   #--------------------------------------------------------------------------
  1587.   alias start_phase1_correct start_phase1
  1588.   def start_phase1
  1589.     # カメラの設定
  1590.     # 元々フロントビュー向けの数値になっているため
  1591.     @zoom_rate = [1.0, 1.0]
  1592.     start_phase1_correct
  1593.   end
  1594.   #--------------------------------------------------------------------------
  1595.   # ● アクターコマンドフェーズ開始
  1596.   #--------------------------------------------------------------------------
  1597.   alias start_phase3_correct start_phase3
  1598.   def start_phase3
  1599.     battler = convert_battler
  1600.     start_phase3_correct
  1601.    #if RTAB
  1602.       ## カメラの設定
  1603.    #  # 元々フロントビュー向けの数値になっているため
  1604.    #  @camera = "command"
  1605.    #  @spriteset.screen_target(0, 0, 1.0)
  1606.   # end
  1607.   end
  1608. end

  1609. class Spriteset_Battle
  1610.   include Side_view
  1611.   #--------------------------------------------------------------------------
  1612.   # ● オブジェクト初期化
  1613.   #--------------------------------------------------------------------------
  1614.   alias side_veiw_initialize initialize
  1615.   def initialize
  1616.     side_veiw_initialize
  1617.     # アクタースプライトを解放
  1618.     for sprite in @actor_sprites
  1619.       sprite.dispose
  1620.     end
  1621.     # アクタースプライトを作成
  1622.     @actor_sprites = []
  1623.     for i in 1..Party_max
  1624.       @actor_sprites.push(Sprite_Battler.new(@viewport1))
  1625.     end
  1626.     update
  1627.   end
  1628.   #--------------------------------------------------------------------------
  1629.   # ● 画面のスクロール
  1630.   #--------------------------------------------------------------------------
  1631.   if method_defined?("screen_scroll")
  1632.   alias side_view_screen_scroll screen_scroll
  1633.   def screen_scroll
  1634.     side_view_screen_scroll
  1635.     # アクターの位置補正
  1636.     for actor in $game_party.actors
  1637.       actor.real_x = @real_x
  1638.       actor.real_y = @real_y
  1639.       actor.real_zoom = @real_zoom
  1640.     end
  1641.   end
  1642.   end
  1643. end

  1644. class Sprite_Battler < RPG::Sprite
  1645.   include Side_view
  1646.   #--------------------------------------------------------------------------
  1647.   # ● オブジェクト初期化
  1648.   #     viewport : ビューポート
  1649.   #     battler  : バトラー (Game_Battler)
  1650.   #--------------------------------------------------------------------------
  1651.   def initialize(viewport, battler = nil)
  1652.     super(viewport)
  1653.     @battler = battler
  1654.     @battler_visible = false
  1655.     @weapon = Sprite_Weapon.new(viewport, battler)
  1656.     @flying = Sprite_Flying.new(viewport, battler)
  1657.     @shadow = []
  1658.     @fly = 0
  1659.     @fly_direction = 1
  1660.     @rand = rand(10)
  1661.     self.effect_clear
  1662.   end
  1663.   #--------------------------------------------------------------------------
  1664.   # ● 解放
  1665.   #--------------------------------------------------------------------------
  1666.   alias side_view_dispose dispose
  1667.   def dispose
  1668.     side_view_dispose
  1669.     @weapon.dispose
  1670.     @flying.dispose
  1671.     if @_target_sprite != nil
  1672.       @_target_sprite.bitmap.dispose
  1673.       @_target_sprite.dispose
  1674.       @_target_sprite = nil
  1675.     end
  1676.   end
  1677.   #--------------------------------------------------------------------------
  1678.   # ● フレーム更新
  1679.   #--------------------------------------------------------------------------
  1680.   def update
  1681.     super
  1682.     # バトラーが nil の場合
  1683.     if @battler == nil
  1684.       self.bitmap = nil
  1685.       @weapon.bitmap = nil
  1686.       loop_animation(nil)
  1687.       return
  1688.     end
  1689.     # バトラー更新
  1690.     @battler.update
  1691.     # バトラーアニメのデータ取得
  1692.     @anime_type = @battler.anime_type
  1693.     # ファイル名か色相が現在のものと異なる場合
  1694.     if @battler.is_a?(Game_Actor)
  1695.       change = (@battler.character_name != @battler_name or @battler.character_hue != @battler_hue)
  1696.     elsif @battler.is_a?(Game_Enemy)
  1697.       change = (@battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue)
  1698.     else
  1699.       return
  1700.     end
  1701.     if change
  1702.       # ビットマップを取得、設定
  1703.       if @battler.is_a?(Game_Actor)
  1704.         @battler_name = @battler.character_name
  1705.         @battler_hue = @battler.character_hue
  1706.         self.bitmap = RPG::Cache.character(@battler_name, @battler_hue)
  1707.         @width = bitmap.width / 4
  1708.         @height = bitmap.height / 4
  1709.       else
  1710.         @battler_name = @battler.battler_name
  1711.         @battler_hue = @battler.battler_hue
  1712.         self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  1713.         @width = bitmap.width
  1714.         @height = bitmap.height
  1715.       end
  1716.       self.ox = @width / 2
  1717.       self.oy = @height / 2
  1718.       @battler.height = @height
  1719.       @flag = true
  1720.       # 戦闘不能または隠れ状態なら不透明度を 0 にする
  1721.       if @battler.dead? or @battler.hidden
  1722.         self.opacity = 0
  1723.       end
  1724.     end
  1725.     if @battler.is_a?(Game_Actor) and
  1726.       (@battler.anime_type != @anime_type or @battler.pattern != @pattern or @flag)
  1727.       # ビットマップを取得、設定
  1728.       @pattern = @battler.pattern
  1729.       self.ox = @width / 2
  1730.       self.oy = @height / 2
  1731.       @sx = @pattern * @width
  1732.       @sy = @anime_type % 4 * @height
  1733.       self.src_rect.set(@sx, @sy, @width, @height)
  1734.       self.zoom_x = CHAR_ZOOM
  1735.       self.zoom_y = CHAR_ZOOM
  1736.       @battler.height = @height
  1737.       @flag = false
  1738.     end
  1739.     # 飛行
  1740.     update_fly
  1741.     # シェイク
  1742.     update_shake
  1743.     # 回転
  1744.     update_turning
  1745.     # 反転
  1746.     update_reverse   
  1747.     # 移動
  1748.     update_moving
  1749.     # 追加アニメ
  1750.     update_add_anime
  1751.     # エフェクト効果の適用
  1752.     update_effect
  1753.     # アニメーション ID が現在のものと異なる場合
  1754.     flag = RTAB ? true : @battler.damage == nil
  1755.     if flag and @battler.state_animation_id != @state_animation_id
  1756.       @state_animation_id = @battler.state_animation_id
  1757.       loop_animation($data_animations[@state_animation_id])
  1758.     end
  1759.     # シェイク
  1760.     if @battler.shake
  1761.       self.start_shake(5, 5, 5)
  1762.       @battler.shake = false
  1763.     end
  1764.     # 明滅
  1765.     if @battler.blink
  1766.       blink_on
  1767.     else
  1768.       blink_off
  1769.     end
  1770.     # 不可視の場合
  1771.     unless @battler_visible
  1772.       flag = RTAB ? (@battler.damage.size < 2 or @battler.damage_pop.size < 2) :
  1773.                     (@battler.damage == nil or @battler.damage_pop)
  1774.       # 出現
  1775.       if not @battler.hidden and not @battler.dead? and flag
  1776.         appear
  1777.         @battler_visible = true
  1778.       end
  1779.     end
  1780.     if RTAB
  1781.     # ダメージ
  1782.     for battler in @battler.damage_pop
  1783.       if battler[0].class == Array
  1784.         if battler[0][1] >= 0
  1785.           $scene.skill_se
  1786.         else
  1787.           $scene.levelup_se
  1788.         end
  1789.         damage(@battler.damage[battler[0]], false, 2)
  1790.       else
  1791.         damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
  1792.       end
  1793.       if @battler.damage_sp.include?(battler[0])
  1794.         damage(@battler.damage_sp[battler[0]],
  1795.                 @battler.critical[battler[0]], 1)
  1796.         @battler.damage_sp.delete(battler[0])
  1797.       end
  1798.       @battler.damage_pop.delete(battler[0])
  1799.       @battler.damage.delete(battler[0])
  1800.       @battler.critical.delete(battler[0])
  1801.     end
  1802.     end
  1803.     # 可視の場合
  1804.     if @battler_visible
  1805.       # 武器アニメ
  1806.       @weapon.battler = @battler
  1807.       @weapon.update
  1808.       # 遠距離アニメ
  1809.       @flying.battler = @battler
  1810.       @flying.update
  1811.       # 逃走
  1812.       if @battler.hidden
  1813.         $game_system.se_play($data_system.escape_se)
  1814.         escape
  1815.         @battler_visible = false
  1816.       end
  1817.       # 白フラッシュ
  1818.       if @battler.white_flash
  1819.         whiten
  1820.         @battler.white_flash = false
  1821.       end
  1822.       if RTAB
  1823.       # アニメーション
  1824.       if [email protected]?
  1825.         for animation in @battler.animation.reverse
  1826.           if animation[2]
  1827.             animation($data_animations[animation[0]], animation[1], true)
  1828.           else
  1829.             animation($data_animations[animation[0]], animation[1])
  1830.           end
  1831.           @battler.animation.delete(animation)
  1832.         end
  1833.       end
  1834.       else
  1835.       # アニメーション
  1836.       if @battler.animation_id != 0
  1837.         animation = $data_animations[@battler.animation_id]
  1838.         animation(animation, @battler.animation_hit)
  1839.         @battler.animation_id = 0
  1840.       end
  1841.       end
  1842.       # ダメージ
  1843.       if !RTAB and @battler.damage_pop
  1844.         damage(@battler.damage, @battler.critical)
  1845.         @battler.damage = nil
  1846.         @battler.critical = false
  1847.         @battler.damage_pop = false
  1848.       end
  1849.       flag = RTAB ? (@battler.damage.empty? and $scene.dead_ok?(@battler)) :
  1850.                      @battler.damage == nil
  1851.       # コラプス
  1852.       if flag and @battler.dead?
  1853.         if @battler.is_a?(Game_Actor)
  1854.           $game_system.se_play($data_system.actor_collapse_se)
  1855.         elsif @battler.is_a?(Game_Enemy)
  1856.           $game_system.se_play($data_system.enemy_collapse_se)
  1857.         end
  1858.         collapse
  1859.         @battler_visible = false
  1860.       end
  1861.     end
  1862.     # スプライトの座標を設定
  1863.     self.x = @battler.screen_x + @effect_ox
  1864.     self.y = @battler.screen_y + @effect_oy
  1865.     self.z = @battler.screen_z
  1866.     self.zoom_x = @battler.real_zoom
  1867.     self.zoom_y = @battler.real_zoom
  1868.     # ウェイトカウントを減らす
  1869.     @battler.wait_count -= 1
  1870.     @battler.wait_count2 -= 1
  1871.     # アニメーション待ち時間取得
  1872.     @battler.animation_duration = @_animation_duration
  1873.     if @battler.is_a?(Game_Actor)
  1874.       self.zoom_x *= CHAR_ZOOM
  1875.       self.zoom_y *= CHAR_ZOOM
  1876.       @weapon.x = self.x + 2
  1877.       @weapon.y = self.y + 6
  1878.       @weapon.angle = 75 - (4 - @battler.pattern) * 45
  1879.       if self.mirror
  1880.         @weapon.angle += @weapon.angle - 180
  1881.       end
  1882.     end
  1883.     # 残像
  1884.     if @battler.shadow
  1885.       if Graphics.frame_count % 2 == 0
  1886.         shadow = ::Sprite.new(self.viewport)
  1887.         shadow.bitmap = self.bitmap.dup
  1888.         shadow.x = self.x
  1889.         shadow.y = self.y
  1890.         shadow.ox = self.ox
  1891.         shadow.oy = self.oy
  1892.         shadow.mirror = self.mirror
  1893.         shadow.angle = self.angle
  1894.         shadow.opacity = 160
  1895.         shadow.zoom_x = self.zoom_x
  1896.         shadow.zoom_y = self.zoom_y
  1897.         if @battler.is_a?(Game_Actor)
  1898.           shadow.src_rect.set(@sx, @sy, @width, @height)
  1899.         else
  1900.           shadow.src_rect.set(0, 0, @width, @height)
  1901.         end
  1902.         @shadow.push([shadow,duration = 10,@battler.true_x + @effect_ox,@battler.true_y + @effect_oy])
  1903.       end
  1904.     end
  1905.     for s in @shadow
  1906.       if !s[0].disposed?
  1907.         s[0].update
  1908.         s[1] -= 1
  1909.         if s[1] < 1
  1910.           if s[0].bitmap != nil
  1911.             s[0].bitmap.dispose
  1912.           end
  1913.           s[0].dispose
  1914.         else
  1915.           s[0].x = @battler.screen_x(s[2])
  1916.           s[0].y = @battler.screen_y(s[3])
  1917.         end
  1918.       else
  1919.         s = nil
  1920.       end
  1921.     end
  1922.     @shadow.compact!
  1923.   end
  1924.   #--------------------------------------------------------------------------
  1925.   # ● エフェクトによる座標系の更新
  1926.   #--------------------------------------------------------------------------
  1927.   def update_effect
  1928.     # 角度の修正
  1929.     if @_upside_down
  1930.       self.angle = (@_turning + 180) % 360
  1931.     else
  1932.       self.angle = @_turning
  1933.     end
  1934.     # X 座標の修正値
  1935.     @effect_ox = @_shake + @_moving[0]
  1936.     # Y 座標の修正値
  1937.     @effect_oy = -@fly + @_moving[1]
  1938.     if  @_animation == nil or (RTAB and @_animation.empty?)
  1939.       self.effect_clear
  1940.     end
  1941.   end
  1942.   #--------------------------------------------------------------------------
  1943.   # ● シェイク更新
  1944.   #--------------------------------------------------------------------------
  1945.   def update_shake
  1946.     if @_shake_duration >= 1 or @_shake != 0
  1947.       delta = (@_shake_power * @_shake_speed * @_shake_direction) / 10.0
  1948.       if @_shake_duration <= 1 and @_shake * (@_shake + delta) < 0
  1949.         @_shake = 0
  1950.       else
  1951.         @_shake += delta
  1952.       end
  1953.       if @_shake > @_shake_power * 2
  1954.         @_shake_direction = -1
  1955.       end
  1956.       if @_shake < - @_shake_power * 2
  1957.         @_shake_direction = 1
  1958.       end
  1959.       if @_shake_duration >= 1
  1960.         @_shake_duration -= 1
  1961.       end
  1962.     end
  1963.   end
  1964.   #--------------------------------------------------------------------------
  1965.   # ● 飛行更新
  1966.   #--------------------------------------------------------------------------
  1967.   def update_fly
  1968.     if @rand > 0
  1969.       @rand -= 1
  1970.       return
  1971.     end
  1972.     if @battler.fly != 0
  1973.       if @fly < @battler.fly / 4
  1974.         @fly_direction = 1
  1975.       elsif @fly > @battler.fly / 2
  1976.         @fly_direction = -1
  1977.       end
  1978.       @fly += 0.5 * @fly_direction
  1979.     end
  1980.   end
  1981.   #--------------------------------------------------------------------------
  1982.   # ● 回転更新
  1983.   #--------------------------------------------------------------------------
  1984.   def update_turning
  1985.     if @_turning_duration > 0 or @_turning != 0
  1986.       @_turning += @_turning_direction * @_turning_speed / 2.0
  1987.       # 残り回転数を減らす
  1988.       if @_turning_direction == -1
  1989.         if @_turning_duration > 0 and @_turning < 0
  1990.           @_turning_duration -= 1
  1991.         end
  1992.       elsif @_turning_direction == 1
  1993.         if @_turning_duration > 0 and @_turning >= 360
  1994.           @_turning_duration -= 1
  1995.         end
  1996.       end
  1997.       # 以下補正
  1998.       while @_turning < 0
  1999.         @_turning += 360
  2000.       end
  2001.       if @_turning_duration <= 0
  2002.         @_turning = 0
  2003.       end
  2004.       @_turning %= 360
  2005.     end
  2006.   end
  2007.   #--------------------------------------------------------------------------
  2008.   # ● 左右反転更新
  2009.   #--------------------------------------------------------------------------
  2010.   def update_reverse
  2011.     if @last_reverse != (@_reverse or @battler.reverse)
  2012.       self.mirror = (@_reverse or @battler.reverse)
  2013.       @last_reverse = (@_reverse or @battler.reverse)
  2014.     end
  2015.   end
  2016.   #--------------------------------------------------------------------------
  2017.   # ● 移動更新
  2018.   #--------------------------------------------------------------------------
  2019.   def update_moving
  2020.     @move_distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2021.                      (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2022.     if @move_distance > 0
  2023.       return if @_moving[0] == @_move_coordinates[0] and @_moving[1] == @_move_coordinates[1]
  2024.       array = @_move_coordinates
  2025.       x = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2026.       y = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2027.       @_moving = [x, y]
  2028.       if @_move_quick_return and @_move_duration == 0
  2029.         @_move_coordinates = [0,0,array[0],array[1]]
  2030.         @_move_duration = @move_distance
  2031.       end
  2032.       @_move_duration -= @_move_speed
  2033.       @_move_duration = [@_move_duration, 0].max
  2034.     end
  2035.   end
  2036.   #--------------------------------------------------------------------------
  2037.   # ● 追加アニメ更新 (RTAB限定機能)
  2038.   #--------------------------------------------------------------------------
  2039.   def update_add_anime
  2040.     if RTAB
  2041.     # アニメーション
  2042.     if @_add_anime_id != 0
  2043.       animation = $data_animations[@_add_anime_id]
  2044.       animation(animation, true)
  2045.       @_add_anime_id = 0
  2046.     end
  2047.     end
  2048.   end
  2049.   #--------------------------------------------------------------------------
  2050.   # ● エフェクト初期化
  2051.   #--------------------------------------------------------------------------
  2052.   def effect_clear
  2053.     @_effect_ox = 0
  2054.     @_effect_oy = 0
  2055.     @_shake_power = 0
  2056.     @_shake_speed = 0
  2057.     @_shake_duration = 0
  2058.     @_shake_direction = 1
  2059.     @_shake = 0
  2060.     @_upside_down = false
  2061.     @_reverse = false
  2062.     @_turning_direction = 1
  2063.     @_turning_speed = 0
  2064.     @_turning_duration = 0
  2065.     @_turning = 0
  2066.     @_move_quick_return = true
  2067.     @_move_speed = 0
  2068.     @_move_coordinates = [0,0,0,0]
  2069.     @_move_jump = false
  2070.     @_move_duration = 0
  2071.     @_moving = [0,0]
  2072.     @_add_anime_id = 0
  2073.   end
  2074.   #--------------------------------------------------------------------------
  2075.   # ● シェイクの開始
  2076.   #     power    : 強さ
  2077.   #     speed    : 速さ
  2078.   #     duration : 時間
  2079.   #--------------------------------------------------------------------------
  2080.   def start_shake(power, speed, duration)
  2081.     @_shake_power = power
  2082.     @_shake_speed = speed
  2083.     @_shake_duration = duration
  2084.   end
  2085.   #--------------------------------------------------------------------------
  2086.   # ● 上下反転を開始
  2087.   #--------------------------------------------------------------------------
  2088.   def start_upside_down
  2089.     @_upside_down = @_upside_down ? false : true
  2090.   end
  2091.   #--------------------------------------------------------------------------
  2092.   # ● 左右反転を開始
  2093.   #--------------------------------------------------------------------------
  2094.   def start_reverse
  2095.     @_reverse = @_reverse ? false : true
  2096.   end
  2097.   #--------------------------------------------------------------------------
  2098.   # ● 回転を開始
  2099.   #     direction: 方向
  2100.   #     speed    : 速さ
  2101.   #     duration : 時間
  2102.   #--------------------------------------------------------------------------
  2103.   def start_turning(direction, speed, duration)
  2104.     @_turning_direction = direction
  2105.     @_turning_speed = speed
  2106.     @_turning_duration = duration
  2107.     @_turning = @_turning_direction == 1 ? 0 : 360
  2108.   end
  2109.   #--------------------------------------------------------------------------
  2110.   # ● 移動を開始
  2111.   #     quick_return : 戻るかどうか
  2112.   #     speed        : 速さ
  2113.   #     x            : X 座標
  2114.   #     y            : Y 座標
  2115.   #--------------------------------------------------------------------------
  2116.   def start_moving(quick_return, speed, x, y)
  2117.     @_move_quick_return = quick_return == 0 ? false : true
  2118.     @_move_speed = speed
  2119.     @_move_coordinates = [x,y,@_move_coordinates[0],@_move_coordinates[1]]
  2120.     distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2121.                (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2122.     @_move_duration = distance
  2123.   end
  2124.   #--------------------------------------------------------------------------
  2125.   # ● アニメ追加を開始
  2126.   #     id           : ID
  2127.   #     hit          : 命中フラッグ
  2128.   #--------------------------------------------------------------------------
  2129.   def start_add_anime(id)
  2130.     @_add_anime_id = id
  2131.   end
  2132.   #--------------------------------------------------------------------------
  2133.   # ● 各種エフェクトの開始判定
  2134.   #--------------------------------------------------------------------------
  2135.   if !method_defined?("side_view_animation_process_timing")
  2136.     alias side_view_animation_process_timing animation_process_timing
  2137.   end
  2138.   def animation_process_timing(timing, hit)
  2139.     side_view_animation_process_timing(timing, hit)
  2140.     if (timing.condition == 0) or
  2141.        (timing.condition == 1 and hit == true) or
  2142.        (timing.condition == 2 and hit == false)
  2143.       if timing.se.name =~ SHAKE_FILE
  2144.         names = timing.se.name.split(/#/)
  2145.         power    = names[1].nil? ? SHAKE_POWER    : names[1].to_i
  2146.         speed    = names[2].nil? ? SHAKE_SPEED    : names[2].to_i
  2147.         duration = names[3].nil? ? SHAKE_DURATION : names[3].to_i
  2148.         # シェイクを開始
  2149.         self.start_shake(power, speed, duration)
  2150.       end
  2151.       if timing.se.name == UPSIDE_DOWN_FILE
  2152.         # 上下反転を開始
  2153.         self.start_upside_down
  2154.       end
  2155.       if timing.se.name == REVERSE_FILE
  2156.         # 左右反転を開始
  2157.         self.start_reverse
  2158.       end
  2159.       if timing.se.name =~ TURNING_FILE
  2160.         names = timing.se.name.split(/#/)
  2161.         direction = names[1].nil? ? TURNING_DIRECTION : names[1].to_i
  2162.         speed     = names[2].nil? ? TURNING_SPEED     : names[2].to_i
  2163.         duration  = names[3].nil? ? TURNING_DURATION  : names[3].to_i
  2164.         # 回転を開始
  2165.         self.start_turning(direction, speed, duration)
  2166.       end
  2167.       if timing.se.name =~ MOVE_FILE
  2168.         names = timing.se.name.split(/#/)
  2169.         quick_return= names[1].nil? ? MOVE_RETURN      : names[1].to_i
  2170.         speed       = names[2].nil? ? MOVE_SPEED       : names[2].to_i
  2171.         x           = names[3].nil? ? MOVE_COORDINATES[0] : names[3].to_i
  2172.         y           = names[3].nil? ? MOVE_COORDINATES[1] : names[4].to_i
  2173.         # 移動を開始
  2174.         self.start_moving(quick_return, speed, x, y)
  2175.       end
  2176.       if timing.se.name =~ ADD_ANIME_FILE
  2177.         names = timing.se.name.split(/#/)
  2178.         id = names[1].nil? ? ADD_ANIME_ID      : names[1].to_i
  2179.         # アニメ追加を開始
  2180.         self.start_add_anime(id)
  2181.       end
  2182.     end
  2183.   end
  2184. end
  2185. #==============================================================================
  2186. # ■ Sprite_Weapon
  2187. #------------------------------------------------------------------------------
  2188. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2189. # スプライトの状態を自動的に変化させます。
  2190. #==============================================================================

  2191. class Sprite_Weapon < RPG::Sprite
  2192.   include Side_view
  2193.   #--------------------------------------------------------------------------
  2194.   # ● 公開インスタンス変数
  2195.   #--------------------------------------------------------------------------
  2196.   attr_accessor :battler                  # バトラー
  2197.   attr_reader   :cw                       # グラフィックの幅
  2198.   attr_reader   :ch                       # グラフィックの高さ
  2199.   #--------------------------------------------------------------------------
  2200.   # ● オブジェクト初期化
  2201.   #     viewport : ビューポート
  2202.   #     battler  : バトラー (Game_Battler)
  2203.   #--------------------------------------------------------------------------
  2204.   def initialize(viewport, battler = nil)
  2205.     super(viewport)
  2206.     @battler = battler
  2207.     @battler_visible = false
  2208.   end
  2209.   #--------------------------------------------------------------------------
  2210.   # ● 解放
  2211.   #--------------------------------------------------------------------------
  2212.   def dispose
  2213.     if self.bitmap != nil
  2214.       self.bitmap.dispose
  2215.     end
  2216.     super
  2217.   end
  2218.   #--------------------------------------------------------------------------
  2219.   # ● フレーム更新
  2220.   #--------------------------------------------------------------------------
  2221.   def update
  2222.     super
  2223.     # バトラーが nil の場合
  2224.     if @battler == nil or [email protected]_a?(Game_Actor)
  2225.       self.bitmap = nil
  2226.       return
  2227.     end
  2228.     # ウエポンアニメのデータ取得
  2229.     @weapon_anime_type = @battler.weapon_anime_type(@battler.condition)
  2230.     # 設定が「非表示」の場合
  2231.     if !@weapon_anime_type[1] or @weapon_anime_type[0].nil?
  2232.       self.visible = false
  2233.       return
  2234.     else
  2235.       self.visible = true
  2236.     end
  2237.     # ファイル名が現在のものと異なる場合
  2238.     if @weapon_anime_type[0] != @weapon_name
  2239.       @weapon_name = @weapon_anime_type[0]
  2240.       # ビットマップを取得、設定
  2241.       self.bitmap = RPG::Cache.icon(@weapon_name)
  2242.       @width = bitmap.width
  2243.       @height = bitmap.height
  2244.       @flag = true
  2245.     end
  2246.     # 現在アニメパターンが現在のものと異なる場合
  2247.     if @pattern != @battler.pattern or @flag or @condition != @battler.condition
  2248.       @pattern = @battler.pattern
  2249.       @condition = @battler.condition
  2250.       self.ox = @width
  2251.       self.oy = @height
  2252.       self.z = battler.screen_z
  2253.       self.zoom_x = @battler.real_zoom * CHAR_ZOOM
  2254.       self.zoom_y = @battler.real_zoom * CHAR_ZOOM
  2255.       self.src_rect.set(0, 0, @width, @height)
  2256.       self.opacity = 255
  2257.       # バトラーより手前に表示
  2258.       if @weapon_anime_type[2]
  2259.         self.z += 10
  2260.       # バトラーより奥に表示
  2261.       else
  2262.         self.z -= 10
  2263.       end
  2264.       @flag = false
  2265.     end
  2266.   end
  2267. end

  2268. #==============================================================================
  2269. # ■ Sprite_Flying
  2270. #------------------------------------------------------------------------------
  2271. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2272. # スプライトの状態を自動的に変化させます。
  2273. #==============================================================================

  2274. class Sprite_Flying < RPG::Sprite
  2275.   include Side_view
  2276.   #--------------------------------------------------------------------------
  2277.   # ● 公開インスタンス変数
  2278.   #--------------------------------------------------------------------------
  2279.   attr_accessor :battler                  # バトラー
  2280.   #--------------------------------------------------------------------------
  2281.   # ● オブジェクト初期化
  2282.   #     viewport : ビューポート
  2283.   #     battler  : バトラー (Game_Battler)
  2284.   #--------------------------------------------------------------------------
  2285.   def initialize(viewport, battler = nil)
  2286.     super(viewport)
  2287.     @battler = battler
  2288.     @battler_visible = false
  2289.   end
  2290.   #--------------------------------------------------------------------------
  2291.   # ● 解放
  2292.   #--------------------------------------------------------------------------
  2293.   def dispose
  2294.     if self.bitmap != nil
  2295.       self.bitmap.dispose
  2296.     end
  2297.     super
  2298.   end
  2299.   #--------------------------------------------------------------------------
  2300.   # ● フレーム更新
  2301.   #--------------------------------------------------------------------------
  2302.   def update
  2303.     super
  2304.     # バトラーが nil の場合
  2305.     if @battler == nil
  2306.       self.bitmap = nil
  2307.       loop_animation(nil)
  2308.       return
  2309.     end
  2310.     # 遠距離アニメ
  2311.     flying_animation = @battler.flying_animation
  2312.     flying_start = flying_animation[0]
  2313.     flying_end   = flying_animation[1]
  2314.     # アニメーション ID が現在のものと異なる場合
  2315.     if @anime_id != @battler.flying_anime[0]
  2316.       @anime_id = @battler.flying_anime[0]
  2317.       @animation = $data_animations[@anime_id]
  2318.     end
  2319.     # アニメーション 開始
  2320.     if flying_start
  2321.       loop_animation(@animation)
  2322.     elsif flying_end
  2323.       loop_animation(nil)
  2324.     end
  2325.     self.x = @battler.flying_x
  2326.     self.y = @battler.flying_y
  2327.     self.z = @battler.screen_z + 1000
  2328.   end
  2329. end

  2330. module RPG
  2331.   class Skill
  2332.     #--------------------------------------------------------------------------
  2333.     # ● 魔法かどうかの判断
  2334.     #--------------------------------------------------------------------------
  2335.     def magic?
  2336.       if @atk_f == 0
  2337.         return true
  2338.       else
  2339.         return false
  2340.       end
  2341.     end
  2342.   end
  2343. end

  2344. # アローカーソルの位置修正

  2345. class Arrow_Actor < Arrow_Base
  2346.   include Side_view
  2347.   #--------------------------------------------------------------------------
  2348.   # ● フレーム更新
  2349.   #--------------------------------------------------------------------------
  2350.   alias side_view_update update
  2351.   def update
  2352.     side_view_update
  2353.     # スプライトの座標を設定
  2354.     if self.actor != nil && (self.x != self.actor.screen_x + ARROW_OX or self.y != self.actor.screen_y + ARROW_OY)
  2355.       self.x = self.actor.screen_x + ARROW_OX
  2356.       self.y = self.actor.screen_y + ARROW_OY
  2357.     end
  2358.   end
  2359. end
  2360. class Arrow_Enemy < Arrow_Base
  2361.   include Side_view
  2362.   #--------------------------------------------------------------------------
  2363.   # ● フレーム更新
  2364.   #--------------------------------------------------------------------------
  2365.   alias side_view_update update
  2366.   def update
  2367.     side_view_update
  2368.     # スプライトの座標を設定
  2369.     if self.enemy != nil && self.y != self.enemy.screen_y + self.enemy.height/2
  2370.       self.x = self.enemy.screen_x
  2371.       self.y = self.enemy.screen_y + self.enemy.height/2
  2372.     end
  2373.   end
  2374. end
复制代码
效果是这样的 fanli.jpg

我把RTAB范例上的有关RTAB系统全部复制到自己的脚本里,然后把相应需要的一些素材也拷贝进去。但是出现了问题
cuowu.jpg 不知道你们看不看的到,就是显示部分的61行出了问题。然后我把显示部分这块代码全
部删除。再进行测试接着就是计算部分的715行又出现了问题。后来我实在没办法,就重新键一个工程,把RTAB战斗系统
和伤害美化拷贝到新键的工程的脚本里,就只有这两样,其他我都没要。然后在把横版放入,显示血,对话加强放入。
结果很正常的运行,不管是用技能还是怎样,都很正常。所以我就不明白了,我就依照这个方法拷贝到自己的游戏里,结果
还是出错 cuowu2.jpg 结果就是这个错。
所以有哪位RUBY高手能帮我解决一下。我的游戏有点大,90M左右,所以就这样提问,也许有了实例会更清楚点。如果有
哪位热心的人肯帮忙的话,我先谢谢了啊

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
发表于 2011-5-6 12:11:05 | 显示全部楼层
LZ可能把菜鸟横版和RTAB放在一起了
这两个脚本貌似会冲突

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
51 小时
注册时间
2011-4-23
帖子
54
 楼主| 发表于 2011-5-6 16:22:14 | 显示全部楼层
回复 Wind2010 的帖子

可是我放在一个新的工程里却能正常运行- -


a6363635于2011-5-6 17:27补充以下内容:
非常确定 我新建一个工程 把所有RTAB都复制进去,就会出错

点评

RTAB是一个系统,而不止是一个脚本,你确定把所有有关RTAB的脚本都复制了吗?  发表于 2011-5-6 16:49
回复

使用道具 举报

Lv2.观梦者

酱油的

梦石
0
星屑
930
在线时间
2161 小时
注册时间
2007-12-22
帖子
3271

贵宾

发表于 2011-5-6 17:46:24 | 显示全部楼层
本帖最后由 禾西 于 2011-5-6 17:46 编辑

這個問題貌似很久了,那啥,誰能提出解決思路額外獎500 exp以上

点评

log 10 的那个解决方法6楼,球戳(你只是要经验而已吧  发表于 2011-5-15 15:52
难怪我说高亮了- -  发表于 2011-5-6 18:02
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
77
在线时间
30 小时
注册时间
2011-4-27
帖子
17
发表于 2011-5-15 12:35:14 | 显示全部楼层
本帖最后由 z16388 于 2011-5-15 12:42 编辑

完全手打,希望尊重我的成果!(引用时注明made in z16388)
碰巧,我也遇到了这种状况
发生背景是:我与wsljxtc交流时,无法实现工程的交流——因为我们的RM版本不同。于是,他让我下载论坛左上角的RM,从那以后,我从他那里学到很多东西,暂且不表……
今天,我照常进行每周周末的游戏制作,但是出现了同楼主相同的状况。我试着放弃这个脚本,改换其他的战斗脚本。但是我那些元件都是按照这个脚本制作的,而且对这个战斗模式有了感情,我不舍得删掉。(而且换成其他的数字又很难看,我自己又不会做脚本)于是我又遵循我的习惯,请教wsljxtc……他这次,让我失望了,首先给了我这个帖子的地址。我看了,里面并没有回答。:L 他说:“有啊 你是不是还用了其他的脚本?”我说有,然后他让我把其他的脚本一个一格地删掉……我并没有删,一来我对这些脚本已经过于依赖,二来原工程缺少某dll文件,我拷进去之后运行脚本却可以使用。所以我断定:不是这个脚本的问题!
然后,我安装了我原来版本的RMXP,运行工程,悲剧的提示:旧版本工程无法打开。于是我便新建了一个工程,然后把我游戏的工程文件夹内的文件都覆盖到了这个新的工程。但是要注意:不能拷贝“Game.project”和"Game.ini"这两个文件!!也就是说,把除了“Game.project”和"Game.ini"这两个文件之外的所有文件都拷贝到新建的工程文件夹内就解决了。

我的RMXP好像是在华军下载的吧,很久了,忘记了……但是我可以提供版本信息。
——————————————————————————
文件版本:1.0.1.7


总结解决方式:不用论坛下载的RMXP
(PS:我QQ1021622929,希望高手助我RM,我还是新手,迫切求助!!加我注明是6R来的)


附图:我可爱的战斗脚本回来了!!!
QQ截图20110515123419.png
QQ截图20110515123419.png

点评

6R的我跟RM的一天征文?  发表于 2011-5-15 15:55

评分

参与人数 1星屑 +2 收起 理由
江湖大虾仁 + 2 给糖吃

查看全部评分

回复

使用道具 举报

Lv2.观梦者

酱油的

梦石
0
星屑
930
在线时间
2161 小时
注册时间
2007-12-22
帖子
3271

贵宾

发表于 2011-5-15 15:55:35 | 显示全部楼层
那啥,1.03出錯我是知道的O O
所以解決方案應該是建立在1.03之上,啥換回1.02的建議全部不算數

点评

那我很识相地自己推了吧- -|||  发表于 2011-5-15 18:20
我想把上面两层推了……  发表于 2011-5-15 16:01
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

Lv3.寻梦者

孤独守望

梦石
0
星屑
3121
在线时间
1534 小时
注册时间
2006-10-16
帖子
4321

开拓者贵宾

发表于 2011-5-15 16:34:43 | 显示全部楼层
没遇到过类似问题,强制复写试试看
  1. class <<Math
  2.   alias ll log10
  3.   def log10(k)
  4.     return 0 if k == 0
  5.     ll(k)
  6.   end
  7. end
复制代码

无名类还不挂F12只能说明Graphics太牛叉了XD
菩提本非树,明镜本非台。回头自望路漫漫。不求姻缘,但求再见。
本来无一物,何处惹尘埃。风打浪吹雨不来。荒庭遍野,扶摇难接。
不知道多久更新一次的博客
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
51 小时
注册时间
2011-4-23
帖子
54
 楼主| 发表于 2011-5-15 17:42:23 | 显示全部楼层
多写大家爱的帮忙 我已经成功的把横版和RTAB给整合了 谢谢
回复

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-3-28 17:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表