Class: Gemwarrior::Stone
- Defined in:
- lib/gemwarrior/entities/weapons/stone.rb
Instance Attribute Summary
Attributes inherited from Weapon
#atk_hi, #atk_lo, #dex_mod, #is_weapon
Attributes inherited from Item
Attributes inherited from Entity
#consumable, #describe, #describe_detailed, #description, #display_shopping_cart, #equippable, #equipped, #name, #name_display, #number_of_uses, #takeable, #talkable, #useable, #useable_battle, #used, #used_again
Instance Method Summary collapse
-
#initialize ⇒ Stone
constructor
A new instance of Stone.
- #use(world) ⇒ Object
Methods inherited from Weapon
Methods inherited from Item
Methods inherited from Entity
Constructor Details
#initialize ⇒ Stone
Returns a new instance of Stone.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gemwarrior/entities/weapons/stone.rb', line 8 def initialize super self.name = 'stone' self.name_display = 'Stone' self.description = 'A small, yet quite sharp, sedimentary pebble, suitable for tossing in amusement, and perhaps combat.' self.atk_lo = 1 self.atk_hi = 2 self.dex_mod = -1 end |
Instance Method Details
#use(world) ⇒ Object
19 20 21 22 |
# File 'lib/gemwarrior/entities/weapons/stone.rb', line 19 def use(world) puts 'You toss the stone a few feet into the air, and then it falls back into your palm. The experience was truly thrilling.' { type: nil, data: nil } end |