Commit Graph

40 Commits

Author SHA1 Message Date
Tom Stellard 8a3100a28c Add support for specifying cups in choose_team_sid tag for generated teams
This makes it possible to include national cup winners in international
cups.
2021-03-05 23:38:28 -05:00
Tom Stellard 347d74a3c4 Load all league and team names at the beginning of the game
This way we don't have to reload the country xml definitions every time
we have to generate a new team.
2021-03-05 23:38:28 -05:00
Tom Stellard 4248c08b7a Allow the user's country's league sids in choose_team tags
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.
2021-03-05 23:38:28 -05:00
Tom Stellard 996bccc739 Implement promotion and relegation rules for reserve teams
This adds some new rules for promoting and relegating reserve
teams:

+ Reserve teams will not be promoted into a league that contains its
  first team or a higher-level reserve team.
+ If a first team or higher-level reserve team is relegated to a league
  with a lower reserve team, then that reserve team will also be relegated.

In order to enable these rules, you must add the
<reserve_promotion_rules>default</reserve_promotion_rules> tag to your
contry xml file, and also define reserve teams in your league/team_defs
file using the <first_team> and <reserve_level> tags.
2020-12-24 10:43:39 -08:00
Tom Stellard f928273875 Add first_team and reserve_level tags to team element
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>
2020-12-24 10:43:39 -08:00
gyboth a76cae2a44 Week breaks introduced. 2008-12-26 15:59:46 +00:00
gyboth c3f2c238b8 Def improvements, Italian definition corrected. 2008-12-23 10:33:55 +00:00
gyboth fed258a749 Added custom round robin breaks to leagues and cups. 2008-12-14 10:37:10 +00:00
gyboth 64d556f3c1 Corrected pointer warnings. 2008-12-07 11:28:18 +00:00
gyboth 945c4d1093 Added league properties and changed league active status to property. 2008-11-24 11:16:36 +00:00
gyboth b9415b186e Multiple tables for leagues feature completed. 2008-11-22 16:51:31 +00:00
gyboth a535439936 Added multiple tables for leagues. 2008-11-21 17:00:47 +00:00
gyboth fc80db9dcb Added two match weeks for cup rounds. 2007-02-18 13:04:19 +00:00
gyboth 819358f291 Added two match weeks for leagues. 2007-02-17 12:06:30 +00:00
gyboth 6f61b20f96 "Minor bugfix in query_cup_begins." 2005-11-26 16:52:51 +00:00
gyboth fa0b06f39d "Randomise teams option added." 2005-10-20 15:45:00 +00:00
gyboth 53131dd2e9 "Switched most GStrings to gchar." 2005-10-09 09:35:44 +00:00
gyboth 0df6829fe0 "Minor bugfixes." 2005-10-01 08:12:06 +00:00
gyboth dc3b8bdc03 "Minor corrections." 2005-09-28 10:21:43 +00:00
gyboth e436801289 Prom_rel improvements. 2005-08-15 13:18:28 +00:00
gyboth 7e4f427be2 "Prom_rel changes." 2005-08-14 19:03:11 +00:00
gyboth f26d18bf3f "Prom games improvements, cup success compare improvement." 2005-06-25 14:09:37 +00:00
gyboth 64c34275b8 "Segfixes." 2005-06-17 12:57:05 +00:00
gyboth a6c9fec8ee "Profiling, romanian names." 2005-06-05 10:39:29 +00:00
gyboth c8642bc8b3 "Minor bug fixed." 2005-05-28 10:41:53 +00:00
gyboth c4d40f55b6 Yet another cup system change. 2005-05-08 17:56:26 +00:00
gyboth bd3f30c8b2 Fixes; success counter. 2005-04-24 14:19:57 +00:00
gyboth c852e415c3 User histories. 2005-04-16 07:46:04 +00:00
gyboth fd6e42af8e Promotion games, supercups (phew). 2005-04-14 19:07:25 +00:00
gyboth 903288474a Season end. 2005-04-13 13:01:59 +00:00
gyboth d973da436a Player info. 2005-04-07 21:10:31 +00:00
gyboth 27efe36a8f User management. Preview. 2005-03-27 17:59:57 +00:00
gyboth 2f7c0bfe36 Transfers, mainly. 2005-03-19 20:04:08 +00:00
gyboth 393e5d00d8 Some finances. 2005-03-16 20:48:25 +00:00
gyboth dfe66b5180 Fixture display. 2005-03-14 17:47:27 +00:00
gyboth 7e07d74abd Made some progress; removed editor gui. 2005-03-03 12:46:48 +00:00
gyboth 993e7b6ba2 Live game can be tested a bit now. 2005-01-09 20:21:22 +00:00
gyboth be3b94742f Finished loading of leagues and cups and generating of teams. 2004-12-30 16:48:19 +00:00
gyboth ba51e1a908 Added new struct style and cup struct. 2004-12-23 20:43:43 +00:00
gyboth 7114381bfb Initial revision 2004-12-23 12:58:39 +00:00