# warrior

from models.loots.armor import Armor
from models.loots.weapon import Weapon
from models.heroes.hero import Hero


class Warrior(Hero):

    def __init__(
        self,
        name: str,
        description: str,
        HP: int,
        attack_power: int,
        defense: int,
        armor: Armor = None,
        weapon: Weapon = None,
    ) -> None:
        super().__init__(
            name, description, HP, attack_power, defense, Hero.WARRIOR, armor, weapon
        )

    def get_type_str(self) -> str:
        return "Warrior"

    def attacks(self, opponent: "Hero") -> float:
        damage = 0
        for i in range(0, 2):
            damage += super().attacks(opponent)

        return damage
