Class: Goby::Helmet
- Includes:
- Equippable
- Defined in:
- lib/goby/item/helmet.rb
Overview
Can be worn in the Player’s outfit.
Constant Summary
Constants inherited from Item
Instance Attribute Summary collapse
-
#stat_change ⇒ Object
readonly
Returns the value of attribute stat_change.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Item
#consumable, #disposable, #name, #price
Instance Method Summary collapse
-
#initialize(name: "Helmet", price: 0, consumable: false, disposable: true, stat_change: {}) ⇒ Helmet
constructor
A new instance of Helmet.
Methods included from Equippable
#alter_stats, #equip, #unequip, #use
Methods inherited from Item
Constructor Details
#initialize(name: "Helmet", price: 0, consumable: false, disposable: true, stat_change: {}) ⇒ Helmet
Returns a new instance of Helmet.
14 15 16 17 18 |
# File 'lib/goby/item/helmet.rb', line 14 def initialize(name: "Helmet", price: 0, consumable: false, disposable: true, stat_change: {}) super(name: name, price: price, consumable: consumable, disposable: disposable) @type = :helmet @stat_change = stat_change end |
Instance Attribute Details
#stat_change ⇒ Object (readonly)
Returns the value of attribute stat_change.
20 21 22 |
# File 'lib/goby/item/helmet.rb', line 20 def stat_change @stat_change end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
20 21 22 |
# File 'lib/goby/item/helmet.rb', line 20 def type @type end |