Class: RubyWarrior::Units::Golem
- Defined in:
- lib/ruby_warrior/units/golem.rb
Instance Attribute Summary collapse
-
#max_health ⇒ Object
Returns the value of attribute max_health.
-
#turn ⇒ Object
writeonly
Sets the attribute turn.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#abilities, #add_abilities, #alive?, #bind, #bound?, #earn_points, #name, #next_turn, #perform_turn, #prepare_turn, #say, #take_damage, #unbind
Instance Attribute Details
#max_health ⇒ Object
Returns the value of attribute max_health.
5 6 7 |
# File 'lib/ruby_warrior/units/golem.rb', line 5 def max_health @max_health end |
#turn=(value) ⇒ Object (writeonly)
Sets the attribute turn
4 5 6 |
# File 'lib/ruby_warrior/units/golem.rb', line 4 def turn=(value) @turn = value end |
Instance Method Details
#attack_power ⇒ Object
11 12 13 |
# File 'lib/ruby_warrior/units/golem.rb', line 11 def attack_power 3 end |
#character ⇒ Object
15 16 17 |
# File 'lib/ruby_warrior/units/golem.rb', line 15 def character "G" end |
#play_turn(turn) ⇒ Object
7 8 9 |
# File 'lib/ruby_warrior/units/golem.rb', line 7 def play_turn(turn) @turn.call(turn) if @turn end |