Class: Gemwarrior::Map

Inherits:
Item show all
Defined in:
lib/gemwarrior/entities/items/map.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

#initializeMap

Returns a new instance of Map.



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

def initialize
  super

  self.name         = 'map'
  self.name_display = 'Map'
  self.description  = 'The land of Jool is contained on this piece of canvas, in a useful, if not very detailed, manner.'
  self.takeable     = true
end

Instance Method Details

#use(world) ⇒ Object



17
18
19
20
21
# File 'lib/gemwarrior/entities/items/map.rb', line 17

def use(world)
  puts 'You unfold the piece of worn canvas and study the markings upon it, always making sure to update it with new places you find.'

  { type: 'action', data: 'map' }
end