So, I have a function that is in a while loop. But when the while loop goes back, the varibles don't change and stay the same.
# x = players attack damage, y = Monster hp, b = Player hp, a = monsters attack
def damage1(x, y, b, a):
print("----------\nyou did", x, "damage.\n----------")
y = y - x
print("monster has", y, "HP\n----------")
time.sleep(0.5)
print("The monster did", a, "damage\n----------")
b = b - a
print("You have", b, "HP")
The players and monsters hp are both a int and not randomized like the attacks are. When it loops back, both the hp values revert to their base value and not subtracting and saving that value. What did I do wrong.