Example #1
0
    AttackMessage rushHandle(IHitable target, FSMbase sender, float attackPoint)
    {
        m.FinalDamage = sender.status.getCurrentStat(STAT.AtkPoint) * attackPoint;

        target.status.AddBuff(new Pierced(pierceTime, target));

        Vector2    dir           = (target.transform.position - sender.transform.position).normalized;
        Vector3    v3Original    = chargeDir;
        Quaternion firstRotation = Quaternion.FromToRotation(v3Original, dir);
        float      dirDot        = firstRotation.eulerAngles.z;
        Vector3    v3Dest;
        Quaternion qUpDir;
        float      reflectionValue = 0;

        if (dirDot >= 0 && dirDot < 180)
        {
            qUpDir = Quaternion.Euler(0, 0, 90);
        }
        else
        {
            qUpDir          = Quaternion.Euler(0, 0, -90);
            reflectionValue = 180;
        }

        v3Original = qUpDir * v3Original;
        float secondRotation = Quaternion.FromToRotation(dir, v3Original).eulerAngles.z * 0.5f;

        v3Dest = Quaternion.Euler(0, 0, dirDot + secondRotation + reflectionValue) * chargeDir;

        v3Dest.Normalize();

        m.CalcKnockBack(v3Dest, 3);
        return(m);
    }
Example #2
0
    AttackMessage attackHandle(IHitable target, FSMbase sender, float attackPoint)
    {
        m.FinalDamage = sender.status.getCurrentStat(STAT.AtkPoint) * attackPoint;
        m.CalcKnockBack(target, sender, 1);

        //20퍼센트 확률로 감전
        int r = UnityEngine.Random.Range(0, 100);

        if (r < 20)
        {
            target.status.AddBuff(new Electrified(1, target));
        }
        return(m);
    }
Example #3
0
 AttackMessage AttackHandle(IHitable target, FSMbase sender, float attackPoint)
 {
     m.FinalDamage = sender.status.getCurrentStat(STAT.AtkPoint) * attackPoint;
     if (tempAtkCount == 1)
     {
         m.CalcKnockBack(target, sender, 1);
     }
     if (m.CriCalculate(sender.status.getCurrentStat(STAT.CriticalPoint),
                        sender.status.getCurrentStat(STAT.CriticalDamage)))
     {
         target.status.AddBuff(new Bleeding(5, 3, target));
     }
     return(m);
 }
Example #4
0
    AttackMessage GroundHandle(IHitable target, FSMbase sender, float attackPoint)
    {
        m.effectType     = EffectType.SMALL;
        m.critEffectType = EffectType.SMALL;
        m.FinalDamage    = sender.status.getCurrentStat(STAT.AtkPoint) * attackPoint;
        m.CalcKnockBack(target, sender, 2);

        int r = UnityEngine.Random.Range(0, 100);

        if (r < 20)
        {
            target.status.AddBuff(new Electrified(1, target));
        }
        return(m);
    }