def get_attack_action_id(server_id, attack_type, game_config):
    """
    Gets the attack action id from a given server position, attack_type, and game config

    :param server_id: id of the server
    :param attack_type: attack type
    :param game_config: game config
    :return: attack id
    """
    if not game_config.reconnaissance_actions:
        action_id = server_id * game_config.num_attack_types + attack_type
    else:
        action_id = server_id * (game_config.num_attack_types+1) + attack_type
    return action_id