package com.yaohun.demonskills.skills.skillsapi;

import com.yaohun.demonskills.SkillsMain;
import com.yaohun.demonskills.component.DelayComponent;
import com.yaohun.demonskills.component.SoundComponent;
import com.yaohun.demonskills.component.damage.DamageComponent;
import com.yaohun.demonskills.component.dragoncore.PlayerAnimationComponent;
import com.yaohun.demonskills.component.dragoncore.StandAnimationComponent;
import com.yaohun.demonskills.component.effects.StunPlayerComponent;
import com.yaohun.demonskills.component.particles.ParticlesComponent;
import com.yaohun.demonskills.component.projectile.ProjectileAroundComponent;
import com.yaohun.demonskills.component.projectile.ProjectileVectorComponent;
import com.yaohun.demonskills.core.Skill;
import com.yaohun.demonskills.data.PlayerData;
import com.yaohun.demonskills.manage.PlayerManager;
import com.yaohun.demonskills.target.NearestEnemiesSelector;
import com.yaohun.demonskills.target.SelfSelector;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import org.serverct.ersha.jd.AttributeAPI;

import java.util.ArrayList;
import java.util.Arrays;

public class Skill_左翻滚 {

    private static final String skillName = "翻滚";
    private static final double cooldownTime = 5;
    private static final int needMagic = 10;

    public static Skill getSkillData() {
        Skill skill = new Skill( // 技能 ID
                skillName,   // 技能名称
                needMagic,      // 魔力需求
                cooldownTime,      // 冷却时间
                1.0,
                Arrays.asList(
                        new SoundComponent("翻滚音效.ogg", 0.8f, 1.0f), // 播放翻滚音效
                        new DelayComponent(4L,Arrays.asList( // 延迟4tick
                                new PlayerAnimationComponent("动作_左翻滚",16), // 播放玩家动作 并在16tick停止播放
                                // 生成盔甲架并添加模型   同时延迟1tick  播放动画并在16tick后关闭动画
                                new StandAnimationComponent("@特效_左翻滚", "idle", 1, 16,0.1),
                                // 延迟1tick执行  Vector 位移
                                new DelayComponent(1L,Arrays.asList(
                                        new ProjectileAroundComponent(1.5,0.15)
                                ))
                        ))
                ));
        return skill;
    }

}
