package org.project.entity.players;


import org.project.entity.Entity;



public class Knight extends Player {
    private final int lightAttackDamage;
    private final int heavyAttackDamage;
    private final int heavyAttackMana;
    private final int healNumber;
    private final int healMana;

    public Knight(String name, int hp, int mp ,int maxHP,int maxMP,int lightAttackDamage,int heavyAttackDamage,int haeavyAttackMana,int healNumber,int healMana){
        super(name, hp, mp, maxHP,maxMP);
        this.lightAttackDamage = lightAttackDamage  ;
        this.heavyAttackDamage = heavyAttackDamage;
        this.heavyAttackMana=haeavyAttackMana ;
        this.healNumber =healNumber ;
        this.healMana=healMana ;
    }

    @Override
    public void SpecialAbility(Entity target) {
        if (mp >= heavyAttackMana + 10) {
            target.takeDamage(heavyAttackDamage);
            mp -= (heavyAttackMana + 10);
        }
    }

    @Override
    public void LightAttack(Entity target, int damage) {
        target.takeDamage(lightAttackDamage);
    }

    @Override
    public void HeavyAttack(Entity target, int damage) {
        if (mp >= heavyAttackMana) {
            target.takeDamage(heavyAttackDamage);
            mp -= heavyAttackMana;
        }
    }


    @Override
    public void heal(int health) {
        if (mp >= healMana) {
            super.heal(healNumber);
            mp -= healMana;
        }
    }

    public int getLightAttackDamage(){
        return lightAttackDamage;
    }
    public int getHeavyAttackDamage(){
        return heavyAttackDamage;
    }
    public int getHeavyAttackMana(){
        return heavyAttackMana;
    }
    public int getHealNumber(){
        return healNumber;
    }
    public int getHealMana(){
        return healMana;
    }
}
