Class: RPG::Weapon

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

#initializeWeapon

Returns a new instance of Weapon.



626
627
628
629
630
631
632
# File 'lib/rgss3/rpg.rb', line 626

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

#animation_idObject

Returns the value of attribute animation_id.



637
638
639
# File 'lib/rgss3/rpg.rb', line 637

def animation_id
  @animation_id
end

#wtype_idObject

Returns the value of attribute wtype_id.



636
637
638
# File 'lib/rgss3/rpg.rb', line 636

def wtype_id
  @wtype_id
end

Instance Method Details

#performanceObject



633
634
635
# File 'lib/rgss3/rpg.rb', line 633

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