Browse files

adding golem abilities to player README

  • Loading branch information...
1 parent 3b7d8d2 commit 6dfd0f2394c57f8393dbdcaaad6c09dff8f561dd @ryanb committed Jun 6, 2010
Showing with 14 additions and 1 deletion.
  1. +4 −0 lib/ruby_warrior/units/warrior.rb
  2. +10 −1 templates/README.erb
View
4 lib/ruby_warrior/units/warrior.rb
@@ -59,6 +59,10 @@ def add_golem_abilities(*abilities)
@golem_abilities += abilities
end
+ def has_golem?
+ !@golem_abilities.empty?
+ end
+
def base_golem
golem = Golem.new
golem.add_abilities *@golem_abilities
View
11 templates/README.erb
@@ -12,9 +12,18 @@ Tip: <%= level.tip %>
<%- end -%>
-Available Abilities:
+Warrior Abilities:
<%- level.warrior.abilities.each do |name, ability| -%>
warrior.<%= name %>
<%= ability.description %>
<%- end -%>
+<%- if level.warrior.has_golem? -%>
+
+Golem Abilities:
+<%- level.warrior.base_golem.abilities.each do |name, ability| -%>
+
+ golem.<%= name %>
+ <%= ability.description %>
+<%- end -%>
+<%- end -%>

0 comments on commit 6dfd0f2

Please sign in to comment.