Class: Gemwarrior::FloorTile

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

Constant Summary collapse

MOVE_TEXT =

CONSTANTS

'** SHOOOOOM **'

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

#initializeFloorTile

Returns a new instance of FloorTile.



11
12
13
14
15
16
17
# File 'lib/gemwarrior/entities/items/floor_tile.rb', line 11

def initialize
  super

  self.name         = 'floor_tile'
  self.name_display = 'Floor Tile'
  self.description  = 'One of the floor tiles, rough-hewn but immaculate, looks...off. Pressable, even.'
end

Instance Method Details

#use(world) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/gemwarrior/entities/items/floor_tile.rb', line 19

def use(world)
  puts 'You slowly lower your foot onto the tile, and then gently depress it, through the floor. Your whole body begins to feel light, lifeless. You black out.'
  puts

  # stats
  world.player.movements_made += 1

  Animation.run(phrase: MOVE_TEXT)

  { type: 'move', data: 'Rock Piles' }
end