Created
December 23, 2011 09:10
-
-
Save AnimaWish/1513676 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def laser_weapon_armory() | |
puts "You do a dive roll into the Weapon Armory, crouch and scan the room" | |
puts "for more Gothons that might be hiding. It's dead quiet, too quiet." | |
puts "You stand up and run to the far side of the room and find the" | |
puts "neutron bomb in its container. Ther's a keypad lock in the box" | |
puts "and you need the code to get the bomb ot. If you get the code" | |
puts "wrong 10 times then the lock closes forever and you can't" | |
puts "get the bomb. The code is 3 digits." | |
code = "%s%s%s" % [rand(9)+1, rand(9)+1, rand(9)+1] | |
print "[keypad]> " | |
guess = gets.chomp | |
guesses = 0 | |
while guess != code and guess != "000" and guesses < 10 | |
puts "BZZZZEDDD!" | |
guesses += 1 | |
print "[keypad]> " | |
guess = gets.chomp() | |
end | |
if guess == "000" or guess = code | |
puts "The container clicks open and the seal breaks, letting gas out." | |
puts "You grab the neutron bomb and run as fast as you can to the" | |
puts "bridge where you must place it in the right spot." | |
return :the_bridge | |
else | |
puts "The lock buzzes one last time and then you hear a sickening" | |
puts "melting sound as the mechanism is fused together." | |
puts "You decide to sit there, and finally the Gothons blow up the" | |
puts "ship from their ship and you die." | |
return :death | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment