import configparser

config = configparser.ConfigParser()
config['DEFAULT'] = {
    'section': 'DefaultSpread',
    'filename': 'DefaultGame.ini',
    'hipfire_spread': '0.05',
    'reduce_bullet_spread': 'true',
    'crosshair_spread': '0.01',
    'fire_crosshair_spread': '0.02',
    'bullet_spread': '0.03',
    'robot_body_hit_rate': '0.04',
    'crosshair_decrease': '0.001'
}
config['DefaultSpread DeviceProfile'] = {
    'hipfire_spread': '0.05',
    'reduce_bullet_spread': 'true',
    'crosshair_spread': '0.01',
    'fire_crosshair_spread': '0.02',
    'bullet_spread': '0.03',
    'robot_body_hit_rate': '0.04',
    'crosshair_decrease': '0.001'
}

with open(config['DEFAULT']['filename'], 'w') as cfFile:
    config.write(cfFile)

def shoot(target):
    config.read(config['DEFAULT']['filename'])
    is_reduce_spread = config.getboolean('DEFAULT', 'reduce_bullet_spread')
    bullet_spread = float(config['DEFAULT']['bullet_spread'])
    
    if is_reduce_spread and bullet_spread < 0.1:
        print("Bullet spread reduced, current value:", bullet_spread)
    else:
        print("Bullet spread not adjusted, current value:", bullet_spread)

shoot("head")
