public override void Damage(float damage, float pushTime, Vector2 pushSpeed, BasicShipGameObject Damager, AttackType attackType) { float PreviousShieldDamage = Math.Min(ShieldDamage, ShieldToughness); float PreviousHullDamage = Math.Min(HullDamage, HullToughness); base.Damage(damage, pushTime, pushSpeed, Damager, attackType); float DamageAmount = (Math.Min(ShieldDamage, ShieldToughness) - PreviousShieldDamage) + (Math.Min(HullDamage, HullToughness) - PreviousHullDamage); if (DamageAmount > 0) { if (DamageAmount > 0.25f) { TextParticleSystem.AddParticle(new Vector3(Position.X(), Y, Position.Y()), ((int)(DamageAmount * 4)).ToString(), (byte)Damager.GetTeam()); } if (Damager.GetType().IsSubclassOf(typeof(UnitShip))) { UnitShip s = (UnitShip)Damager; //if (s.IsGhostMode) // return; } if (Damager.GetTeam() == NeutralManager.NeutralTeam) { FactionManager.AddDamage(DamageAmount * 4); } else { FactionManager.AddDamage(Damager.GetTeam(), DamageAmount * 4); } } }