@mtgame/core 0.1.119 → 0.1.121

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.
@@ -6283,6 +6283,18 @@
6283
6283
  enumerable: false,
6284
6284
  configurable: true
6285
6285
  });
6286
+ Object.defineProperty(WaterpoloStatistic.prototype, "penaltyTime", {
6287
+ get: function () {
6288
+ if (!this.penaltyMinutes) {
6289
+ return '00:00';
6290
+ }
6291
+ var minutes = Math.floor(this.penaltyMinutes / 60);
6292
+ var seconds = Math.floor(this.penaltyMinutes - minutes * 60);
6293
+ return "" + (minutes < 10 ? 0 : '') + minutes + ":" + (seconds < 10 ? 0 : '') + seconds;
6294
+ },
6295
+ enumerable: false,
6296
+ configurable: true
6297
+ });
6286
6298
  Object.defineProperty(WaterpoloStatistic.prototype, "gamesWonPercent", {
6287
6299
  get: function () {
6288
6300
  if (!this.gamesCount) {
@@ -6339,12 +6351,15 @@
6339
6351
  sh_shots_blocked: 'shShotsBlocked',
6340
6352
  pp_goals_percent: 'ppGoalsPercent',
6341
6353
  pp_goals: 'ppGoals',
6354
+ total_pp_goals: 'totalPpGoals',
6342
6355
  ev_goals_percent: 'evGoalsPercent',
6343
6356
  ev_goals: 'evGoals',
6357
+ total_ev_goals: 'totalEvGoals',
6344
6358
  sh_goals_percent: 'shGoalsPercent',
6345
6359
  goals: 'goals',
6346
6360
  total_goals: 'totalGoals',
6347
6361
  sh_goals: 'shGoals',
6362
+ total_sh_goals: 'totalShGoals',
6348
6363
  shot_misses: 'shotMisses',
6349
6364
  shots_on_goal: 'shotsOnGoal',
6350
6365
  shots_blocked: 'shotsBlocked',
@@ -10436,6 +10451,11 @@
10436
10451
  exports.WaterpoloGameLogTypes.minor_penalty, exports.WaterpoloGameLogTypes.major_penalty, exports.WaterpoloGameLogTypes.match_penalty, exports.WaterpoloGameLogTypes.personal_foul
10437
10452
  ].indexOf(this.logType) > -1;
10438
10453
  };
10454
+ WaterpoloGameLog.prototype.isFoulType = function () {
10455
+ return [
10456
+ exports.WaterpoloGameLogTypes.minor_penalty, exports.WaterpoloGameLogTypes.major_penalty, exports.WaterpoloGameLogTypes.match_penalty, exports.WaterpoloGameLogTypes.personal_foul, exports.WaterpoloGameLogTypes.foul
10457
+ ].indexOf(this.logType) > -1;
10458
+ };
10439
10459
  WaterpoloGameLog.prototype.isAfter = function (log) {
10440
10460
  if (this.time === log.time && this.period === log.period) {
10441
10461
  return this.id > log.id;
@@ -10563,11 +10583,30 @@
10563
10583
  enumerable: false,
10564
10584
  configurable: true
10565
10585
  });
10586
+ Object.defineProperty(WaterpoloGameStatistic.prototype, "totalShGoals", {
10587
+ get: function () {
10588
+ return (this.shGoals || 0) + (this.shFreeKickGoals || 0) + (this.shCornerGoals || 0);
10589
+ },
10590
+ enumerable: false,
10591
+ configurable: true
10592
+ });
10593
+ Object.defineProperty(WaterpoloGameStatistic.prototype, "totalEvGoals", {
10594
+ get: function () {
10595
+ return (this.evGoals || 0) + (this.evFreeKickGoals || 0) + (this.evCornerGoals || 0);
10596
+ },
10597
+ enumerable: false,
10598
+ configurable: true
10599
+ });
10600
+ Object.defineProperty(WaterpoloGameStatistic.prototype, "totalPpGoals", {
10601
+ get: function () {
10602
+ return (this.ppGoals || 0) + (this.ppFreeKickGoals || 0) + (this.ppCornerGoals || 0);
10603
+ },
10604
+ enumerable: false,
10605
+ configurable: true
10606
+ });
10566
10607
  Object.defineProperty(WaterpoloGameStatistic.prototype, "goals", {
10567
10608
  get: function () {
10568
- return (this.ppGoals || 0) + (this.shGoals || 0) + (this.evGoals || 0) +
10569
- (this.ppFreeKickGoals || 0) + (this.shFreeKickGoals || 0) + (this.evFreeKickGoals || 0) +
10570
- (this.ppCornerGoals || 0) + (this.shCornerGoals || 0) + (this.evCornerGoals || 0);
10609
+ return this.totalEvGoals + this.totalPpGoals + this.totalShGoals;
10571
10610
  },
10572
10611
  enumerable: false,
10573
10612
  configurable: true
@@ -10669,6 +10708,13 @@
10669
10708
  enumerable: false,
10670
10709
  configurable: true
10671
10710
  });
10711
+ Object.defineProperty(WaterpoloGameStatistic.prototype, "penaltyTime", {
10712
+ get: function () {
10713
+ return Math.floor(this.penaltyMinutes / 60);
10714
+ },
10715
+ enumerable: false,
10716
+ configurable: true
10717
+ });
10672
10718
  Object.defineProperty(WaterpoloGameStatistic.prototype, "goalsPercent", {
10673
10719
  get: function () {
10674
10720
  if (!this.totalGoals || !this.totalShots) {