Permalink
Browse files

mention direction when ability is performed - closes #19

  • Loading branch information...
1 parent 33cbf8e commit e3510ee59bd4e93f9fd9cf4728e9897db9993ad3 @ryanb committed Jan 3, 2010
View
@@ -1,3 +1,6 @@
+* Mention direction when ability is performed
+
+
0.1.1 (Jan 3, 2010)
* Speeding up play speed a little
@@ -2,21 +2,21 @@ 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
power = @unit.attack_power
end
damage(receiver, power)
else
- @unit.say "attacks and hits nothing"
+ @unit.say "attacks #{direction} and hits nothing"
end
end
end
@@ -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
@@ -10,4 +10,4 @@ def perform
end
end
end
-end
+end
@@ -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
@@ -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)
@@ -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
@@ -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"
@@ -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)

0 comments on commit e3510ee

Please sign in to comment.