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.dragoncore.PlayerAnimationComponent;
import com.yaohun.demonskills.component.dragoncore.StandAnimationComponent;
import com.yaohun.demonskills.component.projectile.ProjectileAdvanceComponent;
import com.yaohun.demonskills.component.projectile.ProjectileAroundComponent;
import com.yaohun.demonskills.core.Skill;
import com.yaohun.demonskills.data.PlayerData;
import com.yaohun.demonskills.manage.PlayerManager;
import org.bukkit.entity.Player;

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(
                                new PlayerAnimationComponent("动作_前翻滚",16),
                                new StandAnimationComponent("@特效_前翻滚", "idle", 1, 16,0.1),
                                new DelayComponent(1L,Arrays.asList(
                                        new ProjectileAdvanceComponent(1.5,0.15)
                                ))
                        ))
                ));
        return skill;
    }

}
