//Private void BashPassive(ObjectController target) { if (UnityEngine.Random.value < (TriggerChance / 100)) { if (target.HasDebuff(typeof(StunDebuff))) { Debuff ExistedStunDebuff = target.GetDebuff(typeof(StunDebuff)); if (StunDuration > ExistedStunDebuff.Duration) { ExistedStunDebuff.Duration = StunDuration; } } else { ApplyStunDebuff(target); } } }
void StunAndDealChargeDmg(ObjectController target) { if (target.HasDebuff(typeof(StunDebuff))) { Debuff ExistedStunDebuff = target.GetDebuff(typeof(StunDebuff)); if (StunDuration > ExistedStunDebuff.Duration) { ExistedStunDebuff.Duration = StunDuration; } } else { ApplyStunDebuff(target); } float RawDamage; bool Crit; if (UnityEngine.Random.value < (OC.CurrCritChance / 100)) { RawDamage = OC.CurrDamage * (DamageScale / 100) * (OC.CurrCritDmg / 100); Crit = true; } else { RawDamage = OC.CurrDamage * (DamageScale / 100); Crit = false; } DirectDamage ChargedDmg = new DirectDamage(RawDamage, target.CurrDefense, OC.CurrPenetration, Crit, OC, typeof(PhantomCharge)); //OC.ON_HEALTH_UPDATE += OC.HealHP; //OC.ON_HEALTH_UPDATE(new Value(OC.GetCurrLPH(), 1)); //OC.ON_HEALTH_UPDATE -= OC.HealHP; target.ON_DMG_TAKEN += target.DeductHealth; target.ON_DMG_TAKEN(ChargedDmg); target.ON_DMG_TAKEN -= target.DeductHealth; }
private void StunAndDealStompDmg(ObjectController target) { if (target.HasDebuff(typeof(StunDebuff))) { Debuff ExistedStunDebuff = target.GetDebuff(typeof(StunDebuff)); if (StunDuration > ExistedStunDebuff.Duration) { ExistedStunDebuff.Duration = StunDuration; } } else { ApplyStunDebuff(target); } float RawDamage; bool Crit; if (UnityEngine.Random.value < (OC.GetCurrStats(STATSTYPE.CRIT_CHANCE) / 100)) { RawDamage = OC.CurrDamage * (DamageScale * ScalingFactor / 100) * (OC.CurrCritDmg / 100); Crit = true; } else { RawDamage = OC.CurrDamage * (DamageScale * ScalingFactor / 100); Crit = false; } DirectDamage StompDmg = new DirectDamage(RawDamage, target.CurrDefense, OC.CurrPenetration, Crit, OC, typeof(WarStomp)); //OC.ON_HEALTH_UPDATE += OC.HealHP; //OC.ON_HEALTH_UPDATE(new Value(OC.GetCurrStats(StatsType.HEALTH), 1)); //OC.ON_HEALTH_UPDATE -= OC.HealHP; target.ON_DMG_TAKEN += target.DeductHealth; target.ON_DMG_TAKEN(StompDmg); target.ON_DMG_TAKEN -= target.DeductHealth; }