Class: RubyWarrior::Abilities::Bind
- Defined in:
- lib/ruby_warrior/abilities/bind.rb
Instance Method Summary collapse
Methods inherited from Base
#damage, #initialize, #offset, #pass_turn, #space, #unit, #verify_direction
Constructor Details
This class inherits a constructor from RubyWarrior::Abilities::Base
Instance Method Details
#description ⇒ Object
4 5 6 |
# File 'lib/ruby_warrior/abilities/bind.rb', line 4 def description "#{R18n.t.bind.description}" end |
#perform(direction = :forward) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ruby_warrior/abilities/bind.rb', line 8 def perform(direction = :forward) verify_direction(direction) receiver = unit(direction) if receiver @unit.say R18n.t.bind.and_restricts(R18n.t.direction[direction], "#{receiver}") receiver.bind else @unit.say "#{R18n.t.bind.and_restricts_nothing(R18n.t.direction[direction])}" end end |