基本的に、ユーザーは以前にクラスを選択しました。このメニューでは、チェックし、ユーザーがウィザードを選択した場合、最大4スキルポイントを使用することを選択します。
if Class == ("wizard") or Class == ("Wizard"):
print("You have four spell points. You can learn up to four level- one spells, or one level-four spell, or any combination thereof.")
Spellpoints = 4
FireballLvl = 0
IceBlastLvl = 0
TelekeniticSheildLvl = 0
ElectricShockLvl = 0
WindLvl = 0
while True:
Spellmenu = input("Press 1 to spend a point on Fireball. Press 2 to spend a point on Ice Blast. Press 3 to spend a point on Telekenitic Sheild. Press 4 to spend a point on Electric Shock. Press 5 to spend a point on Wind.")
if Spellpoints == 0:
print ("You have no more spell points")
break
if Spellmenu == ("1"):
Spellpoints - 1
FireballLvl + 1
elif Spellmenu == ("2"):
Spellpoints - 1
IceBlastLvl + 1
elif Spellmenu ==("3"):
Spellpoints - 1
TelekeniticSheildLvl + 1
elif Spellmenu ==("4"):
Spellpoints - 1
ElectricShockLvl + 1
elif Spellmenu ==("5"):
Spellpoints - 1
WindLvl + 1
私の問題は、ループが決して終わらないことです。呪文ポイントがなくなると想定されますが、終わらないのです。よろしくお願いします。