build/EBJB_BattleCommands.rb
#--------------------------------------------------------------------------
# * Create Battle Action (for automatic battle)
#--------------------------------------------------------------------------
Create Battle Action (for automatic battle)
Create Battle Action ( for automatic battle )
def make_autobattle_action
    @action.clear
    return unless movable?
    action = Game_BattleAction.new(self)
    command = self.autobattle_command
    if command.is_a?(Skill_Command)
      if command.is_custom
        action.forcing = true
      end
      if self.skill_can_use?(command.skill) || command.is_custom
        action.set_skill(command.skill.id)
      end
    elsif command.is_a?(Item_Command)
      if $game_party.item_can_use?(command.item)
        action.set_item(command.item.id)
      end
    else
      case command.type
      when BATTLECOMMANDS_CONFIG::BC_ATTACK 
        action.set_attack
      when BATTLECOMMANDS_CONFIG::BC_GUARD
        action.set_guard
      end
    end
    action.evaluate
    if action.value > 0
      @action = action
    end
  end
def make_autobattle_action @action . clear return unless movable? action = Game_BattleAction . new ( self ) command = self . autobattle_command if command . is_a? ( Skill_Command ) if command . is_custom action . forcing = true end if self . skill_can_use? ( command . skill ) || command . is_custom action . set_skill ( command . skill . id ) end elsif command . is_a? ( Item_Command ) if $game_party . item_can_use? ( command . item ) action . set_item ( command . item . id ) end else case command . type when BATTLECOMMANDS_CONFIG :: BC_ATTACK action . set_attack when BATTLECOMMANDS_CONFIG :: BC_GUARD action . set_guard end end action . evaluate if action . value > 0 @action = action end end
Create Battle Action (for automatic battle)
Create Battle Action ( for automatic battle )
#Keeps action if it has been evaluated, else don't do anything