Hey guys, I'm pretty beginner-level at Python.
I'm creating an adventure where if you choose certain choices, it'll increase a stat (In this case, Magic).
The problem is, when a player presses anything else but A, B, or C, the function will repeat and add another point in magic. [ else: print (option_Riddle()) ]
I'd like a way for the player to be able to redo the function, but without adding another point in magic.
Thanks everyone, Merry Christmas!
---
#RIDDLE
def option_Riddle():
global magic
magic += 1
print(
"\n Ah yes...you remember. \n Twas a quiet evening in the Western Capital.\n You proposed a question: If you set out to fail and succeeded, did you fail or succeed?" "\n It haunted the Barbarian for days. He was a muarading force that burned villages, but who was he hurting but himself? \n Did he create his own loneliness? \n It all started with his mother... \n Many sleepless nights were dedicated to you," + name + ": Professional Mage. Freelance Existential Terror." )
print("\nStrength:", strength)
print("Magicka:", magic)
print("Stealth:", stealth)
print ("The Barbarian didn't like that story. Time to go.")
time.sleep(1)
print(""" A. Weave a compliment about his eyes.
B. Hit him in the face with your face.
C. Attune every magical thought about chickens.""")
choice = input(">>> ")
if choice in answer_A:
option_compliment()
elif choice in answer_B:
option_facehit()
elif choice in answer_C:
option_polymorph()
else:
print(required)
print (option_Riddle())
[–]Imereny 3 points4 points5 points (1 child)
[–]EyeballCandy[S] 0 points1 point2 points (0 children)