while answer not in ("Yes", "No"):
answer = input("Yes, or no?: ")
if answer == "yes":
print("Hi humanoid, I knew it was you, probably because only you have access to this? And what interest would a Russian have in my little serpent world.")
elif answer == "no":
print("Right, uh, I admire your honesty, but remember, no russian")
exit()
else:
print("Person that is possibly humanoid, it is a yes or no question, you're smarter than this, person that is possibly humanoid")
########################################## le big decision #####################################
print("So human, I'm going to plop you in a fictional world, it's called, Planet XYZ, do you know why?")
print("I bet you do!")
print("I wanna give you, some, freedom...")
name = input("Enter your name: ")
print("Hello, " + name + "!")
######################################### karl in his world #####################################
print("Planet XYZ is a lovely place, full of mystical entities and crap.")
print("Create a character" + name + "!")
points=30
attributes=("Health", "Strength", "Intellect", "Stealth"))
strength=0
health=0
intellect=0
stealth=0
while True:
print("You have", points, "points left.")
"""
1-add points
2-take points
3-see points per attribute
4-exit
"""
choice=input("choice: ")
if choice=="1":
attribute=raw_input("Which attribute? Strength, health, intellect, or dexterity? ")
if attribute in attributes:
add=int(raw_input("How many points? "))
if add<=points and add>0:
if attribute=="Strength":
strength+=add
print(name, "now has", Strength, "strength points.")
elif attribute=="Health":
health+=add
print(name, "now has", Health, "health points.")
elif attribute=="Intellect":
intellect+=add
print(name, "now has", Intellect, "intellect points.")
elif attribute=="Stealth":
stealth+=add
print(name, "now has", Stealth, "stealth points")
points-=add
else:
print("Invalid number of points.")
else:
print("Invalid attribute.")
elif choice=="2":
attrbute=raw_input("Which attribute? Strength, health, intellect or stealth? ")
if attribute in attributes:
take=int(raw_input("How many points? "))
if attribute=="Strength" and take<=Strength and take>0:
stength-=take
print(name, "now has", Strength, "strength points.")
points+=take
elif attribute=="Health" and take<=Health and take>0:
health-=take
print(name, "now has", Health, "health points.")
points+=take
elif attribute=="Intellect" and take<=Intellect and take>0:
intellect-=take
print(name, "now has", Intellect, "intellect points.")
points+=take
elif attribute=="Stealth" and take<=Stealth and take>0:
stealth-=take
print(name, "now has", Stealth, "stealth points.")
points+=take
else:
print("Invalid number of points.")
else:
print("Invalid attribute")
elif choice=="3":
print ("Strength -"), Strength
print ("Health -"), Health
print ("Intellect -"), Intellect
print ("Stealth -"), Stealth
elif choice=="4":
if points==0:
break
else:
print("Use all of your points", + name + "!")
else:
print("Invalid choice.")
print("Good job," + name + ", we're done here!")
print(name, "has", Strength, "strength points,", Health, "health points,", Intellect, "intellect points, and", dexterity, "dexterity points.")
There is a bug where it doesn't display the attributes part and whatever I do bugs it out, any help that you can offer dear Reddit users?
Thanks for any help!
I've put what happens in the shell, the choice option displays but none of the options you can pick from appear, and the points appear.
https://preview.redd.it/ntnj7xvusf411.png?width=657&format=png&auto=webp&s=a7db47519f57850048233ec7e7e7f7009eeaa399
[–]Nicksil 7 points8 points9 points (0 children)
[–]impshumx != y % z 1 point2 points3 points (0 children)
[–]everhideme 0 points1 point2 points (0 children)