@mtgame/core 0.1.43 → 0.1.45

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,21 +5214,25 @@ 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',
5221
5222
  tries: 'tries',
5222
5223
  penalty_tries: 'penaltyTries',
5223
- conversion_shots: 'conversionShots',
5224
+ conversion_kicks: 'conversionKicks',
5224
5225
  conversion_goals: 'conversionGoals',
5225
5226
  conversion_misses: 'conversionMisses',
5226
5227
  conversion_goals_percent: 'conversionGoalsPercent',
5227
- drawing_ball: 'drawingBall',
5228
- penalty_shots: 'penaltyShots',
5228
+ penalties: 'penalties',
5229
+ penalty_kicks_on_goal: 'penaltyKicksOnGoal',
5229
5230
  penalty_misses: 'penaltyMisses',
5230
5231
  penalty_goals: 'penaltyGoals',
5232
+ tap_penalties: 'tapPenalties',
5233
+ penalty_kicks_to_touch: 'penaltyKicksToTouch',
5231
5234
  penalty_goals_percent: 'penaltyGoalsPercent',
5232
- drop_goal_shots: 'dropGoalShots',
5235
+ drop_goal_kicks: 'dropGoalKicks',
5233
5236
  drop_goals: 'dropGoals',
5234
5237
  drop_goal_misses: 'dropGoalMisses',
5235
5238
  drop_goal_percent: 'dropGoalPercent',
@@ -5238,31 +5241,38 @@ var RugbyStatistic = /** @class */ (function (_super) {
5238
5241
  red_cards: 'redCards',
5239
5242
  offloads: 'offloads',
5240
5243
  tackles: 'tackles',
5241
- outs: 'outs',
5242
5244
  handling_errors: 'handlingErrors',
5243
- carries_other_gainline: 'carriesOtherGainline',
5245
+ carries_over_gainline: 'carriesOverGainline',
5244
5246
  plus_minus: 'plusMinus',
5245
5247
  game_time: 'gameTime',
5246
5248
  // Team statistic
5247
5249
  scrums: 'scrums',
5248
5250
  scrums_won: 'scrumsWon',
5249
- scrum_losses: 'scrumLosses',
5251
+ scrums_lost: 'scrumsLost',
5250
5252
  scrums_won_percent: 'scrumsWonPercent',
5251
5253
  scrums_won_free: 'scrumsWonFree',
5254
+ opponent_scrums_won: 'opponentScrumsWon',
5255
+ opponent_scrums_lost: 'opponentScrumsLost',
5252
5256
  lineouts: 'lineouts',
5253
- lineouts_success: 'lineoutsSuccess',
5254
- lineout_loses: 'lineoutLoses',
5257
+ lineouts_won: 'lineoutsWon',
5258
+ lineouts_lost: 'lineoutsLost',
5255
5259
  lineouts_steal: 'lineoutsSteal',
5260
+ opponent_lineouts_lost: 'opponentLineoutsLost',
5256
5261
  quick_throws: 'quickThrows',
5257
5262
  rucks: 'rucks',
5258
5263
  rucks_won: 'rucksWon',
5259
- ruck_losses: 'ruckLosses',
5264
+ rucks_lost: 'rucksLost',
5260
5265
  rucks_won_percent: 'rucksWonPercent',
5266
+ opponent_rucks_won: 'opponentRucksWon',
5267
+ opponent_rucks_lost: 'opponentRucksLost',
5261
5268
  mauls: 'mauls',
5262
5269
  mauls_won: 'maulsWon',
5263
- maul_losses: 'maulLosses',
5270
+ mauls_lost: 'maulsLost',
5264
5271
  mauls_won_percent: 'maulWonPercent',
5265
- fouls: 'fouls'
5272
+ opponent_mauls_won: 'opponentMaulsWon',
5273
+ opponent_mauls_lost: 'opponentMaulsLost',
5274
+ fouls: 'fouls',
5275
+ team_fouls: 'teamFouls',
5266
5276
  },
5267
5277
  relation: {
5268
5278
  tournamentTeamUser: TournamentTeamUser,
@@ -7052,12 +7062,11 @@ var RugbyGameStatistic = /** @class */ (function (_super) {
7052
7062
  penalty_tries: 'penaltyTries',
7053
7063
  conversion_goals: 'conversionGoals',
7054
7064
  conversion_misses: 'conversionMisses',
7055
- conversion_shots: 'conversionShots',
7065
+ conversion_kicks: 'conversionKicks',
7056
7066
  conversion_goals_percent: 'conversionGoalsPercent',
7057
- drawing_ball: 'drawingBall',
7058
7067
  penalty_misses: 'penaltyMisses',
7059
7068
  penalty_goals: 'penaltyGoals',
7060
- penalty_shots: 'penaltyShots',
7069
+ penalty_kicks_on_goal: 'penaltyKicksOnGoal',
7061
7070
  penalty_goals_percent: 'penaltyGoalsPercent',
7062
7071
  drop_goals: 'dropGoals',
7063
7072
  drop_goal_misses: 'dropGoalMisses',
@@ -7068,9 +7077,8 @@ var RugbyGameStatistic = /** @class */ (function (_super) {
7068
7077
  red_cards: 'redCards',
7069
7078
  offloads: 'offloads',
7070
7079
  tackles: 'tackles',
7071
- outs: 'outs',
7072
7080
  handling_errors: 'handlingErrors',
7073
- carries_other_gainline: 'carriesOtherGainline',
7081
+ carries_over_gainline: 'carriesOverGainline',
7074
7082
  game_time: 'gameTime',
7075
7083
  plus_minus: 'plusMinus'
7076
7084
  },
@@ -7128,38 +7136,37 @@ var RugbyGameLogTypes;
7128
7136
  RugbyGameLogTypes[RugbyGameLogTypes["penalty_try"] = 4] = "penalty_try";
7129
7137
  RugbyGameLogTypes[RugbyGameLogTypes["conversion_goal"] = 5] = "conversion_goal";
7130
7138
  RugbyGameLogTypes[RugbyGameLogTypes["conversion_miss"] = 6] = "conversion_miss";
7131
- RugbyGameLogTypes[RugbyGameLogTypes["drawing_ball"] = 7] = "drawing_ball";
7132
- RugbyGameLogTypes[RugbyGameLogTypes["penalty_miss"] = 8] = "penalty_miss";
7133
- RugbyGameLogTypes[RugbyGameLogTypes["penalty_goal"] = 9] = "penalty_goal";
7134
- RugbyGameLogTypes[RugbyGameLogTypes["drop_goal"] = 10] = "drop_goal";
7135
- RugbyGameLogTypes[RugbyGameLogTypes["drop_goal_miss"] = 11] = "drop_goal_miss";
7136
- RugbyGameLogTypes[RugbyGameLogTypes["free_kick"] = 12] = "free_kick";
7137
- RugbyGameLogTypes[RugbyGameLogTypes["foul"] = 13] = "foul";
7138
- RugbyGameLogTypes[RugbyGameLogTypes["yellow_card"] = 14] = "yellow_card";
7139
- RugbyGameLogTypes[RugbyGameLogTypes["red_card"] = 15] = "red_card";
7140
- RugbyGameLogTypes[RugbyGameLogTypes["offload"] = 16] = "offload";
7141
- RugbyGameLogTypes[RugbyGameLogTypes["tackle"] = 17] = "tackle";
7142
- RugbyGameLogTypes[RugbyGameLogTypes["out"] = 18] = "out";
7143
- RugbyGameLogTypes[RugbyGameLogTypes["handling_error"] = 19] = "handling_error";
7144
- RugbyGameLogTypes[RugbyGameLogTypes["carries_other_gainline"] = 20] = "carries_other_gainline";
7145
- RugbyGameLogTypes[RugbyGameLogTypes["bleeding_injury"] = 21] = "bleeding_injury";
7146
- RugbyGameLogTypes[RugbyGameLogTypes["head_injury"] = 22] = "head_injury";
7147
- RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 23] = "end_game_penalty_miss";
7148
- RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 24] = "end_game_penalty_goal";
7139
+ RugbyGameLogTypes[RugbyGameLogTypes["penalty_miss"] = 7] = "penalty_miss";
7140
+ RugbyGameLogTypes[RugbyGameLogTypes["penalty_goal"] = 8] = "penalty_goal";
7141
+ RugbyGameLogTypes[RugbyGameLogTypes["drop_goal"] = 9] = "drop_goal";
7142
+ RugbyGameLogTypes[RugbyGameLogTypes["drop_goal_miss"] = 10] = "drop_goal_miss";
7143
+ RugbyGameLogTypes[RugbyGameLogTypes["free_kick"] = 11] = "free_kick";
7144
+ RugbyGameLogTypes[RugbyGameLogTypes["foul"] = 12] = "foul";
7145
+ RugbyGameLogTypes[RugbyGameLogTypes["yellow_card"] = 13] = "yellow_card";
7146
+ RugbyGameLogTypes[RugbyGameLogTypes["red_card"] = 14] = "red_card";
7147
+ RugbyGameLogTypes[RugbyGameLogTypes["offload"] = 15] = "offload";
7148
+ RugbyGameLogTypes[RugbyGameLogTypes["tackle"] = 16] = "tackle";
7149
+ RugbyGameLogTypes[RugbyGameLogTypes["handling_error"] = 17] = "handling_error";
7150
+ RugbyGameLogTypes[RugbyGameLogTypes["carries_over_gainline"] = 18] = "carries_over_gainline";
7151
+ RugbyGameLogTypes[RugbyGameLogTypes["bleeding_injury"] = 19] = "bleeding_injury";
7152
+ RugbyGameLogTypes[RugbyGameLogTypes["head_injury"] = 20] = "head_injury";
7153
+ RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 21] = "end_game_penalty_miss";
7154
+ RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 22] = "end_game_penalty_goal";
7149
7155
  // team actions
7150
- RugbyGameLogTypes[RugbyGameLogTypes["timeout"] = 25] = "timeout";
7156
+ RugbyGameLogTypes[RugbyGameLogTypes["timeout"] = 23] = "timeout";
7157
+ RugbyGameLogTypes[RugbyGameLogTypes["tap_penalty"] = 24] = "tap_penalty";
7158
+ RugbyGameLogTypes[RugbyGameLogTypes["penalty_kick_to_touch"] = 25] = "penalty_kick_to_touch";
7151
7159
  RugbyGameLogTypes[RugbyGameLogTypes["scrum_won"] = 26] = "scrum_won";
7152
- RugbyGameLogTypes[RugbyGameLogTypes["scrum_lose"] = 27] = "scrum_lose";
7160
+ RugbyGameLogTypes[RugbyGameLogTypes["scrum_lost"] = 27] = "scrum_lost";
7153
7161
  RugbyGameLogTypes[RugbyGameLogTypes["scrum_won_free"] = 28] = "scrum_won_free";
7154
- RugbyGameLogTypes[RugbyGameLogTypes["lineout_success"] = 29] = "lineout_success";
7155
- RugbyGameLogTypes[RugbyGameLogTypes["lineout_loss"] = 30] = "lineout_loss";
7156
- RugbyGameLogTypes[RugbyGameLogTypes["lineout_steal"] = 31] = "lineout_steal";
7157
- RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] = 32] = "quick_throw";
7158
- RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] = 33] = "ruck_won";
7159
- RugbyGameLogTypes[RugbyGameLogTypes["ruck_lose"] = 34] = "ruck_lose";
7160
- RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] = 35] = "maul_won";
7161
- RugbyGameLogTypes[RugbyGameLogTypes["maul_lose"] = 36] = "maul_lose";
7162
- RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 37] = "team_foul";
7162
+ RugbyGameLogTypes[RugbyGameLogTypes["lineout_won"] = 29] = "lineout_won";
7163
+ RugbyGameLogTypes[RugbyGameLogTypes["lineout_lost"] = 30] = "lineout_lost";
7164
+ RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] = 31] = "quick_throw";
7165
+ RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] = 32] = "ruck_won";
7166
+ RugbyGameLogTypes[RugbyGameLogTypes["ruck_lost"] = 33] = "ruck_lost";
7167
+ RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] = 34] = "maul_won";
7168
+ RugbyGameLogTypes[RugbyGameLogTypes["maul_lost"] = 35] = "maul_lost";
7169
+ RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 36] = "team_foul";
7163
7170
  })(RugbyGameLogTypes || (RugbyGameLogTypes = {}));
7164
7171
  var RUGBY_GAME_LOG_TYPE_POINTS = (_a$1 = {},
7165
7172
  _a$1[RugbyGameLogTypes.penalty_try] = 7,
@@ -7167,12 +7174,14 @@ var RUGBY_GAME_LOG_TYPE_POINTS = (_a$1 = {},
7167
7174
  _a$1[RugbyGameLogTypes.conversion_goal] = 2,
7168
7175
  _a$1[RugbyGameLogTypes.penalty_goal] = 3,
7169
7176
  _a$1[RugbyGameLogTypes.drop_goal] = 3,
7177
+ _a$1[RugbyGameLogTypes.end_game_penalty_goal] = 1,
7170
7178
  _a$1);
7171
7179
  var RUGBY_TEAM_LOG_TYPES = [
7172
- RugbyGameLogTypes.timeout, RugbyGameLogTypes.scrum_won, RugbyGameLogTypes.scrum_lose, RugbyGameLogTypes.scrum_won_free,
7173
- RugbyGameLogTypes.lineout_success, RugbyGameLogTypes.lineout_loss, RugbyGameLogTypes.lineout_steal, RugbyGameLogTypes.quick_throw,
7174
- RugbyGameLogTypes.ruck_won, RugbyGameLogTypes.ruck_lose, RugbyGameLogTypes.maul_won, RugbyGameLogTypes.maul_lose,
7175
- RugbyGameLogTypes.team_foul,
7180
+ RugbyGameLogTypes.timeout, RugbyGameLogTypes.scrum_won, RugbyGameLogTypes.scrum_lost, RugbyGameLogTypes.scrum_won_free,
7181
+ RugbyGameLogTypes.lineout_won, RugbyGameLogTypes.lineout_lost,
7182
+ RugbyGameLogTypes.quick_throw, RugbyGameLogTypes.ruck_won, RugbyGameLogTypes.ruck_lost,
7183
+ RugbyGameLogTypes.maul_won, RugbyGameLogTypes.maul_lost, RugbyGameLogTypes.team_foul,
7184
+ RugbyGameLogTypes.penalty_kick_to_touch, RugbyGameLogTypes.tap_penalty,
7176
7185
  ];
7177
7186
  var RugbyGameLog = /** @class */ (function (_super) {
7178
7187
  __extends(RugbyGameLog, _super);
@@ -9158,9 +9167,10 @@ var RugbyGameLogTypeLocalization = (_a$8 = {},
9158
9167
  _a$8[RugbyGameLogTypes.penalty_try] = 'Штрафная попытка',
9159
9168
  _a$8[RugbyGameLogTypes.conversion_goal] = 'Реализация',
9160
9169
  _a$8[RugbyGameLogTypes.conversion_miss] = 'Реализация промах',
9161
- _a$8[RugbyGameLogTypes.drawing_ball] = 'Розыгрыш мяча',
9162
9170
  _a$8[RugbyGameLogTypes.penalty_miss] = 'Штрафной промах',
9163
9171
  _a$8[RugbyGameLogTypes.penalty_goal] = 'Штрафной гол',
9172
+ _a$8[RugbyGameLogTypes.penalty_kick_to_touch] = 'Штрафной в аут',
9173
+ _a$8[RugbyGameLogTypes.tap_penalty] = 'Штрафной розыгран',
9164
9174
  _a$8[RugbyGameLogTypes.drop_goal] = 'Дроп-гол',
9165
9175
  _a$8[RugbyGameLogTypes.drop_goal_miss] = 'Дроп-гол промах',
9166
9176
  _a$8[RugbyGameLogTypes.free_kick] = 'Свободный удар',
@@ -9169,25 +9179,23 @@ var RugbyGameLogTypeLocalization = (_a$8 = {},
9169
9179
  _a$8[RugbyGameLogTypes.red_card] = 'Красная карточка',
9170
9180
  _a$8[RugbyGameLogTypes.offload] = 'Скидка при завхвате',
9171
9181
  _a$8[RugbyGameLogTypes.tackle] = 'Успешный захват',
9172
- _a$8[RugbyGameLogTypes.out] = 'Аут',
9173
9182
  _a$8[RugbyGameLogTypes.handling_error] = 'Ошибка приема',
9174
- _a$8[RugbyGameLogTypes.carries_other_gainline] = 'Прорыв линии',
9183
+ _a$8[RugbyGameLogTypes.carries_over_gainline] = 'Прорыв линии',
9175
9184
  _a$8[RugbyGameLogTypes.bleeding_injury] = 'Кровоточащая травма',
9176
9185
  _a$8[RugbyGameLogTypes.head_injury] = 'Травма головы',
9177
9186
  _a$8[RugbyGameLogTypes.end_game_penalty_miss] = 'Штрафной промах',
9178
9187
  _a$8[RugbyGameLogTypes.end_game_penalty_goal] = 'Штрафной гол',
9179
9188
  _a$8[RugbyGameLogTypes.timeout] = 'Таймаут',
9180
- _a$8[RugbyGameLogTypes.scrum_won] = 'Свахтка выиграна',
9181
- _a$8[RugbyGameLogTypes.scrum_lose] = 'Схватка проиграна',
9189
+ _a$8[RugbyGameLogTypes.scrum_won] = 'Схватка выиграна',
9190
+ _a$8[RugbyGameLogTypes.scrum_lost] = 'Схватка проиграна',
9182
9191
  _a$8[RugbyGameLogTypes.scrum_won_free] = 'Схватка выиграна без сопротивления',
9183
- _a$8[RugbyGameLogTypes.lineout_success] = 'Корридор выиграно',
9184
- _a$8[RugbyGameLogTypes.lineout_loss] = 'Корридор потеря',
9185
- _a$8[RugbyGameLogTypes.lineout_steal] = 'Корридор перехват',
9192
+ _a$8[RugbyGameLogTypes.lineout_won] = 'Корридор выиграно',
9193
+ _a$8[RugbyGameLogTypes.lineout_lost] = 'Корридор проиграно',
9186
9194
  _a$8[RugbyGameLogTypes.quick_throw] = 'Быстрый вброс',
9187
9195
  _a$8[RugbyGameLogTypes.ruck_won] = 'Рак выиграно',
9188
- _a$8[RugbyGameLogTypes.ruck_lose] = 'Рак проиграно',
9196
+ _a$8[RugbyGameLogTypes.ruck_lost] = 'Рак проиграно',
9189
9197
  _a$8[RugbyGameLogTypes.maul_won] = 'Мол выиграно',
9190
- _a$8[RugbyGameLogTypes.maul_lose] = 'Мол проиграно',
9198
+ _a$8[RugbyGameLogTypes.maul_lost] = 'Мол проиграно',
9191
9199
  _a$8[RugbyGameLogTypes.team_foul] = 'Фол',
9192
9200
  _a$8);
9193
9201