def get_defense_action_id(server_id, defense_type, game_config):
    """
    Gets the defense action id from a given server position, defense_type, and game config

    :param server_id: id of the server
    :param defense_type: defense type
    :param game_config: game config
    :return: attack id
    """
    action_id = server_id * (game_config.num_attack_types+1) + defense_type
    return action_id