@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.
@@ -1672,24 +1672,22 @@ let Game = class Game extends BaseModel {
1672
1672
  return this.status === GameStatuses.closed;
1673
1673
  }
1674
1674
  get isTeamWon() {
1675
- return this.teamScore > this.competitorTeamScore;
1675
+ return [GameResultTypes.team_won, GameResultTypes.competitor_team_technical_defeat].includes(this.resultType);
1676
1676
  }
1677
1677
  get isCompetitorTeamWon() {
1678
- return this.competitorTeamScore > this.teamScore;
1678
+ return [GameResultTypes.competitor_team_won, GameResultTypes.team_technical_defeat].includes(this.resultType);
1679
1679
  }
1680
1680
  get teamWinnerId() {
1681
- if (this.status !== GameStatuses.closed) {
1681
+ if (!this.isClosed) {
1682
1682
  return null;
1683
1683
  }
1684
- if (this.teamScore === this.competitorTeamScore) {
1685
- return null;
1686
- }
1687
- if (this.team.id) {
1688
- return this.teamScore > this.competitorTeamScore ? this.team.id : this.competitorTeam.id;
1684
+ if (this.isTeamWon) {
1685
+ return this.team.id;
1689
1686
  }
1690
- else {
1691
- return this.teamScore > this.competitorTeamScore ? this.teamId : this.competitorTeamId;
1687
+ if (this.isCompetitorTeamWon) {
1688
+ return this.competitorTeam.id;
1692
1689
  }
1690
+ return null;
1693
1691
  }
1694
1692
  static toFront(data) { }
1695
1693
  static toBack(data) { }
@@ -1977,6 +1975,7 @@ TournamentTeam = __decorate([
1977
1975
  games_count: 'gamesCount',
1978
1976
  won_games_count: 'wonGamesCount',
1979
1977
  draw_games_count: 'drawGamesCount',
1978
+ lose_games_count: 'loseGamesCount',
1980
1979
  last_games_count: 'lastGamesCount',
1981
1980
  last_games_won: 'lastGamesWon',
1982
1981
  score_sum: 'scoreSum',
@@ -4241,6 +4240,8 @@ RugbyStatistic = __decorate([
4241
4240
  win_lose: 'winLose',
4242
4241
  games_count: 'gamesCount',
4243
4242
  won_games_count: 'wonGamesCount',
4243
+ lose_games_count: 'loseGamesCount',
4244
+ draw_games_count: 'drawGamesCount',
4244
4245
  newbie: 'newbie',
4245
4246
  // User statistic
4246
4247
  points: 'points',
@@ -5816,7 +5817,8 @@ const RUGBY_GAME_LOG_TYPE_POINTS = {
5816
5817
  [RugbyGameLogTypes.try]: 5,
5817
5818
  [RugbyGameLogTypes.conversion_goal]: 2,
5818
5819
  [RugbyGameLogTypes.penalty_goal]: 3,
5819
- [RugbyGameLogTypes.drop_goal]: 3
5820
+ [RugbyGameLogTypes.drop_goal]: 3,
5821
+ [RugbyGameLogTypes.end_game_penalty_goal]: 1,
5820
5822
  };
5821
5823
  const RUGBY_TEAM_LOG_TYPES = [
5822
5824
  RugbyGameLogTypes.timeout, RugbyGameLogTypes.scrum_won, RugbyGameLogTypes.scrum_lose, RugbyGameLogTypes.scrum_won_free,