valtech-components 4.0.453 → 4.0.454
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/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +17 -6
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +5 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +21 -6
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +3 -1
- package/lib/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -59,7 +59,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
59
59
|
* Current version of valtech-components.
|
|
60
60
|
* This is automatically updated during the publish process.
|
|
61
61
|
*/
|
|
62
|
-
const VERSION = '4.0.
|
|
62
|
+
const VERSION = '4.0.454';
|
|
63
63
|
|
|
64
64
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
65
65
|
let isRefreshing = false;
|
|
@@ -63049,6 +63049,8 @@ const MINI_GAMES_I18N = {
|
|
|
63049
63049
|
chessimalsChallengeNewRecord: 'Nueva mejor marca',
|
|
63050
63050
|
chessimalsChallengeNextRival: 'Siguiente rival',
|
|
63051
63051
|
chessimalsChallengeNextRivalLabel: 'Próximo rival',
|
|
63052
|
+
chessimalsChallengeRetryRival: 'Reintentar rival',
|
|
63053
|
+
chessimalsChallengeRetryRivalLabel: 'Mismo rival',
|
|
63052
63054
|
chessimalsChallengePlayAgain: 'Jugar desafío otra vez',
|
|
63053
63055
|
chessimalsChallengePowersUsed: 'Poderes',
|
|
63054
63056
|
chessimalsChallengePowerCaptures: 'Capturas poder',
|
|
@@ -63530,6 +63532,8 @@ const MINI_GAMES_I18N = {
|
|
|
63530
63532
|
chessimalsChallengeNewRecord: 'New personal best',
|
|
63531
63533
|
chessimalsChallengeNextRival: 'Next rival',
|
|
63532
63534
|
chessimalsChallengeNextRivalLabel: 'Next rival',
|
|
63535
|
+
chessimalsChallengeRetryRival: 'Retry rival',
|
|
63536
|
+
chessimalsChallengeRetryRivalLabel: 'Same rival',
|
|
63533
63537
|
chessimalsChallengePlayAgain: 'Play challenge again',
|
|
63534
63538
|
chessimalsChallengePowersUsed: 'Powers',
|
|
63535
63539
|
chessimalsChallengePowerCaptures: 'Power captures',
|
|
@@ -65470,6 +65474,7 @@ class ChessimalsGameComponent {
|
|
|
65470
65474
|
const roundStats = this.createChallengeRoundStats(game);
|
|
65471
65475
|
const nextLives = won ? run.livesRemaining : Math.max(0, run.livesRemaining - 1);
|
|
65472
65476
|
const nextStreak = won ? run.currentStreak + 1 : 0;
|
|
65477
|
+
const nextRound = won ? Math.min(this.challengeLadder.length, run.currentRound + 1) : run.currentRound;
|
|
65473
65478
|
const completed = won && run.currentRound >= this.challengeLadder.length;
|
|
65474
65479
|
const failed = !won && nextLives <= 0;
|
|
65475
65480
|
const finishedAt = new Date().toISOString();
|
|
@@ -65490,7 +65495,7 @@ class ChessimalsGameComponent {
|
|
|
65490
65495
|
losses: run.losses + (won ? 0 : 1),
|
|
65491
65496
|
currentStreak: nextStreak,
|
|
65492
65497
|
bestStreakInRun: Math.max(run.bestStreakInRun, nextStreak),
|
|
65493
|
-
currentRound: completed || failed ? run.currentRound :
|
|
65498
|
+
currentRound: completed || failed ? run.currentRound : nextRound,
|
|
65494
65499
|
roundResults: [...run.roundResults, roundResult],
|
|
65495
65500
|
updatedAt: finishedAt,
|
|
65496
65501
|
finishedAt: completed || failed ? finishedAt : undefined,
|
|
@@ -66752,6 +66757,16 @@ class ChessimalsGameComponent {
|
|
|
66752
66757
|
.replace('{wins}', String(run?.wins ?? 0))
|
|
66753
66758
|
.replace('{powers}', String(this.totalChallengePowers(stats)));
|
|
66754
66759
|
}
|
|
66760
|
+
challengeNextRivalLabel() {
|
|
66761
|
+
return this.challengeLastWon()
|
|
66762
|
+
? this.t('chessimalsChallengeNextRivalLabel')
|
|
66763
|
+
: this.t('chessimalsChallengeRetryRivalLabel');
|
|
66764
|
+
}
|
|
66765
|
+
challengeContinueLabel() {
|
|
66766
|
+
return this.challengeLastWon()
|
|
66767
|
+
? this.t('chessimalsChallengeNextRival')
|
|
66768
|
+
: this.t('chessimalsChallengeRetryRival');
|
|
66769
|
+
}
|
|
66755
66770
|
challengeHasNewRecord() {
|
|
66756
66771
|
return this.challengeNewRecord();
|
|
66757
66772
|
}
|
|
@@ -67605,7 +67620,7 @@ class ChessimalsGameComponent {
|
|
|
67605
67620
|
<div class="chessimals-challenge-rival chessimals-challenge-rival--next">
|
|
67606
67621
|
<span aria-hidden="true">{{ botProfileAvatar(nextBot.profileId) }}</span>
|
|
67607
67622
|
<div>
|
|
67608
|
-
<small>{{
|
|
67623
|
+
<small>{{ challengeNextRivalLabel() }}</small>
|
|
67609
67624
|
<strong>{{ challengeBotName(nextBot) }}</strong>
|
|
67610
67625
|
<p>{{ t(nextBot.introKey) }}</p>
|
|
67611
67626
|
</div>
|
|
@@ -67613,7 +67628,7 @@ class ChessimalsGameComponent {
|
|
|
67613
67628
|
}
|
|
67614
67629
|
@if (challengePhase() === 'between') {
|
|
67615
67630
|
<button class="chessimals-primary" type="button" (click)="continueChallenge()">
|
|
67616
|
-
{{
|
|
67631
|
+
{{ challengeContinueLabel() }}
|
|
67617
67632
|
</button>
|
|
67618
67633
|
} @else {
|
|
67619
67634
|
<button class="chessimals-primary" type="button" (click)="startChallenge()">
|
|
@@ -68566,7 +68581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68566
68581
|
<div class="chessimals-challenge-rival chessimals-challenge-rival--next">
|
|
68567
68582
|
<span aria-hidden="true">{{ botProfileAvatar(nextBot.profileId) }}</span>
|
|
68568
68583
|
<div>
|
|
68569
|
-
<small>{{
|
|
68584
|
+
<small>{{ challengeNextRivalLabel() }}</small>
|
|
68570
68585
|
<strong>{{ challengeBotName(nextBot) }}</strong>
|
|
68571
68586
|
<p>{{ t(nextBot.introKey) }}</p>
|
|
68572
68587
|
</div>
|
|
@@ -68574,7 +68589,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68574
68589
|
}
|
|
68575
68590
|
@if (challengePhase() === 'between') {
|
|
68576
68591
|
<button class="chessimals-primary" type="button" (click)="continueChallenge()">
|
|
68577
|
-
{{
|
|
68592
|
+
{{ challengeContinueLabel() }}
|
|
68578
68593
|
</button>
|
|
68579
68594
|
} @else {
|
|
68580
68595
|
<button class="chessimals-primary" type="button" (click)="startChallenge()">
|