I am creating a prison escape and in a specific puzzle, the player is supposed to mutilate a hand, soap the hand, then wash it in order to get access by a scanner in a different room. The first time the player chooses to mutilate the hand, in the inventory it is added as a 'bloody hand', and when the character uses soap to clean the hand, I replace the 'bloody hand' with 'soapy hand' and then after washing it completely I replace from 'soapy hand' to 'hand' in the inventory. My problem is that no matter what I do, if the player decides to mutilate the hand more than once, the inventory keeps adding 'bloody hand' despite the fact that the player already has this in their inventory. I want to prevent from any additional 'bloody hand' to add to the inventory while the player has either 'bloody hand' , 'soapy hand' or 'hand'. I hope I explained this thoroughly enough, and that I may get good feedback that may help me fix this error. I have already tried the (and) and (or) functions, but neither of those worked. Here is my code:
elif choice == "use razor on hand":
print ("(cut up mutilated guard's hand)")
if "bloody hand" not in inventory:
if "razor" in inventory:
print ("Furrowing your eyebrows as cold sweat trickled down your neck, you took out your razor blade.")
print ("Slowly placing the fairly sharp tool on the mutilated guard’s wrist, you closed your eyes and felt")
print ("flesh of the guard start to tear. You finished the deed. The bloody hand was added to your")
print ("inventory.")
add_to_inventory("bloody hand")
print("")
print ("Inventory: " + str(inventory))
elif "razor" not in inventory:
print ("You don't own this item in your inventory.")
elif "bloody hand" or "soapy hand" or "hand" in inventory:
print ("You already own this item in your inventory.")