RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
found a nice atb system script but needs fixing

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 87
[code]# real time [akuteibubatoru] (RTAB) Ver 1.07 # distribution original support URL # http://members.jcom.home.ne.jp/cogwheel/

class Scene_Battle #--------------------------------------------------------------------------
  # - Open instance variable #--------------------------------------------------------------------------
  attr_reader: status_window # status window attr_reader: spriteset # battle sprite attr_reader: scroll_time # screen portable basic time attr_reader: zoom_rate # enemy butler basic position attr_reader: drive # camera drive attr_accessor: force degree of # action forcing attr_accessor: camera # present camera possession person #--------------------------------------------------------------------------
  # - ATB fundamental setup #--------------------------------------------------------------------------
  def atb_setup # ATB initialization # speed: Battle speed decision. The extent whose value is small quick # @active: Degree of active setting # 3: Always active state # 2: Only during skill item selecting the # 1 where active gauge stops: In addition to the state of 2, at the time of target selection the # 0 where weight catches: In addition to the state of 1, even at the time of command input the # @action where weight catches: Others while acting the fact that by their causes conduct is permitted or, # 3: If by his is not incapacitation, limited to the # 2 which is permitted: If by his has not received the damage, the # 1 which is permitted: In addition to the state of 2, if the target has not acted, the # 0 which is permitted: Conduct is not permitted. Until it finishes to act in order, the # @anime_wait which it waits: When it makes true, during [batoruanime] damage indicating the # @damage_wait where weight catches: Damage indicatory waiting (as for unit frame) # @enemy_speed: Thought speed of enemy. If 1 immediately conduct.
    In every # 1 frame, the # @force which causes conduct with the probability of 1/@enemy_speed: With forced action forced condition # 2 at time of skill use: As for skill everything not to reside permanently, by all means immediately execution # 1: As for independent skill to reside permanently, only cooperation skill immediately execution # 0: Usually all the skill permanent residence just are done the # (by making $scene.force = x, from the script of the event modification possibility) # @drive: Camera drive ON/OFF. With true drive ON, with false drive OFF # @scroll_time: The basic time # @zoom_rate = which is required for screen movement [i, j]: When zoom ratio # i of the enemy arranges in the picture first section, when enlargement ratio # j arranges in the picture lowest section, when liking to make enlargement ratio # 1 time, 1.0 speed = be sure to setting with decimal 150 @active = 1 @action = 2 @anime_wait = false @damage_wait = 10 @enemy_speed = 40 @force = 2 @drive = true @scroll_time = 15 @zoom_rate = [0.2 and 1.0] @help_time = 40 @escape == false @camera = nil @max = 0 @turn_cnt = 0 @help_wait = 0 @action_battlers = [] @synthe = [] @spell_p = {} @spell_e = {} @command_a = false @command = [] @party = false for battler in $game_party.actors + $game_troop.enemies spell_reset (battler) battler.at = battler.agi * rand (speed/2) battler.damage_pop = {} battler.damage = {} battler.damage_sp = {} battler.critical = {} battler.recover_hp = {} battler.recover_sp = {} battler.state_p = {} battler.state_m = {} battler.animation = [] if battler.is_a? (Game_Actor) @max += battler.agi end end @max *= speed @max/= $game_party.actors.size for battler in $game_party.actors + $game_troop.enemies battler.atp = 100 * battler.at/@max end end #--------------------------------------------------------------------------
  # - At the time of AT gauge Max SE #--------------------------------------------------------------------------
  def fullat_se Audio.se_play (“Audio/SE/033-switch02”, 80 and 100) end #--------------------------------------------------------------------------
  # - Levelling up SE #--------------------------------------------------------------------------
  def levelup_se Audio.se_play (“Audio/SE/056-Right02”, 80 and 100) end #--------------------------------------------------------------------------
  # - Skill acquisition SE #--------------------------------------------------------------------------
  def skill_se Audio.se_play (“Audio/SE/056-Right02”, 80 and 150) end end

class Window_Base < Window #--------------------------------------------------------------------------
  # - The drawing # actor of ATG: Actor # x: Ahead drawing X coordinate # y: Ahead drawing Y coordinate # width: Width # ahead drawing--------------------------------------------------------------------------
  def draw_actor_atg (actor, x, y and width = 144) if @at_gauge == nil # plus_x: Position revision rate_x in X coordinate: Position revision in X coordinate (%) plus_y: Position revision # plus_width in Y coordinate: Revision rate_width of width: Revision of width (%) height: Vertical width # align1: Drawing type 10: Left justify 1: Central arranging 2: Right justify # align2: Drawing type 20: Upper stuffing 1: Central arranging 2: Lower stuffing # align3: Gauge type 0: Left justify 1: Right justify @plus_x = 0 @rate_x = 0 @plus_y = 16 @plus_width = 0 @rate_width = 100 @width = @plus_width + width * @rate_width/100 @height = 16 @align1 = 0 @align2 = 1 @align3 = 0 # gradation setting grade1: Empty gauge grade2: Actual gauge # (0: On side gradation 1: Vertically gradation 2: Slantedly gradation) grade1 = 1 grade2 = 0 # color setting. color1: Outermost framework, color2: Medium framework # color3: Empty framework dark color, color4: When empty framework light/write color color1 = Color.new (0, 0 and 0) color2 = Color.new (255, 255 and 192) color3 = Color.new (0, 0, 0 and 192) color4 = Color.new (0, 0, 64 and 192) the color setting # of # gauge usually color setting color5 of the time = Color.new (0, 64 and 80) color6 = Color.new (0, 128 and 160) # gauge is MAX, color setting color7 = Color.new (80, 0 and 0) color8 = Color.new (240, 0 and 0) color setting color9 at the time of # cooperation skill use = Color.new (80, 64 and 32) color10 = Color.new (240, 192 and 96) color setting color11 at the time of # skill permanent residence = Color.new (80, 0 and 64) color12 = Color.new (240, 0 and 192) drawing gauge_rect_at of # gauge (@width, @height, @align3, color1, color2, color3, color4, color5, color6, color7, color8, color9, color10, color11, color12, grade1 and grade2) width of the gauge which is drawn in end # variable at substitution if actor.rtp == 0 at = (width + @plus_width) * actor.atp * @rate_width/10000 else at = (width + @plus_width) * actor.rt * @rate_width/actor.rtp/100 end if at > revision such as the left stuffing central posture of width at = width end # gauge case @align1 when 1 x += (@rect_width - width)/2 when 2 x += @rect_width - width end case @align2 when 1 y - = @height/2 when 2 y - = @height end self.contents.blt (x + @plus_x + width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (0 and 0, @width and @height))
    if @align3 == color setting if of 0 rect_x = 0 else x += @width - at - 1 rect_x = @width - at - 1 end # gauges at == gauge drawing self.contents.blt at the time of width # MAX (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x and @height * 2, at and @height))
    else if actor.rtp == 0 # usually gauge drawing self.contents.blt of the time (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x, @height, at and @height))
      else if actor.spell == gauge drawing self.contents.blt at time of true # cooperation skill use (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x and @height * 3, at and @height))
        Gauge drawing self.contents.blt at time of else # skill permanent residence (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x and @height * 4, at and @height))
        end end end end end

#============================================================================== # * Scene_Battle (division definition 1) #------------------------------------------------------------------------------
It is the class which processes the # battle picture.
#==============================================================================

class Scene_Battle #--------------------------------------------------------------------------
  # - Main processing #--------------------------------------------------------------------------
  Various def main # field type temporarily the data the interpreters for the initialization $game_temp.in_battle = true $game_temp.battle_turn = 0 $game_temp.battle_event_flags.clear $game_temp.battle_abort = false $game_temp.battle_main_phase = false $game_temp.battleback_name = $game_map.battleback_name $game_temp.forcing_battler = nil # battle event initialization $game_system.battle_interpreter.setup (nil, 0) the # troop preparation @troop_id = $game_temp.battle_troop_id $game_troop.setup (@troop_id) the atb_setup # actor command window compilation s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item @actor_command_window = Window_Command.new (160, [s1, s2, s3 and s4]) the @actor_command_window.y = 160 @actor_command_window.back_opacity = 160 @actor_command_window.active = false @actor_command_window.visible = false # other windows compilation @party_command_window = Window_PartyCommand.new @help_window = Window_Help.new @help_window.back_opacity = 160 @help_window.visible = false @status_window When = Window_BattleStatus.new @message_window = Window_Message.new # sprite set compilation @spriteset = Spriteset_Battle.new # weight count initialization @wait_count = 0 # transition executions if $data_system.battle_transition == "" Graphics.transition (20) else Graphics.transition (40, “Graphics/Transitions/” + $data_system.battle_transition) the end # pre- battle phase start start_phase1 # main loop loop do # game picture information of renewal Graphics.update # input the renewal Input.update # frame renewal update # picture changes, the loop discontinuance if $scene! = self break end end # map refreshment $game_map.refresh # transition preparation Graphics.freeze # window release @actor_command_window.dispose @party_command_window.dispose @help_window.dispose @status_window.dispose @message_window.dispose if @skill_window! = nil @skill_window.dispose end if @item_window! = nil @item_window.dispose end if @result_window! When = nil @result_window.dispose end # sprite set is changed to the release @spriteset.dispose # title picture and it is in, if $scene.is_a? (Scene_Title) When the # picture it changes other than the game over picture from the fading out Graphics.transition Graphics.freeze end # aggressive test and it is in, if $BTEST and not $scene.is_a? (Scene_Gameover) $scene = nil end end #--------------------------------------------------------------------------
  # - Victory or defeat decision #--------------------------------------------------------------------------
  When def judge # total destruction decision the truth, or party number of people 0 is, if $game_party.all_dead? When or $game_party.actors.size == it is 0 # defeats possible, if $game_system.bgm_play which is reset to BGM before the if $game_temp.battle_can_lose # battle starting ($game_temp.map_bgm) # battle end battle_end (2) the return true end # game over flag which returns # true the return true end # enemy which returns set $game_temp.gameover = true # true exists even with 1 bodies, for enemy in $game_troop.enemies if enemy.exist which returns false?
        return false end end # after battle phase start (victory) the return true end # which returns start_phase5 # true--------------------------------------------------------------------------
  # - Frame renewal #--------------------------------------------------------------------------
  When it is in the midst of def update # battle event executing, if $game_system.battle_interpreter.running?
      if @command.size > When 0 @command_a = false @command = [] the butler who is forced the command_delete end @status_window.at_refresh # interpreter renewal $game_system.battle_interpreter.update # action does not exist, when if $game_temp.forcing_battler == execution of the nil # battle event ends, unless $game_system.battle_interpreter.running?
          When setup of the # battle event the reexecution @status_window.refresh setup_battle_event end end end # system (the timer), the picture the renewal $game_system.update $game_screen.update # timer becomes 0, when if $game_system.timer_working and $game_system.timer == 0 # battle discontinuance $game_temp.battle_abort = true end # windows renewal @help_window.update @party_command_window.update @actor_command_window.update @status_window.update @message_window.update # sprite set it is in the midst of renewal @spriteset.update # transition processing, during if $game_temp.transition_processing # transition processing when the flag clearing $game_temp.transition_processing = false # transition execution if $game_temp.transition_name == "" Graphics.transition (20) else Graphics.transition (40, “Graphics/Transitions/” + $game_temp.transition_name) it is in the midst of end end # message window indicating, when it is the if $game_temp.message_window_showing return end # game over, the if $game_temp.gameover # gameWhen $game_system.bgm_play where it changes to the over picture and when you reset to the $scene = Scene_Gameover.new return end # title picture, it changes to the if $game_temp.to_title # title picture and in case of $scene = Scene_Title.new return end # battle discontinuance it resets to BGM before the if $game_temp.battle_abort # battle starting ($game_temp.map_bgm) # battle end battle_end (1) it is in the midst of return end # help window indicating if @help_wait > 0 @help_wait - = 1 if @help_wait == with the @help_window.visible = false end end # phase which hides 0 # help windows divergence case @phase when 0 # AT gauge renewal phase if anime_wait_return update_phase0 end when 1 # pre- battle phase update_phase1 return when 2 # party command phase update_phase2 return when 5 # afterBattle phase update_phase5 return end if $scene! = self return end if @phase == 0 if @command.size! When = 0 # actor command phases if @command_a == it is in false start_phase3 end update_phase3 end # weight, if @wait_count > @wait_count which decreases 0 # weight counts - = 1 return end update_phase4 end end

#==============================================================================
# ? Scene_Battle (???? 2)
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

  #--------------------------------------------------------------------------
  # ? ?????? (AT?????????)
  #--------------------------------------------------------------------------
  def update_phase0
    if $game_temp.battle_turn == 0
      $game_temp.battle_turn = 1
    end
    # B ??????????
    if @command_a == false and @party == false
      if Input.trigger?(Input::B)
        # ????? SE ???
        $game_system.se_play($data_system.cancel_se)
        @party = true
      end
    end
    if @party == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      # ?????????????
      start_phase2
      return
    end
    # AT???????
    cnt = 0
    for battler in $game_party.actors + $game_troop.enemies
      active?(battler)
      if battler.rtp == 0
        if battler.at >= @max
          if battler.is_a?(Game_Actor)
            if battler.inputable?
              unless @action_battlers.include?(battler) or
                  @command.include?(battler) or @escape == true
                if battler.current_action.forcing
                  fullat_se
                  force_action(battler)
                  action_start(battler)
                else
                  fullat_se
                  @command.push(battler)
                end
              end
            else
              unless @action_battlers.include?(battler) or
                      battler == @command[0]
                battler.current_action.clear
                if @command.include?(battler)
                  @command.delete(battler)
                else
                  if battler.movable?
                    fullat_se
                  end
                end
                action_start(battler)
              end
            end
          else
            unless @action_battlers.include?(battler)
              if battler.current_action.forcing
                force_action(battler)
                action_start(battler)
              else
                if @enemy_speed != 0
                  if rand(@enemy_speed) == 0
                    number = cnt - $game_party.actors.size
                    enemy_action(number)
                  end
                else
                  number = cnt - $game_party.actors.size
                  enemy_action(number)
                end
              end
            end
          end
        else
          battler.at += battler.agi
          if battler.guarding?
            battler.at += battler.agi
          end
          if battler.movable?
            battler.atp = 100 * battler.at / @max
          end
        end
      else
        if battler.rt >= battler.rtp
          speller = synthe?(battler)
          if speller != nil
            battler = speller[0]
          end
          unless @action_battlers.include?(battler)
            if battler.is_a?(Game_Actor)
              fullat_se
            end
            battler.rt = battler.rtp
            action_start(battler)
          end
        else
          battler.rt += battler.agi
          speller = synthe?(battler)
          if speller != nil
            for spell in speller
              if spell != battler
                spell.rt += battler.agi
              end
            end
          end
        end
      end
      cnt += 1
    end
    # AT??????????
    @status_window.at_refresh
    # ????
    if @escape == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      temp = false
      for battler in $game_party.actors
        if battler.inputable?
          temp = true
        end
      end
      if temp == true
        for battler in $game_party.actors
          if battler.at < @max and battler.inputable?
            temp = false
            break
          end
        end
        if temp == true
          @escape = false
          for battler in $game_party.actors
            battler.at %= @max
          end
          $game_temp.battle_main_phase = false
          update_phase2_escape
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def start_phase2
    # ???? 2 ???
    @phase = 2
    @party = false
    # ?????????????????
    @party_command_window.active = true
    @party_command_window.visible = true
    # ?????????????
    @actor_index = -1
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
    if @command.size != 0
      # ???????????? OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
    end
    # ??????
    @camera == "party"
    @spriteset.screen_target(0, 0, 1)
    # ??????????????
    $game_temp.battle_main_phase = false
  end
  #--------------------------------------------------------------------------
  # ? ?????? (????????????)
  #--------------------------------------------------------------------------
  def update_phase2
    # C ??????????
    if Input.trigger?(Input::C)
      # ???????????????????????
      case @party_command_window.index
      when 0  # ??
        # ?????????????????
        @party_command_window.active = false
        @party_command_window.visible = false
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        @escape = false
        @phase = 0
        if $game_temp.battle_turn == 0
          $game_temp.battle_turn = 1
        end
        if @command_a == true
          # ??????????????
          start_phase3
        else
          $game_temp.battle_main_phase = true
        end
      when 1  # ???
        # ??????????
        if $game_temp.battle_can_escape == false
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        @phase = 0
        # ?????????????????
        @party_command_window.active = false
        @party_command_window.visible = false
        $game_temp.battle_main_phase = true
        if $game_temp.battle_turn == 0
          update_phase2_escape
          $game_temp.battle_turn = 1
          for battler in $game_party.actors
            battler.at -= @max / 2
          end
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        @escape = true
        for battler in $game_party.actors
          @command_a = false
          @command.delete(battler)
          @action_battlers.delete(battler)
          skill_reset(battler)
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def start_phase5
    # ???? 5 ???
    @phase = 5
    # ????? ME ???
    $game_system.me_play($game_system.battle_end_me)
    # ??????? BGM ???
    $game_system.bgm_play($game_temp.map_bgm)
    # EXP???????????????
    exp = 0
    gold = 0
    treasures = []
    if @active_actor != nil
      @active_actor.blink = false
    end
    # ??????????????
    $game_temp.battle_main_phase = true
    # ?????????????????
    @party_command_window.active = false
    @party_command_window.visible = false
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
    if @skill_window != nil
      # ???????????
      @skill_window.dispose
      @skill_window = nil
    end
    if @item_window != nil
      # ????????????
      @item_window.dispose
      @item_window = nil
    end
    # ???????????
    @help_window.visible = false
    # ???
    for enemy in $game_troop.enemies
      # ??????????????
      unless enemy.hidden
        # ?? EXP????????
        exp += enemy.exp
        gold += enemy.gold
        # ?????????
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    # ???????? 6 ??????
    treasures = treasures[0..5]
    # EXP ??
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
          actor.damage[[actor, -1]] = "Level up!"
          actor.up_level = actor.level - last_level
        end
      end
    end
    # ??????
    $game_party.gain_gold(gold)
    # ???????
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # ???????????????
    @result_window = Window_BattleResult.new(exp, gold, treasures)
    # ???????????
    @phase5_wait_count = 100
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????)
  #--------------------------------------------------------------------------
  def update_phase5
    # ????????? 0 ???????
    if @phase5_wait_count > 0
      # ????????????
      @phase5_wait_count -= 1
      # ????????? 0 ??????
      if @phase5_wait_count == 0
        # ????????????
        @result_window.visible = true
        # ??????????????
        $game_temp.battle_main_phase = false
        # ?????????????????
        @status_window.refresh
        for actor in $game_party.actors
          if actor.damage.include?([actor, 0])
            @phase5_wait_count = 20
            actor.damage_pop[[actor, 0]] = true
          end
          if actor.damage.include?([actor, -1])
            @phase5_wait_count = 20
            actor.damage_pop[[actor, -1]] = true
            for level in actor.level - actor.up_level + 1..actor.level
              for skill in $data_classes[actor.class_id].learnings
                if level == skill.level and not actor.skill_learn?(skill.id)
                  actor.damage[[actor, 0]] = "New Skill!"
                  break
                end
              end
            end
          end
        end
      end
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?????
      battle_end(0)
    end
  end

#==============================================================================
# ? Scene_Battle (???? 3)
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def start_phase3
    # ??????????????
    $game_temp.battle_main_phase = false
    @command_a = true
    @active_actor = @command[0]
    cnt = 0
    for actor in $game_party.actors
      if actor == @active_actor
        @actor_index = cnt
      end
      cnt += 1
    end
    @active_actor.blink = true
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      phase3_next_actor
      return
    end
    phase3_setup_command_window
    # ??????
    @camera = "command"
    plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
    y = [(plus.abs - 1.5) * 10 , 0].min
    @spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def phase3_ next_actor
    @command.shift
    @command_a = false
    # ??????????????
    $game_temp.battle_main_phase = true
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # ???????????? OFF
    if @active_actor != nil
      @active_actor.blink = false
    end
    action_start(@active_actor)
    # ????????
    if @camera == "command"
      @spriteset.screen_target(0, 0, 1)
    end
    return
  end
  #--------------------------------------------------------------------------
  # ? ????????????????????
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
    # ?????????????????
    @party_command_window.active = false
    @party_command_window.visible = false
    # ?????????????????
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # ???????????????????
    @actor_command_window.x = @actor_index * 160 +
                              (4 - $game_party.actors.size) * 80
    # ??????? 0 ???
    @actor_command_window.index = 0
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def enemy_action(number)
    enemy = $game_troop.enemies[number]
    unless enemy.current_action.forcing
      enemy.make_action
    end
    action_start(enemy)
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      phase3_next_actor
      return
    end
    # B ??????????
    if Input.trigger?(Input::B) and @party == false
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      @party = true
    end
    if @party == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      # ?????????????
      start_phase2
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      @party = false
      # ???????????????????????
      case @actor_command_window.index
      when 0  # ??
        if victory?
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ??????????
        start_enemy_select
      when 1  # ???
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ?????????
        start_skill_select
      when 2  # ??
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ????????
        @active_actor.current_action.kind = 0
        @active_actor.current_action.basic = 1
        # ??????????????
        phase3_next_actor
      when 3  # ????
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ??????????
        start_item_select
      end
      return
    end
    # ???????
    if @command.size > 1
      # R ??????????
      if Input.trigger?(Input::R)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        @command.push(@command[0])
        @command.shift
        @command_a = false
        # ?????????????????
        start_phase3
      end
      # L ??????????
      if Input.trigger?(Input::L)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        @command.unshift(@command[@command.size - 1])
        @command.delete_at(@command.size - 1)
        @command_a = false
        # ?????????????????
        start_phase3
      end
      # ? ??????????
      if Input.trigger?(Input::RIGHT)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        actor = $game_party.actors[@actor_index]
        while actor == @command[0] or (not @command.include?(actor))
          @actor_index += 1
          @actor_index %= $game_party.actors.size
          actor = $game_party.actors[@actor_index]
          if actor == @command[0]
            break
          end
        end
        while actor != @command[0]
          @command.push(@command.shift)
        end
        @command_a = false
        # ?????????????????
        start_phase3
      end
      # ? ??????????
      if Input.trigger?(Input::LEFT)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        actor = $game_party.actors[@actor_index]
        while actor == @command[0] or (not @command.include?(actor))
          @actor_index -= 1
          @actor_index %= $game_party.actors.size
          actor = $game_party.actors[@actor_index]
          if actor == @command[0]
            break
          end
        end
        while actor != @command[0]
          @command.push(@command.shift)
        end
        @command_a = false
        # ?????????????????
        start_phase3
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ?????)
  #--------------------------------------------------------------------------
  def update_phase3_skill_select
    # ??????????????????
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ????????????????
    @skill_window.visible = true
    # ???????????
    @skill_window.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ?????????
      end_skill_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ????????????????????????
      @skill = @skill_window.skill
      # ????????
      if @skill == nil or not @active_actor.skill_can_use?(@skill.id)
        # ??? SE ???
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @skill.scope == 1 or @skill.scope == 2
        if victory?
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end       
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.skill_id = @skill.id
      # ?????????????????
      @skill_window.visible = false
      # ???????????
      if @skill.scope == 1
        # ??????????
        start_enemy_select
      # ????????????
      elsif @skill.scope == 3 or @skill.scope == 5
        # ??????????
        start_actor_select
      # ?????????????
      else
        # ????????
        @active_actor.current_action.kind = 1
        # ?????????
        end_skill_select
        # ??????????????
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_item_select
    # ??????????????????
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ?????????????????
    @item_window.visible = true
    # ????????????
    @item_window.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ??????????
      end_item_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?????????????????????????
      @item = @item_window.item
      # ????????
      unless $game_party.item_can_use?(@item.id)
        # ??? SE ???
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @item.scope == 1 or @item.scope == 2
        if victory?
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.item_id = @item.id
      # ??????????????????
      @item_window.visible = false
      # ???????????
      if @item.scope == 1
        # ??????????
        start_enemy_select
      # ????????????
      elsif @item.scope == 3 or @item.scope == 5
        # ??????????
        start_actor_select
      # ?????????????
      else
        # ????????
        @active_actor.current_action.kind = 2
        # ??????????
        end_item_select
        # ??????????????
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_enemy_select
    if victory?
      # ????????
      if @camera == "select"
        @spriteset.screen_target(0, 0, 1)
      end
      # ??????????
      end_enemy_select
      return
    end
    # ??????????????????
    unless @active_actor.inputable?
      # ????????
      if @camera == "select"
        @spriteset.screen_target(0, 0, 1)
      end
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ??????????
    @enemy_arrow.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ????????
      if @camera == "select"
        # ??????
        @camera = "command"
        plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
        y = [(plus.abs - 1.5) * 10 , 0].min
        @spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
      end
      # ??????????
      end_enemy_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.kind = 0
      @active_actor.current_action.basic = 0
      @active_actor.current_action.target_index = @enemy_arrow.index
      # ??????????????
      if @skill_window != nil
        # ?????????
        @active_actor.current_action.kind = 1
        # ?????????
        end_skill_select
      end
      # ???????????????
      if @item_window != nil
        # ?????????
        @active_actor.current_action.kind = 2
        # ??????????
        end_item_select
      end
      # ??????????
      end_enemy_select
      # ??????????????
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_actor_select
    # ??????????????????
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ??????????
    @actor_arrow.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ??????????
      end_actor_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.kind = 0
      @active_actor.current_action.basic = 0
      @active_actor.current_action.target_index = @actor_arrow.index
      # ??????????
      end_actor_select
      # ??????????????
      if @skill_window != nil
        # ?????????
        @active_actor.current_action.kind = 1
        # ?????????
        end_skill_select
      end
      # ???????????????
      if @item_window != nil
        # ?????????
        @active_actor.current_action.kind = 2
        # ??????????
        end_item_select
      end
      # ??????????????
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias :start_enemy_select_rtab :start_enemy_select
  def start_enemy_select
    @camera = "select"
    for enemy in $game_troop.enemies
      if enemy.exist?
        zoom = 1 / enemy.zoom
        @spriteset.screen_target(enemy.attack_x(zoom) * 0.75,
                                  enemy.attack_y(zoom) * 0.75, zoom)
        break
      end
    end
    # ????????
    start_enemy_select_rtab
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias :end_enemy_select_rtab :end_enemy_select
  def end_enemy_select
    # ????????
    end_enemy_select_rtab
    if (@action == 0 and not @action_battlers.empty?) or
          (@camera == "select" and (@active_actor.current_action.kind != 0 or
                                            @active_actor.animation1_id != 0))
      @spriteset.screen_target(0, 0, 1)
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def start_skill_select
    # ???????????
    @skill_window = Window_Skill.new(@active_actor)
    # ?????????????
    @skill_window.help_window = @help_window
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end

#==============================================================================
# ? Scene_Battle (???? 4)
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def start_phase4
    $game_temp.battle_main_phase = true
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????)
  #--------------------------------------------------------------------------
  def update_phase4
    # ????????????????????????
    if $game_temp.forcing_battler != nil
      battler = $game_temp.forcing_battler
      if battler.current_action.forcing == false
        if @action_battlers.include?(battler)
          if @action > 0 or @action_battlers[0].phase == 1
            @action_battlers.delete(battler)
            @action_battlers.push(battler)
          end
          if battler.phase == 1
            battler.current_action.forcing = true
            force_action(battler)
          end
        else
          battler.current_action.forcing = true
          force_action(battler)
          action_start(battler)
          @action_battlers.delete(battler)
          @action_battlers.push(battler)
        end
        battler.at = @max
        battler.atp = 100 * battler.at / @max
      end
    end
    # action ?1???????????????
    for battler in @action_battlers.reverse
      # ????????
      if battler.wait > 0
        # ????????????
        battler.wait -= 1
        break if @action == 0
        next
      end
      unless fin? and battler.phase < 3 and
          not $game_system.battle_interpreter.running?
        action_phase(battler)
      end
      break if @action == 0
    end
    # ?????????????????????????
    if $game_temp.forcing_battler == nil
      # ??????????????
      setup_battle_event
      # ?????????????
      if $game_system.battle_interpreter.running?
        return
      end
    end
    for battler in @action_battlers.reverse
      if fin? and battler.phase < 3 and
          not $game_system.battle_interpreter.running?
        # ????????????????????????????????
        @action_battlers.delete(battler)
      end
    end
    if @action_battlers.empty? and not $game_system.battle_interpreter.running?
      # ????
      judge
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? (???????)
  #--------------------------------------------------------------------------
  def action_phase(battler)
    # action ? 1 ??????????????????
    if @action == 1 and battler.phase < 3
      for target in battler.target
        speller = synthe?(target)
        if speller == nil
          # ?????????????
« Last Edit: June 25, 2007, 06:58:29 PM by ChaosSoldier92 »

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
Huh? What is this? What's wrong with this script :? It could be incompatibility.
:taco: :taco: :taco:

*
A Random Custom Title
Rep:
Level 96
wah
Do you mind editing it to a code syntax? Also, what's the problem?

***
Rep:
Level 87
its says script line error 764 name error occured
undefined method method 'start_enemy_select'for class'Object'
dnt mind...whats that

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
So this is a battle system? Were there no notes or readme's with it?
:taco: :taco: :taco:

*
A Random Custom Title
Rep:
Level 96
wah
Yeah, ATB system. Active Timer Battle. Please repost the script in the first post with a code tag so that we can actually put it in a project and stuff.

***
Rep:
Level 87

*
A Random Custom Title
Rep:
Level 96
wah
Something's messed up in the script. The syntax is all wrong and it's messed up all the way in the "attr_reader:" stuff.

***
Rep:
Level 87
so its unfixable

*
A Random Custom Title
Rep:
Level 96
wah
No, it's just that the script you posted up is different from the one you're using. o.o

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
It cuts off the script.

Just post the rest of the script in another post.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 87
this is the site


http://translate.google.com/translate?hl=en&sl=ja&u=http://members.jcom.home.ne.jp/cogwheel/script/&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dhttp://members.jcom.home.ne.jp/cogwheel/script/%26hl%3Den%26sa%3DG


the script 

[code]# real time [akuteibubatoru] (RTAB) Ver 1.07 # distribution original support URL # http://members.jcom.home.ne.jp/cogwheel/

class Scene_Battle #--------------------------------------------------------------------------
  # - Open instance variable #--------------------------------------------------------------------------
  attr_reader: status_window # status window attr_reader: spriteset # battle sprite attr_reader: scroll_time # screen portable basic time attr_reader: zoom_rate # enemy butler basic position attr_reader: drive # camera drive attr_accessor: force degree of # action forcing attr_accessor: camera # present camera possession person #--------------------------------------------------------------------------
  # - ATB fundamental setup #--------------------------------------------------------------------------
  def atb_setup # ATB initialization # speed: Battle speed decision. The extent whose value is small quick # @active: Degree of active setting # 3: Always active state # 2: Only during skill item selecting the # 1 where active gauge stops: In addition to the state of 2, at the time of target selection the # 0 where weight catches: In addition to the state of 1, even at the time of command input the # @action where weight catches: Others while acting the fact that by themselves causes conduct is permitted or, # 3: If by himself is not incapacitation, limited to the # 2 which is permitted: If by himself has not received the damage, the # 1 which is permitted: In addition to the state of 2, if the target has not acted, the # 0 which is permitted: Conduct is not permitted. Until it finishes to act in order, the # @anime_wait which it waits: When it makes true, during [batoruanime] damage indicating the # @damage_wait where weight catches: Damage indicatory waiting (as for unit frame) # @enemy_speed: Thought speed of enemy. If 1 immediately conduct.
    In every # 1 frame, the # @force which causes conduct with the probability of 1/@enemy_speed: With forced action forced condition # 2 at time of skill use: As for skill everything not to reside permanently, by all means immediately execution # 1: As for independent skill to reside permanently, only cooperation skill immediately execution # 0: Usually all the skill permanent residence just are done # (by making $scene.force = x, from the script of the event modification possibility,) # @drive: Camera drive ON/OFF. With true drive ON, with false drive OFF # @scroll_time: The basic time # @zoom_rate = which is required for screen movement [i, j]: When zoom ratio # i of the enemy arranges in the picture first section, when enlargement ratio # j arranges in the picture lowest section, when liking to make enlargement ratio # 1 time, 1.0 speed = 150 @active = 1 @action = 2 @anime_wait = false @damage_wait = 10 @enemy_speed = 40 @force = 2 @drive = true @scroll_time = 15 @zoom_rate = [0.2 and 1.0] @help_time = 40 @escape be sure to setting with decimal == false @camera = nil @max = 0 @turn_cnt = 0 @help_wait = 0 @action_battlers = [] @synthe = [] @spell_p = {} @spell_e = {} @command_a = false @command = [] @party = false for battler in $game_party.actors + $game_troop.enemies spell_reset (battler) battler.at = battler.agi * rand (speed/2) battler.damage_pop = {} battler.damage = {} battler.damage_sp = {} battler.critical = {} battler.recover_hp = {} battler.recover_sp = {} battler.state_p = {} battler.state_m = {} battler.animation = [] if battler.is_a? (Game_Actor) @max += battler.agi end end @max *= speed @max/= $game_party.actors.size for battler in $game_party.actors + $game_troop.enemies battler.atp = 100 * battler.at/@max end end #--------------------------------------------------------------------------
  # - At the time of AT gauge Max SE #--------------------------------------------------------------------------
  def fullat_se Audio.se_play (“Audio/SE/033-switch02”, 80 and 100) end #--------------------------------------------------------------------------
  # - Levelling up SE #--------------------------------------------------------------------------
  def levelup_se Audio.se_play (“Audio/SE/056-Right02”, 80 and 100) end #--------------------------------------------------------------------------
  # - Skill acquisition SE #--------------------------------------------------------------------------
  def skill_se Audio.se_play (“Audio/SE/056-Right02”, 80 and 150) end end

class Window_Base < Window #--------------------------------------------------------------------------
  # - The drawing # actor of ATG: Actor # x: Ahead drawing X coordinate # y: Ahead drawing Y coordinate # width: Width # ahead drawing--------------------------------------------------------------------------
  def draw_actor_atg (actor, x, y and width = 144) if @at_gauge == nil # plus_x: Position revision rate_x in X coordinate: Position revision (%) plus_y in X coordinate: Position revision # plus_width in Y coordinate: Revision rate_width of width: Revision (%) height of width: Vertical width # align1: Drawing type 10: Left justify 1: Central arranging 2: Right justify # align2: Drawing type 20: Upper stuffing 1: Central arranging 2: Lower stuffing # align3: Gauge type 0: Left justify 1: Right justify @plus_x = 0 @rate_x = 0 @plus_y = 16 @plus_width = 0 @rate_width = 100 @width = @plus_width + width * @rate_width/100 @height = 16 @align1 = 0 @align2 = 1 @align3 = 0 # gradation setting grade1: Empty gauge grade2: Actual gauge # (0: On side gradation 1: Vertically gradation 2: Slantedly gradation) grade1 = 1 grade2 = 0 # color setting. color1: Outermost framework, color2: Medium framework # color3: Empty framework dark color, color4: When the color setting # of empty framework light/write color color1 = Color.new (0, 0 and 0) color2 = Color.new (255, 255 and 192) color3 = Color.new (0, 0, 0 and 192) color4 = Color.new (0, 0, 64 and 192) # gauge usually color setting color5 = Color.new (0, 64 and 80) color6 = Color.new (0, 128 and 160) # gauge of the time is MAX, color setting color9 at the time of color setting color7 = Color.new (80, 0 and 0) color8 = Color.new (240, 0 and 0) # cooperation skill use = Color.new (80, 64 and 32) width of the gauge which is drawn in drawing gauge_rect_at (@width, @height, @align3, color1, color2, color3, color4, color5, color6, color7, color8, color9, color10, color11, color12, grade1 and grade2) end # variable at of color setting color11 = Color.new (80, 0 and 64) color12 = Color.new (240, 0 and 192) # gauge at the time of color10 = Color.new (240, 192 and 96) # skill permanent residence substitution if actor.rtp == 0 at = (width + @plus_width) * actor.atp * @rate_width/10000 else at = (width + @plus_width) * actor.rt * @rate_width/actor.rtp/100 end if at > revision such as the left stuffing central posture of width at = width end # gauge case @align1 when 1 x += (@rect_width - width)/2 when 2 x += @rect_width - width end case @align2 when 1 y - = @height/2 when 2 y - = @height end self.contents.blt (x + @plus_x + width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (0 and 0, @width and @height))
    if @align3 == color setting if of 0 rect_x = 0 else x += @width - at - 1 rect_x = @width - at - 1 end # gauges at == gauge drawing self.contents.blt at the time of width # MAX (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x and @height * 2, at and @height))
    else if actor.rtp == 0 # usually gauge drawing self.contents.blt of the time (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x, @height, at and @height))
      else if actor.spell == gauge drawing self.contents.blt at time of true # cooperation skill use (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x and @height * 3, at and @height))
        Gauge drawing self.contents.blt at time of else # skill permanent residence (x + @plus_x + @width * @rate_x/100, y + @plus_y, @at_gauge and Rect.new (rect_x and @height * 4, at and @height))
        end end end end end

#============================================================================== # * Scene_Battle (division definition 1) #------------------------------------------------------------------------------
It is the class which processes the # battle picture.
#==============================================================================

class Scene_Battle #--------------------------------------------------------------------------
  # - Main processing #--------------------------------------------------------------------------
  Various def main # field type temporarily the data the interpreters for the initialization $game_temp.in_battle = true $game_temp.battle_turn = 0 $game_temp.battle_event_flags.clear $game_temp.battle_abort = false $game_temp.battle_main_phase = false $game_temp.battleback_name = $game_map.battleback_name $game_temp.forcing_battler = nil # battle event initialization $game_system.battle_interpreter.setup (nil, 0) the # troop preparation @troop_id = $game_temp.battle_troop_id $game_troop.setup (@troop_id) the atb_setup # actor command window compilation s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item @actor_command_window = Window_Command.new (160, [s1, s2, s3 and s4]) the @actor_command_window.y = 160 @actor_command_window.back_opacity = 160 @actor_command_window.active = false @actor_command_window.visible = false # other windows compilation @party_command_window = Window_PartyCommand.new @help_window = Window_Help.new @help_window.back_opacity = 160 @help_window.visible = false @status_window When = Window_BattleStatus.new @message_window = Window_Message.new # sprite set compilation @spriteset = Spriteset_Battle.new # weight count initialization @wait_count = 0 # transition executions if $data_system.battle_transition == "" Graphics.transition (20) else Graphics.transition (40, “Graphics/Transitions/” + $data_system.battle_transition) the end # pre- battle phase start start_phase1 # main loop loop do # game picture information of renewal Graphics.update # input the renewal Input.update # frame renewal update # picture changes, the loop discontinuance if $scene! = self break end end # map refreshment $game_map.refresh # transition preparation Graphics.freeze # window release @actor_command_window.dispose @party_command_window.dispose @help_window.dispose @status_window.dispose @message_window.dispose if @skill_window! = nil @skill_window.dispose end if @item_window! = nil @item_window.dispose end if @result_window! When = nil @result_window.dispose end # sprite set is changed to the release @spriteset.dispose # title picture and it is in, if $scene.is_a? (Scene_Title) When the # picture it changes other than the game over picture from the fading out Graphics.transition Graphics.freeze end # aggressive test and it is in, if $BTEST and not $scene.is_a? (Scene_Gameover) $scene = nil end end #--------------------------------------------------------------------------
  # - Victory or defeat decision #--------------------------------------------------------------------------
  When def judge # total destruction decision the truth, or party number of people 0 is, if $game_party.all_dead? When or $game_party.actors.size == it is 0 # defeats possible, if $game_system.bgm_play which is reset to BGM before the if $game_temp.battle_can_lose # battle starting ($game_temp.map_bgm) # battle end battle_end (2) the return true end # game over flag which returns # true the return true end # enemy which returns set $game_temp.gameover = true # true exists even with 1 bodies, for enemy in $game_troop.enemies if enemy.exist which returns false?
        return false end end # after battle phase start (victory) the return true end # which returns start_phase5 # true--------------------------------------------------------------------------
  # - Frame renewal #--------------------------------------------------------------------------
  When it is in the midst of def update # battle event executing, if $game_system.battle_interpreter.running?
      if @command.size > When 0 @command_a = false @command = [] the butler who is forced the command_delete end @status_window.at_refresh # interpreter renewal $game_system.battle_interpreter.update # action does not exist, when if $game_temp.forcing_battler == execution of the nil # battle event ends, unless $game_system.battle_interpreter.running?
          When setup of the # battle event the reexecution @status_window.refresh setup_battle_event end end end # system (the timer), the picture the renewal $game_system.update $game_screen.update # timer becomes 0, when if $game_system.timer_working and $game_system.timer == 0 # battle discontinuance $game_temp.battle_abort = true end # windows renewal @help_window.update @party_command_window.update @actor_command_window.update @status_window.update @message_window.update # sprite set it is in the midst of renewal @spriteset.update # transition processing, during if $game_temp.transition_processing # transition processing when the flag clearing $game_temp.transition_processing = false # transition execution if $game_temp.transition_name == "" Graphics.transition (20) else Graphics.transition (40, “Graphics/Transitions/” + $game_temp.transition_name) it is in the midst of end end # message window indicating, when it is the if $game_temp.message_window_showing return end # game over, the if $game_temp.gameover # gameWhen $game_system.bgm_play where it changes to the over picture and when you reset to the $scene = Scene_Gameover.new return end # title picture, it changes to the if $game_temp.to_title # title picture and in case of $scene = Scene_Title.new return end # battle discontinuance it resets to BGM before the if $game_temp.battle_abort # battle starting ($game_temp.map_bgm) # battle end battle_end (1) it is in the midst of return end # help window indicating if @help_wait > 0 @help_wait - = 1 if @help_wait == with the @help_window.visible = false end end # phase which hides 0 # help windows divergence case @phase when 0 # AT gauge renewal phase if anime_wait_return update_phase0 end when 1 # pre- battle phase update_phase1 return when 2 # party command phase update_phase2 return when 5 # afterBattle phase update_phase5 return end if $scene! = self return end if @phase == 0 if @command.size! When = 0 # actor command phases if @command_a == it is in false start_phase3 end update_phase3 end # weight, if @wait_count > @wait_count which decreases 0 # weight counts - = 1 return end update_phase4 end end

#==============================================================================
# ? Scene_Battle (???? 2)
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

  #--------------------------------------------------------------------------
  # ? ?????? (AT?????????)
  #--------------------------------------------------------------------------
  def update_phase0
    if $game_temp.battle_turn == 0
      $game_temp.battle_turn = 1
    end
    # B ??????????
    if @command_a == false and @party == false
      if Input.trigger?(Input::B)
        # ????? SE ???
        $game_system.se_play($data_system.cancel_se)
        @party = true
      end
    end
    if @party == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      # ?????????????
      start_phase2
      return
    end
    # AT???????
    cnt = 0
    for battler in $game_party.actors + $game_troop.enemies
      active?(battler)
      if battler.rtp == 0
        if battler.at >= @max
          if battler.is_a?(Game_Actor)
            if battler.inputable?
              unless @action_battlers.include?(battler) or
                  @command.include?(battler) or @escape == true
                if battler.current_action.forcing
                  fullat_se
                  force_action(battler)
                  action_start(battler)
                else
                  fullat_se
                  @command.push(battler)
                end
              end
            else
              unless @action_battlers.include?(battler) or
                      battler == @command[0]
                battler.current_action.clear
                if @command.include?(battler)
                  @command.delete(battler)
                else
                  if battler.movable?
                    fullat_se
                  end
                end
                action_start(battler)
              end
            end
          else
            unless @action_battlers.include?(battler)
              if battler.current_action.forcing
                force_action(battler)
                action_start(battler)
              else
                if @enemy_speed != 0
                  if rand(@enemy_speed) == 0
                    number = cnt - $game_party.actors.size
                    enemy_action(number)
                  end
                else
                  number = cnt - $game_party.actors.size
                  enemy_action(number)
                end
              end
            end
          end
        else
          battler.at += battler.agi
          if battler.guarding?
            battler.at += battler.agi
          end
          if battler.movable?
            battler.atp = 100 * battler.at / @max
          end
        end
      else
        if battler.rt >= battler.rtp
          speller = synthe?(battler)
          if speller != nil
            battler = speller[0]
          end
          unless @action_battlers.include?(battler)
            if battler.is_a?(Game_Actor)
              fullat_se
            end
            battler.rt = battler.rtp
            action_start(battler)
          end
        else
          battler.rt += battler.agi
          speller = synthe?(battler)
          if speller != nil
            for spell in speller
              if spell != battler
                spell.rt += battler.agi
              end
            end
          end
        end
      end
      cnt += 1
    end
    # AT??????????
    @status_window.at_refresh
    # ????
    if @escape == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      temp = false
      for battler in $game_party.actors
        if battler.inputable?
          temp = true
        end
      end
      if temp == true
        for battler in $game_party.actors
          if battler.at < @max and battler.inputable?
            temp = false
            break
          end
        end
        if temp == true
          @escape = false
          for battler in $game_party.actors
            battler.at %= @max
          end
          $game_temp.battle_main_phase = false
          update_phase2_escape
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def start_phase2
    # ???? 2 ???
    @phase = 2
    @party = false
    # ?????????????????
    @party_command_window.active = true
    @party_command_window.visible = true
    # ?????????????
    @actor_index = -1
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
    if @command.size != 0
      # ???????????? OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
    end
    # ??????
    @camera == "party"
    @spriteset.screen_target(0, 0, 1)
    # ??????????????
    $game_temp.battle_main_phase = false
  end
  #--------------------------------------------------------------------------
  # ? ?????? (????????????)
  #--------------------------------------------------------------------------
  def update_phase2
    # C ??????????
    if Input.trigger?(Input::C)
      # ???????????????????????
      case @party_command_window.index
      when 0  # ??
        # ?????????????????
        @party_command_window.active = false
        @party_command_window.visible = false
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        @escape = false
        @phase = 0
        if $game_temp.battle_turn == 0
          $game_temp.battle_turn = 1
        end
        if @command_a == true
          # ??????????????
          start_phase3
        else
          $game_temp.battle_main_phase = true
        end
      when 1  # ???
        # ??????????
        if $game_temp.battle_can_escape == false
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        @phase = 0
        # ?????????????????
        @party_command_window.active = false
        @party_command_window.visible = false
        $game_temp.battle_main_phase = true
        if $game_temp.battle_turn == 0
          update_phase2_escape
          $game_temp.battle_turn = 1
          for battler in $game_party.actors
            battler.at -= @max / 2
          end
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        @escape = true
        for battler in $game_party.actors
          @command_a = false
          @command.delete(battler)
          @action_battlers.delete(battler)
          skill_reset(battler)
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def start_phase5
    # ???? 5 ???
    @phase = 5
    # ????? ME ???
    $game_system.me_play($game_system.battle_end_me)
    # ??????? BGM ???
    $game_system.bgm_play($game_temp.map_bgm)
    # EXP???????????????
    exp = 0
    gold = 0
    treasures = []
    if @active_actor != nil
      @active_actor.blink = false
    end
    # ??????????????
    $game_temp.battle_main_phase = true
    # ?????????????????
    @party_command_window.active = false
    @party_command_window.visible = false
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
    if @skill_window != nil
      # ???????????
      @skill_window.dispose
      @skill_window = nil
    end
    if @item_window != nil
      # ????????????
      @item_window.dispose
      @item_window = nil
    end
    # ???????????
    @help_window.visible = false
    # ???
    for enemy in $game_troop.enemies
      # ??????????????
      unless enemy.hidden
        # ?? EXP????????
        exp += enemy.exp
        gold += enemy.gold
        # ?????????
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    # ???????? 6 ??????
    treasures = treasures[0..5]
    # EXP ??
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
          actor.damage[[actor, -1]] = "Level up!"
          actor.up_level = actor.level - last_level
        end
      end
    end
    # ??????
    $game_party.gain_gold(gold)
    # ???????
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # ???????????????
    @result_window = Window_BattleResult.new(exp, gold, treasures)
    # ???????????
    @phase5_wait_count = 100
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????)
  #--------------------------------------------------------------------------
  def update_phase5
    # ????????? 0 ???????
    if @phase5_wait_count > 0
      # ????????????
      @phase5_wait_count -= 1
      # ????????? 0 ??????
      if @phase5_wait_count == 0
        # ????????????
        @result_window.visible = true
        # ??????????????
        $game_temp.battle_main_phase = false
        # ?????????????????
        @status_window.refresh
        for actor in $game_party.actors
          if actor.damage.include?([actor, 0])
            @phase5_wait_count = 20
            actor.damage_pop[[actor, 0]] = true
          end
          if actor.damage.include?([actor, -1])
            @phase5_wait_count = 20
            actor.damage_pop[[actor, -1]] = true
            for level in actor.level - actor.up_level + 1..actor.level
              for skill in $data_classes[actor.class_id].learnings
                if level == skill.level and not actor.skill_learn?(skill.id)
                  actor.damage[[actor, 0]] = "New Skill!"
                  break
                end
              end
            end
          end
        end
      end
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?????
      battle_end(0)
    end
  end

#==============================================================================
# ? Scene_Battle (???? 3)
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def start_phase3
    # ??????????????
    $game_temp.battle_main_phase = false
    @command_a = true
    @active_actor = @command[0]
    cnt = 0
    for actor in $game_party.actors
      if actor == @active_actor
        @actor_index = cnt
      end
      cnt += 1
    end
    @active_actor.blink = true
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      phase3_next_actor
      return
    end
    phase3_setup_command_window
    # ??????
    @camera = "command"
    plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
    y = [(plus.abs - 1.5) * 10 , 0].min
    @spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def phase3_ next_actor
    @command.shift
    @command_a = false
    # ??????????????
    $game_temp.battle_main_phase = true
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # ???????????? OFF
    if @active_actor != nil
      @active_actor.blink = false
    end
    action_start(@active_actor)
    # ????????
    if @camera == "command"
      @spriteset.screen_target(0, 0, 1)
    end
    return
  end
  #--------------------------------------------------------------------------
  # ? ????????????????????
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
    # ?????????????????
    @party_command_window.active = false
    @party_command_window.visible = false
    # ?????????????????
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # ???????????????????
    @actor_command_window.x = @actor_index * 160 +
                              (4 - $game_party.actors.size) * 80
    # ??????? 0 ???
    @actor_command_window.index = 0
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def enemy_action(number)
    enemy = $game_troop.enemies[number]
    unless enemy.current_action.forcing
      enemy.make_action
    end
    action_start(enemy)
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      phase3_next_actor
      return
    end
    # B ??????????
    if Input.trigger?(Input::B) and @party == false
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      @party = true
    end
    if @party == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      # ?????????????
      start_phase2
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      @party = false
      # ???????????????????????
      case @actor_command_window.index
      when 0  # ??
        if victory?
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ??????????
        start_enemy_select
      when 1  # ???
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ?????????
        start_skill_select
      when 2  # ??
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ????????
        @active_actor.current_action.kind = 0
        @active_actor.current_action.basic = 1
        # ??????????????
        phase3_next_actor
      when 3  # ????
        # ?? SE ???
        $game_system.se_play($data_system.decision_se)
        # ??????????
        start_item_select
      end
      return
    end
    # ???????
    if @command.size > 1
      # R ??????????
      if Input.trigger?(Input::R)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        @command.push(@command[0])
        @command.shift
        @command_a = false
        # ?????????????????
        start_phase3
      end
      # L ??????????
      if Input.trigger?(Input::L)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        @command.unshift(@command[@command.size - 1])
        @command.delete_at(@command.size - 1)
        @command_a = false
        # ?????????????????
        start_phase3
      end
      # ? ??????????
      if Input.trigger?(Input::RIGHT)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        actor = $game_party.actors[@actor_index]
        while actor == @command[0] or (not @command.include?(actor))
          @actor_index += 1
          @actor_index %= $game_party.actors.size
          actor = $game_party.actors[@actor_index]
          if actor == @command[0]
            break
          end
        end
        while actor != @command[0]
          @command.push(@command.shift)
        end
        @command_a = false
        # ?????????????????
        start_phase3
      end
      # ? ??????????
      if Input.trigger?(Input::LEFT)
        $game_system.se_play($data_system.cursor_se)
        @party = false
        # ???????????? OFF
        if @active_actor != nil
          @active_actor.blink = false
        end
        actor = $game_party.actors[@actor_index]
        while actor == @command[0] or (not @command.include?(actor))
          @actor_index -= 1
          @actor_index %= $game_party.actors.size
          actor = $game_party.actors[@actor_index]
          if actor == @command[0]
            break
          end
        end
        while actor != @command[0]
          @command.push(@command.shift)
        end
        @command_a = false
        # ?????????????????
        start_phase3
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ?????)
  #--------------------------------------------------------------------------
  def update_phase3_skill_select
    # ??????????????????
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ????????????????
    @skill_window.visible = true
    # ???????????
    @skill_window.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ?????????
      end_skill_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ????????????????????????
      @skill = @skill_window.skill
      # ????????
      if @skill == nil or not @active_actor.skill_can_use?(@skill.id)
        # ??? SE ???
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @skill.scope == 1 or @skill.scope == 2
        if victory?
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end       
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.skill_id = @skill.id
      # ?????????????????
      @skill_window.visible = false
      # ???????????
      if @skill.scope == 1
        # ??????????
        start_enemy_select
      # ????????????
      elsif @skill.scope == 3 or @skill.scope == 5
        # ??????????
        start_actor_select
      # ?????????????
      else
        # ????????
        @active_actor.current_action.kind = 1
        # ?????????
        end_skill_select
        # ??????????????
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_item_select
    # ??????????????????
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ?????????????????
    @item_window.visible = true
    # ????????????
    @item_window.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ??????????
      end_item_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?????????????????????????
      @item = @item_window.item
      # ????????
      unless $game_party.item_can_use?(@item.id)
        # ??? SE ???
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @item.scope == 1 or @item.scope == 2
        if victory?
          # ??? SE ???
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.item_id = @item.id
      # ??????????????????
      @item_window.visible = false
      # ???????????
      if @item.scope == 1
        # ??????????
        start_enemy_select
      # ????????????
      elsif @item.scope == 3 or @item.scope == 5
        # ??????????
        start_actor_select
      # ?????????????
      else
        # ????????
        @active_actor.current_action.kind = 2
        # ??????????
        end_item_select
        # ??????????????
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_enemy_select
    if victory?
      # ????????
      if @camera == "select"
        @spriteset.screen_target(0, 0, 1)
      end
      # ??????????
      end_enemy_select
      return
    end
    # ??????????????????
    unless @active_actor.inputable?
      # ????????
      if @camera == "select"
        @spriteset.screen_target(0, 0, 1)
      end
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ??????????
    @enemy_arrow.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ????????
      if @camera == "select"
        # ??????
        @camera = "command"
        plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
        y = [(plus.abs - 1.5) * 10 , 0].min
        @spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
      end
      # ??????????
      end_enemy_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.kind = 0
      @active_actor.current_action.basic = 0
      @active_actor.current_action.target_index = @enemy_arrow.index
      # ??????????????
      if @skill_window != nil
        # ?????????
        @active_actor.current_action.kind = 1
        # ?????????
        end_skill_select
      end
      # ???????????????
      if @item_window != nil
        # ?????????
        @active_actor.current_action.kind = 2
        # ??????????
        end_item_select
      end
      # ??????????
      end_enemy_select
      # ??????????????
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????? : ??????)
  #--------------------------------------------------------------------------
  def update_phase3_actor_select
    # ??????????????????
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ??????????????
      phase3_next_actor
      return
    end
    # ??????????
    @actor_arrow.update
    # B ??????????
    if Input.trigger?(Input::B)
      # ????? SE ???
      $game_system.se_play($data_system.cancel_se)
      # ??????????
      end_actor_select
      return
    end
    # C ??????????
    if Input.trigger?(Input::C)
      # ?? SE ???
      $game_system.se_play($data_system.decision_se)
      # ????????
      @active_actor.current_action.kind = 0
      @active_actor.current_action.basic = 0
      @active_actor.current_action.target_index = @actor_arrow.index
      # ??????????
      end_actor_select
      # ??????????????
      if @skill_window != nil
        # ?????????
        @active_actor.current_action.kind = 1
        # ?????????
        end_skill_select
      end
      # ???????????????
      if @item_window != nil
        # ?????????
        @active_actor.current_action.kind = 2
        # ??????????
        end_item_select
      end
      # ??????????????
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias :start_enemy_select_rtab :start_enemy_select
  def start_enemy_select
    @camera = "select"
    for enemy in $game_troop.enemies
      if enemy.exist?
        zoom = 1 / enemy.zoom
        @spriteset.screen_target(enemy.attack_x(zoom) * 0.75,
                                  enemy.attack_y(zoom) * 0.75, zoom)
        break
      end
    end
    # ????????
    start_enemy_select_rtab
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias :end_enemy_select_rtab :end_enemy_select
  def end_enemy_select
    # ????????
    end_enemy_select_rtab
    if (@action == 0 and not @action_battlers.empty?) or
          (@camera == "select" and (@active_actor.current_action.kind != 0 or
                                            @active_actor.animation1_id != 0))
      @spriteset.screen_target(0, 0, 1)
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def start_skill_select
    # ???????????
    @skill_window = Window_Skill.new(@active_actor)
    # ?????????????
    @skill_window.help_window = @help_window
    # ?????????????????
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end

#==============================================================================
# ? Scene_Battle (???? 4)
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def start_phase4
    $game_temp.battle_main_phase = true
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????)
  #--------------------------------------------------------------------------
  def update_phase4
    # ????????????????????????
    if $game_temp.forcing_battler != nil
      battler = $game_temp.forcing_battler
      if battler.current_action.forcing == false
        if @action_battlers.include?(battler)
          if @action > 0 or @action_battlers[0].phase == 1
            @action_battlers.delete(battler)
            @action_battlers.push(battler)
          end
          if battler.phase == 1
            battler.current_action.forcing = true
            force_action(battler)
          end
        else
          battler.current_action.forcing = true
          force_action(battler)
          action_start(battler)
          @action_battlers.delete(battler)
          @action_battlers.push(battler)
        end
        battler.at = @max
        battler.atp = 100 * battler.at / @max
      end
    end
    # action ?1???????????????
    for battler in @action_battlers.reverse
      # ????????
      if battler.wait > 0
        # ????????????
        battler.wait -= 1
        break if @action == 0
        next
      end
      unless fin? and battler.phase < 3 and
          not $game_system.battle_interpreter.running?
        action_phase(battler)
      end
      break if @action == 0
    end
    # ?????????????????????????
    if $game_temp.forcing_battler == nil
      # ??????????????
      setup_battle_event
      # ?????????????
      if $game_system.battle_interpreter.running?
        return
      end
    end
    for battler in @action_battlers.reverse
      if fin? and battler.phase < 3 and
          not $game_system.battle_interpreter.running?
        # ????????????????????????????????
        @action_battlers.delete(battler)
      end
    end
    if @action_battlers.empty? and not $game_system.battle_interpreter.running?
      # ????
      judge
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? (???????)
  #--------------------------------------------------------------------------
  def action_ph
« Last Edit: June 25, 2007, 08:09:32 PM by ChaosSoldier92 »