Class: RPG::Armor
Instance Attribute Summary (collapse)
-
- (Object) atype_id
Returns the value of attribute atype_id.
Attributes inherited from EquipItem
Attributes inherited from BaseItem
#description, #features, #icon_index, #id, #name, #note
Instance Method Summary (collapse)
-
- (Armor) initialize
constructor
A new instance of Armor.
- - (Object) performance
Constructor Details
- (Armor) initialize
Returns a new instance of Armor
3 4 5 6 7 8 |
# File 'lib/rpg/armor.rb', line 3 def initialize super @atype_id = 0 @etype_id = 1 @features.push(RPG::BaseItem::Feature.new(22, 1, 0)) end |
Instance Attribute Details
- (Object) atype_id
Returns the value of attribute atype_id
12 13 14 |
# File 'lib/rpg/armor.rb', line 12 def atype_id @atype_id end |
Instance Method Details
- (Object) performance
9 10 11 |
# File 'lib/rpg/armor.rb', line 9 def performance params[3] + params[5] + params.inject(0) {|r, v| r += v } end |