The function incorrectly assumed that cups where all the scheduled games
had been played wre complete, and did not take into account the fact
that games for later rounds may not have been scheduled yet.
This allows you to specify an alternative choose_team in the case the
first choose_team does not match any teams. This can happen if a team
qualifies for another cup in the same cup group. You may list an
unlimited number of alternatives with this new tag. Here is an example of
how to use it:
<choose_team>
<choose_team_sid>faroe_islands_cup</choose_team_sid>
<number_of_teams>1</number_of_teams>
<start_idx>1</start_idx>
<end_idx>1</end_idx>
<alternatives>
<choose_team>
<choose_team_sid>faroe_islands1</choose_team_sid>
<number_of_teams>1</number_of_teams>
<start_idx>1</start_idx>
<end_idx>1</end_idx>
</choose_team>
</alternatives>
</choose_team>
This example chooses the winner of the faroe_islands_cup, but if that
team is not eligible for the cup, then it will choose the winner of the
faroe_islands1 league.
This allows for consistent and accurate international cup definitions,
because the draws will be the same no matter what the country a user
has choosen.
So now if a user is playing Faroe Islands, for example, a choose_team with an
sid of faroe_islands1, will select a team from the Faroe Islands.
Previously, this sid would have been ignored and the only way for a
user team to play in an international cup was if it used the special
LEAGUE* or CUP* sid.
As a result of this change, the 'generate' property of CupChooseTeam is
now infered based on the sid, so the generated tag no longer has an
effect in the definition files.
The first_team tag can be used to indicate that a team is a 'reserve
team'. The value for this new tag is the name of the first team
for this reserve team. The reserve_level is used to indicate if this
is the 2nd, 3rd, 4th, etc. team for the first team. For example:
<team>
<team_name>Blue</team_name>
</team>
<team>
<team_name>Blue 2</team_name>
<first_team>Blue</first_team>
<reserve_level>2</reserve_level>
</team>
<team>
<team_name>Blue 3</team_name>
<first_team>Blue</first_team>
<reserve_level>3</reserve_level>
</team>