조회 수 4560 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

>실시간 전투 스크립트를 알려주세요.


다음을 넣으시면 됩니다. 하지만 가끔 행동에 제한이 걸릴때도 있으니.....

그리고 스크립트가 길다 보니, 디버깅하시거나 추가요소를 넣으실때 힘드실
겁니다.

# 깏귺깑?귽?갋귺긏긡귻긳긫긣깑(RTAB) Ver 1.11
# 봹븓뙰갋긖??긣URL
# http://members.jcom.home.ne.jp/cogwheel/

class Scene_Battle
  #--------------------------------------------------------------------------
  # 걶 뚺둎귽깛긚?깛긚빾릶
  #--------------------------------------------------------------------------
  attr_reader   :status_window            # 긚긡??긚긂귻깛긤긂
  attr_reader   :spriteset                # 긫긣깑긚긵깋귽긣
  attr_reader   :scroll_time              # 긚긏깏?깛댷벍딈?렄듩
  attr_reader   :zoom_rate                # 밎긫긣깋?딈?댧뭫
  attr_reader   :drive                    # 긇긽깋뗭벍
  attr_accessor :force                    # 귺긏긘깈깛떗맕뱗
  attr_accessor :camera                   # 뙸띪궻긇긽깋룋렃롌
  #--------------------------------------------------------------------------
  # 걶 ATB딈멳긜긞긣귺긞긵
  #--------------------------------------------------------------------------
  def atb_setup
    # ATB룊딖돸
    # speed   : 긫긣깑긚긯?긤뙂믦갃뭠궕룷궠궋귌궵몓궋
    # @active : 귺긏긡귻긳뱗먠믦
    #           3 : 륂궸귺긏긡귻긳륉뫴
    #           2 : 긚긌깑갋귺귽긡?멗묖뭷궻귒귺긏긡귻긳긒?긙궕?귏귡
    #           1 : 2궻륉뫴궸돿궑갂??긒긞긣멗묖렄귖긂긃귽긣궕?궔귡
    #           0 : 1궻륉뫴궸돿궑갂긓?깛긤볺쀍렄궸귖긂긃귽긣궕?궔귡
    # @action : 뫜릐궕뛱벍뭷궸렔빁귖뛱벍귩딳궞궥궞궴귩떀궥궔
    #           3 : 렔빁궕뛱벍븉?궳궶궋뙽귟뙽귟떀궥
    #           2 : 렔빁궕?긽?긙귩롷궚궲궋궶궋뙽귟떀궥
    #           1 : 2궻륉뫴궸돿궑갂??긒긞긣궕뛱벍궢궲궋궶궋뙽귟떀궥
    #           0 : 뛱벍귩떀궠궶궋갃룈붥궸뛱벍궢뢎궑귡귏궳뫲궰
    # @anime_wait : true궸궥귡궴긫긣깑귺긦긽갋?긽?긙?렑뭷궼긂긃귽긣궕?궔귡
    # @damage_wait : ?긽?긙?렑뫲궭렄듩걁뭁댧궼긲깒??걂
    # @after_wait : 뼞뺴갋밎멣뽅렄갂렅궻룉뿚궸댷귡귏궳궻뫲궭렄듩
    #               [a, b] a 궼뼞뺴멣뽅렄갂b 궼밎멣뽅렄걁뭁댧궼긲깒??걂
    # @enemy_speed : 밎궻럙뛩뫊뱗갃1궶귞뫂렄뛱벍갃
    #                1긲깒??뻽궸갂1/@enemy_speed궻둴뿦궳뛱벍귩딳궞궥
    # @force : 떗맕귺긏긘깈깛궳긚긌깑럊뾭렄궻떗맕뗰뜃
    #          2:긚긌깑궼멣궲뎣룯궧궦갂뷠궦뫂렄렳뛱
    #          1:뭁벲긚긌깑궼뎣룯궢갂쁀똤긚긌깑궻귒뫂렄렳뛱
    #          0:멣긚긌깑뎣룯귩뛱궎궬궚
    # ($scene.force = x 궴궥귡궞궴궸귝귟갂믅륂귽긹깛긣궻긚긏깏긵긣궔귞빾뛛됀?걂
    # @drive : 긇긽깋뗭벍ON/OFF갃true궳뗭벍ON갂false궳뗭벍OFF
    # @scroll_time : 긚긏깏?깛댷벍궸뾴궥귡딈?렄듩
    # @zoom_rate = [i, j] : 긄긨??궻긛??뿦
    #                       i 궕됪뽋띍뤵븫궸봹뭫궢궫렄궻둮묈뿦
    #                       j 궕됪뽋띍돷븫궸봹뭫궢궫렄궻둮묈뿦
    #                       1 ?궴궢궫궋궴궖귖갂1.0 궴뷠궦룷릶궳먠믦궥귡궞궴
    speed = 150
    @active = 1
    @action = 2
    @anime_wait = false
    @damage_wait = 10
    @after_wait = [80, 0]
    @enemy_speed = 40
    @force = 2
    @drive = true
    @scroll_time = 15
    @zoom_rate = [0.2, 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긒?긙Max렄SE
  #--------------------------------------------------------------------------
  def fullat_se
    Audio.se_play("Audio/SE/033-switch02", 80, 100)
  end
  #--------------------------------------------------------------------------
  # 걶 깒긹깑귺긞긵SE
  #--------------------------------------------------------------------------
  def levelup_se
    Audio.se_play("Audio/SE/056-Right02", 80, 100)
  end
  #--------------------------------------------------------------------------
  # 걶 긚긌깑뢐벦SE
  #--------------------------------------------------------------------------
  def skill_se
    Audio.se_play("Audio/SE/056-Right02", 80, 150)
  end
end

class Window_Base < Window
  #--------------------------------------------------------------------------
  # 걶 ATG 궻?됪
  #     actor : 귺긏??
  #     x     : ?됪먩 X 띆뷭
  #     y     : ?됪먩 Y 띆뷭
  #     width : ?됪먩궻븴
  #--------------------------------------------------------------------------
  def draw_actor_atg(actor, x, y, width = 144)
    if @at_gauge == nil
      # plus_x:X띆뷭궻댧뭫뺚맫 rate_x:X띆뷭궻댧뭫뺚맫(%) plus_y:Y띆뷭궻댧뭫뺚맫
      # plus_width:븴궻뺚맫 rate_width:븴궻뺚맫(%) height:뢢븴
      # align1:?됪?귽긵1 0:뜺땗귕 1:뭷돍뫓궑 2:덭땗귕
      # align2:?됪?귽긵2 0:뤵땗귕 1:뭷돍뫓궑 2:돷땗귕
      # align3:긒?긙?귽긵 0:뜺땗귕 1:덭땗귕
      @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
      # 긐깋긢?긘깈깛먠믦 grade1:뗴긒?긙 grade2:렳긒?긙
      # (0:돘궸긐깋긢?긘깈깛 1:뢢궸긐깋긢?긘깈깛 2:롈귕궸긐깋긢?긘깈깛걂
      grade1 = 1
      grade2 = 0
      # 륡먠믦갃color1:띍둖쁤갅color2:뭷쁤
      # color3:뗴쁤??긏긇깋?갅color4:뗴쁤깋귽긣긇깋?
      color1 = Color.new(0, 0, 0)
      color2 = Color.new(255, 255, 192)
      color3 = Color.new(0, 0, 0, 192)
      color4 = Color.new(0, 0, 64, 192)
      # 긒?긙궻륡먠믦
      # 믅륂렄궻륡먠믦
      color5 = Color.new(0, 64, 80)
      color6 = Color.new(0, 128, 160)
      # 긒?긙궕MAX궻렄궻륡먠믦
      color7 = Color.new(80, 0, 0)
      color8 = Color.new(240, 0, 0)
      # 쁀똤긚긌깑럊뾭렄궻륡먠믦
      color9 = Color.new(80, 64, 32)
      color10 = Color.new(240, 192, 96)
      # 긚긌깑뎣룯렄궻륡먠믦
      color11 = Color.new(80, 0, 64)
      color12 = Color.new(240, 0, 192)
      # 긒?긙궻?됪
      gauge_rect_at(@width, @height, @align3, color1, color2,
                  color3, color4, color5, color6, color7, color8,
                  color9, color10, color11, color12, grade1, grade2)
    end
    # 빾릶at궸?됪궥귡긒?긙궻븴귩묆볺
    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 > width
      at = width
    end
    # 긒?긙궻뜺땗갋뭷돍?궑뱳궻뺚맫
    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, Rect.new(0, 0, @width, @height))
    if @align3 == 0
      rect_x = 0
    else
      x += @width - at - 1
      rect_x = @width - at - 1
    end
    # 긒?긙궻륡먠믦
    if at == width
        # MAX렄궻긒?긙?됪
      self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                        @at_gauge, Rect.new(rect_x, @height * 2, at, @height))
    else
      if actor.rtp == 0
        # 믅륂렄궻긒?긙?됪
        self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                          @at_gauge, Rect.new(rect_x, @height, at, @height))
      else
        if actor.spell == true
          # 쁀똤긚긌깑럊뾭렄궻긒?긙?됪
          self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                        @at_gauge, Rect.new(rect_x, @height * 3, at, @height))
        else
          # 긚긌깑뎣룯렄궻긒?긙?됪
          self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                        @at_gauge, Rect.new(rect_x, @height * 4, at, @height))
        end
      end
    end
  end
end

#==============================================================================
# 걾 Scene_Battle (빁뒆믦? 1)
#------------------------------------------------------------------------------
# ?긫긣깑됪뽋궻룉뿚귩뛱궎긏깋긚궳궥갃
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # 걶 긽귽깛룉뿚
  #--------------------------------------------------------------------------
  def main
    # 먰벉뾭궻둫롰덇렄긢??귩룊딖돸
    $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
    # 긫긣깑귽긹깛긣뾭귽깛?긵깏?귩룊딖돸
    $game_system.battle_interpreter.setup(nil, 0)
    # 긣깑?긵귩?뷈
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    atb_setup
    # 귺긏??긓?깛긤긂귻깛긤긂귩띿맟
    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, s4])
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # 궩궻뫜궻긂귻깛긤긂귩띿맟
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # 긚긵깋귽긣긜긞긣귩띿맟
    @spriteset = Spriteset_Battle.new
    # 긂긃귽긣긇긂깛긣귩룊딖돸
    @wait_count = 0
    # 긣깋깛긙긘깈깛렳뛱
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
    # 긵깒긫긣깑긲긃?긛둎럑
    start_phase1
    # 긽귽깛깑?긵
    loop do
      # 긒??됪뽋귩뛛륷
      Graphics.update
      # 볺쀍륃뺪귩뛛륷
      Input.update
      # 긲깒??뛛륷
      update
      # 됪뽋궕먛귟뫶귦궯궫귞깑?긵귩뭷뭚
      if $scene != self
        break
      end
    end
    # ?긞긵귩깏긲깒긞긘깄
    $game_map.refresh
    # 긣깋깛긙긘깈깛?뷈
    Graphics.freeze
    # 긂귻깛긤긂귩됶뺳
    @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 != nil
      @result_window.dispose
    end
    # 긚긵깋귽긣긜긞긣귩됶뺳
    @spriteset.dispose
    # ?귽긣깑됪뽋궸먛귟뫶궑뭷궻뤾뜃
    if $scene.is_a?(Scene_Title)
      # 됪뽋귩긲긃?긤귺긂긣
      Graphics.transition
      Graphics.freeze
    end
    # 먰벉긡긚긣궔귞긒??긆?긫?됪뽋댥둖궸먛귟뫶궑뭷궻뤾뜃
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # 걶 룦봲뵽믦
  #--------------------------------------------------------------------------
  def judge
    # 멣뽅뵽믦궕?갂귏궫궼긬?긡귻릐릶궕 0 릐궻뤾뜃
    if $game_party.all_dead? or $game_party.actors.size == 0
      # 봲뻢됀?궻뤾뜃
      if $game_temp.battle_can_lose
        # 긫긣깑둎럑멟궻 BGM 궸뽣궥
        $game_system.bgm_play($game_temp.map_bgm)
        # 긫긣깑뢎뿹
        battle_end(2)
        # true 귩뺅궥
        return true
      end
      # 긒??긆?긫?긲깋긐귩긜긞긣
      $game_temp.gameover = true
      # true 귩뺅궥
      return true
    end
    # 긄긨??궕 1 뫬궳귖뫔띪궥귢궽 false 귩뺅궥
    for enemy in $game_troop.enemies
      if enemy.exist?
        return false
      end
    end
    # 귺긲??긫긣깑긲긃?긛둎럑 (룦뿕)
    start_phase5
    # true 귩뺅궥
    return true
  end
  #--------------------------------------------------------------------------
  # 걶 긲깒??뛛륷
  #--------------------------------------------------------------------------
  def update
    # 긫긣깑귽긹깛긣렳뛱뭷궻뤾뜃
    if $game_system.battle_interpreter.running?
      if @command.size > 0
        @command_a = false
        @command = []
        command_delete
      end
      @status_window.at_refresh
      # 귽깛?긵깏?귩뛛륷
      $game_system.battle_interpreter.update
      # 귺긏긘깈깛귩떗맕궠귢궲궋귡긫긣깋?궕뫔띪궢궶궋뤾뜃
      if $game_temp.forcing_battler == nil
        # 긫긣깑귽긹깛긣궻렳뛱궕뢎귦궯궫뤾뜃
        unless $game_system.battle_interpreter.running?
          # 긫긣깑귽긹깛긣궻긜긞긣귺긞긵귩띋렳뛱
          @status_window.refresh
          setup_battle_event
        end
      end
    end
    # 긘긚긡? (?귽??)갂됪뽋귩뛛륷
    $game_system.update
    $game_screen.update
    # ?귽??궕 0 궸궶궯궫뤾뜃
    if $game_system.timer_working and $game_system.timer == 0
      # 긫긣깑뭷뭚
      $game_temp.battle_abort = true
    end
    # 긂귻깛긤긂귩뛛륷
    @help_window.update
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    @message_window.update
    # 긚긵깋귽긣긜긞긣귩뛛륷
    @spriteset.update
    # 긣깋깛긙긘깈깛룉뿚뭷궻뤾뜃
    if $game_temp.transition_processing
      # 긣깋깛긙긘깈깛룉뿚뭷긲깋긐귩긏깏귺
      $game_temp.transition_processing = false
      # 긣깋깛긙긘깈깛렳뛱
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # 긽긞긜?긙긂귻깛긤긂?렑뭷궻뤾뜃
    if $game_temp.message_window_showing
      return
    end
    # 긒??긆?긫?궻뤾뜃
    if $game_temp.gameover
      # 긒??긆?긫?됪뽋궸먛귟뫶궑
      $scene = Scene_Gameover.new
      return
    end
    # ?귽긣깑됪뽋궸뽣궥뤾뜃
    if $game_temp.to_title
      # ?귽긣깑됪뽋궸먛귟뫶궑
      $scene = Scene_Title.new
      return
    end
    # 긫긣깑뭷뭚궻뤾뜃
    if $game_temp.battle_abort
      # 긫긣깑둎럑멟궻 BGM 궸뽣궥
      $game_system.bgm_play($game_temp.map_bgm)
      # 긫긣깑뢎뿹
      battle_end(1)
      return
    end
    # 긶깑긵긂귻깛긤긂?렑뭷궻뤾뜃
    if @help_wait > 0
      @help_wait -= 1
      if @help_wait == 0
        # 긶깑긵긂귻깛긤긂귩덨궥
        @help_window.visible = false
      end
    end
    # 긲긃?긛궸귝궯궲빁딌
    case @phase
    when 0  # AT긒?긙뛛륷긲긃?긛
      if anime_wait_return
        update_phase0
      end
    when 1  # 긵깒긫긣깑긲긃?긛
      update_phase1
      return
    when 2  # 긬?긡귻긓?깛긤긲긃?긛
      update_phase2
      return
    when 5  # 귺긲??긫긣깑긲긃?긛
      update_phase5
      return
    end
    if $scene != self
      return
    end
    if @phase == 0
      if @command.size != 0  # 귺긏??긓?깛긤긲긃?긛
        if @command_a == false
          start_phase3
        end
        update_phase3
      end
      # 긂긃귽긣뭷궻뤾뜃
      if @wait_count > 0
        # 긂긃귽긣긇긂깛긣귩뙵귞궥
        @wait_count -= 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 update_phase2_escape
    # 긄긨??궻멹몓궠빟뗉뭠귩똶럁
    enemies_agi = 0
    enemies_number = 0
    for enemy in $game_troop.enemies
      if enemy.exist?
        enemies_agi += enemy.agi
        enemies_number += 1
      end
    end
    if enemies_number > 0
      enemies_agi /= enemies_number
    end
    # 귺긏??궻멹몓궠빟뗉뭠귩똶럁
    actors_agi = 0
    actors_number = 0
    for actor in $game_party.actors
      if actor.exist?
        actors_agi += actor.agi
        actors_number += 1
      end
    end
    if actors_number > 0
      actors_agi /= actors_number
    end
    # 벀몪맟뚻뵽믦
    success = rand(100) < 50 * actors_agi / enemies_agi
    # 벀몪맟뚻궻뤾뜃
    if success
      # 벀몪 SE 귩뎶몋
      $game_system.se_play($data_system.escape_se)
      # 긫긣깑둎럑멟궻 BGM 궸뽣궥
      $game_system.bgm_play($game_temp.map_bgm)
      # 긫긣깑뢎뿹
      battle_end(1)
    # 벀몪렪봲궻뤾뜃
    else
      @help_window.set_text("벀몪렪봲", 1)
      @help_wait = @help_time
      # 긬?긡귻멣덒궻귺긏긘깈깛귩긏깏귺
      $game_party.clear_actions
      # 긽귽깛긲긃?긛둎럑
      start_phase4
    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[i]
      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
    if victory?
      return
    end
    # 긽귽깛긲긃?긛긲깋긐귩긏깏귺
    $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
    if victory? and @command_a
      command_delete
      @command.push(@active_actor)
      return
    end
    # 긄긨??귺깓?궕뾎뚼궻뤾뜃
    if @enemy_arrow != nil
      update_phase3_enemy_select
    # 귺긏??귺깓?궕뾎뚼궻뤾뜃
    elsif @actor_arrow != nil
      update_phase3_actor_select
    # 긚긌깑긂귻깛긤긂궕뾎뚼궻뤾뜃
    elsif @skill_window != nil
      update_phase3_skill_select
    # 귺귽긡?긂귻깛긤긂궕뾎뚼궻뤾뜃
    elsif @item_window != nil
      update_phase3_item_select
    # 귺긏??긓?깛긤긂귻깛긤긂궕뾎뚼궻뤾뜃
    elsif @actor_command_window.active
      update_phase3_basic_command
    end
  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
?

List of Articles
번호 제목 글쓴이 날짜 조회 수
8828 형제들이여 !!! 나를 구제해다오!! Ress 2006.01.26 173
8827 형제들이여 !!! 나를 구제해다오!! KaSsia 2006.01.25 207
8826 rpg2003에서 music음향이 작업시에는 실행되는데 게임을 실행하면 않되네요 ★샤일☆ 2007.01.03 751
8825 RPG2003의 그림들의 사이즈... MiNi'M' 2006.02.21 781
8824 RPG만들기2003에 관하여...정말 굼금해요~!~부탁드림 ∑☆メ이누∴。』 2005.08.09 521
8823 게이지바 구동 방법좀 <<게이지 유>> file 랑이a 2006.07.03 377
8822 길드는 어떻게 만드나요? 루넨스 2009.06.15 947
8821 길드는 어떻게 만드나요? 제로스 2009.06.15 1208
8820 동영상 관련및.. 급해요 ㅠ RML 2006.07.12 1454
8819 마법 연계 다시 질문!!! 제발 대답부탁!!; file 나르카이제 2005.06.15 296
8818 몬스터가없으면 다른곳으로 자동이동가능? Novelist 2006.08.29 261
8817 몬스터가없으면 다른곳으로 자동이동가능? CredMotion 2006.08.29 307
8816 스크립트로요,, 이동하는걸 보드게임처럼 할순 없나요? XLostTimesX 2006.01.09 385
8815 아이템창 같은 단축창를 만들려고하는데..[rpg2003] ScolPion 2006.04.15 530
8814 아이템창 같은 단축창를 만들려고하는데..[rpg2003] 방콕족의생활 2006.04.15 748
8813 질문! file 『Q트_아키』 2005.05.22 449
8812 "스크립트 데이터 읽기 실패" 라고 뜨는데.. 김세츠나 2009.07.31 1038
8811 "클래스가 등록되지 않았습니다"라니 -0-;;[RPG2003] Chrishyua .E 2007.03.02 639
8810 "클래스가 등록되지 않았습니다"라니 -0-;;[RPG2003] =ROD= 2007.03.07 856
8809 "파일 dmd 은 열지 않습니다" 이리저디 옮겼는데.. 윈드 2006.08.18 182
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 442 Next
/ 442






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)