#NEWLINE# @ given ( '{character_name} wears {item_name}' ) #NEWLINE# @ default_context #NEWLINE# @ armour_list #NEWLINE# @ boots_list #NEWLINE# def impl( context , character_name , item_name ) : #NEWLINE# #INDENT# if ( item_name in context . armour_list ) : #NEWLINE# #INDENT# item = context . armour_list [ item_name ] ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( item_name in context . boots_list ) : #NEWLINE# #INDENT# item = context . boots_list [ item_name ] ( ) #NEWLINE# #UNINDENT# #UNINDENT# context . items . append ( item ) #NEWLINE# character = get_character ( context , character_name ) #NEWLINE# character . inventory . append ( item ) #NEWLINE# if is_armour ( item ) : #NEWLINE# #INDENT# character . inventory . armour = item #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if is_boots ( item ) : #NEWLINE# #INDENT# character . inventory . boots = item