rubywarrior-i18n 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/CHANGELOG.rdoc +38 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +44 -0
  4. data/LICENSE +20 -0
  5. data/README.md +199 -0
  6. data/Rakefile +17 -0
  7. data/bin/rubywarrior +5 -0
  8. data/features/command_options.feature +46 -0
  9. data/features/levels.feature +71 -0
  10. data/features/profiles.feature +56 -0
  11. data/features/step_definitions/common_steps.rb +19 -0
  12. data/features/step_definitions/interaction_steps.rb +65 -0
  13. data/features/support/env.rb +12 -0
  14. data/features/support/mockio.rb +57 -0
  15. data/features/towers.feature +14 -0
  16. data/i18n/en.yml +232 -0
  17. data/i18n/es.yml +233 -0
  18. data/lib/ruby_warrior.rb +53 -0
  19. data/lib/ruby_warrior/abilities/attack.rb +25 -0
  20. data/lib/ruby_warrior/abilities/base.rb +44 -0
  21. data/lib/ruby_warrior/abilities/bind.rb +20 -0
  22. data/lib/ruby_warrior/abilities/detonate.rb +34 -0
  23. data/lib/ruby_warrior/abilities/direction_of.rb +13 -0
  24. data/lib/ruby_warrior/abilities/direction_of_stairs.rb +13 -0
  25. data/lib/ruby_warrior/abilities/distance_of.rb +13 -0
  26. data/lib/ruby_warrior/abilities/explode.rb +28 -0
  27. data/lib/ruby_warrior/abilities/feel.rb +14 -0
  28. data/lib/ruby_warrior/abilities/form.rb +25 -0
  29. data/lib/ruby_warrior/abilities/health.rb +13 -0
  30. data/lib/ruby_warrior/abilities/listen.rb +15 -0
  31. data/lib/ruby_warrior/abilities/look.rb +16 -0
  32. data/lib/ruby_warrior/abilities/pivot.rb +17 -0
  33. data/lib/ruby_warrior/abilities/rescue.rb +24 -0
  34. data/lib/ruby_warrior/abilities/rest.rb +20 -0
  35. data/lib/ruby_warrior/abilities/shoot.rb +24 -0
  36. data/lib/ruby_warrior/abilities/walk.rb +21 -0
  37. data/lib/ruby_warrior/config.rb +22 -0
  38. data/lib/ruby_warrior/core_additions.rb +29 -0
  39. data/lib/ruby_warrior/floor.rb +71 -0
  40. data/lib/ruby_warrior/game.rb +209 -0
  41. data/lib/ruby_warrior/level.rb +123 -0
  42. data/lib/ruby_warrior/level_loader.rb +56 -0
  43. data/lib/ruby_warrior/player_generator.rb +41 -0
  44. data/lib/ruby_warrior/position.rb +82 -0
  45. data/lib/ruby_warrior/profile.rb +120 -0
  46. data/lib/ruby_warrior/runner.rb +34 -0
  47. data/lib/ruby_warrior/space.rb +71 -0
  48. data/lib/ruby_warrior/tower.rb +14 -0
  49. data/lib/ruby_warrior/turn.rb +38 -0
  50. data/lib/ruby_warrior/ui.rb +54 -0
  51. data/lib/ruby_warrior/units/archer.rb +34 -0
  52. data/lib/ruby_warrior/units/base.rb +100 -0
  53. data/lib/ruby_warrior/units/captive.rb +17 -0
  54. data/lib/ruby_warrior/units/golem.rb +20 -0
  55. data/lib/ruby_warrior/units/sludge.rb +30 -0
  56. data/lib/ruby_warrior/units/thick_sludge.rb +13 -0
  57. data/lib/ruby_warrior/units/warrior.rb +73 -0
  58. data/lib/ruby_warrior/units/wizard.rb +34 -0
  59. data/lib/ruby_warrior/version.rb +3 -0
  60. data/spec/fixtures/short-tower/level_001.rb +15 -0
  61. data/spec/fixtures/short-tower/level_002.rb +15 -0
  62. data/spec/fixtures/walking_player.rb +5 -0
  63. data/spec/ruby_warrior/abilities/attack_spec.rb +51 -0
  64. data/spec/ruby_warrior/abilities/base_spec.rb +38 -0
  65. data/spec/ruby_warrior/abilities/bind_spec.rb +19 -0
  66. data/spec/ruby_warrior/abilities/direction_of_spec.rb +13 -0
  67. data/spec/ruby_warrior/abilities/direction_of_stairs_spec.rb +13 -0
  68. data/spec/ruby_warrior/abilities/distance_of_spec.rb +13 -0
  69. data/spec/ruby_warrior/abilities/explode_spec.rb +32 -0
  70. data/spec/ruby_warrior/abilities/feel_spec.rb +13 -0
  71. data/spec/ruby_warrior/abilities/form_spec.rb +48 -0
  72. data/spec/ruby_warrior/abilities/health_spec.rb +13 -0
  73. data/spec/ruby_warrior/abilities/listen_spec.rb +17 -0
  74. data/spec/ruby_warrior/abilities/look_spec.rb +15 -0
  75. data/spec/ruby_warrior/abilities/pivot_spec.rb +18 -0
  76. data/spec/ruby_warrior/abilities/rescue_spec.rb +40 -0
  77. data/spec/ruby_warrior/abilities/rest_spec.rb +29 -0
  78. data/spec/ruby_warrior/abilities/shoot_spec.rb +22 -0
  79. data/spec/ruby_warrior/abilities/throw_spec.rb +46 -0
  80. data/spec/ruby_warrior/abilities/walk_spec.rb +25 -0
  81. data/spec/ruby_warrior/core_additions_spec.rb +7 -0
  82. data/spec/ruby_warrior/floor_spec.rb +81 -0
  83. data/spec/ruby_warrior/game_spec.rb +119 -0
  84. data/spec/ruby_warrior/level_loader_spec.rb +54 -0
  85. data/spec/ruby_warrior/level_spec.rb +203 -0
  86. data/spec/ruby_warrior/player_generator_spec.rb +12 -0
  87. data/spec/ruby_warrior/position_spec.rb +108 -0
  88. data/spec/ruby_warrior/profile_spec.rb +171 -0
  89. data/spec/ruby_warrior/space_spec.rb +190 -0
  90. data/spec/ruby_warrior/tower_spec.rb +15 -0
  91. data/spec/ruby_warrior/turn_spec.rb +42 -0
  92. data/spec/ruby_warrior/ui_spec.rb +93 -0
  93. data/spec/ruby_warrior/units/archer_spec.rb +23 -0
  94. data/spec/ruby_warrior/units/base_spec.rb +133 -0
  95. data/spec/ruby_warrior/units/captive_spec.rb +23 -0
  96. data/spec/ruby_warrior/units/golem_spec.rb +28 -0
  97. data/spec/ruby_warrior/units/sludge_spec.rb +27 -0
  98. data/spec/ruby_warrior/units/thick_sludge_spec.rb +19 -0
  99. data/spec/ruby_warrior/units/warrior_spec.rb +65 -0
  100. data/spec/ruby_warrior/units/wizard_spec.rb +23 -0
  101. data/spec/spec_helper.rb +10 -0
  102. data/templates/README.erb +33 -0
  103. data/templates/player.rb +5 -0
  104. data/towers/beginner/level_001.rb +18 -0
  105. data/towers/beginner/level_002.rb +19 -0
  106. data/towers/beginner/level_003.rb +23 -0
  107. data/towers/beginner/level_004.rb +20 -0
  108. data/towers/beginner/level_005.rb +24 -0
  109. data/towers/beginner/level_006.rb +21 -0
  110. data/towers/beginner/level_007.rb +20 -0
  111. data/towers/beginner/level_008.rb +23 -0
  112. data/towers/beginner/level_009.rb +22 -0
  113. data/towers/intermediate/level_001.rb +20 -0
  114. data/towers/intermediate/level_002.rb +22 -0
  115. data/towers/intermediate/level_003.rb +25 -0
  116. data/towers/intermediate/level_004.rb +26 -0
  117. data/towers/intermediate/level_005.rb +21 -0
  118. data/towers/intermediate/level_006.rb +25 -0
  119. data/towers/intermediate/level_007.rb +27 -0
  120. data/towers/intermediate/level_008.rb +25 -0
  121. data/towers/intermediate/level_009.rb +33 -0
  122. metadata +226 -0
@@ -0,0 +1,56 @@
1
+ Feature: Manage Profiles
2
+ In order to play ruby warrior
3
+ As a player
4
+ I want to create and choose profiles
5
+
6
+ Background:
7
+ Given no profile at "tmp"
8
+
9
+ Scenario: New profile
10
+ When I run rubywarrior
11
+ And I answer "y" to "create one?"
12
+ And I choose "beginner" for "tower"
13
+ And I answer "Joe" to "name"
14
+ Then I should see "generated"
15
+ And I should find file at "tmp/rubywarrior"
16
+ When I run rubywarrior
17
+ Then I should see "Joe - beginner - level 1 - score 0"
18
+
19
+ Scenario: Another new profile on same tower
20
+ Given a profile named "Joe" on "beginner"
21
+ When I run rubywarrior
22
+ And I choose "New" for "profile"
23
+ And I choose "beginner" for "tower"
24
+ And I answer "Bob" to "name"
25
+ Then I should see "generated"
26
+ When I run rubywarrior
27
+ Then I should see "Bob - beginner - level 1 - score 0"
28
+
29
+ Scenario: Replace profile in same tower with same name
30
+ Given a profile named "Joe" on "beginner"
31
+ When I run rubywarrior
32
+ And I choose "New" for "profile"
33
+ And I choose "beginner" for "tower"
34
+ And I answer "Joe" to "name"
35
+ And I answer "y" to "replace"
36
+ Then I should see "generated"
37
+ When I run rubywarrior
38
+ Then I should see "Joe - beginner - level 1 - score 0"
39
+
40
+ Scenario: Auto select profile at given path
41
+ Given a profile named "Joe" on "beginner"
42
+ And current directory is "tmp/rubywarrior/joe-beginner"
43
+ When I copy fixture "walking_player.rb" to "tmp/rubywarrior/joe-beginner/player.rb"
44
+ And I run rubywarrior
45
+ And I answer "y" to "next level"
46
+ Then I should see "the updated README in the rubywarrior/joe-beginner directory"
47
+
48
+ Scenario: Move legacy ruby-warrior profile
49
+ Given a directory at "tmp/ruby-warrior"
50
+ And no directory at "tmp/rubywarrior"
51
+ When I run rubywarrior
52
+ And I choose "beginner" for "tower"
53
+ And I answer "Joe" to "name"
54
+ Then I should see "generated"
55
+ And I should find file at "tmp/rubywarrior"
56
+ And I should find no file at "tmp/ruby-warrior"
@@ -0,0 +1,19 @@
1
+ Given /^a directory at "([^\"]*)"$/ do |path|
2
+ Dir.mkdir(path) unless File.exist? path
3
+ end
4
+
5
+ Given /^no directory at "([^\"]*)"$/ do |path|
6
+ Dir.rmdir(path) if File.exist? path
7
+ end
8
+
9
+ When /^I copy fixture "([^\"]*)" to "([^\"]*)"$/ do |from, to|
10
+ FileUtils.cp_r("spec/fixtures/" + from, to)
11
+ end
12
+
13
+ Then /^I should find file at "([^\"]*)"$/ do |path|
14
+ File.exist?(path).should be_true
15
+ end
16
+
17
+ Then /^I should find no file at "([^\"]*)"$/ do |path|
18
+ File.exist?(path).should be_false
19
+ end
@@ -0,0 +1,65 @@
1
+ Given /^a profile named "([^\"]*)" on "([^\"]*)"$/ do |name, tower|
2
+ step 'I run rubywarrior'
3
+ step 'I answer "y" to "create one?"'
4
+ step 'I choose "' + tower + '" for "tower"'
5
+ step 'I answer "' + name + '" to "name"'
6
+ step 'I should see "generated"'
7
+ end
8
+
9
+ Given /^no profile at "([^\"]*)"$/ do |path|
10
+ RubyWarrior::Config.path_prefix = path
11
+ FileUtils.rm_rf("#{path}/rubywarrior")
12
+ end
13
+
14
+ Given /^current directory is "([^\"]*)"$/ do |path|
15
+ RubyWarrior::Config.path_prefix = path
16
+ end
17
+
18
+ When /^I run rubywarrior$/ do
19
+ @io = MockIO.new
20
+ @io.start do |io|
21
+ RubyWarrior::Config.out_stream = io
22
+ RubyWarrior::Config.in_stream = io
23
+ RubyWarrior::Game.new.start
24
+ end
25
+ end
26
+
27
+ When /^I run rubywarrior with options "([^\"]*)"$/ do |options|
28
+ RubyWarrior::Config.reset
29
+ @io = MockIO.new
30
+ @io.start do |io|
31
+ RubyWarrior::Runner.new(options.split, io, io).run
32
+ end
33
+ end
34
+
35
+ When /^I answer "([^\"]*)" to "([^\"]*)"$/ do |answer, question|
36
+ @io.gets_until_include(question)
37
+ @io.puts(answer)
38
+ end
39
+
40
+ When /^I choose "([^\"]*)" for "([^\"]*)"$/ do |choice, phrase|
41
+ answer = nil
42
+ content = @io.gets_until_include(phrase)
43
+ content.split("\n").each do |line|
44
+ if line.include?(choice) && line =~ /\[(\d)\]/
45
+ answer = $1
46
+ end
47
+ end
48
+ if answer
49
+ @io.puts(answer)
50
+ else
51
+ raise "Unable to find choice #{choice} in #{content}"
52
+ end
53
+ end
54
+
55
+ When /^I wait until it says "([^\"]*)"$/ do |phrase|
56
+ @io.gets_until_include(phrase)
57
+ end
58
+
59
+ Then /^I should see "([^\"]*)"$/ do |phrase|
60
+ @io.gets_until_include(phrase).should include(phrase)
61
+ end
62
+
63
+ Then /^I should not see "([^\"]*)" before "([^\"]*)"$/ do |first_phrase, second_phrase|
64
+ @io.gets_until_include(second_phrase).should_not include(first_phrase)
65
+ end
@@ -0,0 +1,12 @@
1
+ require 'cucumber'
2
+ require 'rspec'
3
+
4
+ require File.dirname(__FILE__) + '/../../lib/ruby_warrior'
5
+
6
+ Before do
7
+ RubyWarrior::Config.reset
8
+ end
9
+
10
+ After do
11
+ FileUtils.rm_rf "towers/short"
12
+ end
@@ -0,0 +1,57 @@
1
+ class MockIO
2
+ class Timeout < Exception
3
+ end
4
+
5
+ def initialize(receiver = nil)
6
+ @buffer = ""
7
+ @receiver = receiver || MockIO.new(self)
8
+ end
9
+
10
+ def gets
11
+ 1000.times do |n|
12
+ sleep 0.01 if n > 800 # throttle if it seems to be taking a while
13
+ unless @buffer.empty?
14
+ content = @buffer
15
+ @buffer = ""
16
+ return content
17
+ end
18
+ end
19
+ raise Timeout, "MockIO Timeout: No content was received for gets."
20
+ end
21
+
22
+ def gets_until_include(phrase)
23
+ content = gets
24
+ while !content.include?(phrase)
25
+ begin
26
+ content += gets
27
+ rescue Timeout
28
+ raise "Unable to find \"#{phrase}\" in \"#{content}\""
29
+ end
30
+ end
31
+ content
32
+ end
33
+
34
+ # TODO make this thread safe
35
+ def puts(str)
36
+ @receiver << "#{str}\n"
37
+ end
38
+
39
+ def print(str)
40
+ @receiver << str.to_s
41
+ end
42
+
43
+ def <<(str)
44
+ @buffer << str
45
+ end
46
+
47
+ def start
48
+ main_thread = Thread.current
49
+ Thread.new do
50
+ begin
51
+ yield(@receiver)
52
+ rescue Exception => e
53
+ main_thread.raise(e)
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,14 @@
1
+ Feature: Manage towers
2
+ In order extend ruby warrior
3
+ As a developer
4
+ I want to manage towers
5
+
6
+ Background:
7
+ Given no profile at "tmp"
8
+
9
+ Scenario: Add a tower
10
+ When I copy fixture "short-tower" to "towers/short"
11
+ And I run rubywarrior
12
+ And I answer "y" to "create one?"
13
+ Then I should see "short"
14
+
@@ -0,0 +1,232 @@
1
+ runner:
2
+ options:
3
+ banner: "Usage: rubywarrior [options]"
4
+ directory: Run under given directory
5
+ level: Practice level on epic
6
+ skip: Skip user input
7
+ time: Delay each turn by seconds
8
+ help: Show this message
9
+ welcome: Welcome to Ruby Warrior
10
+ directory:
11
+ not_found: No rubywarrior directory found, would you like to create one?
12
+ cannot_continue: Unable to continue without directory.
13
+ practice_level:
14
+ unable_not_in_epic_mode: Unable to practice level while not in epic mode, remove -l option.
15
+ first_level_generated: First level has been generated. See the rubywarrior/%1/README for instructions.
16
+ mode:
17
+ back_to_normal: Another level has been added since you started epic, going back to normal mode.
18
+ level:
19
+ level: level
20
+ number: "Level %1:"
21
+ starting: Starting Level %1
22
+ failed: Sorry, you failed level %1. Change your script and try again.
23
+ clues: Would you like to read the additional clues for this level?
24
+ continue_next: Would you like to continue on to the next level?
25
+ continue_epic_mode: Would you like to continue on to epic mode?
26
+ staying_on_current: Staying on current level. Try to earn more points next time.
27
+ to_practice: "To practice a level, use the -l option: rubywarrior -l 3"
28
+ score: Level Score
29
+ grade: Level Grade
30
+ beginner: beginner
31
+ intermediate: intermediate
32
+ short: short
33
+ tower: tower
34
+ profile:
35
+ profile: profile
36
+ new: New Profile
37
+ replace_existing_for_tower: Are you sure you want to replace your existing profile for this tower?
38
+ replace_existing: Replacing existing profile.
39
+ not_replacing: Not replacing profile.
40
+ stairs:
41
+ stairs: stairs
42
+ found: Success! You have found the stairs.
43
+ end_of_game: CONGRATULATIONS! You have climbed to the top of the tower and rescued the fair maiden Ruby.
44
+ readme:
45
+ see_updated: See the updated README in the rubywarrior/%1 directory.
46
+ to_play_epic_mode: Run rubywarrior again to play epic mode.
47
+ game:
48
+ tower: tower
49
+ average_grade_for_tower: "Your average grade for this tower is: %1 "
50
+ warrior:
51
+ warrior: warrior
52
+ enter_name: "Enter a name for your warrior: "
53
+ earns_points: earns %1 points
54
+ does_nothing: does nothing
55
+ abilities: Warrior Abilities
56
+ score:
57
+ score: score
58
+ epic: epic score
59
+ first: first score
60
+ total: Total Score
61
+ answer:
62
+ yes_no: yn
63
+ yes_initial: y
64
+ no_initial: n
65
+ item:
66
+ choose_typing_number: "Choose %1 by typing the number: "
67
+ turn: turn
68
+ only_one_turn: Only one action can be performed per turn.
69
+ bonus:
70
+ time: Time Bonus
71
+ clear: Clear Bonus
72
+ wall: wall
73
+ nothing: nothing
74
+ sludge:
75
+ name: sludge
76
+ first_letter: s
77
+ archer:
78
+ name: archer
79
+ first_letter: a
80
+ thicksludge:
81
+ name: thick sludge
82
+ first_letter: S
83
+ captive:
84
+ name: captive
85
+ first_letter: C
86
+ wizard:
87
+ name: wizard
88
+ first_letter: w
89
+ golem:
90
+ name: golem
91
+ first_letter: G
92
+ abilities: Golem Abilities
93
+ take_damage_health_left: takes %1 damage, %2 health power left
94
+ player:
95
+ dies: dies
96
+ released_from_bonds: released from bonds
97
+ direction:
98
+ unknown: Unknown direction %1. Should be :forward, :backward, :left or :right.
99
+ move_forward_default: Move in the given direction (forward by default).
100
+ bumps_into: bumps into
101
+ forward: forward
102
+ backward: backward
103
+ left: left
104
+ right: right
105
+ walk:
106
+ walk: walk
107
+ s: walks
108
+ attack:
109
+ in_given_direction: Attacks a unit in given direction (forward by default).
110
+ and_hits: attacks %1 and hits %2
111
+ and_hits_nothing: attacks %1 and hits nothing
112
+ feel:
113
+ description: Returns a Space for the given direction (forward by default).
114
+ rest:
115
+ description: Gain 10% of max health back, but do nothing more.
116
+ receives_health: receives %1 health from resting, up to %2 health
117
+ fit_fiddle: is already fit as a fiddle
118
+ health:
119
+ description: Returns an integer representing your health.
120
+ look:
121
+ description: Returns an array of up to three Spaces in the given direction (forward by default).
122
+ shoot:
123
+ description: Shoot your bow & arrow in given direction (forward by default).
124
+ and_hits: shoots %1 and hits %2
125
+ and_hits_nothing: shoots and hits nothing
126
+ rescue:
127
+ description: Rescue a captive from his chains (earning 20 points) in given direction (forward by default).
128
+ unbinds_and_rescues: unbinds %1 and rescues %2
129
+ unbinds_and_rescues_nothing: unbinds %1 and rescues nothing
130
+ rotate:
131
+ description: Rotate :left, :right or :backward (default)
132
+ pivots: pivots
133
+ distance_of:
134
+ description: Pass a Space as an argument, and it will return an integer representing the distance to that space.
135
+ bind:
136
+ description: Binds a unit in given direction to keep him from moving (forward by default).
137
+ and_restricts: binds %1 and restricts %2
138
+ and_restricts_nothing: binds %1 and restricts nothing
139
+ listen:
140
+ description: Returns an array of all spaces which have units in them.
141
+ direction_of_stairs:
142
+ description: Returns the direction (:left, :right, :forward, :backward) the stairs are from your location.
143
+ direction_of:
144
+ description: Pass a Space as an argument, and the direction (:left, :right, :forward, :backward) to that space will be returned.
145
+ explode:
146
+ description: Kills you and all surrounding units. You probably don't want to do this intentionally.
147
+ collapsing_the_ceiling: explodes, collapsing the ceiling and damanging every unit.
148
+ is_ticking: is ticking
149
+ detonate:
150
+ description: Detonate a bomb in a given direction (forward by default) which damages that space and surrounding 4 spaces (including yourself).
151
+ bomb_deadly_explosion: detonates a bomb %1 launching a deadly explosion.
152
+ ticking_explosive: caught in bomb's flames which detonates ticking explosive
153
+ form:
154
+ description: Forms a golem in given direction taking half of invoker's health. The passed block is executed for each golem turn.
155
+ golem_gives_health: forms a golem %1 and gives half of his health (%2)
156
+ fails: fails to form golem because something is blocking the way.
157
+ tip: tip
158
+ hp: HP
159
+ when_you_are_done_run_rubywarrior: When you're done editing player.rb, run the rubywarrior command again.
160
+ add_your_code_here: add your code here
161
+ towers:
162
+ beginner:
163
+ level_001:
164
+ description: You see before yourself a long hallway with stairs at the end. There is nothing in the way.
165
+ tip: Call warrior.walk! to walk forward in the Player 'play_turn' method.
166
+ level_002:
167
+ description: It is too dark to see anything, but you smell sludge nearby.
168
+ tip: Use warrior.feel.empty? to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in !) per turn.
169
+ clue: Add an if/else condition using warrior.feel.empty? to decide whether to warrior.attack! or warrior.walk!.
170
+ level_003:
171
+ description: The air feels thicker than before. There must be a horde of sludge.
172
+ tip: Be careful not to die! Use warrior.health to keep an eye on your health, and warrior.rest! to earn 10% of max health back.
173
+ clue: When there is no enemy ahead of you call warrior.rest! until health is full before walking forward.
174
+ level_004:
175
+ description: You can hear bow strings being stretched.
176
+ tip: No new abilities this time, but you must be careful not to rest while taking damage. Save a @health instance variable and compare it on each turn to see if you're taking damage.
177
+ clue: Set @health to your current health at the end of the turn. If this is greater than your current health next turn then you know you're taking damage and shouldn't rest.
178
+ level_005:
179
+ description: You hear cries for help. Captives must need rescuing.
180
+ tip: Use warrior.feel.captive? to see if there is a captive and warrior.rescue! to rescue him. Don't attack captives.
181
+ clue: Don't forget to constantly check if you're taking damage. Rest until your health is full if you aren't taking damage.
182
+ level_006:
183
+ description: The wall behind you feels a bit further away in this room. And you hear more cries for help.
184
+ tip: You can walk backward by passing ':backward' as an argument to walk!. Same goes for feel, rescue! and attack!. Archers have a limited attack distance.
185
+ clue: Walk backward if you are taking damage from afar and do not have enough health to attack. You may also want to consider walking backward until warrior.feel(:backward).wall?.
186
+ level_007:
187
+ description: You feel a wall right in front of you and an opening behind you.
188
+ tip: You are not as effective at attacking backward. Use warrior.feel.wall? and warrior.pivot! to turn around.
189
+ level_008:
190
+ description: You hear the mumbling of wizards. Beware of their deadly wands! Good thing you found a bow.
191
+ tip: Use warrior.look to determine your surroundings, and warrior.shoot! to fire an arrow.
192
+ clue: Wizards are deadly but low in health. Kill them before they have time to attack.
193
+ level_009:
194
+ description: Time to hone your skills and apply all of the abilities that you have learned.
195
+ tip: Watch your back.
196
+ clue: Don't just keep shooting the bow while you are being attacked from behind.
197
+ intermediate:
198
+ level_001:
199
+ description: Silence. The room feels large, but empty. Luckily you have a map of this tower to help find the stairs.
200
+ tip: Use warrior.direction_of_stairs to determine which direction stairs are located. Pass this to warrior.walk! to walk in that direction.
201
+ level_002:
202
+ description: Another large room, but with several enemies blocking your way to the stairs.
203
+ tip: Just like walking, you can attack! and feel in multiple directions (:forward, :left, :right, :backward).
204
+ clue: Call warrior.feel(direction).enemy? in each direction to make sure there isn't an enemy beside you (attack if there is). Call warrior.rest! if you're low and health when there are no enemies around.
205
+ level_003:
206
+ description: You feel slime on all sides, you're surrounded!
207
+ tip: Call warrior.bind!(direction) to bind an enemy to keep him from attacking. Bound enemies look like captives.
208
+ clue: Count the number of enemies around you. Bind an enemy if there are two or more.
209
+ level_004:
210
+ description: Your ears become more in tune with the surroundings. Listen to find enemies and captives!
211
+ tip: Use warrior.listen to find spaces with other units, and warrior.direction_of to determine what direction they're in.
212
+ clue: Walk towards an enemy or captive with warrior.walk!(warrior.direction_of(warrior.listen.first)), once warrior.listen.empty? then head for the stairs.
213
+ level_005:
214
+ description: You can feel the stairs right next to you, but are you sure you want to go up them right away?
215
+ tip: You'll get more points for clearing the level first. Use warrior.feel.stairs? and warrior.feel.empty? to determine where to go.
216
+ clue: If going towards a unit is the same direction as the stairs, try moving another empty direction until you can safely move toward the enemies.
217
+ level_006:
218
+ description: What's that ticking? Some captives have a timed bomb at their feet!
219
+ tip: Hurry and rescue captives first that have space.ticking?, they'll soon go!
220
+ clue: Avoid fighting enemies at first. Use warrior.listen and space.ticking? and quickly rescue those captives.
221
+ level_007:
222
+ description: Another ticking sound, but some sludge is blocking the way.
223
+ tip: Quickly kill the sludge and rescue the captive before the bomb goes off. You can't simply go around them.
224
+ clue: Determine the direction of the ticking captive and kill any enemies blocking that path. You may need to bind surrounding enemies first.
225
+ level_008:
226
+ description: You discover a satchel of bombs which will help when facing a mob of enemies.
227
+ tip: Detonate a bomb when you see a couple enemies ahead of you (warrior.look). Watch out for your health too.
228
+ clue: Calling warrior.look will return an array of Spaces. If the first two contain enemies, detonate a bomb with warrior.detonate!.
229
+ level_009:
230
+ description: Never before have you seen a room so full of sludge. Start the fireworks!
231
+ tip: Be careful not to let the ticking captive get caught in the flames. Use warrior.distance_of to avoid the captives.
232
+ clue: Be sure to bind the surrounding enemies before fighting. Check your health before detonating explosives.