I’m having some trouble accomplishing a ruleset I was hoping to create. Right now, we have two teams, red and blue and are using the FairTeamSkill rule in the documentation below:

{

“name”: “FairTeamSkill”,

“description”: “The average skill of players in each team is within N points from the average skill of all players in the match”,

“type”: “distance”,

// get skill values for players in each team and average separately to produce list of two numbers

“measurements”: [

“avg(teams[*].players.attributes[skill])"
],
// get skill values for players in each team, flatten into a single list, and average to produce an overall average
“referenceValue”: "avg(flatten(teams[*].players.attributes[skill]))”,

“maxDistance”: 25

},

However, we have two different roles for each team and were hoping to basically create a team for each role (so, 2 teams x 2 roles yielding a total of 4 teams).

I was wondering if there was a way to create two versions of the FairTeamSkill rule above, but each rule only operates on two specific teams vs all four like the * would do. Something like:

“measurements”: [

“avg(teams[redRoleA, blueRoleA].players.attributes[skill])”

],

so in this rule, it would only take the two version of the RoleA team, but leave the two version of the RoleB team out of it.

Is it possible to specify a susbset of teams we’d like to include? Also, same thing but for the reference value:

“referenceValue”: “avg(flatten(teams[*].players.attributes[skill]))”,

Thanks,

Adam