def user_attack(): dam = player.player_damage() dam = mob.mob_defence(dam) mob.damage_mob(dam) mob.print_HP() if mob.is_alive() == True: if mob.poison == True: dam = player.poison_damage(mob.mob_name) mob.damage_mob(dam) mob.print_HP() mob_attack() else: mob_attack() else: player.xp_check(mob.mob_expValue) drop = mob.get_item_drop(player.plr_lvl) player.add_drop(drop) return
def player_power(): if player.AP_check() == True: player.cost_AP() else: battle_options() if player.is_class("Rouge"): mob.poison_mob() battle_options() else: dam = player.power_use() dam = mob.mob_defence(dam) mob.damage_mob(dam) mob.print_HP() player.print_AP2() if mob.is_alive() == True: mob_attack() else: player.xp_check(mob.mob_expValue) mob.get_item_drop(player.plr_lvl) return
if keypress == "new": gamerun = "y" elif keypress == "quit": gamerun = "n" else: "I don't recognize that command." keypress = "none" # main game loop while gamerun == "y": utilities.turnbump(2) print(" +++ ESCAPE THE EVIL WIZARD'S TOWER!!! +++ ") print(" _________________________________________") while action != "escape" or player.stats["health"] >= 1: player.xp_check(player.stats["Experience"], player.stats["Level"]) utilities.turnbump(3) print("You're on the " + floors[floor].name) print("_________________________________________") print("WHATDO?") action = input("?") # Battle function tester if action == "battle": battles.battle() elif action == "e": player.stats["Experience"] += 150 elif action == "stats": for key in player.stats: print("{0} : {1}".format(key, player.stats[key])) input("hit enter when ready --->")