#NEWLINE# def create_smoke_cloud( pos , size , color = tcod . gray , age = 0 , factor_distance = False ) : #NEWLINE# #INDENT# for new_pos in render_los . draw_circle ( pos [ 0 ] , pos [ 1 ] , size ) : #NEWLINE# #INDENT# if ( not gfx . position_is_in_frame ( pos ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not alife . sight . _can_see_position ( pos , new_pos , distance = False ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# _age_mod = 1 #NEWLINE# if factor_distance : #NEWLINE# #INDENT# _age_mod = ( 1 - numbers . clip ( ( numbers . distance ( pos , new_pos ) / float ( size ) ) , 0.1 , 1 ) ) #NEWLINE# #UNINDENT# create_smoke ( new_pos , color = color , age = ( age * _age_mod ) )