package org.project.entity.players;

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

public class Assassin extends Player{

    public Assassin(String name, int hp, int maxHP, int mp, int maxMP, Weapon weapon, Armor armor) {
        super(name, hp, maxHP, mp, maxMP, weapon, armor);
    }

    @Override
    public void attack(Entity target) {

        if(reduceMana(getWeapon().getManaCost())){ //checking if the player has enough Mana

            setDefensing(true); //dodging the next incoming attack
            target.takeDamage(getWeapon().getDamage() * 2); // causing more damage than normal
            System.out.println(getName() + " (Assassin \uD83D\uDDE1\uFE0F) turned invisible.");
        }
        else{
            System.out.println(getName() + " (Assassin \uD83D\uDDE1\uFE0F) dose not have enough Mana\n" +
                    "Choose another action...");
        }
    }
}
