Example #1
0
    void DealBFSpingDMG(ObjectController target)
    {
        float RawDamage;
        bool  Crit;

        if (UnityEngine.Random.value < (OC.GetCurrStats(STATSTYPE.CRIT_CHANCE) / 100))
        {
            RawDamage = OC.CurrDamage * (Sping_DamageScale / 100) * (OC.CurrCritChance / 100);
            Crit      = true;
        }
        else
        {
            RawDamage = OC.CurrDamage * (Sping_DamageScale / 100);
            Crit      = false;
        }
        DirectDamage SpingDmg = new DirectDamage(RawDamage, target.CurrDefense, OC.CurrPenetration, Crit, OC, typeof(BattleFury));

        //OC.ON_HEALTH_UPDATE += OC.HealHP;
        //OC.ON_HEALTH_UPDATE(new Value(OC.GetCurrLPH(), 1));
        //OC.ON_HEALTH_UPDATE -= OC.HealHP;

        target.ActiveOneShotVFXParticle(HitVFX);

        target.ON_DMG_TAKEN += target.DeductHealth;
        target.ON_DMG_TAKEN(SpingDmg);
        target.ON_DMG_TAKEN -= target.DeductHealth;

        if (!target.HasDebuff(typeof(BleedDebuff)))
        {
            ApplyBleedDebuff(target);
        }
    }
Example #2
0
    void DealCleaveDmg(ObjectController target)
    {
        float RawDamage;
        bool  Crit;

        if (UnityEngine.Random.value < (OC.CurrCritChance / 100))
        {
            RawDamage = OC.CurrDamage * (DamageScale / 100 + ScalingFactor * (DamageScale / 100)) * (OC.CurrCritDmg / 100);
            Crit      = true;
        }
        else
        {
            RawDamage = OC.CurrDamage * (DamageScale / 100 + ScalingFactor * (DamageScale / 100));
            Crit      = false;
        }
        DirectDamage CleaveDmg = new DirectDamage(RawDamage, target.CurrDefense, OC.CurrPenetration, Crit, OC, typeof(Cleave));

        //OC.ON_HEALTH_UPDATE += OC.HealHP;
        //OC.ON_HEALTH_UPDATE(new Value(OC.GetCurrLPH(), 1));
        //OC.ON_HEALTH_UPDATE -= OC.HealHP;

        target.ActiveOneShotVFXParticle(HitVFX);


        target.ON_DMG_TAKEN += target.DeductHealth;
        target.ON_DMG_TAKEN(CleaveDmg);
        target.ON_DMG_TAKEN -= target.DeductHealth;
    }
Example #3
0
    void DealMeleeAttackDMG(ObjectController target)
    {
        DirectDamage dmg = AutoAttackDamageDeal(target.GetCurrStats(STATSTYPE.DEFENSE));

        OC.ON_HEALTH_GAIN += OC.HealHP;
        OC.ON_HEALTH_GAIN(new HealHP(dmg.Amount * (OC.GetCurrStats(STATSTYPE.LPH) / 100), dmg.Crit, OC, typeof(MeleeAttackCollider)));
        OC.ON_HEALTH_GAIN -= OC.HealHP;

        target.ON_DMG_TAKEN += target.DeductHealth;
        target.ON_DMG_TAKEN(dmg);
        target.ON_DMG_TAKEN -= target.DeductHealth;

        if (HitVFX != null)
        {
            target.ActiveOneShotVFXParticle(HitVFX);
        }
        if (DamageSFXList.Count > 0)
        {
            AudioSource.PlayClipAtPoint(DamageSFXList[UnityEngine.Random.Range(0, DamageSFXList.Count)], target.transform.position, GameManager.SFX_Volume);
        }
        else if (HitSFX != null)
        {
            AudioSource.PlayClipAtPoint(HitSFX, target.transform.position, GameManager.SFX_Volume);
        }
    }
Example #4
0
    public override void ApplyDebuff(ObjectController applyer, ObjectController target)
    {
        base.ApplyDebuff(applyer, target);
        DirectDamage damage = new DirectDamage(ReflectedAmount, 0, 0, Crit, applyer, typeof(RetaliationDebuff));

        target.ON_DMG_TAKEN += target.DeductHealth;
        target.ON_DMG_TAKEN(damage);
        target.ON_DMG_TAKEN -= target.DeductHealth;
        target.ActiveOneShotVFXParticle(VFX);
        AudioSource.PlayClipAtPoint(SFX, target.transform.position, GameManager.SFX_Volume);
    }