Class: Gemwarrior::Item
- Defined in:
- lib/gemwarrior/entities/item.rb
Direct Known Subclasses
Apple, ArenaDoor, ArenaMaster, Bed, Couch, Cup, Dagger, Dehumidifier, Feather, FloorTile, Flower, Gun, Herb, Keystone, Ladder, Map, MassiveDoor, Opalaser, Pedestal, Pond, Rope, SmallHole, Snowman, SparklyThing, Stalactite, Stone, Stonemite, Tent, Throne, Tree, Waterfall
Instance Attribute Summary collapse
-
#atk_hi ⇒ Object
Returns the value of attribute atk_hi.
-
#atk_lo ⇒ Object
Returns the value of attribute atk_lo.
-
#equippable ⇒ Object
Returns the value of attribute equippable.
-
#equipped ⇒ Object
Returns the value of attribute equipped.
-
#reuse ⇒ Object
Returns the value of attribute reuse.
-
#takeable ⇒ Object
Returns the value of attribute takeable.
-
#use(inventory = nil) ⇒ Object
Returns the value of attribute use.
-
#useable ⇒ Object
Returns the value of attribute useable.
Attributes inherited from Entity
Instance Method Summary collapse
Methods inherited from Entity
Instance Attribute Details
#atk_hi ⇒ Object
Returns the value of attribute atk_hi.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def atk_hi @atk_hi end |
#atk_lo ⇒ Object
Returns the value of attribute atk_lo.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def atk_lo @atk_lo end |
#equippable ⇒ Object
Returns the value of attribute equippable.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def equippable @equippable end |
#equipped ⇒ Object
Returns the value of attribute equipped.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def equipped @equipped end |
#reuse ⇒ Object
Returns the value of attribute reuse.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def reuse @reuse end |
#takeable ⇒ Object
Returns the value of attribute takeable.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def takeable @takeable end |
#use(inventory = nil) ⇒ Object
Returns the value of attribute use.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def use @use end |
#useable ⇒ Object
Returns the value of attribute useable.
8 9 10 |
# File 'lib/gemwarrior/entities/item.rb', line 8 def useable @useable end |
Instance Method Details
#describe ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/gemwarrior/entities/item.rb', line 21 def describe status_text = name.upcase.colorize(:green) status_text << "\n#{description} \n".colorize(:white) status_text << "ATTACK: #{atk_lo.to_s.rjust(2)}-#{atk_hi.to_s.rjust(2)} ".colorize(:white) unless atk_lo.nil? status_text << "TAKEABLE? #{takeable} ".colorize(:white) status_text << "USEABLE? #{useable} ".colorize(:white) status_text << "EQUIPPABLE? #{equippable} ".colorize(:white) status_text << "\n" end |