public int GetDamageDealt(PvPPlayer attacker, PvPItem weapon, PvPProjectile projectile = null) { int damage = (projectile == null || PvPController.config.projectileInfo[projectile.type].damage < 1) ? weapon.GetPvPDamage(attacker) : projectile.GetConfigDamage(); damage += PvPUtils.GetAmmoDamage(attacker, weapon); damage += PvPUtils.GetDamageVariance(); damage += PvPUtils.GetVortexDamage(attacker, weapon, damage); damage -= (int)(this.GetDefenseDifferenceFromModded() * 0.5); return(damage); }
public void ApplyPvPEffects(PvPPlayer attacker, PvPItem weapon, PvPProjectile projectile, int damage) { this.ApplyReflectDamage(attacker, damage, weapon); this.ApplyArmorEffects(attacker, weapon); TerrariaUtils.ActivateYoyo(attacker, this, damage, weapon.knockBack); }