package org.project.entity.enemies;

import org.project.entity.Entity;
import org.project.item.weapons.BasicWeapon;

import java.util.Random;

public class Dragon extends Enemy
{

    private Random random = new Random();

    public Dragon()
    {
        super("Dragon", 200, 50, new BasicWeapon("Flame Breath", 25));
    }

    @Override
    public void attack(Entity target)
    {

        int damage;

        if (random.nextBoolean())
        {
            damage = weapon.getDamage() + 20;
            System.out.println(RED + "🔥 Dragon uses FIRE BREATH!" + RESET);
        } else {
            damage = weapon.getDamage();
            System.out.println(YELLOW + "🐉 Dragon claws viciously!" + RESET);
        }

        target.takeDamage(damage);

        System.out.println(RED + "💥 Dragon deals "
                + damage + " damage!" + RESET);
    }
}