package eu.mhsl.minenet.minigames.instance.game.stateless.types.towerdefense.towers;

import net.minestom.server.entity.EntityCreature;
import net.minestom.server.entity.EntityType;
import net.minestom.server.item.ItemStack;
import net.minestom.server.item.Material;

public class SkeletonTower extends ShootingTower {
    public SkeletonTower() {
        super(EntityType.SKELETON, 1, 2, 10);
        this.setItemInMainHand(ItemStack.of(Material.BOW));
    }

    @Override
    protected void attack(EntityCreature enemy) {
        this.swingMainHand();
        this.shootProjectile(enemy, EntityType.ARROW, 2, 0);
    }

    @Override
    protected void onProjectileHit(EntityCreature enemy) {
        super.onProjectileHit(enemy);
//        enemy.getAttribute(Attribute.MOVEMENT_SPEED).setBaseValue(enemy.getAttribute(Attribute.MOVEMENT_SPEED).getBaseValue()*0.5);
    }
}
