39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class Skill_Berserk : ProjectileBase
|
|
{
|
|
[Header("치명타 확률 증가량")]
|
|
public float cri = 0.2f;
|
|
[Header("공격속도 증가량")]
|
|
public float attackspeed = 0.3f;
|
|
[Header("방어력 감소량")]
|
|
public int defdown = 10;
|
|
[Header("마법저항력 감소량")]
|
|
public int mdefdown = 10;
|
|
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
base.Set(_data);
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
var time = m_ProjecTileData.Get_SkillDamagePercent();
|
|
if (time <= 0f) time = 5f; // TODO 정인호 : 테스트
|
|
// 이펙트
|
|
InGameInfo.Ins.Show_Effect("Effect_Howling", m_ProjecTileData.target.Get_Center_position());
|
|
InGameInfo.Ins.Show_Effect("Effect_Berserk", m_ProjecTileData.target, eEffectLocation.Mid, time);
|
|
// 커짐
|
|
m_ProjecTileData.target.Set_ScaleControl(false);
|
|
m_ProjecTileData.target.Buff_or_Debuff(eCC.Cri_Up, time, cri);
|
|
m_ProjecTileData.target.Buff_or_Debuff(eCC.ATK_Up, time, attackspeed);
|
|
m_ProjecTileData.target.Buff_or_Debuff(eCC.DEF_Down, time, defdown);
|
|
m_ProjecTileData.target.Buff_or_Debuff(eCC.M_DEF_Down, time, mdefdown);
|
|
// Off & 원래대로 돌아오기
|
|
yield return new WaitForSeconds(time);
|
|
m_ProjecTileData.target.Set_ScaleControl(true);
|
|
Off(true);
|
|
}
|
|
} |