The situation you are describing is known as hepatic encephalopathy. It can cause asterixis, rigidity, and hypereflexia and is attributed to abnormal neurotransmission in the brain. The cause is not exactly known but elevated levels of ammonia in the blood is suspected. The liver handles nitrogen metabolism and when it is severely diseased it loses this ability. To test for asterixis: bring patients hands straight out in front of them and then extend their wrist...release and tell the patient to hold this position...if present, the hands will slightly flex rhythmically...it looks like they are flapping their hands and hence the term "liver flap."