private void RpcAddStatusEffect(Stat type, GameObject otherActor, int duration, int healthOnRemove) { BattleController.Instance.PlaySoundEffect(type); StatusEffect s = new StatusEffect(type, otherActor.GetComponent <BattleActorBase>(), duration, healthOnRemove); if (type == Stat.Cure) { Heal(healthOnRemove); return; } damagePopup.DisplayStat(GetStatColor(type), duration, "+"); overlays.ToggleOverlay(type, true); if (HasStatusEffect(type)) { AddStack(s); } else { statusEffects.Add(type, new List <StatusEffect>() { s }); } switch (s.Type) { case Stat.Bleed: OnAddBleed(); break; case Stat.Blind: OnAddBlind(); break; case Stat.Burn: OnAddBurn(); break; case Stat.Focus: OnAddFocus(); break; case Stat.Freeze: OnAddFreeze(); break; case Stat.Invisible: OnAddInvisible(); break; case Stat.Poison: OnAddPoison(); break; case Stat.Protected: OnAddProtected(); break; case Stat.Reflect: OnAddReflect(); break; case Stat.Stun: OnAddStun(); break; case Stat.Weak: OnAddWeak(); break; case Stat.Cure: OnAddCure(); break; default: break; } }