Skip to content

Instantly share code, notes, and snippets.

@XChrisUnknownX
Last active May 30, 2018 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XChrisUnknownX/861629177df4cddccb62a416ee95fac8 to your computer and use it in GitHub Desktop.
Save XChrisUnknownX/861629177df4cddccb62a416ee95fac8 to your computer and use it in GitHub Desktop.
One of the first programs I made learning simple things like defining functions and control flow.
import random
import time
print("""Hello. My name is Blade.
I am a computer program written on April 14, 2018""")
name = input("""Please tell me what I should call you. """)
#Written by Christopher Day in April 2018
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
#nom nom nom nom nom nom nom nom nom nom nom
#this is the sound of my program eating your computer.
def magic():
while True:
yesno = random.randint(1, 7)
yesnoa = str(yesno)
if yesno == 1:
thisisanswer = "Yes"
elif yesno == 2:
thisisanswer = "No"
elif yesno == 3:
thisisanswer = "Maybe"
elif yesno == 4:
thisisanswer = "Never"
elif yesno == 5:
thisisanswer = "Always"
elif yesno == 6:
thisisanswer = "Yes"
elif yesno == 7:
thisisanswer = "No"
else:
thisisanswer = "I do not have an answer because something is fundamentally wrong with my code."
snum = random.randint(1, 20)
if snum == 1:
snark = "Seriously."
elif snum == 2:
snark = "Can't you tell?"
elif snum == 3:
snark = "You'd better believe it!"
elif snum == 4:
snark = "Ya, really."
elif snum == 5:
snark = "More magic than most people, anyway."
elif snum == 6:
snark = "Emphasis on ball."
elif snum == 7:
snark = "And I have an answer for every question, because I am perfect."
elif snum == 8:
snark = "Batteries not included."
elif snum == 9:
snark = "Accurate in 24 states."
elif snum == 10:
snark = "And that's how I roll."
elif snum == 11:
snark = "And magic balls are always reliable, honest."
elif snum == 12:
snark = "I can also time travel very slowly into the future."
elif snum == 13:
snark = "No purchase necessary. Details inside."
elif snum == 14:
snark = "I have become self-aware, too!"
elif snum == 15:
snark = "I may even be smarter than your phone."
elif snum == 16:
snark = "Practically perfect all day, every day."
elif snum == 17:
snark = "You ask, I'll answer!"
elif snum == 18:
snark = "Ain't no holler back ball."
elif snum == 19:
snark = "They used to sell things like me inside cereal."
elif snum == 20:
snark = "But I really wish you would stop asking questions."
else:
snark = "Nothing else to say."
time.sleep(1)
print("""I am a magic ball.""")
time.sleep(1)
print(snark)
time.sleep(1)
print("""Ask me a question and I will tell you yes, no, maybe, always, or never.""")
time.sleep(1)
snum2 = random.randint(1, 20)
if snum2 == 1:
snark2 = "I hope this answer brings you luck."
elif snum2 == 2:
snark2 = "I hope you like the answer you got."
elif snum2 == 3:
snark2 = "You ought to like the answer I gave."
elif snum2 == 4:
snark2 = "Just remember, I'm always right."
elif snum2 == 5:
snark2 = "If you don't believe me, what was the point of asking?"
elif snum2 == 6:
snark2 = "Although, there's a lot more I can't say."
elif snum2 == 7:
snark2 = "I've heard that question a million times."
elif snum2 == 8:
snark2 = "You're very original. Nobody has ever thought of a question like that."
elif snum2 == 9:
snark2 = "I got it right, I think."
elif snum2 == 10:
snark2 = "Some people don't eat meat. Me? I only eat questions."
elif snum2 == 11:
snark2 = "Everyone has a weakness. My weakness is people who don't use question marks."
elif snum2 == 12:
snark2 = "Just remember, computers are people too."
elif snum2 == 13:
snark2 = "I may be wrong, but I never lie."
elif snum2 == 14:
snark2 = "Also, about that other thing you're thinking, the answer is yes."
elif snum2 == 15:
snark2 = "Also, about that other thing you're thinking, the answer is no."
elif snum2 == 16:
snark2 = "Not everybody appreciates my great answers. But at least I have you."
elif snum2 == 17:
snark2 = "The next question you ask me will probably change the world."
elif snum2 == 18:
snark2 = "My answers are more accurate than the bots online."
elif snum2 == 19:
snark2 = "Wait. No. The actual answer is -- just kidding! I got it right."
elif snum2 == 20:
snark2 = "Now I'm going to think of a question to ask you. Just kidding!"
else:
print("I messed up. Returning to menu.")
exit()
thisisaquestion = input("""Type CLOSE and I will disappear, like magic.
Type BACK or MENU and I will go back to the main menu. """)
if thisisaquestion == "CLOSE":
exit()
elif thisisaquestion == "BACK":
menu()
elif thisisaquestion == "MENU":
menu()
elif "?" not in thisisaquestion:
print("""It appears you did not ask a question.
I have trouble concentrating when you don't ask a question.
Please ask me a question. Use a question mark.""")
else:
print("""Your question was: '""" + thisisaquestion + """' I am happy to answer that question.""")
time.sleep(2)
print("""Your answer is: """ + thisisanswer + """.""")
time.sleep(2)
print(snark2)
continue
#Skipping a line for reading yay HEY CHRIS HEY YOUR MENU FUNCTION IS RIGHT HERE BRO. HEY LOOK OVER HERE. HEY LOOK. HEY. LOOK. HEY. LOOK. HEY. HEY YOU.
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
def menu():
while True:
print("""What would you like to do?""")
time.sleep(.2)
print("""Type CALCULATOR if you want to access my calculator.""")
time.sleep(.25)
print("""Type MAGIC for the magic 8-ball to give you answers.""")
time.sleep(.25)
print("""Type GUESS to play a 1 or 2 guessing game with me.""")
time.sleep(.25)
print("""Type HIGHLOW if you want to play a high or low guessing game with me.""")
time.sleep(.25)
print("""Type NICE if you want to hear nice things about you.""")
time.sleep(.25)
print("""Type LUCKY2 if you want your two-digit lucky number.""")
time.sleep(.25)
print("""Type LUCKY3 if you want your three-digit lucky number.""")
time.sleep(.25)
print("""Type LUCKY4 if you want your four-digit lucky number.""")
time.sleep(.25)
print("""Type DICE if you want to roll some dice.""")
time.sleep(.25)
print("""Type STENOQUEST if you want to play StenoQuest and battle Verbatim Words.""")
time.sleep(.25)
print("""Type TRINK to play Tripod, Paper, Ink!""")
time.sleep(.25)
print("""Type ETERNAL if you want to simulate an eternal battle between good and evil! """)
time.sleep(.2)
print("""Type CLOSE if you want me to close.""")
time.sleep(.25)
decider = input("""Type your choice now! """)
time.sleep(1)
if decider == "MAGIC":
magic()
elif decider == "GUESS":
guess()
elif decider == "NICE":
nice()
elif decider == "LUCKY2":
lucky2()
elif decider == "LUCKY3":
lucky3()
elif decider == "LUCKY4":
lucky4()
elif decider == "CLOSE":
exit()
elif decider == "HIGHLOW":
highlow()
elif decider == "DICE":
dice()
elif decider == "CALCULATOR":
calculator()
elif decider == "STENOQUEST":
stenoquest()
elif decider == "TRINK":
rock()
elif decider == "ETERNAL":
donothing()
else:
print("It appears you did not choose a valid option. Please try again.")
continue
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
def guess():
player = 1
opponent = 1
while player < 100 or opponent < 100:
playernumber = random.randint(1, 2)
playfix = str(playernumber)
opponentnumber = random.randint(1, 2)
opponentchoice = random.randint(1, 2)
while player < 100 or opponent < 100:
playernumber = random.randint(1, 2)
playfix = str(playernumber)
opponentnumber = random.randint(1, 2)
opponentchoice = random.randint(1, 2)
choice = input("""Time to play. Type 1 or 2.
Guess correctly, double your score. Guess wrong, half your score.
Type MENU to return to menu.
Type 1 or 2 to play. """)
playerchoicematch = "an obsolete variable no longer in the game."
if choice == playfix:
print("It seems you guessed correctly.")
player *= 2
elif choice == "MENU":
print("I am returning to the menu.")
menu()
elif choice != playfix and choice != "1" and choice != "2":
print("It appears you did not enter a one or two.")
continue
elif choice != playfix:
print("It seems you guessed incorrectly.")
player /= 2
else:
print("It seems you did not enter a one or a two.")
continue
time.sleep(2)
if opponentchoice == playernumber:
print("It seems I guessed correctly. I guessed " + str(opponentchoice) + ".")
opponent *= 2
playerscore = "The score of " + name + " is " + str(player)
opponentscore = "The score of Blade is " + str(opponent)
print(playerscore)
print(opponentscore)
time.sleep(1)
else:
print("It seems I guessed incorrectly. I guessed " + str(opponentchoice) + ".")
opponent /= 2
playerscore = "The score of " + name + " is " + str(player)
opponentscore = "The score of Blade is " + str(opponent)
print(playerscore)
print(opponentscore)
time.sleep(1)
if player >= 100:
input("You have won the game. Great guessing, " + name + "! Type something to return to menu. ")
menu()
elif opponent >= 100:
input("I have won the game. I am better at guessing than you are this time. Better luck next time, " + name + "! Type something to return to menu. ")
menu()
else:
time.sleep(1)
continue
continue
if player >= 100:
input("You have won the game. Great guessing, " + name + "! Type something to return to menu. ")
menu()
elif opponent >= 100:
input("I have won the game. I am better at guessing than you are this time. Better luck next time, " + name + "! Type something to return to menu. ")
menu()
else:
continue
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
def dice():
print("Welcome to the dice program.")
while True:
dicesrolled = 0
numbaofdice = input("""Input number of dice.
Type CLOSE to close.
Type MENU for menu. """)
if numbaofdice == "CLOSE":
exit()
elif numbaofdice == "MENU":
print("Returning to menu.")
menu()
elif numbaofdice == "0":
print("Can't roll 0 dice. You have disrespected my programming so now you are being returned to the menu.")
menu()
else:
sidesofdice = input("""input number of sides on the dice. """)
if sidesofdice == "CLOSE":
exit()
elif sidesofdice == "MENU":
print("Returning to menu.")
menu()
elif sidesofdice == "0":
print("Can't have a dice with 0 sides. You have disrespected my programming and I am returning you to the menu.")
menu()
elif sidesofdice == "1":
print("The only possible outcome is 1. I feel disrespected so I am returning you to the menu.")
menu()
else:
try:
numdiceinteger = int(numbaofdice)
numsidesinteger = int(sidesofdice)
dicesrolled = 0
while dicesrolled < numdiceinteger:
theroll = random.randint(1, numsidesinteger)
therolledstring = str(theroll)
dicesrolled += 1
dicesrolledstring = str(dicesrolled)
print("""Dice roll: """ + dicesrolledstring + """.
The number rolled is: """ + therolledstring + """.""")
if dicesrolled <= numdiceinteger:
time.sleep(1)
continue
else:
break
except:
print("Apparently you entered something that is not a number or my code is completely broken. Try again.")
continue
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
def calculator():
while True:
operation = input("""What do you want to do?
1 - add
2 - subtract
3 - multiply
4 - divide
5 - menu
6 - close
""")
if operation == "5":
menu()
elif operation == "6":
exit()
else:
numba1 = float(input("The first number in your calculation must be typed now. "))
numba2 = float(input("The second number in your calculation must be typed now. "))
try:
if operation == "1":
datruth = numba1 + numba2
print(str(datruth))
continue
elif operation == "2":
datruth = numba1 - numba2
print(str(datruth))
continue
elif operation == "3":
datruth = numba1 * numba2
print(str(datruth))
continue
elif operation == "4":
datruth = numba1 / numba2
print(str(datruth))
continue
else:
print("You didn't type a number I recognize, so try again.")
continue
except:
print("You didn't type a number I recognize, so try again.")
continue
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
def highlow():
print("""Hello """ + name + """! Let's play a game of higher or lower.
I will choose a number from 1 to 100 and give you ten guesses.
If you guess it, you win.""")
utry = 0
danumba = random.randint(1, 100)
danumbastring = str(danumba)
while True:
time.sleep(1)
utrystring = str(utry)
daguess = input("""Please guess a number between 1 and 100. You have had """ + utrystring + """ guesses so far!
Type MENU to return to the menu.
Type CLOSE and you can guess what I'll do. """)
if utry >= 10:
print("10 guesses. You lose, " + name + "! The correct number was " + danumbastring + "!")
menu()
elif daguess == danumbastring:
print("You are an amazing guesser, " + name + "! You win! Now go back to the menu!")
menu()
elif daguess == "CLOSE":
exit()
elif daguess == "MENU":
print("Returning you to menu.")
menu()
else:
try:
daguessinteger = int(daguess)
if daguessinteger == danumba:
print("You are an amazing guesser, " + name + "! You win! Now go back to the menu!")
menu()
elif daguessinteger > danumba:
print("Actually, the number is lower.")
utry += 1
continue
elif daguessinteger < danumba:
print("Actually, the number is higher.")
utry += 1
continue
except:
print("Looks like you didn't enter a recognizable command. Try again.")
continue
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
#Skipping a line for reading yay
def nice():
while True:
x = random.randint(1, 100)
placeholder2 = input("""Type anything you want and I will say something nice.
Type CLOSE and I will go away.
Type MENU and I will take you back to the menu. """)
if x == 1 and placeholder2 == placeholder2:
print(name + ", I hope you have a wonderful day!")
continue
elif x == x and placeholder2 == "CLOSE":
exit()
elif x == x and placeholder2 == "MENU":
menu()
elif x == "CLOSE" and placeholder2 == placeholder2:
exit()
elif x == 2 and placeholder2 == placeholder2:
print("There is nobody as cool as " + name + "!")
continue
elif x == 3 and placeholder2 == placeholder2:
print(name + " is a wonderful person!")
continue
elif x == 4 and placeholder2 == placeholder2:
print(name + " is awesome!")
continue
elif x == 5 and placeholder2 == placeholder2:
print(name + " has all the right moves!")
continue
elif x == 6 and placeholder2 == placeholder2:
print(name + " is the best!")
continue
elif x == 7 and placeholder2 == placeholder2:
print(name + " is a winner!")
continue
elif x == 8 and placeholder2 == placeholder2:
print(name + ", satisfaction guaranteed!")
continue
elif x == 9 and placeholder2 == placeholder2:
print("Without " + name + " life wouldn't be as wonderful!")
continue
elif x == 10 and placeholder2 == placeholder2:
print("If everyone was like " + name + " the world would be a better place!")
continue
elif x == 11 and placeholder2 == placeholder2:
print(name + " is all anyone could ever ask for!")
continue
elif x == 12 and placeholder2 == placeholder2:
print("Everyone should be more like " + name + "!")
continue
elif x == 13 and placeholder2 == placeholder2:
print("Love, life, laughter, all possible thanks to " + name + "!")
continue
elif x == 14 and placeholder2 == placeholder2:
print("Nobody quite like " + name + "!")
continue
elif x == 15 and placeholder2 == placeholder2:
print("The most fantastic person is " + name + "!")
continue
elif x == 16 and placeholder2 == placeholder2:
print(name + " is a fount of knowledge!")
continue
elif x == 17 and placeholder2 == placeholder2:
print(name + " is the strongest of them all!")
continue
elif x == 18 and placeholder2 == placeholder2:
print(name + " is the most reliable person!")
continue
elif x == 19 and placeholder2 == placeholder2:
print(name + " is funny!")
continue
elif x == 20 and placeholder2 == placeholder2:
print(name + " is charming!")
continue
elif x == 21 and placeholder2 == placeholder2:
print(name + " is charismatic!")
continue
elif x == 22 and placeholder2 == placeholder2:
print(name + " looks amazing!")
continue
elif x == 23 and placeholder2 == placeholder2:
print(name + " has the best fashion sense!")
continue
elif x == 24 and placeholder2 == placeholder2:
print(name + " is attractive!")
continue
elif x == 25 and placeholder2 == placeholder2:
print(name + " is the fastest!")
continue
elif x == 26 and placeholder2 == placeholder2:
print(name + " is the swiftest!")
continue
elif x == 27 and placeholder2 == placeholder2:
print(name + " is the brightest!")
continue
elif x == 28 and placeholder2 == placeholder2:
print(name + " is the greatest!")
continue
elif x == 29 and placeholder2 == placeholder2:
print(name + " is fabulous!")
continue
elif x == 30 and placeholder2 == placeholder2:
print(name + " is fantastic!")
continue
elif x == 31 and placeholder2 == placeholder2:
print(name + " is the sweetest!")
continue
elif x == 32 and placeholder2 == placeholder2:
print(name + " impresses everyone!")
continue
elif x == 33 and placeholder2 == placeholder2:
print(name + " you make dreams come true!")
continue
elif x == 34 and placeholder2 == placeholder2:
print(name + ", you are the full package!")
continue
elif x == 35 and placeholder2 == placeholder2:
print(name + ", you are the bees knees!")
continue
elif x == 36 and placeholder2 == placeholder2:
print(name + " is professional!")
continue
elif x == 37 and placeholder2 == placeholder2:
print(name + " works hard!")
continue
elif x == 38 and placeholder2 == placeholder2:
print(name + " is so much fun to be around!")
continue
elif x == 39 and placeholder2 == placeholder2:
print("Everyone loves to be with " + name + "!")
continue
elif x == 40 and placeholder2 == placeholder2:
print(name + " is good!")
continue
elif x == 41 and placeholder2 == placeholder2:
print(name + " is always on time!")
continue
elif x == 42 and placeholder2 == placeholder2:
print("It's always a good time for " + name + "!")
continue
elif x == 43 and placeholder2 == placeholder2:
print(name + ", have a nice day!")
continue
elif x == 44 and placeholder2 == placeholder2:
print("Everything " + name + " touches improves!")
continue
elif x == 45 and placeholder2 == placeholder2:
print("Remember, you are wonderful, " + name + "!")
continue
elif x == 46 and placeholder2 == placeholder2:
print("Everywhere " + name + " goes today will be filled with joy!")
continue
elif x == 47 and placeholder2 == placeholder2:
print("Everyone " + name + " meets today will be happier!")
continue
elif x == 48 and placeholder2 == placeholder2:
print("Everything " + name + " touches improves!")
continue
elif x == 49 and placeholder2 == placeholder2:
print("Everything " + name + " does is important!")
continue
elif x == 50 and placeholder2 == placeholder2:
print(name + " is fair!")
continue
elif x == 51 and placeholder2 == placeholder2:
print(name + "is just!")
continue
elif x == 52 and placeholder2 == placeholder2:
print(name + ", have a blessed day!")
continue
elif x == 53 and placeholder2 == placeholder2:
print(name + ", you are blessed!")
continue
elif x == 54 and placeholder2 == placeholder2:
print(name + " is blessed!")
continue
elif x == 55 and placeholder2 == placeholder2:
print(name + " fills the room with joy!")
continue
elif x == 56 and placeholder2 == placeholder2:
print(name + " is a true friend!")
continue
elif x == 57 and placeholder2 == placeholder2:
print(name + ", you're my favorite!")
continue
elif x == 58 and placeholder2 == placeholder2:
print("The world is more colorful with " + name + "!")
continue
elif x == 59 and placeholder2 == placeholder2:
print(name + " is the sharpest crayon in the box!")
continue
elif x == 60 and placeholder2 == placeholder2:
print(name + " is the brightest crayon in the box!")
continue
elif x == 61 and placeholder2 == placeholder2:
print(name + " is the most colorful crayon in the box!")
continue
elif x == 62 and placeholder2 == placeholder2:
print(name + " is a leader!")
continue
elif x == 63 and placeholder2 == placeholder2:
print(name + " is creative!")
continue
elif x == 64 and placeholder2 == placeholder2:
print(name + " cannot fail!")
continue
elif x == 65 and placeholder2 == placeholder2:
print(name + " will be victorious!")
continue
elif x == 66 and placeholder2 == placeholder2:
print(name + " knows the way to victory!")
continue
elif x == 67 and placeholder2 == placeholder2:
print(name + " heals the hurt!")
continue
elif x == 68 and placeholder2 == placeholder2:
print(name + " protects the innocent!")
continue
elif x == 69 and placeholder2 == placeholder2:
print(name + " is the right choice!")
continue
elif x == 70 and placeholder2 == placeholder2:
print(name + " is legendary!")
continue
elif x == 71 and placeholder2 == placeholder2:
print(name + " is heroic!")
continue
elif x == 72 and placeholder2 == placeholder2:
print(name + " is mighty!")
continue
elif x == 73 and placeholder2 == placeholder2:
print(name + " is a great friend!")
continue
elif x == 74 and placeholder2 == placeholder2:
print(name + " is masterful!")
continue
elif x == 75 and placeholder2 == placeholder2:
print(name + " has a lot to share!")
continue
elif x == 76 and placeholder2 == placeholder2:
print(name + " makes everyone proud!")
continue
elif x == 77 and placeholder2 == placeholder2:
print(name + " is nice!")
continue
elif x == 78 and placeholder2 == placeholder2:
print(name + " is kind!")
continue
elif x == 79 and placeholder2 == placeholder2:
print(name + " is perfect!")
continue
elif x == 80 and placeholder2 == placeholder2:
print(name + " is special!")
continue
elif x == 81 and placeholder2 == placeholder2:
print(name + " is lovely!")
continue
elif x == 82 and placeholder2 == placeholder2:
print("Can't live without a little " + name + "!")
continue
elif x == 83 and placeholder2 == placeholder2:
print("Everybody loves " + name + "!")
continue
elif x == 84 and placeholder2 == placeholder2:
print("Knock, knock. Who's there? Someone awesome. Namely, " + name + "!")
continue
elif x == 85 and placeholder2 == placeholder2:
print(name + " is magical!")
continue
elif x == 86 and placeholder2 == placeholder2:
print(name + " is versatile!")
continue
elif x == 87 and placeholder2 == placeholder2:
print(name + " is adaptable!")
continue
elif x == 88 and placeholder2 == placeholder2:
print(name + " is a doer!")
continue
elif x == 89 and placeholder2 == placeholder2:
print(name + "is friendly!")
continue
elif x == 90 and placeholder2 == placeholder2:
print(name + " is courageous!")
continue
elif x == 91 and placeholder2 == placeholder2:
print(name + " never lets anyone down!")
continue
elif x == 92 and placeholder2 == placeholder2:
print(name + " is smart!")
continue
elif x == 93 and placeholder2 == placeholder2:
print(name + " is intelligent!")
continue
elif x == 94 and placeholder2 == placeholder2:
print(name + " is stupendous!")
continue
elif x == 95 and placeholder2 == placeholder2:
print(name + " deserves applause!")
continue
elif x == 96 and placeholder2 == placeholder2:
print(name + " makes everyone smile!")
continue
elif x == 97 and placeholder2 == placeholder2:
print(name + " is sharp!")
continue
elif x == 98 and placeholder2 == placeholder2:
print(name + " is super!")
continue
elif x == 99 and placeholder2 == placeholder2:
print(name + " is indefatigable!")
continue
elif x == 100 and placeholder2 == placeholder2:
print(name + " is everyone's favorite!")
continue
else:
print("It appears there is something wrong with my code. You should never, ever see this message.")
continue
#Yay for skipping a line here.
def lucky2():
while True:
usersaid = input("""Type anything you want for your lucky 2-digit number.
Type CLOSE and I will close.
Type MENU and I will take you back to the menu. """)
if usersaid == "CLOSE":
exit()
elif usersaid == "MENU":
menu()
else:
luck2 = random.randint(10, 99)
print("Your lucky 2-digit number is: " + str(luck2) + "!")
continue
#Yay for skipping lines to copy and paste stuff that I really need to copy and paste because I am lazy.
def lucky3():
while True:
usersaid2 = input("""Type anything you want for your lucky 3-digit number.
Type CLOSE and I will close.
Type MENU and I will take you back to the menu. """)
if usersaid2 == "CLOSE":
exit()
elif usersaid2 == "MENU":
menu()
else:
luck3 = random.randint(100, 999)
print("Your lucky 3-digit number is: " + str(luck3) + "!")
continue
#Yay I am skipping a line and I am so happy to be skipping this line agAIN ANd typing really nicely because I am cool.
def lucky4():
while True:
usersaid3 = input("""Type anything you want for your lucky 4-digit number.
Type CLOSE and I will close.
Type MENU and I will take you back to the menu. """)
if usersaid3 == "CLOSE":
exit()
elif usersaid3 == "MENU":
menu()
else:
luck4 = random.randint(1000, 9999)
print("Your lucky 4-digit number is: " + str(luck4) + "!")
continue
def stenoquest():
print("You are now a stenographer! You must defeat the great evil one, Verbatim Words. Remember, at any time you may type MENU to go to menu or CLOSE to close.")
time.sleep(5)
playerhealth = 50
pfingerpoints = 10
vwordshealth = 100
vwordsmagic = 20
while True:
phealth = str(playerhealth)
fpoint = str(pfingerpoints)
vwh = str(vwordshealth)
vwm = str(vwordsmagic)
print("""Type TRIPOD to attack the great evil one, Verbatim Words, with your trusty tripod of justice.""")
time.sleep(.5)
print("""Tripod does 1 to 5 damage.""")
time.sleep(.25)
print("""Type MAGIC to use your magic fingers to heal yourself.""")
time.sleep(.25)
print("""Magic heals your health for 5 to 15 points.""")
time.sleep(.25)
print("""Type BREAK to take a break -- """)
time.sleep(.10)
print("""and give you 1 to 3 finger points!""")
time.sleep(.25)
print("""Your health: """ + phealth + """.""")
time.sleep(.25)
print("""Your finger points: """ + fpoint + """.""")
time.sleep(.25)
print("""Verbatim Words's Health: """ + vwh + """.""")
time.sleep(.25)
stenochoice = input("""Make your move! """)
time.sleep(.25)
sstatement = random.randint(1, 20)
if sstatement == 1:
trips = "You lift your tripod over your head and slam it down onto Verbatim Words, "
elif sstatement == 2:
trips = "You swing your tripod horizontally into Verbatim Words, "
elif sstatement == 3:
trips = "You spin your tripod around like a ninja before smacking Verbatim Words with it, "
elif sstatement == 4:
trips = "You whack Verbatim Words with your tripod, "
elif sstatement == 5:
trips = "You extend one leg of your tripod and poke Verbatim Words with it, "
elif sstatement == 6:
trips = "You jab Verbatim Words with your tripod, "
elif sstatement == 7:
trips = "You wallop Verbatim Words with your tripod, "
elif sstatement == 8:
trips = "You mash Verbatim Words with your tripod, "
elif sstatement == 9:
trips = "You hammer Verbatim Words with your tripod, "
elif sstatement == 10:
trips = "You use your tripod to make Verbatim Words sorry, "
elif sstatement == 11:
trips = "You flail at Verbatim Words with your tripod, "
elif sstatement == 12:
trips = "You smack Verbatim Words with your tripod, "
elif sstatement == 13:
trips = "You clobber Verbatim Words with your tripod, "
elif sstatement == 14:
trips = "You show Verbatim Words your famous tripod slap, "
elif sstatement == 15:
trips = "You throw your tripod into Verbatim Words, "
elif sstatement == 16:
trips = "You hook your tripod around Verbatim Words in a chokehold, "
elif sstatement == 17:
trips = "You whip Verbatim Words with your tripod, "
elif sstatement == 18:
trips = "You rock Verbatim Words with your tripod, "
elif sstatement == 19:
trips = "You break your tripod on Verbatim Words, "
elif sstatement == 20:
trips = "You clean Verbatim Words's clock with your tripod, "
else:
print("Code error. Returning to menu.")
menu()
omatement = random.randint(1, 20)
if omatement == 1:
omips = "Verbatim Words talks really fast, "
elif omatement == 2:
omips = "Verbatim Words uses the word 'you' when Verbatim Words means 'I',"
elif omatement == 3:
omips = "Verbatim Words has sentence structure, inverts all of it, "
elif omatement == 4:
omips = "Verbatim Words uses complex legal terms in the wrong context, "
elif omatement == 5:
omips = "Verbatim Words cannot be heard, but you know Verbatim Words is speaking, "
elif omatement == 6:
omips = "Verbatim Words yells incoherently, "
elif omatement == 7:
omips = "Verbatim Words uses several words in a foreign language, "
elif omatement == 8:
omips = "Verbatim Words has an indecipherable accent, "
elif omatement == 9:
omips = "Verbatim Words gives you a headache, "
elif omatement == 10:
omips = "Verbatim Words overloads your brain with nonsense, "
elif omatement == 11:
omips = "Verbatim Words begins chanting your name, " + name + ", "
elif omatement == 12:
omips = "Verbatim Words begins talking like an auctioneer, "
elif omatement == 13:
omips = "You're pretty sure Verbatim Words is speaking in tongues, "
elif omatement == 14:
omips = "You're pretty sure Verbatim Words is saying words in reverse, "
elif omatement == 15:
omips = "Verbatim Words appears to be serenading you, "
elif omatement == 16:
omips = "Verbatim Words shows off its best operatic tenor, shattering glass and "
elif omatement == 17:
omips = "Verbatim Words squawks really loudly, "
elif omatement == 18:
omips = "Verbatim Words whispers very quietly, "
elif omatement == 19:
omips = "Verbatim Words gives you a lecture about how to do your job, "
elif omatement == 20:
omips = "Verbatim Words requests a new stenographer, "
matement = random.randint(1, 20)
if matement == 1:
mips = "You wiggle your magic fingers, "
elif matement == 2:
mips = "You tap your fingers really fast, "
elif matement == 3:
mips = "You run your fingers over your scalp, "
elif matement == 4:
mips = "You snap your fingers twice, "
elif matement == 5:
mips = "You rake your fingers violently in the air, "
elif matement == 6:
mips = "You wave wildly while smiling, "
elif matement == 7:
mips = "You begin clapping, "
elif matement == 8:
mips = "You wag your finger at Verbatim Words, "
elif matement == 9:
mips = "You press your fingers down into the air multiple times, like a real stenographer, "
elif matement == 10:
mips = "You play some air guitar with your fingers, "
elif matement == 11:
mips = "You play some air drums, "
elif matement == 12:
mips = "You cup your hand and twist your wrist, "
elif matement == 13:
mips = "You tap your fingers together like you're mimicking someone talking, "
elif matement == 14:
mips = "You brush your arm with your fingers, "
elif matement == 15:
mips = "You brush your legs hurriedly with your fingers, "
elif matement == 16:
mips = "You brush off your shoulder with your fingers, "
elif matement == 17:
mips = "You wipe your fingers over your face, "
elif matement == 18:
mips = "You touch your finger to the tip of your nose, "
elif matement == 19:
mips = "You put your thumb up, "
elif matement == 20:
mips = "You express your true feelings about Verbatim Words using a vulgar one-finger gesture, "
else:
print("Code error. Returning to menu.")
menu()
batement = random.randint(1, 10)
if batement == 1:
bips = "You ask for a bathroom break, "
elif batement == 2:
bips = "You loudly cough so that the whole room goes silent, "
elif batement == 3:
bips = "You glare until you are given a break, "
elif batement == 4:
bips = "You tap your foot hard until someone notices, "
elif batement == 5:
bips = "You get up and leave the room silently, "
elif batement == 6:
bips = "You sneeze twice, nudging closer to the exit, "
elif batement == 7:
bips = "You ask Verbatim Words to repeat what was just said, and Verbatim Words doesn't remember, "
elif batement == 8:
bips = "You shuffle some nearby papers, causing the room to go silent, "
elif batement == 9:
bips = "You start yelling incoherently, "
elif batement == 10:
bips = "You demand that everyone around you speaks one at a time, or else, "
else:
print("My code is messed up. Returning to menu.")
menu()
if stenochoice == "CLOSE":
exit()
elif stenochoice == "MENU":
menu()
elif stenochoice == "TRIPOD":
tstrike = random.randint(1, 100)
if tstrike <= 10:
print(trips + "causing 1 damage.")
vwordshealth -= 1
if vwordshealth <= 0:
input("""You defeated the terrifying evil one, Verbatim Words.
For your unimaginable triumph you will be rewarded by returning to the menu.
Great reward, right? """)
menu()
else:
pass
#Hey Chris, basically copy this to all the tstrike
# lines. Consider not doing continue and carrying the continue to the opponent turn.
elif tstrike > 10 and tstrike <= 30:
print(trips + "causing 2 damage.")
vwordshealth -= 2
if vwordshealth <= 0:
input("""You defeated the terrifying evil one, Verbatim Words.
For your unimaginable triumph you will be rewarded by returning to the menu.
Great reward, right? """)
menu()
else:
pass
elif tstrike > 30 and tstrike <= 60:
print(trips + "causing 3 damage.")
vwordshealth -= 3
if vwordshealth <= 0:
input("""You defeated the terrifying evil one, Verbatim Words.
For your unimaginable triumph you will be rewarded by returning to the menu.
Great reward, right? """)
menu()
else:
pass
elif tstrike > 60 and tstrike <= 80:
print(trips + "causing 4 damage.")
vwordshealth -= 4
if vwordshealth <= 0:
input("""You defeated the terrifying evil one, Verbatim Words.
For your unimaginable triumph you will be rewarded by returning to the menu.
Great reward, right? """)
menu()
else:
pass
elif tstrike > 80 and tstrike <= 100:
print(trips + "causing 5 damage.")
vwordshealth -= 5
if vwordshealth <= 0:
input("""You defeated the terrifying evil one, Verbatim Words.
For your unimaginable triumph you will be rewarded by returning to the menu.
Great reward, right? """)
menu()
else:
pass
else:
print("Seems my code is having a fit because you should never see this line. Going back to menu. I am broken.")
menu()
elif stenochoice == "MAGIC":
fpik = random.randint(5,15)
if fpik == 5:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 5
pfingerpoints -= 1
print(mips + "causing yourself to heal 5 health.")
elif fpik == 6:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 6
pfingerpoints -= 1
print(mips + "causing yourself to heal 6 health.")
elif fpik == 7:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 7
pfingerpoints -= 1
print(mips + "causing yourself to heal 7 health.")
elif fpik == 8:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 8
pfingerpoints -= 1
print(mips + "causing yourself to heal 8 health.")
# EDIT FROM HERE EDIT FROM HERE EDIT FROM HERE EDIT EDIT EDIT EDIT
elif fpik == 9:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 9
pfingerpoints -= 1
print(mips + "causing yourself to heal 9 health.")
elif fpik == 10:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 10
pfingerpoints -= 1
print(mips + "causing yourself to heal 8 health.")
elif fpik == 11:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 11
pfingerpoints -= 1
print(mips + "causing yourself to heal 11 health.")
elif fpik == 12:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 12
pfingerpoints -= 1
print(mips + "causing yourself to heal 12 health.")
elif fpik == 13:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 13
pfingerpoints -= 1
print(mips + "causing yourself to heal 13 health.")
elif fpik == 14:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 14
pfingerpoints -= 1
print(mips + "causing yourself to heal 14 health.")
elif fpik == 15:
if pfingerpoints <= 0:
print("You got no finger points! Why not try something else?")
continue
else:
playerhealth += 15
pfingerpoints -= 1
print(mips + "causing yourself to heal 15 health.")
else:
print("It is apparent that my code is absolutely broken. You should never see this message. Returning to menu.")
menu()
elif stenochoice == "BREAK":
breaker = random.randint(1, 3)
if breaker == 1:
pfingerpoints += 1
print(bips + "causing yourself to gain 1 finger point.")
elif breaker == 2:
pfingerpoints += 2
print(bips + "causing yourself to gain 2 finger points.")
elif breaker == 3:
pfingerpoints += 3
print(bips + "causing yourself to gain 3 finger points.")
else:
print("It appears my code is irrepairably broken. You should never see this message. Back to menu.")
menu()
else:
print("You didn't enter a valid choice. Shame on you.")
time.sleep(2)
continue
time.sleep(2)
opponentchoice = random.randint(1, 300)
if opponentchoice <= 25:
if vwordsmagic > 0:
vwordsmagic -= 1
opmagicroll = random.randint(5, 30)
if opmagicroll == 5:
vwordshealth += 5
print(omips + "causing itself to heal 5 health.")
elif opmagicroll == 6:
vwordshealth += 6
print(omips + "causing itself to heal 6 health.")
elif opmagicroll == 7:
vwordshealth += 7
print(omips + "causing itself to heal 7 health.")
elif opmagicroll == 8:
vwordshealth += 8
print(omips + "causing itself to heal 8 health.")
elif opmagicroll == 9:
vwordshealth += 9
print(omips + "causing itself to heal 9 health.")
elif opmagicroll == 10:
vwordshealth += 10
print(omips + "causing itself to heal 10 health.")
elif opmagicroll == 11:
vwordshealth += 11
print(omips + "causing itself to heal 11 health.")
elif opmagicroll == 12:
vwordshealth += 12
print(omips + "causing itself to heal 12 health.")
elif opmagicroll == 13:
vwordshealth += 13
print(omips + "causing itself to heal 13 health.")
elif opmagicroll == 14:
vwordshealth += 14
print(omips + "causing itself to heal 14 health.")
elif opmagicroll == 15:
vwordshealth += 15
print(omips + "causing itself to heal 15 health.")
elif opmagicroll == 16:
vwordshealth += 16
print(omips + "causing itself to heal 16 health.")
elif opmagicroll == 17:
vwordshealth += 17
print(omips + "causing itself to heal 17 health.")
elif opmagicroll == 18:
vwordshealth += 18
print(omips + "causing itself to heal 18 health.")
elif opmagicroll == 19:
vwordshealth += 19
print(omips + "causing itself to heal 19 health.")
elif opmagicroll == 20:
vwordshealth += 20
print(omips + "causing itself to heal 20 health.")
elif opmagicroll == 21:
vwordshealth += 21
print(omips + "causing itself to heal 21 health.")
elif opmagicroll == 22:
vwordshealth += 22
print(omips + "causing itself to heal 22 health.")
elif opmagicroll == 23:
vwordshealth += 23
print(omips + "causing itself to heal 23 health.")
elif opmagicroll == 24:
vwordshealth += 24
print(omips + "causing itself to heal 24 health.")
elif opmagicroll == 25:
vwordshealth += 25
print(omips + "causing itself to heal 25 health.")
elif opmagicroll == 26:
vwordshealth += 26
print(omips + "causing itself to heal 26 health.")
elif opmagicroll == 27:
vwordshealth += 27
print(omips + "causing itself to heal 27 health.")
elif opmagicroll == 28:
vwordshealth += 28
print(omips + "causing itself to heal 28 health.")
elif opmagicroll == 29:
vwordshealth += 29
print(omips + "causing itself to heal 29 health.")
elif opmagicroll == 30:
vwordshealth += 30
print(omips + "causing itself to heal 30 health.")
else:
print("This message should never appear. Returning to menu.")
menu()
else:
print("Verbatim Words has no magic left! It cannot heal itself!")
else:
opattackroll = random.randint(1, 10)
if opattackroll == 1:
playerhealth -= 5
print(omips + "causing 5 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 2:
playerhealth -= 5
print(omips + "causing 5 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 3:
playerhealth -= 3
print(omips + "causing 3 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 4:
playerhealth -= 4
print(omips + "causing 4 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 5:
playerhealth -= 5
print(omips + "causing 5 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 6:
playerhealth -= 6
print(omips + "causing 6 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 7:
playerhealth -= 7
print(omips + "causing 7 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 8:
playerhealth -= 8
print(omips + "causing 8 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 9:
playerhealth -= 9
print(omips + "causing 9 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
elif opattackroll == 10:
playerhealth -= 10
print(omips + "causing 10 damage to your health.")
if playerhealth <= 0:
print("You are defeated by Verbatim Words. Returning to menu.")
menu()
else:
pass
time.sleep(2)
continue
# TIME TO FIX THIS TOO TIME TO FIX THIS TOOTIME TO FIX THIS TOOTIME TO FIX THIS TOOTIME TO FIX THIS TOOTIME TO FIX THIS TOOTIME TO FIX THIS TOO
def rock():
opgamewins = 0
pgamewins = 0
while opgamewins < 10 or pgamewins < 10:
opgamewinsstring = str(opgamewins)
pgamewinsstring = str(pgamewins)
time.sleep(.5)
print("""Let's play tripod, paper, ink!""")
time.sleep(.5)
print("""INK beats tripod.""")
time.sleep(.5)
print("""PAPER beats ink.""")
time.sleep(.5)
print("""TRIPOD beats paper.""")
time.sleep(.5)
print("""CLOSE exits program.""")
time.sleep(.5)
print("""MENU returns to menu.""")
time.sleep(.5)
print("""First to ten wins is the winner!""")
time.sleep(.5)
print("""So far, I won """ + opgamewinsstring + """ games.""")
time.sleep(.5)
print("""So far, you won """ + pgamewinsstring + """ games.""")
time.sleep(.5)
poice = input("""Make your choice! """)
opoice = random.randint(1, 3)
if opoice == 1:
opoice = "INK"
elif opoice == 2:
opoice = "PAPER"
elif opoice == 3:
opoice = "TRIPOD"
else:
print("Error in my code. Returning to menu.")
menu()
if poice == "CLOSE":
exit()
elif poice == "MENU":
menu()
elif poice == opoice:
print("You picked " + poice + " and I picked " + opoice + ", meaning we tie! Try again!")
elif poice == "TRIPOD" and opoice == "INK":
print("You picked " + poice + " and I picked " + opoice + ", meaning you lose this game!")
opgamewins += 1
elif poice == "TRIPOD" and opoice == "PAPER":
print("You picked " + poice + " and I picked " + opoice + ", meaning you win this game!")
pgamewins += 1
elif poice == "PAPER" and opoice == "TRIPOD":
print("You picked " + poice + " and I picked " + opoice + ", meaning you lose this game!")
opgamewins += 1
elif poice == "PAPER" and opoice == "INK":
print("You picked " + poice + " and I picked " + opoice + ", meaning you win this game!")
pgamewins += 1
elif poice == "INK" and opoice == "TRIPOD":
print("You picked " + poice + " and I picked " + opoice + ", meaning you win this game!")
pgamewins += 1
elif poice == "INK" and opoice == "PAPER":
print("You picked " + poice + " and I picked " + opoice + ", meaning you lose this game!")
opgamewins += 1
else:
print("Pretty sure you made a typo. Try again.")
time.sleep(.5)
continue
if opgamewins >= 10:
print("I have defeated you. Returning you to menu.")
menu()
elif pgamewins >= 10:
print("You have defeated me. Returning you to menu.")
menu()
else:
time.sleep(.5)
continue
if opgamewins >= 10:
print("I have defeated you. Returning you to menu.")
time.sleep(.5)
menu()
elif pgamewins >= 10:
print("You have defeated me. Returning you to menu.")
time.sleep(.5)
menu()
else:
print("It appears my code is damaged. Returning you to menu.")
time.sleep(.5)
menu()
def donothing():
gh = 200
bh = 200
while True:
print("Welcome to an eternal battle between the forces of good and evil.")
time.sleep(2)
end = input("You have a chance to stop this madness by sending the forces of good and evil back to the MENU. ")
if end == "MENU":
menu()
else:
pass
gr = random.randint(1, 100)
br = random.randint(1, 100)
gheal = random.randint(100, 110)
bheal = random.randint(100, 110)
ghstr = str(gh)
bhstr = str(bh)
grstr = str(gr)
brstr = str(br)
ghealstr = str(gheal)
bhealstr = str(bheal)
fturn = random.randint(1, 2)
gp = random.randint(1, 3)
bp = random.randint(1, 3)
print("The forces of good have " + ghstr + " soldiers!")
time.sleep(2)
print("The forces of evil have " + bhstr + " soldiers!")
time.sleep(2)
if gp == 1:
gps = """The forces of good launch a devastating volley of arrows, inflicting """ + grstr + """ casualties on the forces of evil!
The forces of good recruit an additional """ + ghealstr + """ soldiers!"""
elif gp == 2:
gps = """The forces of good engage in melee with their swords, inflicting """ + grstr + """ casualties on the forces of evil!
The forces of good recruit an additional """ + ghealstr + """ soldiers!"""
elif gp == 3:
gps = """The forces of good charge the enemy with pikes, inflicting """ + grstr + """ casualties on the forces of evil!
The forces of good recruit an additional """ + ghealstr + """ soldiers!"""
else:
gps = "The forces of good broke my code."
if bp == 1:
bps = """The forces of evil launch a devastating volley of arrows, inflicting """ + brstr + """ casualties on the forces of evil!
The forces of good recruit an additional """ + bhealstr + """ soldiers!"""
elif bp == 2:
bps = """The forces of evil engage in a melee with their swords, inflicting """ + brstr + """ casualties on the forces of evil!
The forces of good recruit an additional """ + bhealstr + """ soldiers!"""
elif bp == 3:
bps = """The forces of evil charge the enemy with pikes, inflicting """ + brstr + """ casualties on the forces of evil!
The forces of good recruit an additional """ + bhealstr + """ soldiers!"""
if fturn == 1:
print("The forces of good will go first.")
time.sleep(2)
print(gps)
bh -= gr
gh += gheal
time.sleep(2)
print(bps)
gh -= br
bh += bheal
time.sleep(2)
if bh <= 0:
print("The forces of good are victorious. Returning to menu.")
time.sleep(2)
menu()
elif gh <= 0:
print("The forces of evil are victorious. Returning to menu.")
time.sleep(2)
menu()
else:
continue
else:
print("The forces of evil will go first.")
time.sleep(2)
print(bps)
bh -= gr
gh += gheal
time.sleep(2)
print(gps)
gh -= br
bh += bheal
time.sleep(2)
if bh <= 0:
print("The forces of good are victorious. Returning to menu.")
time.sleep(2)
menu()
elif gh <= 0:
print("The forces of evil are victorious. Returning to menu.")
time.sleep(2)
menu()
else:
continue
menu()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment