@mtgame/core 0.1.43 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1996,32 +1996,30 @@ var Game = /** @class */ (function (_super) {
1996
1996
  });
1997
1997
  Object.defineProperty(Game.prototype, "isTeamWon", {
1998
1998
  get: function () {
1999
- return this.teamScore > this.competitorTeamScore;
1999
+ return [GameResultTypes.team_won, GameResultTypes.competitor_team_technical_defeat].includes(this.resultType);
2000
2000
  },
2001
2001
  enumerable: true,
2002
2002
  configurable: true
2003
2003
  });
2004
2004
  Object.defineProperty(Game.prototype, "isCompetitorTeamWon", {
2005
2005
  get: function () {
2006
- return this.competitorTeamScore > this.teamScore;
2006
+ return [GameResultTypes.competitor_team_won, GameResultTypes.team_technical_defeat].includes(this.resultType);
2007
2007
  },
2008
2008
  enumerable: true,
2009
2009
  configurable: true
2010
2010
  });
2011
2011
  Object.defineProperty(Game.prototype, "teamWinnerId", {
2012
2012
  get: function () {
2013
- if (this.status !== GameStatuses.closed) {
2013
+ if (!this.isClosed) {
2014
2014
  return null;
2015
2015
  }
2016
- if (this.teamScore === this.competitorTeamScore) {
2017
- return null;
2018
- }
2019
- if (this.team.id) {
2020
- return this.teamScore > this.competitorTeamScore ? this.team.id : this.competitorTeam.id;
2016
+ if (this.isTeamWon) {
2017
+ return this.team.id;
2021
2018
  }
2022
- else {
2023
- return this.teamScore > this.competitorTeamScore ? this.teamId : this.competitorTeamId;
2019
+ if (this.isCompetitorTeamWon) {
2020
+ return this.competitorTeam.id;
2024
2021
  }
2022
+ return null;
2025
2023
  },
2026
2024
  enumerable: true,
2027
2025
  configurable: true
@@ -2348,6 +2346,7 @@ var TournamentTeam = /** @class */ (function (_super) {
2348
2346
  games_count: 'gamesCount',
2349
2347
  won_games_count: 'wonGamesCount',
2350
2348
  draw_games_count: 'drawGamesCount',
2349
+ lose_games_count: 'loseGamesCount',
2351
2350
  last_games_count: 'lastGamesCount',
2352
2351
  last_games_won: 'lastGamesWon',
2353
2352
  score_sum: 'scoreSum',
@@ -5215,6 +5214,8 @@ var RugbyStatistic = /** @class */ (function (_super) {
5215
5214
  win_lose: 'winLose',
5216
5215
  games_count: 'gamesCount',
5217
5216
  won_games_count: 'wonGamesCount',
5217
+ lose_games_count: 'loseGamesCount',
5218
+ draw_games_count: 'drawGamesCount',
5218
5219
  newbie: 'newbie',
5219
5220
  // User statistic
5220
5221
  points: 'points',
@@ -7167,6 +7168,7 @@ var RUGBY_GAME_LOG_TYPE_POINTS = (_a$1 = {},
7167
7168
  _a$1[RugbyGameLogTypes.conversion_goal] = 2,
7168
7169
  _a$1[RugbyGameLogTypes.penalty_goal] = 3,
7169
7170
  _a$1[RugbyGameLogTypes.drop_goal] = 3,
7171
+ _a$1[RugbyGameLogTypes.end_game_penalty_goal] = 1,
7170
7172
  _a$1);
7171
7173
  var RUGBY_TEAM_LOG_TYPES = [
7172
7174
  RugbyGameLogTypes.timeout, RugbyGameLogTypes.scrum_won, RugbyGameLogTypes.scrum_lose, RugbyGameLogTypes.scrum_won_free,