@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.
- package/bundles/mtgame-core.umd.js +49 -3
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/models/waterpolo-game-log.js +6 -1
- package/esm2015/models/waterpolo-game-statistic.js +14 -4
- package/esm2015/models/waterpolo-statistic.js +12 -1
- package/fesm2015/mtgame-core.js +29 -3
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/waterpolo-game-log.d.ts +1 -0
- package/models/waterpolo-game-statistic.d.ts +4 -0
- package/models/waterpolo-statistic.d.ts +4 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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) {
|