package org.project.entity.enemies;

import org.project.entity.Entity;
import org.project.item.weapons.Weapon;
import org.project.ConsoleColors;

public class Dragon extends Enemy {
    public Dragon() {
        super(150, 50, new Weapon(25, 10, "Fiery Breath", 0) {
            @Override
            public void use(Entity target) {
                target.takeDamage(getDamage());
            }
        });
    }
    @Override
    public void attack(Entity target) {
        int damage = getWeapon().getDamage();
        System.out.println("🐉 Dragon used Fiery Breath! Bypasses defense!");
        if (target instanceof org.project.entity.players.Player) {
            org.project.entity.players.Player player = (org.project.entity.players.Player) target;
            player.takeRawDamage(damage);
        }
        else {
            target.takeDamage(damage);
        }
        System.out.println(ConsoleColors.RED + "Dragon dealt " + damage + " damage." + ConsoleColors.RESET);
    }
}