@mtgame/core 0.1.85 → 0.1.87

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.
@@ -2996,6 +2996,53 @@
2996
2996
  enumerable: false,
2997
2997
  configurable: true
2998
2998
  });
2999
+ Object.defineProperty(BasketballStatistic.prototype, "onePointsPercent", {
3000
+ get: function () {
3001
+ if (!this.onePointsMade || !this.onePointAttempts) {
3002
+ return 0;
3003
+ }
3004
+ return Math.round(1000 * this.onePointsMade / this.onePointAttempts) / 10;
3005
+ },
3006
+ enumerable: false,
3007
+ configurable: true
3008
+ });
3009
+ Object.defineProperty(BasketballStatistic.prototype, "twoPointsPercent", {
3010
+ get: function () {
3011
+ if (!this.twoPointsMade || !this.twoPointAttempts) {
3012
+ return 0;
3013
+ }
3014
+ return Math.round(1000 * this.twoPointsMade / this.twoPointAttempts) / 10;
3015
+ },
3016
+ enumerable: false,
3017
+ configurable: true
3018
+ });
3019
+ Object.defineProperty(BasketballStatistic.prototype, "threePointsPercent", {
3020
+ get: function () {
3021
+ if (!this.threePointsMade || !this.threePointAttempts) {
3022
+ return 0;
3023
+ }
3024
+ return Math.round(1000 * this.threePointsMade / this.threePointAttempts) / 10;
3025
+ },
3026
+ enumerable: false,
3027
+ configurable: true
3028
+ });
3029
+ Object.defineProperty(BasketballStatistic.prototype, "freeThrowsPercent", {
3030
+ get: function () {
3031
+ if (!this.freeThrowsMade || !this.freeThrowAttempts) {
3032
+ return 0;
3033
+ }
3034
+ return Math.round(1000 * this.freeThrowsMade / this.freeThrowAttempts) / 10;
3035
+ },
3036
+ enumerable: false,
3037
+ configurable: true
3038
+ });
3039
+ Object.defineProperty(BasketballStatistic.prototype, "totalRebounds", {
3040
+ get: function () {
3041
+ return Math.floor(10 * ((this.offensiveRebounds || 0) + (this.defensiveRebounds || 0))) / 10;
3042
+ },
3043
+ enumerable: false,
3044
+ configurable: true
3045
+ });
2999
3046
  BasketballStatistic.toFront = function (data) { };
3000
3047
  BasketballStatistic.toBack = function (data) { };
3001
3048
  return BasketballStatistic;
@@ -3107,6 +3154,53 @@
3107
3154
  enumerable: false,
3108
3155
  configurable: true
3109
3156
  });
3157
+ Object.defineProperty(BasketballGameStatistic.prototype, "onePointsPercent", {
3158
+ get: function () {
3159
+ if (!this.onePointsMade || !this.onePointAttempts) {
3160
+ return 0;
3161
+ }
3162
+ return Math.round(1000 * this.onePointsMade / this.onePointAttempts) / 10;
3163
+ },
3164
+ enumerable: false,
3165
+ configurable: true
3166
+ });
3167
+ Object.defineProperty(BasketballGameStatistic.prototype, "twoPointsPercent", {
3168
+ get: function () {
3169
+ if (!this.twoPointsMade || !this.twoPointAttempts) {
3170
+ return 0;
3171
+ }
3172
+ return Math.round(1000 * this.twoPointsMade / this.twoPointAttempts) / 10;
3173
+ },
3174
+ enumerable: false,
3175
+ configurable: true
3176
+ });
3177
+ Object.defineProperty(BasketballGameStatistic.prototype, "threePointsPercent", {
3178
+ get: function () {
3179
+ if (!this.threePointsMade || !this.threePointAttempts) {
3180
+ return 0;
3181
+ }
3182
+ return Math.round(1000 * this.threePointsMade / this.threePointAttempts) / 10;
3183
+ },
3184
+ enumerable: false,
3185
+ configurable: true
3186
+ });
3187
+ Object.defineProperty(BasketballGameStatistic.prototype, "freeThrowsPercent", {
3188
+ get: function () {
3189
+ if (!this.freeThrowsMade || !this.freeThrowAttempts) {
3190
+ return 0;
3191
+ }
3192
+ return Math.round(1000 * this.freeThrowsMade / this.freeThrowAttempts) / 10;
3193
+ },
3194
+ enumerable: false,
3195
+ configurable: true
3196
+ });
3197
+ Object.defineProperty(BasketballGameStatistic.prototype, "totalRebounds", {
3198
+ get: function () {
3199
+ return Math.floor(10 * ((this.offensiveRebounds || 0) + (this.defensiveRebounds || 0))) / 10;
3200
+ },
3201
+ enumerable: false,
3202
+ configurable: true
3203
+ });
3110
3204
  return BasketballGameStatistic;
3111
3205
  }(BaseModel));
3112
3206
  __decorate([
@@ -3958,6 +4052,26 @@
3958
4052
  enumerable: false,
3959
4053
  configurable: true
3960
4054
  });
4055
+ Object.defineProperty(HockeyGameStatistic.prototype, "goalsPercent", {
4056
+ get: function () {
4057
+ if (!this.totalGoals || !this.totalShots) {
4058
+ return 0;
4059
+ }
4060
+ return Math.round(1000 * this.totalGoals / this.totalShots) / 10;
4061
+ },
4062
+ enumerable: false,
4063
+ configurable: true
4064
+ });
4065
+ Object.defineProperty(HockeyGameStatistic.prototype, "faceOffPercent", {
4066
+ get: function () {
4067
+ if (!this.faceOffWins || !this.faceOffs) {
4068
+ return 0;
4069
+ }
4070
+ return Math.round(1000 * this.faceOffWins / this.faceOffs) / 10;
4071
+ },
4072
+ enumerable: false,
4073
+ configurable: true
4074
+ });
3961
4075
  HockeyGameStatistic.toFront = function (data) { };
3962
4076
  HockeyGameStatistic.toBack = function (data) { };
3963
4077
  return HockeyGameStatistic;
@@ -4406,7 +4520,7 @@
4406
4520
  });
4407
4521
  Object.defineProperty(FootballGameStatistic.prototype, "penaltyGoalsPercent", {
4408
4522
  get: function () {
4409
- if (!this.penaltyAttempts || !this.penaltyGoals) {
4523
+ if (!this.penalties || !this.penaltyGoals) {
4410
4524
  return 0;
4411
4525
  }
4412
4526
  return Math.round(1000 * this.penaltyGoals / this.penalties) / 10;
@@ -4423,7 +4537,7 @@
4423
4537
  });
4424
4538
  Object.defineProperty(FootballGameStatistic.prototype, "smallPenaltyGoalsPercent", {
4425
4539
  get: function () {
4426
- if (!this.smallPenaltyAttempts || !this.smallPenaltyGoals) {
4540
+ if (!this.smallPenalties || !this.smallPenaltyGoals) {
4427
4541
  return 0;
4428
4542
  }
4429
4543
  return Math.round(1000 * this.smallPenaltyGoals / this.smallPenalties) / 10;
@@ -4943,14 +5057,14 @@
4943
5057
  });
4944
5058
  Object.defineProperty(HandballGameStatistic.prototype, "shots", {
4945
5059
  get: function () {
4946
- return (this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0);
5060
+ return Math.floor(10 * ((this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0))) / 10;
4947
5061
  },
4948
5062
  enumerable: false,
4949
5063
  configurable: true
4950
5064
  });
4951
5065
  Object.defineProperty(HandballGameStatistic.prototype, "totalGoals", {
4952
5066
  get: function () {
4953
- return (this.goals || 0) + (this.penaltyGoals || 0);
5067
+ return Math.floor(10 * ((this.goals || 0) + (this.penaltyGoals || 0))) / 10;
4954
5068
  },
4955
5069
  enumerable: false,
4956
5070
  configurable: true
@@ -4977,7 +5091,7 @@
4977
5091
  });
4978
5092
  Object.defineProperty(HandballGameStatistic.prototype, "penaltyShots", {
4979
5093
  get: function () {
4980
- return (this.penaltyShotsOnGoal || 0) + (this.penaltyMisses || 0);
5094
+ return Math.floor(10 * ((this.penaltyShotsOnGoal || 0) + (this.penaltyMisses || 0))) / 10;
4981
5095
  },
4982
5096
  enumerable: false,
4983
5097
  configurable: true
@@ -4994,28 +5108,28 @@
4994
5108
  });
4995
5109
  Object.defineProperty(HandballGameStatistic.prototype, "shotsAgainst", {
4996
5110
  get: function () {
4997
- return (this.saves || 0) + (this.goalsAgainst || 0);
5111
+ return Math.floor(10 * ((this.saves || 0) + (this.goalsAgainst || 0))) / 10;
4998
5112
  },
4999
5113
  enumerable: false,
5000
5114
  configurable: true
5001
5115
  });
5002
5116
  Object.defineProperty(HandballGameStatistic.prototype, "penaltyShotsAgainst", {
5003
5117
  get: function () {
5004
- return (this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0);
5118
+ return Math.floor(10 * ((this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0))) / 10;
5005
5119
  },
5006
5120
  enumerable: false,
5007
5121
  configurable: true
5008
5122
  });
5009
5123
  Object.defineProperty(HandballGameStatistic.prototype, "totalGoalsAgainst", {
5010
5124
  get: function () {
5011
- return (this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0);
5125
+ return Math.floor(10 * ((this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0))) / 10;
5012
5126
  },
5013
5127
  enumerable: false,
5014
5128
  configurable: true
5015
5129
  });
5016
5130
  Object.defineProperty(HandballGameStatistic.prototype, "totalSaves", {
5017
5131
  get: function () {
5018
- return (this.saves || 0) + (this.penaltySaves || 0);
5132
+ return Math.floor(10 * ((this.saves || 0) + (this.penaltySaves || 0))) / 10;
5019
5133
  },
5020
5134
  enumerable: false,
5021
5135
  configurable: true
@@ -5433,7 +5547,7 @@
5433
5547
  });
5434
5548
  Object.defineProperty(VolleyballStatistic.prototype, "totalServes", {
5435
5549
  get: function () {
5436
- return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults)) / 10;
5550
+ return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults + this.goodServes)) / 10;
5437
5551
  },
5438
5552
  enumerable: false,
5439
5553
  configurable: true
@@ -5479,6 +5593,7 @@
5479
5593
  serve_faults: 'serveFaults',
5480
5594
  serve_aces: 'serveAces',
5481
5595
  serve_percent: 'servePercent',
5596
+ good_serves: 'goodServes',
5482
5597
  ace_percent: 'acePercent',
5483
5598
  stuff_blocks: 'stuffBlocks',
5484
5599
  block_faults: 'blockFaults',
@@ -9291,7 +9406,7 @@
9291
9406
  });
9292
9407
  Object.defineProperty(VolleyballGameStatistic.prototype, "totalServes", {
9293
9408
  get: function () {
9294
- return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults)) / 10;
9409
+ return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults + this.goodServes)) / 10;
9295
9410
  },
9296
9411
  enumerable: false,
9297
9412
  configurable: true
@@ -9327,6 +9442,7 @@
9327
9442
  serve_hits: 'serveHits',
9328
9443
  serve_faults: 'serveFaults',
9329
9444
  serve_aces: 'serveAces',
9445
+ good_serves: 'goodServes',
9330
9446
  stuff_blocks: 'stuffBlocks',
9331
9447
  block_faults: 'blockFaults',
9332
9448
  block_rebounds: 'blockRebounds',
@@ -9371,6 +9487,7 @@
9371
9487
  VolleyballGameLogType[VolleyballGameLogType["timeout"] = 21] = "timeout";
9372
9488
  VolleyballGameLogType[VolleyballGameLogType["yellow_card"] = 22] = "yellow_card";
9373
9489
  VolleyballGameLogType[VolleyballGameLogType["tie_ball"] = 23] = "tie_ball";
9490
+ VolleyballGameLogType[VolleyballGameLogType["good_serve"] = 24] = "good_serve";
9374
9491
  })(exports.VolleyballGameLogType || (exports.VolleyballGameLogType = {}));
9375
9492
  var SCORE_LOG_TYPES = [
9376
9493
  exports.VolleyballGameLogType.serve_ace, exports.VolleyballGameLogType.stuff_block,
@@ -9412,7 +9529,8 @@
9412
9529
  return [
9413
9530
  exports.VolleyballGameLogType.serve_hit,
9414
9531
  exports.VolleyballGameLogType.serve_ace,
9415
- exports.VolleyballGameLogType.serve_fault
9532
+ exports.VolleyballGameLogType.serve_fault,
9533
+ exports.VolleyballGameLogType.good_serve,
9416
9534
  ].includes(this.logType);
9417
9535
  };
9418
9536
  VolleyballGameLog.prototype.isAttack = function () {
@@ -9914,6 +10032,7 @@
9914
10032
  _a$2[exports.VolleyballGameLogType.serve_ace] = 'Эйс',
9915
10033
  _a$2[exports.VolleyballGameLogType.serve_hit] = 'Подача',
9916
10034
  _a$2[exports.VolleyballGameLogType.serve_fault] = 'Ошибка на подаче',
10035
+ _a$2[exports.VolleyballGameLogType.good_serve] = 'Усложнённая подача',
9917
10036
  _a$2[exports.VolleyballGameLogType.attack_spike] = 'Результативная атака',
9918
10037
  _a$2[exports.VolleyballGameLogType.attack_shot] = 'Атака',
9919
10038
  _a$2[exports.VolleyballGameLogType.attack_fault] = 'Ошибка атаки',