RPG::Armor

The data class for armor.

Superclass

Attributes

atype_id

The armor type ID.

Method

performance

Evaluates armor performance. Used by the ultimate equipment command.

Returns the total of defense + magic defense + all parameters.

Definition

class RPG::Armor < RPG::EquipItem
  def initialize
    super
    @atype_id = 0
    @etype_id = 1
    @features.push(RPG::BaseItem::Feature.new(22, 1, 0))
  end
  def performance
    params[3] + params[5] + params.inject(0) {|r, v| r += v }
  end
  attr_accessor :atype_id
end