Class: Gemwarrior::SandJewel

Inherits:
Item show all
Defined in:
lib/gemwarrior/entities/items/sand_jewel.rb

Instance Attribute Summary

Attributes inherited from Item

#is_armor, #is_weapon

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

Methods inherited from Item

#describe_detailed

Methods inherited from Entity

#puts

Constructor Details

#initializeSandJewel

Returns a new instance of SandJewel.



8
9
10
11
12
13
14
# File 'lib/gemwarrior/entities/items/sand_jewel.rb', line 8

def initialize
  super

  self.name         = 'sand_jewel'
  self.name_display = 'Sand Jewel'
  self.description  = 'As blue (or is it violet? or brown?) as it is brittle, this shiny rock feels warm to the touch.'
end

Instance Method Details

#use(world) ⇒ Object



16
17
18
19
# File 'lib/gemwarrior/entities/items/sand_jewel.rb', line 16

def use(world)
  puts 'You lift the sand jewel to the sky; rays of sunlight refract through it and nearly blind you.'
  { type: nil, data: nil }
end