Class: Gemwarrior::Opalaser

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

Instance Attribute Summary

Attributes inherited from Item

#atk_hi, #atk_lo, #consumable, #equippable, #equipped, #takeable, #useable, #used

Attributes inherited from Entity

#description, #name

Instance Method Summary collapse

Methods inherited from Item

#describe

Methods inherited from Entity

#status

Constructor Details

#initializeOpalaser

Returns a new instance of Opalaser.



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

def initialize
  self.name         = 'opalaser'
  self.description  = 'Gleaming with supernatural light, this object feels alien, yet familiar.'
  self.atk_lo       = 10
  self.atk_hi       = 12
  self.takeable     = true
  self.useable      = true
  self.equippable   = true
  self.equipped     = false
end

Instance Method Details

#use(player = nil) ⇒ Object



19
20
21
22
# File 'lib/gemwarrior/entities/items/opalaser.rb', line 19

def use(player = nil)
  puts 'You pull the "trigger" on the opalaser, but nothing happens.'
  {:type => nil, :data => nil}
end