So, i'm currently writing a script for a simple Text Based Adventure Game, I made a pathway function that randomly selects the place the player will go, when the place is select for example "Almighty Mountain" it executes the loot_room function even tho the heal_room function is selected for "almighty Mountain", why does it executes the Loot_room funktion? There is nothing that could execute the loot_room function in the heal_room function. Here is the code:
Right and left doesnt matter right now.
def pathway():
while True:
pathway_input = input("Where at a turn. Should we go left or right? L/R: ")
if pathway_input == "L" or "Left":
pathway_choice = random.choice(path_selection)
if pathway_choice == "Mando Town" or "Crossover Mountains":
sleep(2)
print("Ok. Were going to " + pathway_choice + ".")
loot_room(Player_stats)
elif pathway_choice == "Almighty Mountain":
sleep(2)
print("Ok. Were going to " + pathway_choice + ".")
heal_room(Player_stats)
elif pathway_choice == "Sleeping Edges":
sleep(2)
print("Ok. Were going to " + pathway_choice + ".")
fight_room(Player_stats)
elif pathway_input == "R" or "Right":
pathway_choice = random.choice(path_selection)
if pathway_choice == "Almighty Mountain":
print("Ok. Were going to " + pathway_choice + ".")
heal_room(Player_stats)
elif pathway_choice == "Sleeping Edges":
sleep(2)
print("Ok. Were going to " + pathway_choice + ".")
fight_room(Player_stats)
elif pathway_choice == "Mando Town" or "Crossover Mountains":
sleep(2)
print("Ok. Were going to " + pathway_choice + ".")
loot_room(Player_stats)
else:
sleep(1)
print("please Say something understandable Bro")
continue
Heal_room and loot_room functions are under the rest.