def tick(life):

	if life['dead']:
		perform_collisions(life)
		calculate_velocity(life)
		return False
	
	if calculate_blood(life)<=0:
		kill(life,'bleedout')
				
		return False
	
	if 'HUNGER' in life['life_flags']:
		if not hunger(life):
			return False
		
		calculate_hunger(life)
		
	if 'THIRST' in life['life_flags']:
		if not thirst(life):
			return False

	life['recoil'] = numbers.clip(life['recoil']-alife.stats.get_recoil_recovery_rate(life), 0.0, 1.0)
	
	natural_healing(life)
	_bleeding_limbs = get_bleeding_limbs(life)
	if _bleeding_limbs:
		_bleed_score = sum([get_limb(life, l)['bleeding'] for l in _bleeding_limbs])*3
		
		if random.randint(0,50)<numbers.clip(_bleed_score, 0, 50):
			effects.create_splatter('blood', life['pos'])
	
	if life['asleep']:
		life['asleep'] -= 1
		
		if life['asleep']<=0:
			life['asleep'] = 0
			
			logging.debug('%s woke up.' % life['name'][0])
			
			if 'player' in life:
				tcod.sys_set_fps(FPS)
				gfx.message('You wake up.')
			else:
				say(life,'@n wakes up.',action=True, event=False)
		
		return False
	
	_crit_injury = can_die_via_critical_injury(life)
	if _crit_injury:
		kill(life, 'acute pain in the %s' % _crit_injury)
		
		return True
	
	if get_total_pain(life)>life['pain_threshold']:
		life['consciousness'] = numbers.clip(life['consciousness']-get_total_pain(life), 0, 100)
		
		if life['consciousness'] <= 0:
			life['consciousness'] = 0
			
			if 'player' in life:
				gfx.message('The pain becomes too much.')
			
			pass_out(life)
			
			return False
	elif life['consciousness']<100:
		life['consciousness'] += life['pain_tolerance']
	
	perform_collisions(life)
	
	_current_known_chunk_id = get_current_known_chunk_id(life)
	if _current_known_chunk_id:
		judgement.judge_chunk(life, _current_known_chunk_id, visited=True, seen=True)
	else:
		judgement.judge_chunk(life, get_current_chunk_id(life), visited=True, seen=True)
	
	if calculate_velocity(life):
		return False	
	
	return True
Wrapper function. Performs all life-related logic. Returns nothing.
dataset/ETHPy150Open flags/Reactor-3/life.py/tick