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

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: uijk777
打印 上一主题 下一主题

请问RTAB战斗系统的脚本怎么用

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-7-12
帖子
27
11
 楼主| 发表于 2008-7-13 01:10:14 | 只看该作者
囧......对不起,偶刚来这论坛,不然你帮我写?
RPG高手加我的QQ:185875267 RPG游戏讨论群(一定要加哦~):65944252
回复 支持 反对

使用道具 举报

Lv1.梦旅人

曹操

梦石
0
星屑
121
在线时间
42 小时
注册时间
2008-2-28
帖子
513
12
发表于 2008-7-13 01:25:03 | 只看该作者
脚本内容


  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. # リアルタイム・アクティブバトル(RTAB) Ver 1.05
  5. # 配布元・サポートURL
  6. # http://members.jcom.home.ne.jp/cogwheel/

  7. class Scene_Battle
  8. #--------------------------------------------------------------------------
  9. # ● 公開インスタンス変数
  10. #--------------------------------------------------------------------------
  11. attr_reader   :status_window            # ステータスウィンドウ
  12. attr_reader   :spriteset                # バトルスプライト
  13. attr_reader   :scroll_time              # スクリーン移動基本時間
  14. attr_reader   :zoom_rate                # 敵バトラー基本位置
  15. attr_reader   :drive                    # カメラ駆動
  16. attr_accessor :force                    # アクション強制度
  17. attr_accessor :camera                   # 現在のカメラ所持者
  18. #--------------------------------------------------------------------------
  19. # ● ATB基礎セットアップ
  20. #--------------------------------------------------------------------------
  21. def atb_setup
  22.    # ATB初期化
  23.    # speed   : バトルスピード決定。値が小さいほど早い
  24.    # @active : アクティブ度設定
  25.    #           3 : 常にアクティブ状態
  26.    #           2 : スキル・アイテム選択中のみアクティブゲージが止まる
  27.    #           1 : 2の状態に加え、ターゲット選択時もウェイトが掛かる
  28.    #           0 : 1の状態に加え、コマンド入力時にもウェイトが掛かる
  29.    # @action : 他人が行動中に自分も行動を起こすことを許すか
  30.    #           3 : 自分が行動不能でない限り限り許す
  31.    #           2 : 自分がダメージを受けていない限り許す
  32.    #           1 : 2の状態に加え、ターゲットが行動していない限り許す
  33.    #           0 : 行動を許さない。順番に行動し終えるまで待つ
  34.    # @anime_wait : trueにするとバトルアニメ・ダメージ表示中はウェイトが掛かる
  35.    # @damage_wait : ダメージ表示待ち時間(単位はフレーム)
  36.    # @enemy_speed : 敵の思考速度。1なら即時行動。
  37.    #                1フレーム毎に、1/@enemy_speedの確率で行動を起こす
  38.    # @force : 強制アクションでスキル使用時の強制具合
  39.    #          2:スキルは全て詠唱せず、必ず即時実行
  40.    #          1:単独スキルは詠唱し、連携スキルのみ即時実行
  41.    #          0:全スキル詠唱を行うだけ
  42.    # ($scene.force = x とすることにより、通常イベントのスクリプトから変更可能)
  43.    # @drive : カメラ駆動ON/OFF。trueで駆動ON、falseで駆動OFF
  44.    # @scroll_time : スクリーン移動に要する基本時間
  45.    # @zoom_rate = [i, j] : エネミーのズーム率
  46.    #                       i が画面最上部に配置した時の拡大率
  47.    #                       j が画面最下部に配置した時の拡大率
  48.    #                       1 倍としたいときも、1.0 と必ず小数で設定すること
  49.    speed = 150
  50.    @active = 1
  51.    @action = 2
  52.    @anime_wait = false
  53.    @damage_wait = 10
  54.    @enemy_speed = 40
  55.    @force = 2
  56.    @drive = true
  57.    @scroll_time = 15
  58.    @zoom_rate = [0.2, 1.0]
  59.    @help_time = 40
  60.    @escape == false
  61.    @camera = nil
  62.    @max = 0
  63.    @turn_cnt = 0
  64.    @help_wait = 0
  65.    @action_battlers = []
  66.    @synthe = []
  67.    @spell_p = {}
  68.    @spell_e = {}
  69.    @command_a = false
  70.    @command = []
  71.    @party = false
  72.    for battler in $game_party.actors + $game_troop.enemies
  73.      spell_reset(battler)
  74.      battler.at = battler.agi * rand(speed / 2)
  75.      battler.damage_pop = {}
  76.      battler.damage = {}
  77.      battler.damage_sp = {}
  78.      battler.critical = {}
  79.      battler.recover_hp = {}
  80.      battler.recover_sp = {}
  81.      battler.state_p = {}
  82.      battler.state_m = {}
  83.      battler.animation = []
  84.      if battler.is_a?(Game_Actor)
  85.        @max += battler.agi
  86.      end
  87.    end
  88.    @max *= speed
  89.    @max /= $game_party.actors.size
  90.    for battler in $game_party.actors + $game_troop.enemies
  91.      battler.atp = 100 * battler.at / @max
  92.    end
  93. end
  94. #--------------------------------------------------------------------------
  95. # ● ATゲージMax時SE
  96. #--------------------------------------------------------------------------
  97. def fullat_se
  98.    Audio.se_play("Audio/SE/033-switch02", 80, 100)
  99. end
  100. #--------------------------------------------------------------------------
  101. # ● レベルアップSE
  102. #--------------------------------------------------------------------------
  103. def levelup_se
  104.    Audio.se_play("Audio/SE/056-Right02", 80, 100)
  105. end
  106. #--------------------------------------------------------------------------
  107. # ● スキル習得SE
  108. #--------------------------------------------------------------------------
  109. def skill_se
  110.    Audio.se_play("Audio/SE/056-Right02", 80, 150)
  111. end
  112. end

  113. class Window_Base < Window
  114. #--------------------------------------------------------------------------
  115. # ● ATG の描画
  116. #     actor : アクター
  117. #     x     : 描画先 X 座標
  118. #     y     : 描画先 Y 座標
  119. #     width : 描画先の幅
  120. #--------------------------------------------------------------------------
  121. def draw_actor_atg(actor, x, y, width = 144)
  122.    if @at_gauge == nil
  123.      # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  124.      # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  125.      # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  126.      # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  127.      # align3:ゲージタイプ 0:左詰め 1:右詰め
  128.      @plus_x = 0
  129.      @rate_x = 0
  130.      @plus_y = 16
  131.      @plus_width = 0
  132.      @rate_width = 100




  133. # 第一命中判定
  134.    hit_result = (rand(100) < attacker.hit)
  135.    # 命中の場合
  136.    if hit_result == true
  137.      # 基本ダメージを計算
  138.      atk = [attacker.atk - self.pdef / 2, 0].max
  139.      self.damage[attacker] = atk * (20 + attacker.str) / 20
  140.      # 属性修正
  141.      self.damage[attacker] *= elements_correct(attacker.element_set)
  142.      self.damage[attacker] /= 100
  143.      # ダメージの符号が正の場合
  144.      if self.damage[attacker] > 0
  145.        # クリティカル修正
  146.        if rand(100) < 4 * attacker.dex / self.agi
  147.          self.damage[attacker] *= 2
  148.          self.critical[attacker] = true
  149.        end
  150.        # 防御修正
  151.        if self.guarding?
  152.          self.damage[attacker] /= 2
  153.        end
  154.      end
  155.      # 分散
  156.      if self.damage[attacker].abs > 0
  157.        amp = [self.damage[attacker].abs * 15 / 100, 1].max
  158.        self.damage[attacker] += rand(amp+1) + rand(amp+1) - amp
  159.      end
  160.      # 第二命中判定
  161.      eva = 8 * self.agi / attacker.dex + self.eva
  162.      hit = self.damage[attacker] < 0 ? 100 : 100 - eva
  163.      hit = self.cant_evade? ? 100 : hit
  164.      hit_result = (rand(100) < hit)
  165.    end
  166.    # 命中の場合
  167.    if hit_result == true
  168.      # ステート衝撃解除
  169.      remove_states_shock
  170.      # HP からダメージを減算
  171.      # ステート変化
  172.      @state_changed = false
  173.      states_plus(attacker, attacker.plus_state_set)
  174.      states_minus(attacker, attacker.minus_state_set)
  175.    # ミスの場合
  176.    else
  177.      # ダメージに "Miss" を設定
  178.      self.damage[attacker] = "Miss"
  179.      # クリティカルフラグをクリア
  180.      self.critical[attacker] = false
  181.    end
  182.    # メソッド終了
  183.    return true
  184. end
  185. #--------------------------------------------------------------------------
  186. # ● スキルの効果適用
  187. #     user  : スキルの使用者 (バトラー)
  188. #     skill : スキル
  189. #--------------------------------------------------------------------------
  190. def skill_effect(user, skill)
  191.    # クリティカルフラグをクリア
  192.    self.critical[user] = false
  193.    state_p[user] = []
  194.    state_m[user] = []
  195.    # スキルの効果範囲が HP 1 以上の味方で、自分の HP が 0、
  196.    # またはスキルの効果範囲が HP 0 の味方で、自分の HP が 1 以上の場合
  197.    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
  198.       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
  199.      # メソッド終了
  200.      return false
  201.    end
  202.    # 有効フラグをクリア
  203.    effective = false
  204.    # コモンイベント ID が有効の場合は有効フラグをセット
  205.    effective |= skill.common_event_id > 0
  206.    # 第一命中判定
  207.    hit = skill.hit
  208.    if skill.atk_f > 0
  209.      hit *= user.hit / 100
  210.    end
  211.    hit_result = (rand(100) < hit)
  212.    # 不確実なスキルの場合は有効フラグをセット
  213.    effective |= hit < 100
  214.    # 命中の場合
  215.    if hit_result == true
  216.      # 威力を計算
  217.      power = skill.power + user.atk * skill.atk_f / 100
  218.      if power > 0
  219.        power -= self.pdef * skill.pdef_f / 200
  220.        power -= self.mdef * skill.mdef_f / 200
  221.        power = [power, 0].max
  222.      end
  223.      # 倍率を計算
  224.      rate = 20
  225.      rate += (user.str * skill.str_f / 100)
  226.      rate += (user.dex * skill.dex_f / 100)
  227.      rate += (user.agi * skill.agi_f / 100)
  228.      rate += (user.int * skill.int_f / 100)
  229.      # 基本ダメージを計算
  230.      self.damage[user] = power * rate / 20
  231.      # 属性修正
  232.      self.damage[user] *= elements_correct(skill.element_set)
  233.      self.damage[user] /= 100
  234.      # ダメージの符号が正の場合
  235.      if self.damage[user] > 0
  236.        # 防御修正
  237.        if self.guarding?
  238.          self.damage[user] /= 2
  239.        end
  240.      end
  241.      # 分散
  242.      if skill.variance > 0 and self.damage[user].abs > 0
  243.        amp = [self.damage[user].abs * skill.variance / 100, 1].max
  244.        self.damage[user] += rand(amp+1) + rand(amp+1) - amp
  245.      end
  246.      # 第二命中判定
  247.      eva = 8 * self.agi / user.dex + self.eva
  248.      hit = self.damage[user] < 0 ? 100 : 100 - eva * skill.eva_f / 100
  249.      hit = self.cant_evade? ? 100 : hit
  250.      hit_result = (rand(100) < hit)
  251.      # 不確実なスキルの場合は有効フラグをセット
  252.      effective |= hit < 100
  253.    end
  254.    # 命中の場合
  255.    if hit_result == true
  256.      # 威力 0 以外の物理攻撃の場合
  257.      if skill.power != 0 and skill.atk_f > 0
  258.        # ステート衝撃解除
  259.        remove_states_shock
  260.        # 有効フラグをセット
  261.        effective = true
  262.      end
  263.      # HP の変動判定
  264.      last_hp = [[self.hp - self.damage[user], self.maxhp].min, 0].max
  265.      # 効果判定
  266.      effective |= self.hp != last_hp
  267.      # ステート変化
  268.      @state_changed = false
  269.      effective |= states_plus(user, skill.plus_state_set)
  270.      effective |= states_minus(user, skill.minus_state_set)
  271.      unless $game_temp.in_battle
  272.        self.damage_effect(user, 1)
  273.      end
  274.      # 威力が 0 の場合
  275.      if skill.power == 0
  276.        # ダメージに空文字列を設定
  277.        self.damage[user] = ""
  278.        # ステートに変化がない場合
  279.        unless @state_changed
  280.          # ダメージに "Miss" を設定
  281.          self.damage[user] = "Miss"
  282.        end
  283.      end
  284.    # ミスの場合
  285.    else
  286.      # ダメージに "Miss" を設定
  287.      self.damage[user] = "Miss"
  288.    end
  289.    # 戦闘中でない場合
  290.    unless $game_temp.in_battle
  291.      # ダメージに nil を設定
  292.      self.damage[user] = nil
  293.    end
  294.    # メソッド終了
  295.    return effective
  296. end
  297. #--------------------------------------------------------------------------
  298. # ● アイテムの効果適用
  299. #     item : アイテム
  300. #--------------------------------------------------------------------------
  301. def item_effect(item, user = $game_party.actors[0])
  302.    # クリティカルフラグをクリア
  303.    self.critical[user] = false
  304.    state_p[user] = []
  305.    state_m[user] = []
  306.    # アイテムの効果範囲が HP 1 以上の味方で、自分の HP が 0、
  307.    # またはアイテムの効果範囲が HP 0 の味方で、自分の HP が 1 以上の場合
  308.    if ((item.scope == 3 or item.scope == 4) and self.hp == 0) or
  309.       ((item.scope == 5 or item.scope == 6) and self.hp >= 1)
  310.      # メソッド終了
  311.      return false
  312.    end
  313.    # 有効フラグをクリア
  314.    effective = false
  315.    # コモンイベント ID が有効の場合は有効フラグをセット
  316.    effective |= item.common_event_id > 0
  317.    # 命中判定
  318.    hit_result = (rand(100) < item.hit)
  319.    # 不確実なスキルの場合は有効フラグをセット
  320.    effective |= item.hit < 100
  321.    # 命中の場合
  322.    if hit_result == true
  323.      # 回復量を計算
  324.      self.recover_hp[user] = maxhp * item.recover_hp_rate / 100 +
  325.                              item.recover_hp
  326.      self.recover_sp[user] = maxsp * item.recover_sp_rate / 100 +
  327.                              item.recover_sp
  328.      if self.recover_hp[user] < 0
  329.        self.recover_hp[user] += self.pdef * item.pdef_f / 20
  330.        self.recover_hp[user] += self.mdef * item.mdef_f / 20
  331.        self.recover_hp[user] = [self.recover_hp[user], 0].min
  332.      end
  333.      # 属性修正
  334.      self.recover_hp[user] *= elements_correct(item.element_set)
  335.      self.recover_hp[user] /= 100
  336.      self.recover_sp[user] *= elements_correct(item.element_set)
  337.      self.recover_sp[user] /= 100
  338.      # 分散
  339.      if item.variance > 0 and self.recover_hp[user].abs > 0
  340.        amp = [self.recover_hp[user].abs * item.variance / 100, 1].max
  341.        self.recover_hp[user] += rand(amp+1) + rand(amp+1) - amp
  342.      end
  343.      if item.variance > 0 and self.recover_sp[user].abs > 0
  344.        amp = [self.recover_sp[user].abs * item.variance / 100, 1].max
  345.        self.recover_sp[user] += rand(amp+1) + rand(amp+1) - amp
  346.      end
  347.      # 回復量の符号が負の場合
  348.      if self.recover_hp[user] < 0
  349.        # 防御修正
  350.        if self.guarding?
  351.          self.recover_hp[user] /= 2
  352.        end
  353.      end
  354.      # HP 回復量の符号を反転し、ダメージの値に設定
  355.      self.damage[user] = -self.recover_hp[user]
  356.      # HP および SP の変動判定
  357.      last_hp = [[self.hp + self.recover_hp[user], self.maxhp].min, 0].max
  358.      last_sp = [[self.sp + self.recover_sp[user], self.maxsp].min, 0].max
  359.      effective |= self.hp != last_hp
  360.      effective |= self.sp != last_sp
  361.      # ステート変化
  362.      @state_changed = false
  363.      effective |= states_plus(user, item.plus_state_set)
  364.      effective |= states_minus(user, item.minus_state_set)
  365.      unless $game_temp.in_battle
  366.        self.damage_effect(user, 2)
  367.      end
  368.      # パラメータ上昇値が有効の場合
  369.      if item.parameter_type > 0 and item.parameter_points != 0
  370.        # パラメータで分岐
  371.        case item.parameter_type
  372.        when 1  # MaxHP
  373.          @maxhp_plus += item.parameter_points
  374.        when 2  # MaxSP
  375.          @maxsp_plus += item.parameter_points
  376.        when 3  # 腕力
  377.          @str_plus += item.parameter_points
  378.        when 4  # 器用さ
  379.          @dex_plus += item.parameter_points
  380.        when 5  # 素早さ
  381.          @agi_plus += item.parameter_points
  382.        when 6  # 魔力
  383.          @int_plus += item.parameter_points
  384.        end
  385.        # 有効フラグをセット
  386.        effective = true
  387.      end
  388.      # HP 回復率と回復量が 0 の場合
  389.      if item.recover_hp_rate == 0 and item.recover_hp == 0
  390.        # ダメージに空文字列を設定
  391.        self.damage[user] = ""
  392.        # SP 回復率と回復量が 0、パラメータ上昇値が無効の場合
  393.        if item.recover_sp_rate == 0 and item.recover_sp == 0 and
  394.           (item.parameter_type == 0 or item.parameter_points == 0)
  395.          # ステートに変化がない場合
  396.          unless @state_changed
  397.            # ダメージに "Miss" を設定
  398.            self.damage[user] = "Miss"
  399.          end
  400.        end
  401.      end
  402.    # ミスの場合
  403.    else
  404.      # ダメージに "Miss" を設定
  405.      self.damage[user] = "Miss"
  406.    end
  407.    # 戦闘中でない場合
  408.    unless $game_temp.in_battle
  409.      # ダメージに nil を設定
  410.      self.damage[user] = nil
  411.    end
  412.    # メソッド終了
  413.    return effective
  414. end
  415. #--------------------------------------------------------------------------
  416. # ● ステート変化 (+) の適用
  417. #     plus_state_set  : ステート変化 (+)
  418. #--------------------------------------------------------------------------
  419. def states_plus(battler, plus_state_set)
  420.    # 有効フラグをクリア
  421.    effective = false
  422.    # ループ (付加するステート)
  423.    for i in plus_state_set
  424.      # このステートが防御されていない場合
  425.      unless self.state_guard?(i)
  426.        # このステートがフルでなければ有効フラグをセット
  427.        effective |= self.state_full?(i) == false
  428.        # ステートが [抵抗しない] の場合
  429.        if $data_states[i].nonresistance
  430.          # ステート変化フラグをセット
  431.          @state_changed = true
  432.          # ステートを付加
  433.          add_state(i)
  434.        # このステートがフルではない場合
  435.        elsif self.state_full?(i) == false
  436.          # ステート有効度を確率に変換し、乱数と比較
  437.          if rand(100) < [0,100,80,60,40,20,0][self.state_ranks[i]]
  438.            # ステート変化フラグをセット
  439.            @state_changed = true
  440.            # ステートを付加
  441.            self.state_p[battler].push(i)
  442.          end
  443.        end
  444.      end
  445.    end
  446.    # メソッド終了
  447.    return effective
  448. end
  449. #--------------------------------------------------------------------------
  450. # ● ステート変化 (-) の適用
  451. #     minus_state_set : ステート変化 (-)
  452. #--------------------------------------------------------------------------
  453. def states_minus(battler, minus_state_set)
  454.    # 有効フラグをクリア
  455.    effective = false
  456.    # ループ (解除するステート)
  457.    for i in minus_state_set
  458.      # このステートが付加されていれば有効フラグをセット
  459.      effective |= self.state?(i)
  460.      # ステート変化フラグをセット
  461.      @state_changed = true
  462.      # ステートを解除
  463.      self.state_m[battler].push(i)
  464.    end
  465.    # メソッド終了
  466.    return effective
  467. end
  468. #--------------------------------------------------------------------------
  469. # ● ダメージ演算
  470. #--------------------------------------------------------------------------
  471. def damage_effect(battler, item)
  472.    if item == 2
  473.      self.hp += self.recover_hp[battler]
  474.      self.sp += self.recover_sp[battler]
  475.      if self.recover_sp[battler] != 0
  476.        self.damage_sp[battler] = -self.recover_sp[battler]
  477.      end
  478.    else
  479.      if self.damage[battler].class != String
  480.        self.hp -= self.damage[battler]
  481.      end
  482.    end
  483.    for i in self.state_p[battler]
  484.      add_state(i)
  485.    end
  486.    for i in self.state_m[battler]
  487.      remove_state(i)
  488.    end
  489. end
  490. #--------------------------------------------------------------------------
  491. # ● スリップダメージの効果適用
  492. #--------------------------------------------------------------------------
  493. def slip_damage_effect


  494. # ダメージを設定
  495.    self.damage["slip"] = self.maxhp / 10
  496.    # 分散
  497.    if self.damage["slip"].abs > 0
  498.      amp = [self.damage["slip"].abs * 15 / 100, 1].max
  499.      self.damage["slip"] += rand(amp+1) + rand(amp+1) - amp
  500.    end
  501.    # HP からダメージを減算
  502.    self.hp -= self.damage["slip"]
  503.    # メソッド終了
  504.    return true
  505. end
  506. end

  507. #==============================================================================
  508. # ■ Game_BattleAction
  509. #------------------------------------------------------------------------------
  510. #  アクション (戦闘中の行動) を扱うクラスです。このクラスは Game_Battler クラ
  511. # スの内部で使用されます。
  512. #==============================================================================

  513. class Game_BattleAction
  514. #--------------------------------------------------------------------------
  515. # ● 公開インスタンス変数
  516. #--------------------------------------------------------------------------
  517. attr_accessor :spell_id                 # 合体魔法用スキル ID
  518. attr_accessor :force_kind               # 種別 (基本 / スキル / アイテム)
  519. attr_accessor :force_basic              # 基本 (攻撃 / 防御 / 逃げる)
  520. attr_accessor :force_skill_id           # スキル ID
  521. #--------------------------------------------------------------------------
  522. # ● 有効判定
  523. #--------------------------------------------------------------------------
  524. def valid?
  525.    return (not (@force_kind == 0 and @force_basic == 3))
  526. end
  527. end

  528. #==============================================================================
  529. # ■ Game_Actor
  530. #------------------------------------------------------------------------------
  531. #  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
  532. # の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
  533. #==============================================================================

  534. class Game_Actor < Game_Battler
  535. def skill_can_use?(skill_id)
  536.    return super
  537. end
  538. end

  539. #==============================================================================
  540. # ■ Game_Enemy
  541. #------------------------------------------------------------------------------
  542. #  エネミーを扱うクラスです。このクラスは Game_Troop クラス ($game_troop) の
  543. # 内部で使用されます。
  544. #==============================================================================

  545. class Game_Enemy < Game_Battler
  546. #--------------------------------------------------------------------------
  547. # ● 公開インスタンス変数
  548. #--------------------------------------------------------------------------
  549. attr_accessor :height                  # 画像の高さ
  550. attr_accessor :real_x                  # X座標補正
  551. attr_accessor :real_y                  # Y座標補正
  552. attr_accessor :real_zoom               # 拡大率
  553. #--------------------------------------------------------------------------
  554. # ● オブジェクト初期化
  555. #     troop_id     : トループ ID
  556. #     member_index : トループメンバーのインデックス
  557. #--------------------------------------------------------------------------
  558. def initialize(troop_id, member_index)
  559.    super()
  560.    @troop_id = troop_id
  561.    @member_index = member_index
  562.    troop = $data_troops[@troop_id]
  563.    @enemy_id = troop.members[@member_index].enemy_id
  564.    enemy = $data_enemies[@enemy_id]
  565.    @battler_name = enemy.battler_name
  566.    @battler_hue = enemy.battler_hue
  567.    @hp = maxhp
  568.    @sp = maxsp
  569.    @real_x = 0
  570.    @real_y = 0
  571.    @real_zoom = 1.0
  572.    @fly = 0
  573.    enemy.name.sub(/\\[Ff]\[([0-9]+)\]/) {@fly = $1.to_i}
  574.    @hidden = troop.members[@member_index].hidden
  575.    @immortal = troop.members[@member_index].immortal
  576. end
  577. alias :true_x :screen_x
  578. alias :true_y :screen_y
  579. #--------------------------------------------------------------------------
  580. # ● バトル画面 X 座標の取得
  581. #--------------------------------------------------------------------------
  582. def screen_x
  583.    return 320 + (true_x - 320) * @real_zoom + @real_x
  584. end
  585. #--------------------------------------------------------------------------
  586. # ● バトル画面 Y 座標の取得
  587. #--------------------------------------------------------------------------
  588. def screen_y
  589.    return true_y * @real_zoom + @real_y
  590. end
  591. #--------------------------------------------------------------------------
  592. # ● バトル画面 Z 座標の取得
  593. #--------------------------------------------------------------------------
  594. def screen_z
  595.    return true_y + @fly
  596. end
  597. #--------------------------------------------------------------------------
  598. # ● バトル画面 拡大率の取得
  599. #--------------------------------------------------------------------------
  600. def zoom
  601.    return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) *
  602.                          (true_y + @fly) / 320 + $scene.zoom_rate[0]
  603. end
  604. #--------------------------------------------------------------------------
  605. # ● 攻撃用、バトル画面 X 座標の取得
  606. #--------------------------------------------------------------------------
  607. def attack_x(z)
  608.    return (320 - true_x) * z * 0.75
  609. end
  610. #--------------------------------------------------------------------------
  611. # ● 攻撃用、バトル画面 Y 座標の取得
  612. #--------------------------------------------------------------------------
  613. def attack_y(z)
  614.    return (160 - (true_y + @fly / 4) * z + @height * zoom * z / 2) * 0.75
  615. end
  616. #--------------------------------------------------------------------------
  617. # ● アクション作成
  618. #--------------------------------------------------------------------------
  619. def make_action
  620.    # カレントアクションをクリア
  621.    self.current_action.clear
  622.    # 動けない場合
  623.    unless self.inputable?
  624.      # メソッド終了
  625.      return
  626.    end
  627.    # 現在有効なアクションを抽出
  628.    available_actions = []
  629.    rating_max = 0
  630.    for action in self.actions
  631.      # ターン 条件確認
  632.      n = $game_temp.battle_turn
  633.      a = action.condition_turn_a
  634.      b = action.condition_turn_b
  635.      if (b == 0 and n != a) or
  636.         (b > 0 and (n < 1 or n < a or n % b != a % b))
  637.        next
  638.      end
  639.      # HP 条件確認
  640.      if self.hp * 100.0 / self.maxhp > action.condition_hp
  641.        next
  642.      end
  643.      # レベル 条件確認
  644.      if $game_party.max_level < action.condition_level
  645.        next
  646.      end
  647.      # スイッチ 条件確認
  648.      switch_id = action.condition_switch_id
  649.      if switch_id > 0 and $game_switches[switch_id] == false
  650.        next
  651.      end
  652.      # スキル使用可能 条件確認
  653.      if action.kind == 1
  654.        unless self.skill_can_use?(action.skill_id)
  655.          next
  656.        end
  657.      end
  658.      # 条件に該当 : このアクションを追加
  659.      available_actions.push(action)
  660.      if action.rating > rating_max
  661.        rating_max = action.rating
  662.      end
  663.    end
  664.    # 最大のレーティング値を 3 として合計を計算 (0 以下は除外)
  665.    ratings_total = 0
  666.    for action in available_actions
  667.      if action.rating > rating_max - 3
  668.        ratings_total += action.rating - (rating_max - 3)
  669.      end
  670.    end
  671.    # レーティングの合計が 0 ではない場合
  672.    if ratings_total > 0
  673.      # 乱数を作成
  674.      ;value = rand(ratings_total)
  675.      # 作成した乱数に対応するものをカレントアクションに設定
  676.      for action in available_actions
  677.        if action.rating > rating_max - 3
  678.          if value < action.rating - (rating_max - 3)
  679.            self.current_action.kind = action.kind
  680.            self.current_action.basic = action.basic
  681.            self.current_action.skill_id = action.skill_id
  682.            self.current_action.decide_random_target_for_enemy
  683.            return
  684.          else
  685.            ;value -= action.rating - (rating_max - 3)
  686.          end
  687.        end
  688.      end
  689.    end
  690. end
  691. end

  692. #==============================================================================
  693. # ■ Game_Party
  694. #------------------------------------------------------------------------------
  695. #  パーティを扱うクラスです。ゴールドやアイテムなどの情報が含まれます。このク
  696. # ラスのインスタンスは $game_party で参照されます。
  697. #==============================================================================

  698. class Game_Party
  699. #--------------------------------------------------------------------------
  700. # ● 全滅判定
  701. #--------------------------------------------------------------------------
  702. def all_dead?
  703.    # パーティ人数が 0 人の場合
  704.    if $game_party.actors.size == 0
  705.      return false
  706.    end
  707.    # HP 0 以上のアクターがパーティにいる場合
  708.    for actor in @actors
  709.      if actor.hp > 0 or actor.damage.size > 0
  710.        return false
  711.      end
  712.    end
  713.    # 全滅
  714.    return true
  715. end
  716. end

  717. #==============================================================================
  718. # ■ Sprite_Battler
  719. #------------------------------------------------------------------------------
  720. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  721. # スプライトの状態を自動的に変化させます。
  722. #==============================================================================

  723. class Sprite_Battler < RPG::Sprite
  724. #--------------------------------------------------------------------------
  725. # ● フレーム更新
  726. #--------------------------------------------------------------------------
  727. def update
  728.    super
  729.    # バトラーが nil の場合
  730.    if @battler == nil
  731.      self.bitmap = nil
  732.      loop_animation(nil)
  733.      return
  734.    end
  735.    # ファイル名か色相が現在のものと異なる場合
  736.    if @battler.battler_name != @battler_name or
  737.       @battler.battler_hue != @battler_hue
  738.      # ビットマップを取得、設定
  739.      @battler_name = @battler.battler_name
  740.      @battler_hue = @battler.battler_hue
  741.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  742.      @width = bitmap.width
  743.      @height = bitmap.height
  744.      self.ox = @width / 2
  745.      self.oy = @height
  746.      if @battler.is_a?(Game_Enemy)
  747.        @battler.height = @height
  748.      end
  749.      # 戦闘不能または隠れ状態なら不透明度を 0 にする
  750.      if @battler.dead? or @battler.hidden
  751.        self.opacity = 0
  752.      end
  753.    end
  754.    # アニメーション ID が現在のものと異なる場合
  755.    if @battler.state_animation_id != @state_animation_id
  756.      @state_animation_id = @battler.state_animation_id
  757.      loop_animation($data_animations[@state_animation_id])
  758.    end
  759.    # 表示されるべきアクターの場合
  760.    if @battler.is_a?(Game_Actor) and @battler_visible
  761.      # メインフェーズでないときは不透明度をやや下げる
  762.      if $game_temp.battle_main_phase
  763.        self.opacity += 3 if self.opacity < 255
  764.      else
  765.        self.opacity -= 3 if self.opacity > 207
  766.      end
  767.    end
  768.    # 明滅
  769.    if @battler.blink
  770.      blink_on
  771.    else
  772.      blink_off
  773.    end
  774.    # 不可視の場合
  775.    unless @battler_visible
  776.      # 出現
  777.      if not @battler.hidden and not @battler.dead? and
  778.         (@battler.damage.size < 2 or @battler.damage_pop.size < 2)
  779.        appear
  780.        @battler_visible = true
  781.      end
  782.    end
  783.    # ダメージ
  784.    for battler in @battler.damage_pop
  785.      if battler[0].class == Array
  786.        if battler[0][1] >= 0
  787.          $scene.skill_se
  788.        else
  789.          $scene.levelup_se
  790.        end
  791.        damage(@battler.damage[battler[0]], false, 2)
  792.      else
  793.        damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
  794.      end
  795.      if @battler.damage_sp.include?(battler[0])
  796.        damage(@battler.damage_sp[battler[0]],
  797.                @battler.critical[battler[0]], 1)
  798.        @battler.damage_sp.delete(battler[0])
  799.      end
  800.      @battler.damage_pop.delete(battler[0])
  801.      @battler.damage.delete(battler[0])
  802.      @battler.critical.delete(battler[0])
  803.    end
  804.    # 可視の場合
  805.    if @battler_visible
  806.      # 逃走
  807.      if @battler.hidden
  808.        $game_system.se_play($data_system.escape_se)
  809.        escape
  810.        @battler_visible = false
  811.      end
  812.      # 白フラッシュ
  813.      if @battler.white_flash
  814.        whiten
  815.        @battler.white_flash = false
  816.      end
  817.      # アニメーション
  818.      unless @battler.animation.empty?
  819.        for animation in @battler.animation.reverse
  820.          animation($data_animations[animation[0]], animation[1])
  821.          @battler.animation.delete(animation)
  822.        end
  823.      end
  824.      # コラプス
  825.      if @battler.damage.empty? and @battler.dead?
  826.        if $scene.dead_ok?(@battler)
  827.          if @battler.is_a?(Game_Enemy)
  828.            $game_system.se_play($data_system.enemy_collapse_se)
  829.          else
  830.            $game_system.se_play($data_system.actor_collapse_se)
  831.          end
  832.          collapse
  833.          @battler_visible = false
  834.        end
  835.      end
  836.    end
  837.    # スプライトの座標を設定
  838.    self.x = @battler.screen_x
  839.    self.y = @battler.screen_y
  840.    self.z = @battler.screen_z
  841.    if @battler.is_a?(Game_Enemy)
  842.      self.zoom_x = @battler.real_zoom * @battler.zoom
  843.      self.zoom_y = @battler.real_zoom * @battler.zoom
  844.    end
  845. end
  846. end

  847. #==============================================================================
  848. # ■ Window_Base
  849. #------------------------------------------------------------------------------
  850. #  ゲーム中のすべてのウィンドウのスーパークラスです。
  851. #==============================================================================

  852. class Window_Base < Window
  853. #--------------------------------------------------------------------------
  854. # ● ゲージの描画
  855. #--------------------------------------------------------------------------
  856. def gauge_rect_at(width, height, align3,
  857.                    color1, color2, color3, color4, color5, color6, color7,
  858.                    color8, color9, color10, color11, color12, grade1, grade2)
  859.    # 枠描画
  860.    @at_gauge = Bitmap.new(width, height * 5)
  861.    @at_gauge.fill_rect(0, 0, width, height, color1)
  862.    @at_gauge.fill_rect(1, 1, width - 2, height - 2, color2)
  863.    if (align3 == 1 and grade1 == 0) or grade1 > 0
  864.      color = color3
  865.      color3 = color4
  866.      color4 = color
  867.    end
  868.    if (align3 == 1 and grade2 == 0) or grade2 > 0
  869.      color = color5
  870.      color5 = color6
  871.      color6 = color
  872.      color = color7
  873.      color7 = color8
  874.      color8 = color
  875.      color = color9
  876.      color9 = color10
  877.      color10 = color
  878.      color = color11
  879.      color11 = color12
  880.      color12 = color
  881.    end
  882.    if align3 == 0
  883.      if grade1 == 2
  884.        grade1 = 3
  885.      end
  886.      if grade2 == 2
  887.        grade2 = 3
  888.      end
  889.    end
  890.    # 空ゲージの描画 縦にグラデーション表示
  891.    @at_gauge.gradation_rect(2, 2, width - 4, height - 4,
  892.                                  color3, color4, grade1)
  893.    # 実ゲージの描画
  894.    @at_gauge.gradation_rect(2, height + 2, width- 4, height - 4,
  895.                                  color5, color6, grade2)
  896.    @at_gauge.gradation_rect(2, height * 2 + 2, width- 4, height - 4,
  897.                                  color7, color8, grade2)
  898.    @at_gauge.gradation_rect(2, height * 3 + 2, width- 4, height - 4,
  899.                                  color9, color10, grade2)
  900.    @at_gauge.gradation_rect(2, height * 4 + 2, width- 4, height - 4,
  901.                                  color11, color12, grade2)
  902. end
  903. end
复制代码



系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
Ruby技术讨论,帮助你快速入门Ruby.群号码:4910970
回复 支持 反对

使用道具 举报

Lv1.梦旅人

曹操

梦石
0
星屑
121
在线时间
42 小时
注册时间
2008-2-28
帖子
513
13
发表于 2008-7-13 01:27:21 | 只看该作者
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. # リアルタイム・アクティブバトル(RTAB) Ver 1.05
  5. # 配布元・サポートURL
  6. # http://members.jcom.home.ne.jp/cogwheel/

  7. class Scene_Battle
  8. #--------------------------------------------------------------------------
  9. # ● 公開インスタンス変数
  10. #--------------------------------------------------------------------------
  11. attr_reader   :status_window            # ステータスウィンドウ
  12. attr_reader   :spriteset                # バトルスプライト
  13. attr_reader   :scroll_time              # スクリーン移動基本時間
  14. attr_reader   :zoom_rate                # 敵バトラー基本位置
  15. attr_reader   :drive                    # カメラ駆動
  16. attr_accessor :force                    # アクション強制度
  17. attr_accessor :camera                   # 現在のカメラ所持者
  18. #--------------------------------------------------------------------------
  19. # ● ATB基礎セットアップ
  20. #--------------------------------------------------------------------------
  21. def atb_setup
  22.    # ATB初期化
  23.    # speed   : バトルスピード決定。値が小さいほど早い
  24.    # @active : アクティブ度設定
  25.    #           3 : 常にアクティブ状態
  26.    #           2 : スキル・アイテム選択中のみアクティブゲージが止まる
  27.    #           1 : 2の状態に加え、ターゲット選択時もウェイトが掛かる
  28.    #           0 : 1の状態に加え、コマンド入力時にもウェイトが掛かる
  29.    # @action : 他人が行動中に自分も行動を起こすことを許すか
  30.    #           3 : 自分が行動不能でない限り限り許す
  31.    #           2 : 自分がダメージを受けていない限り許す
  32.    #           1 : 2の状態に加え、ターゲットが行動していない限り許す
  33.    #           0 : 行動を許さない。順番に行動し終えるまで待つ
  34.    # @anime_wait : trueにするとバトルアニメ・ダメージ表示中はウェイトが掛かる
  35.    # @damage_wait : ダメージ表示待ち時間(単位はフレーム)
  36.    # @enemy_speed : 敵の思考速度。1なら即時行動。
  37.    #                1フレーム毎に、1/@enemy_speedの確率で行動を起こす
  38.    # @force : 強制アクションでスキル使用時の強制具合
  39.    #          2:スキルは全て詠唱せず、必ず即時実行
  40.    #          1:単独スキルは詠唱し、連携スキルのみ即時実行
  41.    #          0:全スキル詠唱を行うだけ
  42.    # ($scene.force = x とすることにより、通常イベントのスクリプトから変更可能)
  43.    # @drive : カメラ駆動ON/OFF。trueで駆動ON、falseで駆動OFF
  44.    # @scroll_time : スクリーン移動に要する基本時間
  45.    # @zoom_rate = [i, j] : エネミーのズーム率
  46.    #                       i が画面最上部に配置した時の拡大率
  47.    #                       j が画面最下部に配置した時の拡大率
  48.    #                       1 倍としたいときも、1.0 と必ず小数で設定すること
  49.    speed = 150
  50.    @active = 1
  51.    @action = 2
  52.    @anime_wait = false
  53.    @damage_wait = 10
  54.    @enemy_speed = 40
  55.    @force = 2
  56.    @drive = true
  57.    @scroll_time = 15
  58.    @zoom_rate = [0.2, 1.0]
  59.    @help_time = 40
  60.    @escape == false
  61.    @camera = nil
  62.    @max = 0
  63.    @turn_cnt = 0
  64.    @help_wait = 0
  65.    @action_battlers = []
  66.    @synthe = []
  67.    @spell_p = {}
  68.    @spell_e = {}
  69.    @command_a = false
  70.    @command = []
  71.    @party = false
  72.    for battler in $game_party.actors + $game_troop.enemies
  73.      spell_reset(battler)
  74.      battler.at = battler.agi * rand(speed / 2)
  75.      battler.damage_pop = {}
  76.      battler.damage = {}
  77.      battler.damage_sp = {}
  78.      battler.critical = {}
  79.      battler.recover_hp = {}
  80.      battler.recover_sp = {}
  81.      battler.state_p = {}
  82.      battler.state_m = {}
  83.      battler.animation = []
  84.      if battler.is_a?(Game_Actor)
  85.        @max += battler.agi
  86.      end
  87.    end
  88.    @max *= speed
  89.    @max /= $game_party.actors.size
  90.    for battler in $game_party.actors + $game_troop.enemies
  91.      battler.atp = 100 * battler.at / @max
  92.    end
  93. end
  94. #--------------------------------------------------------------------------
  95. # ● ATゲージMax時SE
  96. #--------------------------------------------------------------------------
  97. def fullat_se
  98.    Audio.se_play("Audio/SE/033-switch02", 80, 100)
  99. end
  100. #--------------------------------------------------------------------------
  101. # ● レベルアップSE
  102. #--------------------------------------------------------------------------
  103. def levelup_se
  104.    Audio.se_play("Audio/SE/056-Right02", 80, 100)
  105. end
  106. #--------------------------------------------------------------------------
  107. # ● スキル習得SE
  108. #--------------------------------------------------------------------------
  109. def skill_se
  110.    Audio.se_play("Audio/SE/056-Right02", 80, 150)
  111. end
  112. end

  113. class Window_Base < Window
  114. #--------------------------------------------------------------------------
  115. # ● ATG の描画
  116. #     actor : アクター
  117. #     x     : 描画先 X 座標
  118. #     y     : 描画先 Y 座標
  119. #     width : 描画先の幅
  120. #--------------------------------------------------------------------------
  121. def draw_actor_atg(actor, x, y, width = 144)
  122.    if @at_gauge == nil
  123.      # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
  124.      # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
  125.      # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
  126.      # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
  127.      # align3:ゲージタイプ 0:左詰め 1:右詰め
  128.      @plus_x = 0
  129.      @rate_x = 0
  130.      @plus_y = 16
  131.      @plus_width = 0
  132.      @rate_width = 100




  133. # 第一命中判定
  134.    hit_result = (rand(100) < attacker.hit)
  135.    # 命中の場合
  136.    if hit_result == true
  137.      # 基本ダメージを計算
  138.      atk = [attacker.atk - self.pdef / 2, 0].max
  139.      self.damage[attacker] = atk * (20 + attacker.str) / 20
  140.      # 属性修正
  141.      self.damage[attacker] *= elements_correct(attacker.element_set)
  142.      self.damage[attacker] /= 100
  143.      # ダメージの符号が正の場合
  144.      if self.damage[attacker] > 0
  145.        # クリティカル修正
  146.        if rand(100) < 4 * attacker.dex / self.agi
  147.          self.damage[attacker] *= 2
  148.          self.critical[attacker] = true
  149.        end
  150.        # 防御修正
  151.        if self.guarding?
  152.          self.damage[attacker] /= 2
  153.        end
  154.      end
  155.      # 分散
  156.      if self.damage[attacker].abs > 0
  157.        amp = [self.damage[attacker].abs * 15 / 100, 1].max
  158.        self.damage[attacker] += rand(amp+1) + rand(amp+1) - amp
  159.      end
  160.      # 第二命中判定
  161.      eva = 8 * self.agi / attacker.dex + self.eva
  162.      hit = self.damage[attacker] < 0 ? 100 : 100 - eva
  163.      hit = self.cant_evade? ? 100 : hit
  164.      hit_result = (rand(100) < hit)
  165.    end
  166.    # 命中の場合
  167.    if hit_result == true
  168.      # ステート衝撃解除
  169.      remove_states_shock
  170.      # HP からダメージを減算
  171.      # ステート変化
  172.      @state_changed = false
  173.      states_plus(attacker, attacker.plus_state_set)
  174.      states_minus(attacker, attacker.minus_state_set)
  175.    # ミスの場合
  176.    else
  177.      # ダメージに "Miss" を設定
  178.      self.damage[attacker] = "Miss"
  179.      # クリティカルフラグをクリア
  180.      self.critical[attacker] = false
  181.    end
  182.    # メソッド終了
  183.    return true
  184. end
  185. #--------------------------------------------------------------------------
  186. # ● スキルの効果適用
  187. #     user  : スキルの使用者 (バトラー)
  188. #     skill : スキル
  189. #--------------------------------------------------------------------------
  190. def skill_effect(user, skill)
  191.    # クリティカルフラグをクリア
  192.    self.critical[user] = false
  193.    state_p[user] = []
  194.    state_m[user] = []
  195.    # スキルの効果範囲が HP 1 以上の味方で、自分の HP が 0、
  196.    # またはスキルの効果範囲が HP 0 の味方で、自分の HP が 1 以上の場合
  197.    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
  198.       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
  199.      # メソッド終了
  200.      return false
  201.    end
  202.    # 有効フラグをクリア
  203.    effective = false
  204.    # コモンイベント ID が有効の場合は有効フラグをセット
  205.    effective |= skill.common_event_id > 0
  206.    # 第一命中判定
  207.    hit = skill.hit
  208.    if skill.atk_f > 0
  209.      hit *= user.hit / 100
  210.    end
  211.    hit_result = (rand(100) < hit)
  212.    # 不確実なスキルの場合は有効フラグをセット
  213.    effective |= hit < 100
  214.    # 命中の場合
  215.    if hit_result == true
  216.      # 威力を計算
  217.      power = skill.power + user.atk * skill.atk_f / 100
  218.      if power > 0
  219.        power -= self.pdef * skill.pdef_f / 200
  220.        power -= self.mdef * skill.mdef_f / 200
  221.        power = [power, 0].max
  222.      end
  223.      # 倍率を計算
  224.      rate = 20
  225.      rate += (user.str * skill.str_f / 100)
  226.      rate += (user.dex * skill.dex_f / 100)
  227.      rate += (user.agi * skill.agi_f / 100)
  228.      rate += (user.int * skill.int_f / 100)
  229.      # 基本ダメージを計算
  230.      self.damage[user] = power * rate / 20
  231.      # 属性修正
  232.      self.damage[user] *= elements_correct(skill.element_set)
  233.      self.damage[user] /= 100
  234.      # ダメージの符号が正の場合
  235.      if self.damage[user] > 0
  236.        # 防御修正
  237.        if self.guarding?
  238.          self.damage[user] /= 2
  239.        end
  240.      end
  241.      # 分散
  242.      if skill.variance > 0 and self.damage[user].abs > 0
  243.        amp = [self.damage[user].abs * skill.variance / 100, 1].max
  244.        self.damage[user] += rand(amp+1) + rand(amp+1) - amp
  245.      end
  246.      # 第二命中判定
  247.      eva = 8 * self.agi / user.dex + self.eva
  248.      hit = self.damage[user] < 0 ? 100 : 100 - eva * skill.eva_f / 100
  249.      hit = self.cant_evade? ? 100 : hit
  250.      hit_result = (rand(100) < hit)
  251.      # 不確実なスキルの場合は有効フラグをセット
  252.      effective |= hit < 100
  253.    end
  254.    # 命中の場合
  255.    if hit_result == true
  256.      # 威力 0 以外の物理攻撃の場合
  257.      if skill.power != 0 and skill.atk_f > 0
  258.        # ステート衝撃解除
  259.        remove_states_shock
  260.        # 有効フラグをセット
  261.        effective = true
  262.      end
  263.      # HP の変動判定
  264.      last_hp = [[self.hp - self.damage[user], self.maxhp].min, 0].max
  265.      # 効果判定
  266.      effective |= self.hp != last_hp
  267.      # ステート変化
  268.      @state_changed = false
  269.      effective |= states_plus(user, skill.plus_state_set)
  270.      effective |= states_minus(user, skill.minus_state_set)
  271.      unless $game_temp.in_battle
  272.        self.damage_effect(user, 1)
  273.      end
  274.      # 威力が 0 の場合
  275.      if skill.power == 0
  276.        # ダメージに空文字列を設定
  277.        self.damage[user] = ""
  278.        # ステートに変化がない場合
  279.        unless @state_changed
  280.          # ダメージに "Miss" を設定
  281.          self.damage[user] = "Miss"
  282.        end
  283.      end
  284.    # ミスの場合
  285.    else
  286.      # ダメージに "Miss" を設定
  287.      self.damage[user] = "Miss"
  288.    end
  289.    # 戦闘中でない場合
  290.    unless $game_temp.in_battle
  291.      # ダメージに nil を設定
  292.      self.damage[user] = nil
  293.    end
  294.    # メソッド終了
  295.    return effective
  296. end
  297. #--------------------------------------------------------------------------
  298. # ● アイテムの効果適用
  299. #     item : アイテム
  300. #--------------------------------------------------------------------------
  301. def item_effect(item, user = $game_party.actors[0])
  302.    # クリティカルフラグをクリア
  303.    self.critical[user] = false
  304.    state_p[user] = []
  305.    state_m[user] = []
  306.    # アイテムの効果範囲が HP 1 以上の味方で、自分の HP が 0、
  307.    # またはアイテムの効果範囲が HP 0 の味方で、自分の HP が 1 以上の場合
  308.    if ((item.scope == 3 or item.scope == 4) and self.hp == 0) or
  309.       ((item.scope == 5 or item.scope == 6) and self.hp >= 1)
  310.      # メソッド終了
  311.      return false
  312.    end
  313.    # 有効フラグをクリア
  314.    effective = false
  315.    # コモンイベント ID が有効の場合は有効フラグをセット
  316.    effective |= item.common_event_id > 0
  317.    # 命中判定
  318.    hit_result = (rand(100) < item.hit)
  319.    # 不確実なスキルの場合は有効フラグをセット
  320.    effective |= item.hit < 100
  321.    # 命中の場合
  322.    if hit_result == true
  323.      # 回復量を計算
  324.      self.recover_hp[user] = maxhp * item.recover_hp_rate / 100 +
  325.                              item.recover_hp
  326.      self.recover_sp[user] = maxsp * item.recover_sp_rate / 100 +
  327.                              item.recover_sp
  328.      if self.recover_hp[user] < 0
  329.        self.recover_hp[user] += self.pdef * item.pdef_f / 20
  330.        self.recover_hp[user] += self.mdef * item.mdef_f / 20
  331.        self.recover_hp[user] = [self.recover_hp[user], 0].min
  332.      end
  333.      # 属性修正
  334.      self.recover_hp[user] *= elements_correct(item.element_set)
  335.      self.recover_hp[user] /= 100
  336.      self.recover_sp[user] *= elements_correct(item.element_set)
  337.      self.recover_sp[user] /= 100
  338.      # 分散
  339.      if item.variance > 0 and self.recover_hp[user].abs > 0
  340.        amp = [self.recover_hp[user].abs * item.variance / 100, 1].max
  341.        self.recover_hp[user] += rand(amp+1) + rand(amp+1) - amp
  342.      end
  343.      if item.variance > 0 and self.recover_sp[user].abs > 0
  344.        amp = [self.recover_sp[user].abs * item.variance / 100, 1].max
  345.        self.recover_sp[user] += rand(amp+1) + rand(amp+1) - amp
  346.      end
  347.      # 回復量の符号が負の場合
  348.      if self.recover_hp[user] < 0
  349.        # 防御修正
  350.        if self.guarding?
  351.          self.recover_hp[user] /= 2
  352.        end
  353.      end
  354.      # HP 回復量の符号を反転し、ダメージの値に設定
  355.      self.damage[user] = -self.recover_hp[user]
  356.      # HP および SP の変動判定
  357.      last_hp = [[self.hp + self.recover_hp[user], self.maxhp].min, 0].max
  358.      last_sp = [[self.sp + self.recover_sp[user], self.maxsp].min, 0].max
  359.      effective |= self.hp != last_hp
  360.      effective |= self.sp != last_sp
  361.      # ステート変化
  362.      @state_changed = false
  363.      effective |= states_plus(user, item.plus_state_set)
  364.      effective |= states_minus(user, item.minus_state_set)
  365.      unless $game_temp.in_battle
  366.        self.damage_effect(user, 2)
  367.      end
  368.      # パラメータ上昇値が有効の場合
  369.      if item.parameter_type > 0 and item.parameter_points != 0
  370.        # パラメータで分岐
  371.        case item.parameter_type
  372.        when 1  # MaxHP
  373.          @maxhp_plus += item.parameter_points
  374.        when 2  # MaxSP
  375.          @maxsp_plus += item.parameter_points
  376.        when 3  # 腕力
  377.          @str_plus += item.parameter_points
  378.        when 4  # 器用さ
  379.          @dex_plus += item.parameter_points
  380.        when 5  # 素早さ
  381.          @agi_plus += item.parameter_points
  382.        when 6  # 魔力
  383.          @int_plus += item.parameter_points
  384.        end
  385.        # 有効フラグをセット
  386.        effective = true
  387.      end
  388.      # HP 回復率と回復量が 0 の場合
  389.      if item.recover_hp_rate == 0 and item.recover_hp == 0
  390.        # ダメージに空文字列を設定
  391.        self.damage[user] = ""
  392.        # SP 回復率と回復量が 0、パラメータ上昇値が無効の場合
  393.        if item.recover_sp_rate == 0 and item.recover_sp == 0 and
  394.           (item.parameter_type == 0 or item.parameter_points == 0)
  395.          # ステートに変化がない場合
  396.          unless @state_changed
  397.            # ダメージに "Miss" を設定
  398.            self.damage[user] = "Miss"
  399.          end
  400.        end
  401.      end
  402.    # ミスの場合
  403.    else
  404.      # ダメージに "Miss" を設定
  405.      self.damage[user] = "Miss"
  406.    end
  407.    # 戦闘中でない場合
  408.    unless $game_temp.in_battle
  409.      # ダメージに nil を設定
  410.      self.damage[user] = nil
  411.    end
  412.    # メソッド終了
  413.    return effective
  414. end
  415. #--------------------------------------------------------------------------
  416. # ● ステート変化 (+) の適用
  417. #     plus_state_set  : ステート変化 (+)
  418. #--------------------------------------------------------------------------
  419. def states_plus(battler, plus_state_set)
  420.    # 有効フラグをクリア
  421.    effective = false
  422.    # ループ (付加するステート)
  423.    for i in plus_state_set
  424.      # このステートが防御されていない場合
  425.      unless self.state_guard?(i)
  426.        # このステートがフルでなければ有効フラグをセット
  427.        effective |= self.state_full?(i) == false
  428.        # ステートが [抵抗しない] の場合
  429.        if $data_states[i].nonresistance
  430.          # ステート変化フラグをセット
  431.          @state_changed = true
  432.          # ステートを付加
  433.          add_state(i)
  434.        # このステートがフルではない場合
  435.        elsif self.state_full?(i) == false
  436.          # ステート有効度を確率に変換し、乱数と比較
  437.          if rand(100) < [0,100,80,60,40,20,0][self.state_ranks[i]]
  438.            # ステート変化フラグをセット
  439.            @state_changed = true
  440.            # ステートを付加
  441.            self.state_p[battler].push(i)
  442.          end
  443.        end
  444.      end
  445.    end
  446.    # メソッド終了
  447.    return effective
  448. end
  449. #--------------------------------------------------------------------------
  450. # ● ステート変化 (-) の適用
  451. #     minus_state_set : ステート変化 (-)
  452. #--------------------------------------------------------------------------
  453. def states_minus(battler, minus_state_set)
  454.    # 有効フラグをクリア
  455.    effective = false
  456.    # ループ (解除するステート)
  457.    for i in minus_state_set
  458.      # このステートが付加されていれば有効フラグをセット
  459.      effective |= self.state?(i)
  460.      # ステート変化フラグをセット
  461.      @state_changed = true
  462.      # ステートを解除
  463.      self.state_m[battler].push(i)
  464.    end
  465.    # メソッド終了
  466.    return effective
  467. end
  468. #--------------------------------------------------------------------------
  469. # ● ダメージ演算
  470. #--------------------------------------------------------------------------
  471. def damage_effect(battler, item)
  472.    if item == 2
  473.      self.hp += self.recover_hp[battler]
  474.      self.sp += self.recover_sp[battler]
  475.      if self.recover_sp[battler] != 0
  476.        self.damage_sp[battler] = -self.recover_sp[battler]
  477.      end
  478.    else
  479.      if self.damage[battler].class != String
  480.        self.hp -= self.damage[battler]
  481.      end
  482.    end
  483.    for i in self.state_p[battler]
  484.      add_state(i)
  485.    end
  486.    for i in self.state_m[battler]
  487.      remove_state(i)
  488.    end
  489. end
  490. #--------------------------------------------------------------------------
  491. # ● スリップダメージの効果適用
  492. #--------------------------------------------------------------------------
  493. def slip_damage_effect


  494. # ダメージを設定
  495.    self.damage["slip"] = self.maxhp / 10
  496.    # 分散
  497.    if self.damage["slip"].abs > 0
  498.      amp = [self.damage["slip"].abs * 15 / 100, 1].max
  499.      self.damage["slip"] += rand(amp+1) + rand(amp+1) - amp
  500.    end
  501.    # HP からダメージを減算
  502.    self.hp -= self.damage["slip"]
  503.    # メソッド終了
  504.    return true
  505. end
  506. end

  507. #==============================================================================
  508. # ■ Game_BattleAction
  509. #------------------------------------------------------------------------------
  510. #  アクション (戦闘中の行動) を扱うクラスです。このクラスは Game_Battler クラ
  511. # スの内部で使用されます。
  512. #==============================================================================

  513. class Game_BattleAction
  514. #--------------------------------------------------------------------------
  515. # ● 公開インスタンス変数
  516. #--------------------------------------------------------------------------
  517. attr_accessor :spell_id                 # 合体魔法用スキル ID
  518. attr_accessor :force_kind               # 種別 (基本 / スキル / アイテム)
  519. attr_accessor :force_basic              # 基本 (攻撃 / 防御 / 逃げる)
  520. attr_accessor :force_skill_id           # スキル ID
  521. #--------------------------------------------------------------------------
  522. # ● 有効判定
  523. #--------------------------------------------------------------------------
  524. def valid?
  525.    return (not (@force_kind == 0 and @force_basic == 3))
  526. end
  527. end

  528. #==============================================================================
  529. # ■ Game_Actor
  530. #------------------------------------------------------------------------------
  531. #  アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
  532. # の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
  533. #==============================================================================

  534. class Game_Actor < Game_Battler
  535. def skill_can_use?(skill_id)
  536.    return super
  537. end
  538. end

  539. #==============================================================================
  540. # ■ Game_Enemy
  541. #------------------------------------------------------------------------------
  542. #  エネミーを扱うクラスです。このクラスは Game_Troop クラス ($game_troop) の
  543. # 内部で使用されます。
  544. #==============================================================================

  545. class Game_Enemy < Game_Battler
  546. #--------------------------------------------------------------------------
  547. # ● 公開インスタンス変数
  548. #--------------------------------------------------------------------------
  549. attr_accessor :height                  # 画像の高さ
  550. attr_accessor :real_x                  # X座標補正
  551. attr_accessor :real_y                  # Y座標補正
  552. attr_accessor :real_zoom               # 拡大率
  553. #--------------------------------------------------------------------------
  554. # ● オブジェクト初期化
  555. #     troop_id     : トループ ID
  556. #     member_index : トループメンバーのインデックス
  557. #--------------------------------------------------------------------------
  558. def initialize(troop_id, member_index)
  559.    super()
  560.    @troop_id = troop_id
  561.    @member_index = member_index
  562.    troop = $data_troops[@troop_id]
  563.    @enemy_id = troop.members[@member_index].enemy_id
  564.    enemy = $data_enemies[@enemy_id]
  565.    @battler_name = enemy.battler_name
  566.    @battler_hue = enemy.battler_hue
  567.    @hp = maxhp
  568.    @sp = maxsp
  569.    @real_x = 0
  570.    @real_y = 0
  571.    @real_zoom = 1.0
  572.    @fly = 0
  573.    enemy.name.sub(/\\[Ff]\[([0-9]+)\]/) {@fly = $1.to_i}
  574.    @hidden = troop.members[@member_index].hidden
  575.    @immortal = troop.members[@member_index].immortal
  576. end
  577. alias :true_x :screen_x
  578. alias :true_y :screen_y
  579. #--------------------------------------------------------------------------
  580. # ● バトル画面 X 座標の取得
  581. #--------------------------------------------------------------------------
  582. def screen_x
  583.    return 320 + (true_x - 320) * @real_zoom + @real_x
  584. end
  585. #--------------------------------------------------------------------------
  586. # ● バトル画面 Y 座標の取得
  587. #--------------------------------------------------------------------------
  588. def screen_y
  589.    return true_y * @real_zoom + @real_y
  590. end
  591. #--------------------------------------------------------------------------
  592. # ● バトル画面 Z 座標の取得
  593. #--------------------------------------------------------------------------
  594. def screen_z
  595.    return true_y + @fly
  596. end
  597. #--------------------------------------------------------------------------
  598. # ● バトル画面 拡大率の取得
  599. #--------------------------------------------------------------------------
  600. def zoom
  601.    return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) *
  602.                          (true_y + @fly) / 320 + $scene.zoom_rate[0]
  603. end
  604. #--------------------------------------------------------------------------
  605. # ● 攻撃用、バトル画面 X 座標の取得
  606. #--------------------------------------------------------------------------
  607. def attack_x(z)
  608.    return (320 - true_x) * z * 0.75
  609. end
  610. #--------------------------------------------------------------------------
  611. # ● 攻撃用、バトル画面 Y 座標の取得
  612. #--------------------------------------------------------------------------
  613. def attack_y(z)
  614.    return (160 - (true_y + @fly / 4) * z + @height * zoom * z / 2) * 0.75
  615. end
  616. #--------------------------------------------------------------------------
  617. # ● アクション作成
  618. #--------------------------------------------------------------------------
  619. def make_action
  620.    # カレントアクションをクリア
  621.    self.current_action.clear
  622.    # 動けない場合
  623.    unless self.inputable?
  624.      # メソッド終了
  625.      return
  626.    end
  627.    # 現在有効なアクションを抽出
  628.    available_actions = []
  629.    rating_max = 0
  630.    for action in self.actions
  631.      # ターン 条件確認
  632.      n = $game_temp.battle_turn
  633.      a = action.condition_turn_a
  634.      b = action.condition_turn_b
  635.      if (b == 0 and n != a) or
  636.         (b > 0 and (n < 1 or n < a or n % b != a % b))
  637.        next
  638.      end
  639.      # HP 条件確認
  640.      if self.hp * 100.0 / self.maxhp > action.condition_hp
  641.        next
  642.      end
  643.      # レベル 条件確認
  644.      if $game_party.max_level < action.condition_level
  645.        next
  646.      end
  647.      # スイッチ 条件確認
  648.      switch_id = action.condition_switch_id
  649.      if switch_id > 0 and $game_switches[switch_id] == false
  650.        next
  651.      end
  652.      # スキル使用可能 条件確認
  653.      if action.kind == 1
  654.        unless self.skill_can_use?(action.skill_id)
  655.          next
  656.        end
  657.      end
  658.      # 条件に該当 : このアクションを追加
  659.      available_actions.push(action)
  660.      if action.rating > rating_max
  661.        rating_max = action.rating
  662.      end
  663.    end
  664.    # 最大のレーティング値を 3 として合計を計算 (0 以下は除外)
  665.    ratings_total = 0
  666.    for action in available_actions
  667.      if action.rating > rating_max - 3
  668.        ratings_total += action.rating - (rating_max - 3)
  669.      end
  670.    end
  671.    # レーティングの合計が 0 ではない場合
  672.    if ratings_total > 0
  673.      # 乱数を作成
  674.      ;value = rand(ratings_total)
  675.      # 作成した乱数に対応するものをカレントアクションに設定
  676.      for action in available_actions
  677.        if action.rating > rating_max - 3
  678.          if value < action.rating - (rating_max - 3)
  679.            self.current_action.kind = action.kind
  680.            self.current_action.basic = action.basic
  681.            self.current_action.skill_id = action.skill_id
  682.            self.current_action.decide_random_target_for_enemy
  683.            return
  684.          else
  685.            ;value -= action.rating - (rating_max - 3)
  686.          end
  687.        end
  688.      end
  689.    end
  690. end
  691. end

  692. #==============================================================================
  693. # ■ Game_Party
  694. #------------------------------------------------------------------------------
  695. #  パーティを扱うクラスです。ゴールドやアイテムなどの情報が含まれます。このク
  696. # ラスのインスタンスは $game_party で参照されます。
  697. #==============================================================================

  698. class Game_Party
  699. #--------------------------------------------------------------------------
  700. # ● 全滅判定
  701. #--------------------------------------------------------------------------
  702. def all_dead?
  703.    # パーティ人数が 0 人の場合
  704.    if $game_party.actors.size == 0
  705.      return false
  706.    end
  707.    # HP 0 以上のアクターがパーティにいる場合
  708.    for actor in @actors
  709.      if actor.hp > 0 or actor.damage.size > 0
  710.        return false
  711.      end
  712.    end
  713.    # 全滅
  714.    return true
  715. end
  716. end

  717. #==============================================================================
  718. # ■ Sprite_Battler
  719. #------------------------------------------------------------------------------
  720. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  721. # スプライトの状態を自動的に変化させます。
  722. #==============================================================================

  723. class Sprite_Battler < RPG::Sprite
  724. #--------------------------------------------------------------------------
  725. # ● フレーム更新
  726. #--------------------------------------------------------------------------
  727. def update
  728.    super
  729.    # バトラーが nil の場合
  730.    if @battler == nil
  731.      self.bitmap = nil
  732.      loop_animation(nil)
  733.      return
  734.    end
  735.    # ファイル名か色相が現在のものと異なる場合
  736.    if @battler.battler_name != @battler_name or
  737.       @battler.battler_hue != @battler_hue
  738.      # ビットマップを取得、設定
  739.      @battler_name = @battler.battler_name
  740.      @battler_hue = @battler.battler_hue
  741.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  742.      @width = bitmap.width
  743.      @height = bitmap.height
  744.      self.ox = @width / 2
  745.      self.oy = @height
  746.      if @battler.is_a?(Game_Enemy)
  747.        @battler.height = @height
  748.      end
  749.      # 戦闘不能または隠れ状態なら不透明度を 0 にする
  750.      if @battler.dead? or @battler.hidden
  751.        self.opacity = 0
  752.      end
  753.    end
  754.    # アニメーション ID が現在のものと異なる場合
  755.    if @battler.state_animation_id != @state_animation_id
  756.      @state_animation_id = @battler.state_animation_id
  757.      loop_animation($data_animations[@state_animation_id])
  758.    end
  759.    # 表示されるべきアクターの場合
  760.    if @battler.is_a?(Game_Actor) and @battler_visible
  761.      # メインフェーズでないときは不透明度をやや下げる
  762.      if $game_temp.battle_main_phase
  763.        self.opacity += 3 if self.opacity < 255
  764.      else
  765.        self.opacity -= 3 if self.opacity > 207
  766.      end
  767.    end
  768.    # 明滅
  769.    if @battler.blink
  770.      blink_on
  771.    else
  772.      blink_off
  773.    end
  774.    # 不可視の場合
  775.    unless @battler_visible
  776.      # 出現
  777.      if not @battler.hidden and not @battler.dead? and
  778.         (@battler.damage.size < 2 or @battler.damage_pop.size < 2)
  779.        appear
  780.        @battler_visible = true
  781.      end
  782.    end
  783.    # ダメージ
  784.    for battler in @battler.damage_pop
  785.      if battler[0].class == Array
  786.        if battler[0][1] >= 0
  787.          $scene.skill_se
  788.        else
  789.          $scene.levelup_se
  790.        end
  791.        damage(@battler.damage[battler[0]], false, 2)
  792.      else
  793.        damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
  794.      end
  795.      if @battler.damage_sp.include?(battler[0])
  796.        damage(@battler.damage_sp[battler[0]],
  797.                @battler.critical[battler[0]], 1)
  798.        @battler.damage_sp.delete(battler[0])
  799.      end
  800.      @battler.damage_pop.delete(battler[0])
  801.      @battler.damage.delete(battler[0])
  802.      @battler.critical.delete(battler[0])
  803.    end
  804.    # 可視の場合
  805.    if @battler_visible
  806.      # 逃走
  807.      if @battler.hidden
  808.        $game_system.se_play($data_system.escape_se)
  809.        escape
  810.        @battler_visible = false
  811.      end
  812.      # 白フラッシュ
  813.      if @battler.white_flash
  814.        whiten
  815.        @battler.white_flash = false
  816.      end
  817.      # アニメーション
  818.      unless @battler.animation.empty?
  819.        for animation in @battler.animation.reverse
  820.          animation($data_animations[animation[0]], animation[1])
  821.          @battler.animation.delete(animation)
  822.        end
  823.      end
  824.      # コラプス
  825.      if @battler.damage.empty? and @battler.dead?
  826.        if $scene.dead_ok?(@battler)
  827.          if @battler.is_a?(Game_Enemy)
  828.            $game_system.se_play($data_system.enemy_collapse_se)
  829.          else
  830.            $game_system.se_play($data_system.actor_collapse_se)
  831.          end
  832.          collapse
  833.          @battler_visible = false
  834.        end
  835.      end
  836.    end
  837.    # スプライトの座標を設定
  838.    self.x = @battler.screen_x
  839.    self.y = @battler.screen_y
  840.    self.z = @battler.screen_z
  841.    if @battler.is_a?(Game_Enemy)
  842.      self.zoom_x = @battler.real_zoom * @battler.zoom
  843.      self.zoom_y = @battler.real_zoom * @battler.zoom
  844.    end
  845. end
  846. end

  847. #==============================================================================
  848. # ■ Window_Base
  849. #------------------------------------------------------------------------------
  850. #  ゲーム中のすべてのウィンドウのスーパークラスです。
  851. #==============================================================================

  852. class Window_Base < Window
  853. #--------------------------------------------------------------------------
  854. # ● ゲージの描画
  855. #--------------------------------------------------------------------------
  856. def gauge_rect_at(width, height, align3,
  857.                    color1, color2, color3, color4, color5, color6, color7,
  858.                    color8, color9, color10, color11, color12, grade1, grade2)
  859.    # 枠描画
  860.    @at_gauge = Bitmap.new(width, height * 5)
  861.    @at_gauge.fill_rect(0, 0, width, height, color1)
  862.    @at_gauge.fill_rect(1, 1, width - 2, height - 2, color2)
  863.    if (align3 == 1 and grade1 == 0) or grade1 > 0
  864.      color = color3
  865.      color3 = color4
  866.      color4 = color
  867.    end
  868.    if (align3 == 1 and grade2 == 0) or grade2 > 0
  869.      color = color5
  870.      color5 = color6
  871.      color6 = color
  872.      color = color7
  873.      color7 = color8
  874.      color8 = color
  875.      color = color9
  876.      color9 = color10
  877.      color10 = color
  878.      color = color11
  879.      color11 = color12
  880.      color12 = color
  881.    end
  882.    if align3 == 0
  883.      if grade1 == 2
  884.        grade1 = 3
  885.      end
  886.      if grade2 == 2
  887.        grade2 = 3
  888.      end
  889.    end
  890.    # 空ゲージの描画 縦にグラデーション表示
  891.    @at_gauge.gradation_rect(2, 2, width - 4, height - 4,
  892.                                  color3, color4, grade1)
  893.    # 実ゲージの描画
  894.    @at_gauge.gradation_rect(2, height + 2, width- 4, height - 4,
  895.                                  color5, color6, grade2)
  896.    @at_gauge.gradation_rect(2, height * 2 + 2, width- 4, height - 4,
  897.                                  color7, color8, grade2)
  898.    @at_gauge.gradation_rect(2, height * 3 + 2, width- 4, height - 4,
  899.                                  color9, color10, grade2)
  900.    @at_gauge.gradation_rect(2, height * 4 + 2, width- 4, height - 4,
  901.                                  color11, color12, grade2)
  902. end
  903. end
复制代码
Ruby技术讨论,帮助你快速入门Ruby.群号码:4910970
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-31
帖子
243
14
发表于 2008-7-13 05:35:57 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
107
在线时间
73 小时
注册时间
2008-7-5
帖子
509
15
发表于 2008-7-13 05:40:20 | 只看该作者
以下引用uijk777于2008-7-12 16:18:30的发言:

对不起,因为脚本太长,所以请高手进入这空间里看这脚本了:
http://hi.baidu.com/uijk777

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-7-12
帖子
27
16
 楼主| 发表于 2008-7-13 20:16:17 | 只看该作者
哈(水一下)因为空间的文章传不上,请见谅(最麻烦的一次提问TAT){/dk}
RPG高手加我的QQ:185875267 RPG游戏讨论群(一定要加哦~):65944252
回复 支持 反对

使用道具 举报

Lv1.梦旅人

冰王子

梦石
0
星屑
50
在线时间
34 小时
注册时间
2008-1-27
帖子
1875
17
发表于 2008-7-31 08:53:13 | 只看该作者
除了RTAB还用了什么= =
不常在线,有事PM
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-8-10 05:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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