Here is what I am working with:
here = raw_input("> ")
response = here.split()
if ("look" or "examine") and ("box" or "bag") in response:
entrance_dun()
elif "move" and "right" in response:
room_one()
elif ("left" or "niche") and "move" in response:
entrance_niche()
else:
commands(response)
return entrance()
I think I may be missing something on the IF-Else conditions. If I take out the parenthesis, then anything entered returns the entrance_dun() response. With the parenthesis, I can get the combination: Look Box and Examine Box to work, but the bag side will not.
If I use something like this:
here = raw_input("> ")
response = here.split()
if "look" or "examine" and "box" or "bag" in response:
entrance_dun()
elif "move" and "right" in response:
room_one()
elif ("left" or "niche") and "move" in response:
entrance_niche()
else:
commands(response)
return entrance()
Anything I type, or do not type, defaults to the entrance_dun() event.
What am I missing?
Thank you in advance for the help!


Sign In
Create Account


Back to top









