////// Hooks //////

        private void HealthComponent_TakeDamage(On.RoR2.HealthComponent.orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
        {
            orig(self, damageInfo);
            if (!self || !damageInfo.attacker || damageInfo.HasModdedDamageType(damageType) || !damageInfo.attacker.TryGetComponent <HealthComponent>(out var attackerHC))
            {
                return;
            }
            var count = GetCount(self.body);

            if (count > 0)
            {
                var attackerTeam = TeamComponent.GetObjectTeam(damageInfo.attacker);
                var frac         = Mathf.Clamp01(1f - 1f / (1f + damageFrac * ((attackerTeam == TeamIndex.Player) ? vsPlayerScaling: 1f) * (float)count));
                var di           = new DamageInfo {
                    attacker         = self.gameObject,
                    canRejectForce   = true,
                    crit             = false,
                    damage           = damageInfo.damage * frac,
                    damageColorIndex = DamageColorIndex.Item,
                    force            = Vector3.zero,
                    position         = attackerHC.body ? attackerHC.body.corePosition : attackerHC.transform.position,
                    procChainMask    = damageInfo.procChainMask,
                    procCoefficient  = 0f
                };
                di.AddModdedDamageType(damageType);
                attackerHC.TakeDamage(di);
            }
        }