@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.
@@ -2209,32 +2209,30 @@
2209
2209
  });
2210
2210
  Object.defineProperty(Game.prototype, "isTeamWon", {
2211
2211
  get: function () {
2212
- return this.teamScore > this.competitorTeamScore;
2212
+ return [exports.GameResultTypes.team_won, exports.GameResultTypes.competitor_team_technical_defeat].includes(this.resultType);
2213
2213
  },
2214
2214
  enumerable: true,
2215
2215
  configurable: true
2216
2216
  });
2217
2217
  Object.defineProperty(Game.prototype, "isCompetitorTeamWon", {
2218
2218
  get: function () {
2219
- return this.competitorTeamScore > this.teamScore;
2219
+ return [exports.GameResultTypes.competitor_team_won, exports.GameResultTypes.team_technical_defeat].includes(this.resultType);
2220
2220
  },
2221
2221
  enumerable: true,
2222
2222
  configurable: true
2223
2223
  });
2224
2224
  Object.defineProperty(Game.prototype, "teamWinnerId", {
2225
2225
  get: function () {
2226
- if (this.status !== exports.GameStatuses.closed) {
2226
+ if (!this.isClosed) {
2227
2227
  return null;
2228
2228
  }
2229
- if (this.teamScore === this.competitorTeamScore) {
2230
- return null;
2231
- }
2232
- if (this.team.id) {
2233
- return this.teamScore > this.competitorTeamScore ? this.team.id : this.competitorTeam.id;
2229
+ if (this.isTeamWon) {
2230
+ return this.team.id;
2234
2231
  }
2235
- else {
2236
- return this.teamScore > this.competitorTeamScore ? this.teamId : this.competitorTeamId;
2232
+ if (this.isCompetitorTeamWon) {
2233
+ return this.competitorTeam.id;
2237
2234
  }
2235
+ return null;
2238
2236
  },
2239
2237
  enumerable: true,
2240
2238
  configurable: true
@@ -2561,6 +2559,7 @@
2561
2559
  games_count: 'gamesCount',
2562
2560
  won_games_count: 'wonGamesCount',
2563
2561
  draw_games_count: 'drawGamesCount',
2562
+ lose_games_count: 'loseGamesCount',
2564
2563
  last_games_count: 'lastGamesCount',
2565
2564
  last_games_won: 'lastGamesWon',
2566
2565
  score_sum: 'scoreSum',
@@ -5428,6 +5427,8 @@
5428
5427
  win_lose: 'winLose',
5429
5428
  games_count: 'gamesCount',
5430
5429
  won_games_count: 'wonGamesCount',
5430
+ lose_games_count: 'loseGamesCount',
5431
+ draw_games_count: 'drawGamesCount',
5431
5432
  newbie: 'newbie',
5432
5433
  // User statistic
5433
5434
  points: 'points',
@@ -7380,6 +7381,7 @@
7380
7381
  _a$1[exports.RugbyGameLogTypes.conversion_goal] = 2,
7381
7382
  _a$1[exports.RugbyGameLogTypes.penalty_goal] = 3,
7382
7383
  _a$1[exports.RugbyGameLogTypes.drop_goal] = 3,
7384
+ _a$1[exports.RugbyGameLogTypes.end_game_penalty_goal] = 1,
7383
7385
  _a$1);
7384
7386
  var RUGBY_TEAM_LOG_TYPES = [
7385
7387
  exports.RugbyGameLogTypes.timeout, exports.RugbyGameLogTypes.scrum_won, exports.RugbyGameLogTypes.scrum_lose, exports.RugbyGameLogTypes.scrum_won_free,