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