package org.project.entity.players;

import org.project.entity.Entity;
import org.project.item.armors.Armor;
import org.project.item.armors.LeatherArmor;
import org.project.item.weapons.Dagger;
import org.project.item.weapons.Weapon;

public class Assassin extends Player{
    private boolean invisible;

    public Assassin(String name, int hp, int mp, Weapon weapon, Armor armor) {
        super(name, 60, 50, new Dagger(14,0),new LeatherArmor(5,15));
        this.invisible = false;
    }

    public Assassin(String name) {
        super(name, 60, 50, new Dagger(14,0),new LeatherArmor(5,15));
    }

    @Override
    public void lightAttack(Entity target){
        int damage = 5 + (level*2);
        target.takeDamage(damage);
        System.out.println("\u001B[31m" + name + " use Light attack! (0 mana) " + damage + " damage!\u001B[0m");
    }

    @Override
    public void specialAbility(Entity target) {
        if(mp >=18){
            mp -= 18;
            invisible = true;
            System.out.println("\u001B[35m" + name + " turned Invisible! next attack will be critical (-18 mana)\u001B[0m");
        }else{
            System.out.println("\u001b[33m Not enough mana ! \u001B[0m");
            lightAttack(target);
        }
    }
}
