Class: Gemwarrior::TowerSwitch
- Defined in:
- lib/gemwarrior/entities/items/tower_switch.rb
Instance Attribute Summary
Attributes inherited from Item
#atk_hi, #atk_lo, #equippable, #equipped, #reuse, #takeable, #useable
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize ⇒ TowerSwitch
constructor
A new instance of TowerSwitch.
- #use(player = nil) ⇒ Object
Methods inherited from Item
Methods inherited from Entity
Constructor Details
#initialize ⇒ TowerSwitch
Returns a new instance of TowerSwitch.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gemwarrior/entities/items/tower_switch.rb', line 8 def initialize self.name = 'tower_switch' self.description = 'A pedestal about 4 feet in height rises up from the ground, a switch atop it. It is labeled "Tower" with choices for "Yes" and "No". It is set to "No".' 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 |
# File 'lib/gemwarrior/entities/items/tower_switch.rb', line 19 def use(player = nil) puts 'You move the switch from "No" to "Yes". Suddenly, a great wind picks up and you are gently lifted up by it. The ground moves away and your whole body begins to gently drift towards Emerald\'s compound high in the stratosphere.' puts Animation::run({ :phrase => '*** WHOOOOOSH ***' }) {:type => 'move', :data => 'Sky Tower (Entryway)'} end |