public void ApplyStatusEffect(StatusEffect inEffect) { bool addAsNew = true; if (inEffect.CombinesWithOwnType()) { StatusEffect curEffect = GetStatusEffect(inEffect.type); if (curEffect != null) { addAsNew = false; curEffect.CombineWith(inEffect); } } if (addAsNew) { _statusEffects.Add(inEffect); inEffect.ApplyToTarget(this); } if (HasImmobileStatusEffect()) { ClearCooldowns(); } }