build/EBJB_BattleCommands.rb
#--------------------------------------------------------------------------
# * Check if actor has a specific battle command
#     obj : Item, Skill or Battle Command object
#--------------------------------------------------------------------------
Check if actor has a specific battle command
obj : Item, Skill or Battle Command object
Check if actor has a specific battle command obj : Item Skill or Battle Command object
def is_command_equipped?(obj)
    if (obj.is_a?(RPG::Item))
      return active_battle_commands.any?{|c| c.is_a?(Item_Command) && c.item_id == obj.id} 
    elsif (obj.is_a?(RPG::Skill))
      return active_battle_commands.any?{|c| c.is_a?(Skill_Command) && c.skill_id == obj.id} 
    elsif (obj.is_a?(Battle_Command))
      return active_battle_commands.include?(obj)
    end
    return false
  end
def is_command_equipped? ( obj ) if ( obj . is_a? ( RPG :: Item ) ) return active_battle_commands . any? { | c | c . is_a? ( Item_Command ) && c . item_id == obj . id } elsif ( obj . is_a? ( RPG :: Skill ) ) return active_battle_commands . any? { | c | c . is_a? ( Skill_Command ) && c . skill_id == obj . id } elsif ( obj . is_a? ( Battle_Command ) ) return active_battle_commands . include? ( obj ) end return false end
Check if actor has a specific battle command
obj : Item, Skill or Battle Command object
Check if actor has a specific battle command obj : Item Skill or Battle Command object
obj
<not_specific>