# 仱仮仱 憰旛懏惈庢摼儔僀僽儔儕 仱仮仱
#
# update 2006/ 4/11
#
#==============================================================================
# --- 憰旛懏惈庢摼儔僀僽儔儕 ---
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# 仜 僗僉儖偺懏惈庢摼
#--------------------------------------------------------------------------
def skill_element_set(skill)
return skill.nil? ? [] : skill.element_set
end
#--------------------------------------------------------------------------
# 仜 慡憰旛偺懏惈庢摼
#--------------------------------------------------------------------------
def equip_element_set
return self.element_set + self.guard_element_set
end
#--------------------------------------------------------------------------
# 仜 慡杊嬶偺懏惈庢摼
#--------------------------------------------------------------------------
def guard_element_set
return []
end
end
class Game_Actor < Game_Battler
def guard_element_set
set = []
for id in self.armor_ids
next if id.nil?
armor = $data_armors[id]
set += (armor != nil ? armor.guard_element_set : [])
end
return set
end
#--------------------------------------------------------------------------
# 仜 晲婍 ID攝楍
#--------------------------------------------------------------------------
def weapon_ids
@weapon_ids = [] if @weapon_ids == nil
@weapon_ids[0] = @weapon_id
return @weapon_ids
end
#--------------------------------------------------------------------------
# 仜 杊嬶 ID攝楍
#--------------------------------------------------------------------------
def armor_ids
@armor_ids = [] if @armor_ids == nil
@armor_ids[0] = @armor1_id
@armor_ids[1] = @armor2_id
@armor_ids[2] = @armor3_id
@armor_ids[3] = @armor4_id
return @armor_ids
end
#--------------------------------------------------------------------------
# 仜 憰旛攝楍偺庢摼
#--------------------------------------------------------------------------
def equipments
equipments = []
self.weapon_ids.each {|id| equipments.push($data_weapons[id])}
self.armor_ids.each {|id| equipments.push($data_armors[id])}
return equipments
end
#--------------------------------------------------------------------------
# 仜 憰旛拞丠
#--------------------------------------------------------------------------
def equiping?(item)
case item
when RPG::Weapon
return self.weapon_ids.include?(item.id)
when RPG::Armor
return self.armor_ids.include?(item.id)
else
return false
end
end
end