@mtgame/core 0.1.42 → 0.1.44
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 +44 -24
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/localization/rugby-game-log-types.js +3 -1
- package/esm2015/models/game.js +9 -11
- package/esm2015/models/rugby-game-config.js +8 -2
- package/esm2015/models/rugby-game-log.js +18 -15
- package/esm2015/models/rugby-game-statistic.js +1 -1
- package/esm2015/models/rugby-game-team-statistic.js +1 -1
- package/esm2015/models/rugby-statistic.js +3 -1
- package/esm2015/models/tournament-team.js +7 -2
- package/esm5/localization/rugby-game-log-types.js +3 -1
- package/esm5/models/game.js +9 -11
- package/esm5/models/rugby-game-config.js +12 -2
- package/esm5/models/rugby-game-log.js +17 -14
- package/esm5/models/rugby-game-statistic.js +1 -1
- package/esm5/models/rugby-game-team-statistic.js +1 -1
- package/esm5/models/rugby-statistic.js +3 -1
- package/esm5/models/tournament-team.js +7 -2
- package/fesm2015/mtgame-core.js +41 -25
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +44 -24
- package/fesm5/mtgame-core.js.map +1 -1
- package/localization/rugby-game-log-types.d.ts +2 -0
- package/models/rugby-game-config.d.ts +1 -0
- package/models/rugby-game-log.d.ts +16 -13
- package/models/rugby-game-statistic.d.ts +2 -1
- package/models/rugby-game-team-statistic.d.ts +2 -1
- package/models/rugby-statistic.d.ts +9 -2
- package/models/tournament-team.d.ts +5 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -2002,6 +2002,16 @@
|
|
|
2002
2002
|
function RugbyGameConfig() {
|
|
2003
2003
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
2004
2004
|
}
|
|
2005
|
+
Object.defineProperty(RugbyGameConfig.prototype, "penaltyPeriod", {
|
|
2006
|
+
get: function () {
|
|
2007
|
+
if (this.overtimeType !== exports.OvertimeTypes.time_and_penalties) {
|
|
2008
|
+
return +this.periodsCount + 1;
|
|
2009
|
+
}
|
|
2010
|
+
return +this.periodsCount + this.overtimePeriods + 1;
|
|
2011
|
+
},
|
|
2012
|
+
enumerable: true,
|
|
2013
|
+
configurable: true
|
|
2014
|
+
});
|
|
2005
2015
|
RugbyGameConfig.toFront = function (data) { };
|
|
2006
2016
|
RugbyGameConfig.toBack = function (data) { };
|
|
2007
2017
|
__decorate([
|
|
@@ -2199,32 +2209,30 @@
|
|
|
2199
2209
|
});
|
|
2200
2210
|
Object.defineProperty(Game.prototype, "isTeamWon", {
|
|
2201
2211
|
get: function () {
|
|
2202
|
-
return
|
|
2212
|
+
return [exports.GameResultTypes.team_won, exports.GameResultTypes.competitor_team_technical_defeat].includes(this.resultType);
|
|
2203
2213
|
},
|
|
2204
2214
|
enumerable: true,
|
|
2205
2215
|
configurable: true
|
|
2206
2216
|
});
|
|
2207
2217
|
Object.defineProperty(Game.prototype, "isCompetitorTeamWon", {
|
|
2208
2218
|
get: function () {
|
|
2209
|
-
return
|
|
2219
|
+
return [exports.GameResultTypes.competitor_team_won, exports.GameResultTypes.team_technical_defeat].includes(this.resultType);
|
|
2210
2220
|
},
|
|
2211
2221
|
enumerable: true,
|
|
2212
2222
|
configurable: true
|
|
2213
2223
|
});
|
|
2214
2224
|
Object.defineProperty(Game.prototype, "teamWinnerId", {
|
|
2215
2225
|
get: function () {
|
|
2216
|
-
if (this.
|
|
2226
|
+
if (!this.isClosed) {
|
|
2217
2227
|
return null;
|
|
2218
2228
|
}
|
|
2219
|
-
if (this.
|
|
2220
|
-
return
|
|
2229
|
+
if (this.isTeamWon) {
|
|
2230
|
+
return this.team.id;
|
|
2221
2231
|
}
|
|
2222
|
-
if (this.
|
|
2223
|
-
return this.
|
|
2224
|
-
}
|
|
2225
|
-
else {
|
|
2226
|
-
return this.teamScore > this.competitorTeamScore ? this.teamId : this.competitorTeamId;
|
|
2232
|
+
if (this.isCompetitorTeamWon) {
|
|
2233
|
+
return this.competitorTeam.id;
|
|
2227
2234
|
}
|
|
2235
|
+
return null;
|
|
2228
2236
|
},
|
|
2229
2237
|
enumerable: true,
|
|
2230
2238
|
configurable: true
|
|
@@ -2551,6 +2559,7 @@
|
|
|
2551
2559
|
games_count: 'gamesCount',
|
|
2552
2560
|
won_games_count: 'wonGamesCount',
|
|
2553
2561
|
draw_games_count: 'drawGamesCount',
|
|
2562
|
+
lose_games_count: 'loseGamesCount',
|
|
2554
2563
|
last_games_count: 'lastGamesCount',
|
|
2555
2564
|
last_games_won: 'lastGamesWon',
|
|
2556
2565
|
score_sum: 'scoreSum',
|
|
@@ -2565,7 +2574,11 @@
|
|
|
2565
2574
|
lose_normal_time_games_count: 'loseNormalTimeGamesCount',
|
|
2566
2575
|
win_overtime_games_count: 'winOvertimeGamesCount',
|
|
2567
2576
|
lose_overtime_games_count: 'loseOvertimeGamesCount',
|
|
2568
|
-
last_five_games: 'lastFiveGames'
|
|
2577
|
+
last_five_games: 'lastFiveGames',
|
|
2578
|
+
tries_scored: 'triesScored',
|
|
2579
|
+
tries_missed: 'triesMissed',
|
|
2580
|
+
attack_bonuses: 'attackBonuses',
|
|
2581
|
+
defense_bonuses: 'defenseBonuses',
|
|
2569
2582
|
},
|
|
2570
2583
|
relation: {
|
|
2571
2584
|
logo: File,
|
|
@@ -5414,6 +5427,8 @@
|
|
|
5414
5427
|
win_lose: 'winLose',
|
|
5415
5428
|
games_count: 'gamesCount',
|
|
5416
5429
|
won_games_count: 'wonGamesCount',
|
|
5430
|
+
lose_games_count: 'loseGamesCount',
|
|
5431
|
+
draw_games_count: 'drawGamesCount',
|
|
5417
5432
|
newbie: 'newbie',
|
|
5418
5433
|
// User statistic
|
|
5419
5434
|
points: 'points',
|
|
@@ -7343,20 +7358,22 @@
|
|
|
7343
7358
|
RugbyGameLogTypes[RugbyGameLogTypes["carries_other_gainline"] = 20] = "carries_other_gainline";
|
|
7344
7359
|
RugbyGameLogTypes[RugbyGameLogTypes["bleeding_injury"] = 21] = "bleeding_injury";
|
|
7345
7360
|
RugbyGameLogTypes[RugbyGameLogTypes["head_injury"] = 22] = "head_injury";
|
|
7361
|
+
RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 23] = "end_game_penalty_miss";
|
|
7362
|
+
RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 24] = "end_game_penalty_goal";
|
|
7346
7363
|
// team actions
|
|
7347
|
-
RugbyGameLogTypes[RugbyGameLogTypes["timeout"] =
|
|
7348
|
-
RugbyGameLogTypes[RugbyGameLogTypes["scrum_won"] =
|
|
7349
|
-
RugbyGameLogTypes[RugbyGameLogTypes["scrum_lose"] =
|
|
7350
|
-
RugbyGameLogTypes[RugbyGameLogTypes["scrum_won_free"] =
|
|
7351
|
-
RugbyGameLogTypes[RugbyGameLogTypes["lineout_success"] =
|
|
7352
|
-
RugbyGameLogTypes[RugbyGameLogTypes["lineout_loss"] =
|
|
7353
|
-
RugbyGameLogTypes[RugbyGameLogTypes["lineout_steal"] =
|
|
7354
|
-
RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] =
|
|
7355
|
-
RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] =
|
|
7356
|
-
RugbyGameLogTypes[RugbyGameLogTypes["ruck_lose"] =
|
|
7357
|
-
RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] =
|
|
7358
|
-
RugbyGameLogTypes[RugbyGameLogTypes["maul_lose"] =
|
|
7359
|
-
RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] =
|
|
7364
|
+
RugbyGameLogTypes[RugbyGameLogTypes["timeout"] = 25] = "timeout";
|
|
7365
|
+
RugbyGameLogTypes[RugbyGameLogTypes["scrum_won"] = 26] = "scrum_won";
|
|
7366
|
+
RugbyGameLogTypes[RugbyGameLogTypes["scrum_lose"] = 27] = "scrum_lose";
|
|
7367
|
+
RugbyGameLogTypes[RugbyGameLogTypes["scrum_won_free"] = 28] = "scrum_won_free";
|
|
7368
|
+
RugbyGameLogTypes[RugbyGameLogTypes["lineout_success"] = 29] = "lineout_success";
|
|
7369
|
+
RugbyGameLogTypes[RugbyGameLogTypes["lineout_loss"] = 30] = "lineout_loss";
|
|
7370
|
+
RugbyGameLogTypes[RugbyGameLogTypes["lineout_steal"] = 31] = "lineout_steal";
|
|
7371
|
+
RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] = 32] = "quick_throw";
|
|
7372
|
+
RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] = 33] = "ruck_won";
|
|
7373
|
+
RugbyGameLogTypes[RugbyGameLogTypes["ruck_lose"] = 34] = "ruck_lose";
|
|
7374
|
+
RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] = 35] = "maul_won";
|
|
7375
|
+
RugbyGameLogTypes[RugbyGameLogTypes["maul_lose"] = 36] = "maul_lose";
|
|
7376
|
+
RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 37] = "team_foul";
|
|
7360
7377
|
})(exports.RugbyGameLogTypes || (exports.RugbyGameLogTypes = {}));
|
|
7361
7378
|
var RUGBY_GAME_LOG_TYPE_POINTS = (_a$1 = {},
|
|
7362
7379
|
_a$1[exports.RugbyGameLogTypes.penalty_try] = 7,
|
|
@@ -7364,6 +7381,7 @@
|
|
|
7364
7381
|
_a$1[exports.RugbyGameLogTypes.conversion_goal] = 2,
|
|
7365
7382
|
_a$1[exports.RugbyGameLogTypes.penalty_goal] = 3,
|
|
7366
7383
|
_a$1[exports.RugbyGameLogTypes.drop_goal] = 3,
|
|
7384
|
+
_a$1[exports.RugbyGameLogTypes.end_game_penalty_goal] = 1,
|
|
7367
7385
|
_a$1);
|
|
7368
7386
|
var RUGBY_TEAM_LOG_TYPES = [
|
|
7369
7387
|
exports.RugbyGameLogTypes.timeout, exports.RugbyGameLogTypes.scrum_won, exports.RugbyGameLogTypes.scrum_lose, exports.RugbyGameLogTypes.scrum_won_free,
|
|
@@ -9371,6 +9389,8 @@
|
|
|
9371
9389
|
_a$8[exports.RugbyGameLogTypes.carries_other_gainline] = 'Прорыв линии',
|
|
9372
9390
|
_a$8[exports.RugbyGameLogTypes.bleeding_injury] = 'Кровоточащая травма',
|
|
9373
9391
|
_a$8[exports.RugbyGameLogTypes.head_injury] = 'Травма головы',
|
|
9392
|
+
_a$8[exports.RugbyGameLogTypes.end_game_penalty_miss] = 'Штрафной промах',
|
|
9393
|
+
_a$8[exports.RugbyGameLogTypes.end_game_penalty_goal] = 'Штрафной гол',
|
|
9374
9394
|
_a$8[exports.RugbyGameLogTypes.timeout] = 'Таймаут',
|
|
9375
9395
|
_a$8[exports.RugbyGameLogTypes.scrum_won] = 'Свахтка выиграна',
|
|
9376
9396
|
_a$8[exports.RugbyGameLogTypes.scrum_lose] = 'Схватка проиграна',
|