python – Having troubles with adding and deleting methods from Class

Wish everyone happy 2021!
I want to say right away that I just recently started learning python. Now my task is to write a small RPG game.

The task looks like this.

  1. Create a Character class that will have a constructor (init) that will accept name, health and mana
  2. The Character class should have the following methods
  3. 1.change_health (changes the character’s health cannot be lower than 0 and cannot be more than 100)
  4. 2.change_mana (changes the character’s mana cannot be lower than 0 and cannot be more than 100)
  5. Create a Skill class, the constructor will take (name, damage and mana)
  6. Create a Hero subclass of the Character class (must have name, health, mana and skills). Skills is a list of the hero’s skills. the
    class should have the following methods
    4.1. add_skill (add a skill to this list)
    4.2. remove_skill (remove a skill from the list)
  7. Create a subclass of Evil of the Character class (must have name, health, mana and one skill)
  8. Do an endless while loop until the user presses “Q” to exit.
  9. “Hero” must fight the enemy (which is randomly generated with a random health (from 15 to 50 using python “random”). If the Hero wins,
    you must increase the health and mana of the hero by half the health
    and half of the enemy’s mana and acquire his skills.

The player can choose which skill to use by typing the index of the
skill from the list, after using the skill, the Hero loses this skill.
9. The game ends if the Hero dies (health 0) or the player leaves the game.
10. If the player leaves the game, you should save the current statistics in a text file and load them in the next game.

This, is what i’ve got.

import random
import time

class Character():
    def __init__(self, name): = 100 = name
        self.wins = 0

    def calculate_damage(self, damage_amount, attacker):
        if (damage_amount >
            overkill = abs( - damage_amount)
   = 0
            if (overkill > 0):
                print("{0} takes fatal damage from {1}, with {2} overkill!"
                      .format(, attacker, overkill))
                print("{0} takes fatal damage from {1}!"
                      .format(, attacker))
   -= damage_amount
            print("{0} takes {1} damage from {2}!"
                  .format(, damage_amount, attacker))

    def calculate_heal(self, heal_amount):
        if (heal_amount + > 100):
   = 100
            print("{0} heals back to full health!"
   += heal_amount
            print("{0} heals for {1}!"
                  .format(, heal_amount))

def parse_int(input):
        return True
    except ValueError:
        return False

def get_selection():
    valid_input = False
    while (valid_input is False):
        choice = input("Select an attack: ")
        if (parse_int(choice) is True):
            return int(choice)
            print("The input was invalid. Please try again.")

def get_computer_selection(health):
    sleep_time = random.randrange(2, 5)

    if (health <= 35):
        # Have the computer heal ~50% of its turns when <= 35
        result = random.randint(1, 6)
        if (result % 2 == 0):
            return 3
            return random.randint(1, 2)
    elif (health == 100):
        return random.randint(1, 2)
        return random.randint(1, 3)

def play_round(computer, human):
    game_in_progress = True
    current_player = computer

    while game_in_progress:
        # swap the current player each round
        if (current_player == computer):
            current_player = human
            current_player = computer

            "You have {0} health remaining and the "
            "computer has {1} health remaining."

        if (current_player == human):
            print("Available attacks:")
            print("1) Fireball - Causes moderate damage.")
            print("2) Frost Nova - high or low damage, "
                  "depending on your luck!")
            print("3) Mother Nature - Restores a moderate amount of health.")
            move = get_selection()
            move = get_computer_selection(

        if (move == 1):
            damage = random.randrange(18, 25)
            if (current_player == human):
        elif (move == 2):
            damage = random.randrange(10, 35)
            if (current_player == human):
        elif (move == 3):
            heal = random.randrange(18, 25)
            print ("The input was not valid. Please select a choice again.")

        if ( == 0):
            print("Sorry, you lose!")
            computer.wins += 1
            game_in_progress = False

        if ( == 0):
            print("Congratulations, you beat the computer!")
            human.wins += 1
            game_in_progress = False

def start_game():

    computer = Character("Computer")

    name = input("Please enter your name: ")
    human = Character(name)

    keep_playing = True

    while (keep_playing is True):
        print("Current Score:")
        print("You - {0}".format(human.wins))
        print("Computer - {0}".format(computer.wins)) = 100 = 100
        play_round(computer, human)
        response = input("Play another round?(Y/N)")
        if (response.lower() == "n"):


I decided to write a prototype based on what I know. Now, there is a problem. I don’t know how to properly create a separate evil character, the amount of hp of which will vary all the time.
But the main problem, I do not know how to make it so as to take the skill from the killed enemy and transfer it to the hero.
And, after the battle, remove the skill that the hero used during the fight.