print("Go South") tile = move("s") elif direction == "w": tile = move("w") print("Go West") else: print("Moving Cancelled") elif command == "search": if command == "items": if tile.seed in searched_tiles: print("You've already searched here") continue random.seed(seed + str(x) + str(y)) if random.randint(0,5) == 1: print("You seem to have found something") user.addItem(item.getRandomItem()) else: print("You find nothing") searched_tiles.append(tile.seed) elif command == "fight": random.seed(datetime.now()) while tile.enemy.isAlive() and user.isAlive(): print("You have {} health!".format(user.health)) command = input("FIGHT CLUB > ") if command == "punch": if random.randint(1,5) < 5: print("You punched the enemy!") tile.enemy.health -= 1 else: print("You are clumsy and missed the punch! oof.wav") elif command == "curb stomp":
else: print("That's not a direction") elif command.lower() == "debug": debugMode(tile) tile = move("debug") elif command.lower() == "search": if tile.seed in searched_tiles: print("You have already searched here") continue random.seed(seed + str(x) + str(y)) if x == keyFindx and y == keyFindy: print("You have discovered an old Gate Key!") user.addItem(items.addItem("Gate Key")) elif random.randint(1, 5) == 1: print("You seem to have found something") user.addItem(items.getRandomItem()) else: print("You search for a while, but find nothing") searched_tiles.append(tile.seed) elif command.lower() == "fight": random.seed(datetime.now()) while tile.enemy.isAlive() and user.isAlive(): print("You have {} health! Enemy has {} health!".format( user.health, tile.enemy.health)) commandRun = False command = input("FIGHT MODE > ") if command.lower() == "punch": if random.randint(1, 10) < 10: print("You punched the enemy!") tile.enemy.health -= 1 commandRun = True