Class: RPG::Armor

Inherits:
EquipItem show all
Defined in:
lib/rgss3/rpg.rb

Instance Attribute Summary collapse

Attributes inherited from EquipItem

#etype_id, #params, #price

Attributes inherited from BaseItem

#description, #features, #icon_index, #id, #name, #note

Instance Method Summary collapse

Constructor Details

#initializeArmor

Returns a new instance of Armor.



642
643
644
645
646
647
# File 'lib/rgss3/rpg.rb', line 642

def initialize
  super
  @atype_id = 0
  @etype_id = 1
  @features.push(RPG::BaseItem::Feature.new(22, 1, 0))
end

Instance Attribute Details

#atype_idObject

Returns the value of attribute atype_id.



651
652
653
# File 'lib/rgss3/rpg.rb', line 651

def atype_id
  @atype_id
end

Instance Method Details

#performanceObject



648
649
650
# File 'lib/rgss3/rpg.rb', line 648

def performance
  params[3] + params[5] + params.inject(0) {|r, v| r += v }
end