Skip to content

Commit

Permalink
spinner.lic: Fix an issue when you finish and get a item at the same …
Browse files Browse the repository at this point in the history
…time. (#2049)

Turns out you can't match regex like that and the latter was ignored.
Also, add a message when it bails because you are not in the spinner room.
  • Loading branch information
Sarvatt authored and rpherbig committed Nov 3, 2017
1 parent 42d650f commit 3b87fe7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spinner.lic
Expand Up @@ -21,6 +21,7 @@ class Spinnerette
@device = nil
case bput('push button', 'You count out', 'I don\'t think pushing that would')
when 'I don\'t think pushing that would'
echo('This script must be started at the spinneret.')
exit
end
pause 1
Expand All @@ -37,10 +38,10 @@ class Spinnerette
when /You think you can (.+) the (.+) to increase your chances of spinning a good fabric/i
@action = Regexp.last_match(1)
@device = Regexp.last_match(2)
when /^You are pretty sure you can PUSH the BUTTON/i, /^You should probably push the button first./i
start_game
when /^You're pretty sure you've improved your odds as much as you possibly can./i
end_game
else
start_game
end

echo "Action is: #{@action}. Device is: #{@device}" if @spinner_debug
Expand Down

0 comments on commit 3b87fe7

Please sign in to comment.