Почему переменная опыта не изменяется, на сколько я понимаю, то что я написал - после каждой победы к переменной Exp должно добавляться 5, но этого не происходит. Прошу помочь и указать на ошибку.
#-*-coding:utf8;-*- HP = 100 MP = 50 MaxHP = HP MaxMP = MP Ar = 3 Pw = 20 lvl = 1 Exp = 0 inputPl = input('Print "Attack" to attack:\n') m1 = "peasant" lvlm1 = 1 HPm1 = 40 MPm1 = 0 MaxHPm1 = HPm1 MaxMPm1 = MPm1 Arm1 = 1 Pwm1 = 5 Expm1 = 5 def b_m1(HP,MP,Ar,Pw,lvl,Exp,m1,lvlm1,HPm1,MPm1,Arm1,Pwm1): inputPl = input('Print name your opponent:\n') if inputPl == m1: round = 1 while HPm1 > 0: print(" !!!ROUND " + str(round) + "!!!") round += 1 print(str(m1) + "strike") HP = HP - (Pwm1 - Ar) print("Your health point: " + str(HP)) print("You strike") HPm1 = HPm1 - (Pw - Arm1) print(str(m1) + "health point: " + str(HPm1)) if HPm1 <= 0: Exp = Exp + Expm1 print("Mined experience - " + str(Expm1)) print("All experience - " + str(Exp)) def b_m1_1(HP,MP,Ar,Pw,lvl,Exp,m1,lvlm1,HPm1,MPm1,Arm1,Pwm1): round = 1 while HPm1 > 0: print(" !!!ROUND " + str(round) + "!!!") round += 1 print(str(m1) + "strike") HP = HP - (Pwm1 - Ar) print("Your health point: " + str(HP)) print("You strike") HPm1 = HPm1 - (Pw - Arm1) print(str(m1) + "health point: " + str(HPm1)) if HPm1 <= 0: Exp = Exp + Expm1 print("Mined experience - " + str(Expm1)) print("All experience - " + str(Exp)) print(str(m1) + "defeated") if inputPl == "Attack": b_m1(HP, MP, Ar, Pw, lvl, Exp, m1, lvlm1, HPm1, MPm1, Arm1, Pwm1) inputPl = input('Do you want to repeat the fight with the peasant, print "yes" if so:\n') if inputPl == "yes": inputPlb = int(input("how many opponents do you expect:\n")) battle = inputPlb while battle > 0: b_m1_1(HP, MP, Ar, Pw, lvl, Exp, m1, lvlm1, HPm1, MPm1, Arm1, Pwm1) battle -= 1