Class: Gemwarrior::FloorTile

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

Instance Attribute Summary

Attributes inherited from Item

#atk_hi, #atk_lo, #equippable, #equipped, #reuse, #takeable, #useable

Attributes inherited from Entity

#description, #name

Instance Method Summary collapse

Methods inherited from Item

#describe

Methods inherited from Entity

#status

Constructor Details

#initializeFloorTile

Returns a new instance of FloorTile.



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

def initialize
  self.name         = 'floor_tile'
  self.description  = 'One of the floor tiles, rough-hewn but immaculate, looks...off. Pressable, even.'
  self.atk_lo       = nil
  self.atk_hi       = nil
  self.takeable     = false
  self.useable      = true
  self.equippable   = false
  self.equipped     = false
end

Instance Method Details

#use(player = nil) ⇒ Object



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

def use(player = nil)
  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
  player.movements_made += 1

  Animation::run({ :phrase => '*** SHOOOOOM ***' })

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