build/EBJB_BattleCommands.rb
#--------------------------------------------------------------------------
# * Execute battle commands
#     actor : Actor object
#--------------------------------------------------------------------------
Execute battle commands
actor : Actor object
Execute battle commands actor : Actor object
def execute_battle_commands(actor)
    command = @actor_command_window.selected_command
    if command.is_a?(List_Command)
      case command.type
      when BATTLECOMMANDS_CONFIG::BC_SKILL
        Sound.play_decision
        @skill_window.filter = command.filter
        start_skill_selection(actor)  
      when BATTLECOMMANDS_CONFIG::BC_ITEM
        Sound.play_decision
        @item_window.filter = command.filter
        start_item_selection
      end
    elsif command.is_a?(Skill_Command)
      if command.is_custom
        actor.action.forcing = true
      end
      if actor.skill_can_use?(command.skill) || command.is_custom
        Sound.play_decision
        @actor_command_window.active = false
        determine_skill(command.skill)
      else
        Sound.play_buzzer
      end
    elsif command.is_a?(Item_Command)
      if $game_party.item_can_use?(command.item)
        Sound.play_decision
        @actor_command_window.active = false
        determine_item(command.item)
      else
        Sound.play_buzzer
      end
    else
      case command.type
      when BATTLECOMMANDS_CONFIG::BC_ATTACK 
        Sound.play_decision
        actor.action.set_attack
        start_target_enemy_selection
      when BATTLECOMMANDS_CONFIG::BC_GUARD
        Sound.play_decision
        actor.action.set_guard
        add_to_battleline(actor)
        end_actor_command_selection()
      end
    end
  end
def execute_battle_commands ( actor ) command = @actor_command_window . selected_command if command . is_a? ( List_Command ) case command . type when BATTLECOMMANDS_CONFIG :: BC_SKILL Sound . play_decision @skill_window . filter = command . filter start_skill_selection ( actor ) when BATTLECOMMANDS_CONFIG :: BC_ITEM Sound . play_decision @item_window . filter = command . filter start_item_selection end elsif command . is_a? ( Skill_Command ) if command . is_custom actor . action . forcing = true end if actor . skill_can_use? ( command . skill ) || command . is_custom Sound . play_decision @actor_command_window . active = false determine_skill ( command . skill ) else Sound . play_buzzer end elsif command . is_a? ( Item_Command ) if $game_party . item_can_use? ( command . item ) Sound . play_decision @actor_command_window . active = false determine_item ( command . item ) else Sound . play_buzzer end else case command . type when BATTLECOMMANDS_CONFIG :: BC_ATTACK Sound . play_decision actor . action . set_attack start_target_enemy_selection when BATTLECOMMANDS_CONFIG :: BC_GUARD Sound . play_decision actor . action . set_guard add_to_battleline ( actor ) end_actor_command_selection ( ) end end end
Execute battle commands
actor : Actor object
Execute battle commands actor : Actor object
actor
<not_specific>