#NEWLINE# def setup( self ) : #NEWLINE# #INDENT# '\n        Setup the test case\n        ' #NEWLINE# self . floor_rock = 1 #NEWLINE# self . wall_empty = None #NEWLINE# self . rng = Random ( ) #NEWLINE# self . level = LevelBuilder ( ) . with_size ( ( 60 , 40 ) ) . with_floor_tile ( self . floor_rock ) . with_wall_tile ( self . wall_empty ) . build ( ) #NEWLINE# add_location_tag ( self . level , ( 10 , 10 ) , 'room' ) #NEWLINE# for x_loc in range ( 11 , 30 ) : #NEWLINE# #INDENT# add_location_tag ( self . level , ( x_loc , 10 ) , 'corridor' ) #NEWLINE# #UNINDENT# item_config = ItemConfigurations ( Random ( ) ) #NEWLINE# item_config . add_item ( ItemConfiguration ( name = 'dagger' , cost = 2 , weight = 1 , icons = [ 500 ] , types = [ 'weapon' , 'light weapon' , 'melee' , 'simple weapon' ] , rarity = 'common' , weapon_configration = WeaponConfiguration ( damage = [ ( 2 , 'piercing' ) , ( 2 , 'slashing' ) ] , critical_range = 11 , critical_damage = 2 , weapon_class = 'simple' ) ) ) #NEWLINE# item_config . add_item ( ItemConfiguration ( name = 'red potion' , cost = 150 , weight = 1 , icons = [ 100 ] , types = [ 'potion' ] , rarity = 'rare' , effect_handles = [ EffectHandle ( trigger = 'on drink' , effect = 'cure medium wounds' , parameters = None , charges = 1 ) ] ) ) #NEWLINE# self . item_generator = ItemGenerator ( self ) #NEWLINE# self . configuration = [ item_by_name ( 3 , 4 , 'dagger' ) , item_by_type ( 1 , 1 , 'potion' ) ] #NEWLINE# self . item_adder = ItemAdder ( self . item_generator , self . configuration , self . rng ) #NEWLINE# self . item_adder . add_items ( self . level )