public bool DispelStatus(Entity caster, string statusId) { StatusEffect effect = statusList.Find((status) => { return(status.caster == caster && status.Id == statusId); }); if (effect != null) { effect.Dispel(); if (effect.state != StatusState.Active) { statusList.Remove(effect); return(true); } } return(false); }