@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.
@@ -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,21 +5427,25 @@
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',
5434
5435
  tries: 'tries',
5435
5436
  penalty_tries: 'penaltyTries',
5436
- conversion_shots: 'conversionShots',
5437
+ conversion_kicks: 'conversionKicks',
5437
5438
  conversion_goals: 'conversionGoals',
5438
5439
  conversion_misses: 'conversionMisses',
5439
5440
  conversion_goals_percent: 'conversionGoalsPercent',
5440
- drawing_ball: 'drawingBall',
5441
- penalty_shots: 'penaltyShots',
5441
+ penalties: 'penalties',
5442
+ penalty_kicks_on_goal: 'penaltyKicksOnGoal',
5442
5443
  penalty_misses: 'penaltyMisses',
5443
5444
  penalty_goals: 'penaltyGoals',
5445
+ tap_penalties: 'tapPenalties',
5446
+ penalty_kicks_to_touch: 'penaltyKicksToTouch',
5444
5447
  penalty_goals_percent: 'penaltyGoalsPercent',
5445
- drop_goal_shots: 'dropGoalShots',
5448
+ drop_goal_kicks: 'dropGoalKicks',
5446
5449
  drop_goals: 'dropGoals',
5447
5450
  drop_goal_misses: 'dropGoalMisses',
5448
5451
  drop_goal_percent: 'dropGoalPercent',
@@ -5451,31 +5454,38 @@
5451
5454
  red_cards: 'redCards',
5452
5455
  offloads: 'offloads',
5453
5456
  tackles: 'tackles',
5454
- outs: 'outs',
5455
5457
  handling_errors: 'handlingErrors',
5456
- carries_other_gainline: 'carriesOtherGainline',
5458
+ carries_over_gainline: 'carriesOverGainline',
5457
5459
  plus_minus: 'plusMinus',
5458
5460
  game_time: 'gameTime',
5459
5461
  // Team statistic
5460
5462
  scrums: 'scrums',
5461
5463
  scrums_won: 'scrumsWon',
5462
- scrum_losses: 'scrumLosses',
5464
+ scrums_lost: 'scrumsLost',
5463
5465
  scrums_won_percent: 'scrumsWonPercent',
5464
5466
  scrums_won_free: 'scrumsWonFree',
5467
+ opponent_scrums_won: 'opponentScrumsWon',
5468
+ opponent_scrums_lost: 'opponentScrumsLost',
5465
5469
  lineouts: 'lineouts',
5466
- lineouts_success: 'lineoutsSuccess',
5467
- lineout_loses: 'lineoutLoses',
5470
+ lineouts_won: 'lineoutsWon',
5471
+ lineouts_lost: 'lineoutsLost',
5468
5472
  lineouts_steal: 'lineoutsSteal',
5473
+ opponent_lineouts_lost: 'opponentLineoutsLost',
5469
5474
  quick_throws: 'quickThrows',
5470
5475
  rucks: 'rucks',
5471
5476
  rucks_won: 'rucksWon',
5472
- ruck_losses: 'ruckLosses',
5477
+ rucks_lost: 'rucksLost',
5473
5478
  rucks_won_percent: 'rucksWonPercent',
5479
+ opponent_rucks_won: 'opponentRucksWon',
5480
+ opponent_rucks_lost: 'opponentRucksLost',
5474
5481
  mauls: 'mauls',
5475
5482
  mauls_won: 'maulsWon',
5476
- maul_losses: 'maulLosses',
5483
+ mauls_lost: 'maulsLost',
5477
5484
  mauls_won_percent: 'maulWonPercent',
5478
- fouls: 'fouls'
5485
+ opponent_mauls_won: 'opponentMaulsWon',
5486
+ opponent_mauls_lost: 'opponentMaulsLost',
5487
+ fouls: 'fouls',
5488
+ team_fouls: 'teamFouls',
5479
5489
  },
5480
5490
  relation: {
5481
5491
  tournamentTeamUser: TournamentTeamUser,
@@ -7265,12 +7275,11 @@
7265
7275
  penalty_tries: 'penaltyTries',
7266
7276
  conversion_goals: 'conversionGoals',
7267
7277
  conversion_misses: 'conversionMisses',
7268
- conversion_shots: 'conversionShots',
7278
+ conversion_kicks: 'conversionKicks',
7269
7279
  conversion_goals_percent: 'conversionGoalsPercent',
7270
- drawing_ball: 'drawingBall',
7271
7280
  penalty_misses: 'penaltyMisses',
7272
7281
  penalty_goals: 'penaltyGoals',
7273
- penalty_shots: 'penaltyShots',
7282
+ penalty_kicks_on_goal: 'penaltyKicksOnGoal',
7274
7283
  penalty_goals_percent: 'penaltyGoalsPercent',
7275
7284
  drop_goals: 'dropGoals',
7276
7285
  drop_goal_misses: 'dropGoalMisses',
@@ -7281,9 +7290,8 @@
7281
7290
  red_cards: 'redCards',
7282
7291
  offloads: 'offloads',
7283
7292
  tackles: 'tackles',
7284
- outs: 'outs',
7285
7293
  handling_errors: 'handlingErrors',
7286
- carries_other_gainline: 'carriesOtherGainline',
7294
+ carries_over_gainline: 'carriesOverGainline',
7287
7295
  game_time: 'gameTime',
7288
7296
  plus_minus: 'plusMinus'
7289
7297
  },
@@ -7341,38 +7349,37 @@
7341
7349
  RugbyGameLogTypes[RugbyGameLogTypes["penalty_try"] = 4] = "penalty_try";
7342
7350
  RugbyGameLogTypes[RugbyGameLogTypes["conversion_goal"] = 5] = "conversion_goal";
7343
7351
  RugbyGameLogTypes[RugbyGameLogTypes["conversion_miss"] = 6] = "conversion_miss";
7344
- RugbyGameLogTypes[RugbyGameLogTypes["drawing_ball"] = 7] = "drawing_ball";
7345
- RugbyGameLogTypes[RugbyGameLogTypes["penalty_miss"] = 8] = "penalty_miss";
7346
- RugbyGameLogTypes[RugbyGameLogTypes["penalty_goal"] = 9] = "penalty_goal";
7347
- RugbyGameLogTypes[RugbyGameLogTypes["drop_goal"] = 10] = "drop_goal";
7348
- RugbyGameLogTypes[RugbyGameLogTypes["drop_goal_miss"] = 11] = "drop_goal_miss";
7349
- RugbyGameLogTypes[RugbyGameLogTypes["free_kick"] = 12] = "free_kick";
7350
- RugbyGameLogTypes[RugbyGameLogTypes["foul"] = 13] = "foul";
7351
- RugbyGameLogTypes[RugbyGameLogTypes["yellow_card"] = 14] = "yellow_card";
7352
- RugbyGameLogTypes[RugbyGameLogTypes["red_card"] = 15] = "red_card";
7353
- RugbyGameLogTypes[RugbyGameLogTypes["offload"] = 16] = "offload";
7354
- RugbyGameLogTypes[RugbyGameLogTypes["tackle"] = 17] = "tackle";
7355
- RugbyGameLogTypes[RugbyGameLogTypes["out"] = 18] = "out";
7356
- RugbyGameLogTypes[RugbyGameLogTypes["handling_error"] = 19] = "handling_error";
7357
- RugbyGameLogTypes[RugbyGameLogTypes["carries_other_gainline"] = 20] = "carries_other_gainline";
7358
- RugbyGameLogTypes[RugbyGameLogTypes["bleeding_injury"] = 21] = "bleeding_injury";
7359
- RugbyGameLogTypes[RugbyGameLogTypes["head_injury"] = 22] = "head_injury";
7360
- RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 23] = "end_game_penalty_miss";
7361
- RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 24] = "end_game_penalty_goal";
7352
+ RugbyGameLogTypes[RugbyGameLogTypes["penalty_miss"] = 7] = "penalty_miss";
7353
+ RugbyGameLogTypes[RugbyGameLogTypes["penalty_goal"] = 8] = "penalty_goal";
7354
+ RugbyGameLogTypes[RugbyGameLogTypes["drop_goal"] = 9] = "drop_goal";
7355
+ RugbyGameLogTypes[RugbyGameLogTypes["drop_goal_miss"] = 10] = "drop_goal_miss";
7356
+ RugbyGameLogTypes[RugbyGameLogTypes["free_kick"] = 11] = "free_kick";
7357
+ RugbyGameLogTypes[RugbyGameLogTypes["foul"] = 12] = "foul";
7358
+ RugbyGameLogTypes[RugbyGameLogTypes["yellow_card"] = 13] = "yellow_card";
7359
+ RugbyGameLogTypes[RugbyGameLogTypes["red_card"] = 14] = "red_card";
7360
+ RugbyGameLogTypes[RugbyGameLogTypes["offload"] = 15] = "offload";
7361
+ RugbyGameLogTypes[RugbyGameLogTypes["tackle"] = 16] = "tackle";
7362
+ RugbyGameLogTypes[RugbyGameLogTypes["handling_error"] = 17] = "handling_error";
7363
+ RugbyGameLogTypes[RugbyGameLogTypes["carries_over_gainline"] = 18] = "carries_over_gainline";
7364
+ RugbyGameLogTypes[RugbyGameLogTypes["bleeding_injury"] = 19] = "bleeding_injury";
7365
+ RugbyGameLogTypes[RugbyGameLogTypes["head_injury"] = 20] = "head_injury";
7366
+ RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 21] = "end_game_penalty_miss";
7367
+ RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 22] = "end_game_penalty_goal";
7362
7368
  // team actions
7363
- RugbyGameLogTypes[RugbyGameLogTypes["timeout"] = 25] = "timeout";
7369
+ RugbyGameLogTypes[RugbyGameLogTypes["timeout"] = 23] = "timeout";
7370
+ RugbyGameLogTypes[RugbyGameLogTypes["tap_penalty"] = 24] = "tap_penalty";
7371
+ RugbyGameLogTypes[RugbyGameLogTypes["penalty_kick_to_touch"] = 25] = "penalty_kick_to_touch";
7364
7372
  RugbyGameLogTypes[RugbyGameLogTypes["scrum_won"] = 26] = "scrum_won";
7365
- RugbyGameLogTypes[RugbyGameLogTypes["scrum_lose"] = 27] = "scrum_lose";
7373
+ RugbyGameLogTypes[RugbyGameLogTypes["scrum_lost"] = 27] = "scrum_lost";
7366
7374
  RugbyGameLogTypes[RugbyGameLogTypes["scrum_won_free"] = 28] = "scrum_won_free";
7367
- RugbyGameLogTypes[RugbyGameLogTypes["lineout_success"] = 29] = "lineout_success";
7368
- RugbyGameLogTypes[RugbyGameLogTypes["lineout_loss"] = 30] = "lineout_loss";
7369
- RugbyGameLogTypes[RugbyGameLogTypes["lineout_steal"] = 31] = "lineout_steal";
7370
- RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] = 32] = "quick_throw";
7371
- RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] = 33] = "ruck_won";
7372
- RugbyGameLogTypes[RugbyGameLogTypes["ruck_lose"] = 34] = "ruck_lose";
7373
- RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] = 35] = "maul_won";
7374
- RugbyGameLogTypes[RugbyGameLogTypes["maul_lose"] = 36] = "maul_lose";
7375
- RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 37] = "team_foul";
7375
+ RugbyGameLogTypes[RugbyGameLogTypes["lineout_won"] = 29] = "lineout_won";
7376
+ RugbyGameLogTypes[RugbyGameLogTypes["lineout_lost"] = 30] = "lineout_lost";
7377
+ RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] = 31] = "quick_throw";
7378
+ RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] = 32] = "ruck_won";
7379
+ RugbyGameLogTypes[RugbyGameLogTypes["ruck_lost"] = 33] = "ruck_lost";
7380
+ RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] = 34] = "maul_won";
7381
+ RugbyGameLogTypes[RugbyGameLogTypes["maul_lost"] = 35] = "maul_lost";
7382
+ RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 36] = "team_foul";
7376
7383
  })(exports.RugbyGameLogTypes || (exports.RugbyGameLogTypes = {}));
7377
7384
  var RUGBY_GAME_LOG_TYPE_POINTS = (_a$1 = {},
7378
7385
  _a$1[exports.RugbyGameLogTypes.penalty_try] = 7,
@@ -7380,12 +7387,14 @@
7380
7387
  _a$1[exports.RugbyGameLogTypes.conversion_goal] = 2,
7381
7388
  _a$1[exports.RugbyGameLogTypes.penalty_goal] = 3,
7382
7389
  _a$1[exports.RugbyGameLogTypes.drop_goal] = 3,
7390
+ _a$1[exports.RugbyGameLogTypes.end_game_penalty_goal] = 1,
7383
7391
  _a$1);
7384
7392
  var RUGBY_TEAM_LOG_TYPES = [
7385
- exports.RugbyGameLogTypes.timeout, exports.RugbyGameLogTypes.scrum_won, exports.RugbyGameLogTypes.scrum_lose, exports.RugbyGameLogTypes.scrum_won_free,
7386
- exports.RugbyGameLogTypes.lineout_success, exports.RugbyGameLogTypes.lineout_loss, exports.RugbyGameLogTypes.lineout_steal, exports.RugbyGameLogTypes.quick_throw,
7387
- exports.RugbyGameLogTypes.ruck_won, exports.RugbyGameLogTypes.ruck_lose, exports.RugbyGameLogTypes.maul_won, exports.RugbyGameLogTypes.maul_lose,
7388
- exports.RugbyGameLogTypes.team_foul,
7393
+ exports.RugbyGameLogTypes.timeout, exports.RugbyGameLogTypes.scrum_won, exports.RugbyGameLogTypes.scrum_lost, exports.RugbyGameLogTypes.scrum_won_free,
7394
+ exports.RugbyGameLogTypes.lineout_won, exports.RugbyGameLogTypes.lineout_lost,
7395
+ exports.RugbyGameLogTypes.quick_throw, exports.RugbyGameLogTypes.ruck_won, exports.RugbyGameLogTypes.ruck_lost,
7396
+ exports.RugbyGameLogTypes.maul_won, exports.RugbyGameLogTypes.maul_lost, exports.RugbyGameLogTypes.team_foul,
7397
+ exports.RugbyGameLogTypes.penalty_kick_to_touch, exports.RugbyGameLogTypes.tap_penalty,
7389
7398
  ];
7390
7399
  var RugbyGameLog = /** @class */ (function (_super) {
7391
7400
  __extends(RugbyGameLog, _super);
@@ -9371,9 +9380,10 @@
9371
9380
  _a$8[exports.RugbyGameLogTypes.penalty_try] = 'Штрафная попытка',
9372
9381
  _a$8[exports.RugbyGameLogTypes.conversion_goal] = 'Реализация',
9373
9382
  _a$8[exports.RugbyGameLogTypes.conversion_miss] = 'Реализация промах',
9374
- _a$8[exports.RugbyGameLogTypes.drawing_ball] = 'Розыгрыш мяча',
9375
9383
  _a$8[exports.RugbyGameLogTypes.penalty_miss] = 'Штрафной промах',
9376
9384
  _a$8[exports.RugbyGameLogTypes.penalty_goal] = 'Штрафной гол',
9385
+ _a$8[exports.RugbyGameLogTypes.penalty_kick_to_touch] = 'Штрафной в аут',
9386
+ _a$8[exports.RugbyGameLogTypes.tap_penalty] = 'Штрафной розыгран',
9377
9387
  _a$8[exports.RugbyGameLogTypes.drop_goal] = 'Дроп-гол',
9378
9388
  _a$8[exports.RugbyGameLogTypes.drop_goal_miss] = 'Дроп-гол промах',
9379
9389
  _a$8[exports.RugbyGameLogTypes.free_kick] = 'Свободный удар',
@@ -9382,25 +9392,23 @@
9382
9392
  _a$8[exports.RugbyGameLogTypes.red_card] = 'Красная карточка',
9383
9393
  _a$8[exports.RugbyGameLogTypes.offload] = 'Скидка при завхвате',
9384
9394
  _a$8[exports.RugbyGameLogTypes.tackle] = 'Успешный захват',
9385
- _a$8[exports.RugbyGameLogTypes.out] = 'Аут',
9386
9395
  _a$8[exports.RugbyGameLogTypes.handling_error] = 'Ошибка приема',
9387
- _a$8[exports.RugbyGameLogTypes.carries_other_gainline] = 'Прорыв линии',
9396
+ _a$8[exports.RugbyGameLogTypes.carries_over_gainline] = 'Прорыв линии',
9388
9397
  _a$8[exports.RugbyGameLogTypes.bleeding_injury] = 'Кровоточащая травма',
9389
9398
  _a$8[exports.RugbyGameLogTypes.head_injury] = 'Травма головы',
9390
9399
  _a$8[exports.RugbyGameLogTypes.end_game_penalty_miss] = 'Штрафной промах',
9391
9400
  _a$8[exports.RugbyGameLogTypes.end_game_penalty_goal] = 'Штрафной гол',
9392
9401
  _a$8[exports.RugbyGameLogTypes.timeout] = 'Таймаут',
9393
- _a$8[exports.RugbyGameLogTypes.scrum_won] = 'Свахтка выиграна',
9394
- _a$8[exports.RugbyGameLogTypes.scrum_lose] = 'Схватка проиграна',
9402
+ _a$8[exports.RugbyGameLogTypes.scrum_won] = 'Схватка выиграна',
9403
+ _a$8[exports.RugbyGameLogTypes.scrum_lost] = 'Схватка проиграна',
9395
9404
  _a$8[exports.RugbyGameLogTypes.scrum_won_free] = 'Схватка выиграна без сопротивления',
9396
- _a$8[exports.RugbyGameLogTypes.lineout_success] = 'Корридор выиграно',
9397
- _a$8[exports.RugbyGameLogTypes.lineout_loss] = 'Корридор потеря',
9398
- _a$8[exports.RugbyGameLogTypes.lineout_steal] = 'Корридор перехват',
9405
+ _a$8[exports.RugbyGameLogTypes.lineout_won] = 'Корридор выиграно',
9406
+ _a$8[exports.RugbyGameLogTypes.lineout_lost] = 'Корридор проиграно',
9399
9407
  _a$8[exports.RugbyGameLogTypes.quick_throw] = 'Быстрый вброс',
9400
9408
  _a$8[exports.RugbyGameLogTypes.ruck_won] = 'Рак выиграно',
9401
- _a$8[exports.RugbyGameLogTypes.ruck_lose] = 'Рак проиграно',
9409
+ _a$8[exports.RugbyGameLogTypes.ruck_lost] = 'Рак проиграно',
9402
9410
  _a$8[exports.RugbyGameLogTypes.maul_won] = 'Мол выиграно',
9403
- _a$8[exports.RugbyGameLogTypes.maul_lose] = 'Мол проиграно',
9411
+ _a$8[exports.RugbyGameLogTypes.maul_lost] = 'Мол проиграно',
9404
9412
  _a$8[exports.RugbyGameLogTypes.team_foul] = 'Фол',
9405
9413
  _a$8);
9406
9414