The data class for weapons.
The weapon type ID.
The animation ID when using the weapon.
Evaluates weapon performance. Used by the Ultimate Equipment command.
Returns the total of attack + magic defense + all parameters.
class RPG::Weapon < RPG::EquipItem
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
def performance
params[2] + params[4] + params.inject(0) {|r, v| r += v }
end
attr_accessor :wtype_id
attr_accessor :animation_id
end