Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mention direction when ability is performed - closes #19

  • Loading branch information...
commit e3510ee59bd4e93f9fd9cf4728e9897db9993ad3 1 parent 33cbf8e
@ryanb authored
View
3  CHANGELOG.rdoc
@@ -1,3 +1,6 @@
+* Mention direction when ability is performed
+
+
0.1.1 (Jan 3, 2010)
* Speeding up play speed a little
View
6 lib/ruby_warrior/abilities/attack.rb
@@ -2,13 +2,13 @@ module RubyWarrior
module Abilities
class Attack < Base
def description
- "Attack the unit in given direction (forward by default)."
+ "Attacks a unit in given direction (forward by default)."
end
def perform(direction = :forward)
receiver = unit(direction)
if receiver
- @unit.say "attacks #{receiver}"
+ @unit.say "attacks #{direction} and hits #{receiver}"
if direction == :backward
power = (@unit.attack_power/2.0).ceil
else
@@ -16,7 +16,7 @@ def perform(direction = :forward)
end
damage(receiver, power)
else
- @unit.say "attacks and hits nothing"
+ @unit.say "attacks #{direction} and hits nothing"
end
end
end
View
6 lib/ruby_warrior/abilities/bind.rb
@@ -2,16 +2,16 @@ module RubyWarrior
module Abilities
class Bind < Base
def description
- "Bind unit in given direction to keep him from moving (forward by default)."
+ "Binds a unit in given direction to keep him from moving (forward by default)."
end
def perform(direction = :forward)
receiver = unit(direction)
if receiver
- @unit.say "binds #{receiver}"
+ @unit.say "binds #{direction} and restricts #{receiver}"
receiver.bind
else
- @unit.say "binds nothing"
+ @unit.say "binds #{direction} and restricts nothing"
end
end
end
View
2  lib/ruby_warrior/abilities/direction_of_stairs.rb
@@ -10,4 +10,4 @@ def perform
end
end
end
-end
+end
View
2  lib/ruby_warrior/abilities/explode.rb
@@ -7,7 +7,7 @@ def description
def perform
if @unit.position
- @unit.say "explodes, collapsing the cealing and damanging every unit."
+ @unit.say "explodes, collapsing the ceiling and damanging every unit."
@unit.position.floor.units.map do |unit|
unit.take_damage(100)
end
View
2  lib/ruby_warrior/abilities/look.rb
@@ -2,7 +2,7 @@ module RubyWarrior
module Abilities
class Look < Base
def description
- "Returns an array of Spaces in given direction (forward by default)."
+ "Returns an array of Spaces in the given direction (forward by default)."
end
def perform(direction = :forward)
View
4 lib/ruby_warrior/abilities/rescue.rb
@@ -8,14 +8,14 @@ def description
def perform(direction = :forward)
if space(direction).captive?
recipient = unit(direction)
- @unit.say "unbinds #{recipient}"
+ @unit.say "unbinds #{direction} and rescues #{recipient}"
recipient.unbind
if recipient.kind_of? Units::Captive
recipient.position = nil
@unit.earn_points(20)
end
else
- @unit.say "rescues nothing"
+ @unit.say "unbinds #{direction} and rescues nothing"
end
end
end
View
2  lib/ruby_warrior/abilities/shoot.rb
@@ -8,7 +8,7 @@ def description
def perform(direction = :forward)
receiver = multi_unit(direction, 1..3).compact.first
if receiver
- @unit.say "shoots #{receiver}"
+ @unit.say "shoots #{direction} and hits #{receiver}"
damage(receiver, @unit.shoot_power)
else
@unit.say "shoots and hits nothing"
View
2  lib/ruby_warrior/abilities/walk.rb
@@ -2,7 +2,7 @@ module RubyWarrior
module Abilities
class Walk < Base
def description
- "Move in given direction (forward by default)."
+ "Move in the given direction (forward by default)."
end
def perform(direction = :forward)
Please sign in to comment.
Something went wrong with that request. Please try again.