def LevelM(): Shop.withdraw() global LevelPrice if Princess.Balance >= LevelPrice: Princess.Balance -= LevelPrice Princess.lvlup() LevelPrice += LevelPrice
] ans = ["c", "b", "a", "d", "b", "a"] list_q = [] for i in range(6): q1 = Question(pro[i], a_ans[i], b_ans[i], c_ans[i], d_ans[i], ans[i]) list_q.append(q1) for i in range(6): global score is_did = False print(list_q[i].prompt) print(list_q[i].a) print(list_q[i].b) print(list_q[i].c) print(list_q[i].d) answer = simpledialog.askstring("Input", "Enter the letter of the right answer", parent=tk.Tk().withdraw()) if answer == list_q[i].anind: print("wow!") score += 1 print(score) time.sleep(TIME) if score >= 5: turtle.bgpic("castleIn.gif") from startButtons import Princess Princess.showturtle() from moveFunctions import main from startButtons import winning winning += 1 import end_story
def SteelM(): ArmorF.withdraw() if Princess.Balance >= 800: Princess.EquipArmor(Steel) Princess.Balance -= 800 Princess.defense = Princess.Armor.protection + (Princess.defence * Princess.level)
def IronM(): ArmorF.withdraw() if Princess.Balance >= 400: Princess.EquipArmor(Iron) Princess.Balance -= 400 Princess.defense = Princess.Armor.protection + (Princess.defence * Princess.level)
def LeatherM(): ArmorF.withdraw() if Princess.Balance >= 200: Princess.EquipArmor(Leather) Princess.Balance -= 200 Princess.defense = Princess.Armor.protection + (Princess.defence * Princess.level)
def IronSwordM(): WeaponsF.withdraw() if Princess.Balance >= 600: Princess.EquipWeapon(IronSword) Princess.Balance -= 600 Princess.attack = Princess.Weapon.damage + (Princess.strength * Princess.level)
def RubberGloveM(): WeaponsF.withdraw() if Princess.Balance >= 200: Princess.EquipWeapon(RubberGlove) Princess.Balance -= 200 Princess.attack = Princess.Weapon.damage + (Princess.strength * Princess.level)