valtech-components 4.0.427 → 4.0.429
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/bubble-blitz-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/christianity-game.component.mjs +116 -39
- package/esm2022/lib/components/organisms/mini-games/memory-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +3 -1
- package/esm2022/lib/components/organisms/mini-games/simon-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +186 -71
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/bubble-blitz-game.component.d.ts +2 -0
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +3 -1
- package/lib/components/organisms/mini-games/christianity-game.component.d.ts +2 -0
- package/lib/components/organisms/mini-games/memory-game.component.d.ts +2 -0
- package/lib/components/organisms/mini-games/simon-game.component.d.ts +2 -0
- package/lib/components/organisms/mini-games/types.d.ts +12 -2
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
58
58
|
* Current version of valtech-components.
|
|
59
59
|
* This is automatically updated during the publish process.
|
|
60
60
|
*/
|
|
61
|
-
const VERSION = '4.0.
|
|
61
|
+
const VERSION = '4.0.429';
|
|
62
62
|
|
|
63
63
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
64
64
|
let isRefreshing = false;
|
|
@@ -62471,6 +62471,7 @@ const MINI_GAMES_I18N = {
|
|
|
62471
62471
|
christianityEmpty: 'Vacío',
|
|
62472
62472
|
christianityYourHand: 'Tu mano',
|
|
62473
62473
|
christianityCost: 'Coste',
|
|
62474
|
+
christianityOfferingCard: 'Ofrenda',
|
|
62474
62475
|
christianityEndTurn: 'Terminar turno',
|
|
62475
62476
|
christianityPlayCard: 'Jugar carta',
|
|
62476
62477
|
christianityReset: 'Reiniciar mock',
|
|
@@ -62875,6 +62876,7 @@ const MINI_GAMES_I18N = {
|
|
|
62875
62876
|
christianityEmpty: 'Empty',
|
|
62876
62877
|
christianityYourHand: 'Your hand',
|
|
62877
62878
|
christianityCost: 'Cost',
|
|
62879
|
+
christianityOfferingCard: 'Offering',
|
|
62878
62880
|
christianityEndTurn: 'End turn',
|
|
62879
62881
|
christianityPlayCard: 'Play card',
|
|
62880
62882
|
christianityReset: 'Reset mock',
|
|
@@ -64361,6 +64363,7 @@ class ChessimalsGameComponent {
|
|
|
64361
64363
|
});
|
|
64362
64364
|
this.botThinking = signal(false);
|
|
64363
64365
|
this.confirmAction = signal(undefined);
|
|
64366
|
+
this.confirmedAction = signal(undefined);
|
|
64364
64367
|
this.onlineJoinCode = signal('');
|
|
64365
64368
|
this.onlineLoading = signal(false);
|
|
64366
64369
|
this.onlineAction = signal(undefined);
|
|
@@ -65135,13 +65138,12 @@ class ChessimalsGameComponent {
|
|
|
65135
65138
|
closeConfirmModal() {
|
|
65136
65139
|
this.confirmAction.set(undefined);
|
|
65137
65140
|
}
|
|
65138
|
-
|
|
65139
|
-
if (token !== 'confirm') {
|
|
65140
|
-
this.closeConfirmModal();
|
|
65141
|
-
return;
|
|
65142
|
-
}
|
|
65143
|
-
const action = this.confirmAction();
|
|
65141
|
+
handleConfirmModalDismissed() {
|
|
65144
65142
|
this.confirmAction.set(undefined);
|
|
65143
|
+
const action = this.confirmedAction();
|
|
65144
|
+
this.confirmedAction.set(undefined);
|
|
65145
|
+
if (!action)
|
|
65146
|
+
return;
|
|
65145
65147
|
if (action === 'restart') {
|
|
65146
65148
|
this.restartGame();
|
|
65147
65149
|
return;
|
|
@@ -65158,6 +65160,15 @@ class ChessimalsGameComponent {
|
|
|
65158
65160
|
this.resignGame();
|
|
65159
65161
|
}
|
|
65160
65162
|
}
|
|
65163
|
+
confirmPendingAction(token) {
|
|
65164
|
+
if (token !== 'confirm') {
|
|
65165
|
+
this.closeConfirmModal();
|
|
65166
|
+
return;
|
|
65167
|
+
}
|
|
65168
|
+
const action = this.confirmAction();
|
|
65169
|
+
this.confirmedAction.set(action);
|
|
65170
|
+
this.confirmAction.set(undefined);
|
|
65171
|
+
}
|
|
65161
65172
|
resignGame() {
|
|
65162
65173
|
const game = this.game();
|
|
65163
65174
|
if (game.status === 'finished')
|
|
@@ -67005,7 +67016,7 @@ class ChessimalsGameComponent {
|
|
|
67005
67016
|
<ion-modal
|
|
67006
67017
|
[isOpen]="!!confirmAction()"
|
|
67007
67018
|
cssClass="val-modal-adaptive"
|
|
67008
|
-
(didDismiss)="
|
|
67019
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
67009
67020
|
>
|
|
67010
67021
|
<ng-template>
|
|
67011
67022
|
<val-modal-layout
|
|
@@ -67846,7 +67857,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
67846
67857
|
<ion-modal
|
|
67847
67858
|
[isOpen]="!!confirmAction()"
|
|
67848
67859
|
cssClass="val-modal-adaptive"
|
|
67849
|
-
(didDismiss)="
|
|
67860
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
67850
67861
|
>
|
|
67851
67862
|
<ng-template>
|
|
67852
67863
|
<val-modal-layout
|
|
@@ -67873,11 +67884,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
67873
67884
|
}] } });
|
|
67874
67885
|
|
|
67875
67886
|
const STARTER_CARDS = {
|
|
67876
|
-
|
|
67877
|
-
|
|
67878
|
-
|
|
67879
|
-
|
|
67880
|
-
|
|
67887
|
+
o_simple: { id: 'o_simple', name: 'Ofrenda simple', type: 'offering', cost: 0, attack: 0, life: 1 },
|
|
67888
|
+
p_scout: { id: 'p_scout', name: 'Scout', type: 'character', cost: 1, attack: 1, life: 1 },
|
|
67889
|
+
p_guard: { id: 'p_guard', name: 'Guard', type: 'character', cost: 2, attack: 1, life: 3 },
|
|
67890
|
+
p_warrior: { id: 'p_warrior', name: 'Warrior', type: 'character', cost: 2, attack: 2, life: 2 },
|
|
67891
|
+
p_elder: { id: 'p_elder', name: 'Elder', type: 'character', cost: 3, attack: 2, life: 4 },
|
|
67892
|
+
p_champion: { id: 'p_champion', name: 'Champion', type: 'character', cost: 4, attack: 4, life: 4 },
|
|
67881
67893
|
};
|
|
67882
67894
|
const STARTING_GAME = {
|
|
67883
67895
|
gameId: 'mock-christianity',
|
|
@@ -67895,9 +67907,9 @@ const STARTING_GAME = {
|
|
|
67895
67907
|
leaderName: 'Adam',
|
|
67896
67908
|
leaderHp: 15,
|
|
67897
67909
|
leaderMaxHp: 15,
|
|
67898
|
-
|
|
67899
|
-
|
|
67900
|
-
hand: ['
|
|
67910
|
+
offerings: [{ instanceId: 'p1_offering_001', cardId: 'o_simple', name: 'Ofrenda simple', owner: 'P1', ready: true, value: 1 }],
|
|
67911
|
+
offeringPlayedThisTurn: false,
|
|
67912
|
+
hand: ['o_simple', 'p_scout', 'p_warrior', 'p_guard'],
|
|
67901
67913
|
battleZone: [],
|
|
67902
67914
|
},
|
|
67903
67915
|
P2: {
|
|
@@ -67906,8 +67918,8 @@ const STARTING_GAME = {
|
|
|
67906
67918
|
leaderName: 'Noah',
|
|
67907
67919
|
leaderHp: 15,
|
|
67908
67920
|
leaderMaxHp: 15,
|
|
67909
|
-
|
|
67910
|
-
|
|
67921
|
+
offerings: [{ instanceId: 'p2_offering_001', cardId: 'o_simple', name: 'Ofrenda simple', owner: 'P2', ready: true, value: 1 }],
|
|
67922
|
+
offeringPlayedThisTurn: false,
|
|
67911
67923
|
handCount: 4,
|
|
67912
67924
|
battleZone: [
|
|
67913
67925
|
{
|
|
@@ -67969,8 +67981,15 @@ class ChristianityGameComponent {
|
|
|
67969
67981
|
card: cards[index],
|
|
67970
67982
|
}));
|
|
67971
67983
|
}
|
|
67984
|
+
readyOfferings(player) {
|
|
67985
|
+
return player.offerings.reduce((total, offering) => total + (offering.ready ? offering.value : 0), 0);
|
|
67986
|
+
}
|
|
67972
67987
|
canPlay(card) {
|
|
67973
|
-
|
|
67988
|
+
if (!this.isOwnTurn())
|
|
67989
|
+
return false;
|
|
67990
|
+
if (card.type === 'offering')
|
|
67991
|
+
return !this.player().offeringPlayedThisTurn;
|
|
67992
|
+
return this.readyOfferings(this.player()) >= card.cost && this.player().battleZone.length < 5;
|
|
67974
67993
|
}
|
|
67975
67994
|
canPlaySelected() {
|
|
67976
67995
|
const selected = this.selectedHandCard();
|
|
@@ -67994,20 +68013,36 @@ class ChristianityGameComponent {
|
|
|
67994
68013
|
if (handIndex < 0 || !player.hand)
|
|
67995
68014
|
return game;
|
|
67996
68015
|
player.hand.splice(handIndex, 1);
|
|
67997
|
-
|
|
67998
|
-
|
|
67999
|
-
|
|
68000
|
-
|
|
68001
|
-
|
|
68002
|
-
|
|
68003
|
-
|
|
68004
|
-
|
|
68005
|
-
|
|
68006
|
-
|
|
68007
|
-
|
|
68008
|
-
|
|
68016
|
+
if (card.type === 'offering') {
|
|
68017
|
+
player.offerings.push({
|
|
68018
|
+
instanceId: `p1_offering_${next.revision + 1}`,
|
|
68019
|
+
cardId: card.id,
|
|
68020
|
+
name: card.name,
|
|
68021
|
+
owner: 'P1',
|
|
68022
|
+
ready: true,
|
|
68023
|
+
value: card.life,
|
|
68024
|
+
});
|
|
68025
|
+
player.offeringPlayedThisTurn = true;
|
|
68026
|
+
}
|
|
68027
|
+
else {
|
|
68028
|
+
this.spendOfferings(player, card.cost);
|
|
68029
|
+
player.battleZone.push({
|
|
68030
|
+
instanceId: `p1_${next.revision + 1}_${player.battleZone.length}`,
|
|
68031
|
+
cardId: card.id,
|
|
68032
|
+
name: card.name,
|
|
68033
|
+
owner: 'P1',
|
|
68034
|
+
controller: 'P1',
|
|
68035
|
+
attack: card.attack,
|
|
68036
|
+
currentHp: card.life,
|
|
68037
|
+
maxHp: card.life,
|
|
68038
|
+
canAttack: false,
|
|
68039
|
+
});
|
|
68040
|
+
}
|
|
68009
68041
|
next.revision++;
|
|
68010
|
-
next.log = [
|
|
68042
|
+
next.log = [
|
|
68043
|
+
card.type === 'offering' ? `${card.name} queda lista como ofrenda.` : `${card.name} entra en batalla.`,
|
|
68044
|
+
...next.log,
|
|
68045
|
+
].slice(0, 4);
|
|
68011
68046
|
return next;
|
|
68012
68047
|
});
|
|
68013
68048
|
this.selectedHandCard.set(null);
|
|
@@ -68064,8 +68099,8 @@ class ChristianityGameComponent {
|
|
|
68064
68099
|
next.turnOwner = next.turnOwner === 'P1' ? 'P2' : 'P1';
|
|
68065
68100
|
next.turnCount++;
|
|
68066
68101
|
const current = next.players[next.turnOwner];
|
|
68067
|
-
current.
|
|
68068
|
-
current.
|
|
68102
|
+
current.offeringPlayedThisTurn = false;
|
|
68103
|
+
current.offerings = current.offerings.map(offering => ({ ...offering, ready: true }));
|
|
68069
68104
|
current.battleZone = current.battleZone.map(card => ({ ...card, canAttack: true }));
|
|
68070
68105
|
next.revision++;
|
|
68071
68106
|
next.log = [`Turno de ${current.displayName}.`, ...next.log].slice(0, 4);
|
|
@@ -68089,6 +68124,15 @@ class ChristianityGameComponent {
|
|
|
68089
68124
|
game.historyZone.push(...destroyed.map(card => card.cardId));
|
|
68090
68125
|
player.battleZone = player.battleZone.filter(card => card.currentHp > 0);
|
|
68091
68126
|
}
|
|
68127
|
+
spendOfferings(player, cost) {
|
|
68128
|
+
let remaining = cost;
|
|
68129
|
+
player.offerings = player.offerings.map(offering => {
|
|
68130
|
+
if (remaining <= 0 || !offering.ready)
|
|
68131
|
+
return offering;
|
|
68132
|
+
remaining -= offering.value;
|
|
68133
|
+
return { ...offering, ready: false };
|
|
68134
|
+
});
|
|
68135
|
+
}
|
|
68092
68136
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChristianityGameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68093
68137
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChristianityGameComponent, isStandalone: true, selector: "val-christianity-game", ngImport: i0, template: `
|
|
68094
68138
|
<main class="christianity-shell">
|
|
@@ -68112,7 +68156,12 @@ class ChristianityGameComponent {
|
|
|
68112
68156
|
</div>
|
|
68113
68157
|
<div class="christianity-offerings">
|
|
68114
68158
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68115
|
-
<strong>{{ opponent()
|
|
68159
|
+
<strong>{{ readyOfferings(opponent()) }}/{{ opponent().offerings.length }}</strong>
|
|
68160
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68161
|
+
@for (offering of opponent().offerings; track offering.instanceId) {
|
|
68162
|
+
<i [class.is-used]="!offering.ready"></i>
|
|
68163
|
+
}
|
|
68164
|
+
</div>
|
|
68116
68165
|
</div>
|
|
68117
68166
|
<div class="christianity-hidden-hand">
|
|
68118
68167
|
<span>{{ t('christianityHand') }}</span>
|
|
@@ -68175,9 +68224,14 @@ class ChristianityGameComponent {
|
|
|
68175
68224
|
<div class="christianity-player__summary">
|
|
68176
68225
|
<div class="christianity-offerings">
|
|
68177
68226
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68178
|
-
<strong>{{ player()
|
|
68227
|
+
<strong>{{ readyOfferings(player()) }}/{{ player().offerings.length }}</strong>
|
|
68228
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68229
|
+
@for (offering of player().offerings; track offering.instanceId) {
|
|
68230
|
+
<i [class.is-used]="!offering.ready"></i>
|
|
68231
|
+
}
|
|
68232
|
+
</div>
|
|
68179
68233
|
</div>
|
|
68180
|
-
<button type="button" class="christianity-leader
|
|
68234
|
+
<button type="button" class="christianity-leader christianity-leader--target" (click)="attackLeader()">
|
|
68181
68235
|
<span>{{ player().leaderName }}</span>
|
|
68182
68236
|
<strong>{{ player().leaderHp }}/{{ player().leaderMaxHp }}</strong>
|
|
68183
68237
|
</button>
|
|
@@ -68198,9 +68252,21 @@ class ChristianityGameComponent {
|
|
|
68198
68252
|
[class.is-disabled]="!canPlay(card)"
|
|
68199
68253
|
(click)="selectHandCard(cardId)"
|
|
68200
68254
|
>
|
|
68201
|
-
<small>
|
|
68255
|
+
<small>
|
|
68256
|
+
@if (card.type === 'offering') {
|
|
68257
|
+
{{ t('christianityOfferingCard') }}
|
|
68258
|
+
} @else {
|
|
68259
|
+
{{ t('christianityCost') }} {{ card.cost }}
|
|
68260
|
+
}
|
|
68261
|
+
</small>
|
|
68202
68262
|
<span>{{ card.name }}</span>
|
|
68203
|
-
<strong>
|
|
68263
|
+
<strong>
|
|
68264
|
+
@if (card.type === 'offering') {
|
|
68265
|
+
+{{ card.life }}
|
|
68266
|
+
} @else {
|
|
68267
|
+
{{ card.attack }} / {{ card.life }}
|
|
68268
|
+
}
|
|
68269
|
+
</strong>
|
|
68204
68270
|
</button>
|
|
68205
68271
|
}
|
|
68206
68272
|
</section>
|
|
@@ -68228,7 +68294,7 @@ class ChristianityGameComponent {
|
|
|
68228
68294
|
</section>
|
|
68229
68295
|
}
|
|
68230
68296
|
</main>
|
|
68231
|
-
`, isInline: true, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding
|
|
68297
|
+
`, isInline: true, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding:.75rem .25rem;border:1px solid rgba(36,48,68,.12);border-radius:.75rem;background:#f6f8fb}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.christianity-header h1,.christianity-header p,.christianity-history h2,.christianity-actions p{margin:0}.christianity-header h1{font-size:1.35rem;line-height:1.1}.christianity-header p,.christianity-turn span,.christianity-offerings span,.christianity-hidden-hand span,.christianity-deck span,.christianity-place span,.christianity-pile span,.christianity-leader span{color:#1f2933a3;font-size:.75rem}.christianity-turn,.christianity-leader,.christianity-offerings,.christianity-hidden-hand,.christianity-pile,.christianity-deck,.christianity-place{display:grid;gap:.15rem;min-width:5.25rem;padding:.55rem .65rem;border:1px solid rgba(36,48,68,.12);border-radius:.5rem;background:#fff}.christianity-turn.is-own-turn{border-color:#12806c59;background:#ecfdf5}.christianity-table{display:grid;gap:.75rem;padding:.55rem .35rem;border-radius:.75rem;background:#dceafb}.christianity-player{display:grid;gap:.65rem}.christianity-battle-zone{display:grid;grid-template-columns:repeat(5,minmax(4.2rem,1fr));gap:.5rem;min-height:7rem;padding:.55rem .4rem;border-radius:.75rem;background:#ffffffc2}.christianity-shared-zone{padding:.55rem .4rem;border-radius:.75rem;background:#ffffffe6}.christianity-card,.christianity-end-turn,.christianity-actions button,.christianity-pile,.christianity-leader--target{border:1px solid rgba(36,48,68,.16);border-radius:.5rem;background:#fff;color:inherit;font:inherit}.christianity-card{display:grid;align-content:space-between;min-height:5.8rem;padding:.5rem;text-align:left;box-shadow:0 .5rem 1.25rem #24304414}.christianity-card span{font-weight:700}.christianity-card strong{justify-self:end;padding:.15rem .35rem;border-radius:999px;background:#edf2f7;font-size:.8rem}.christianity-card.is-selected{border-color:#2563eb;box-shadow:0 0 0 .2rem #2563eb29}.christianity-card.is-disabled,.christianity-card.is-exhausted{opacity:.55}.christianity-card.is-target{border-color:#dc2626}.christianity-offering-cards{display:grid;grid-auto-flow:column;grid-auto-columns:.7rem;gap:.16rem;align-items:end;min-height:1.05rem}.christianity-offering-cards i{display:block;width:.65rem;height:.95rem;border:1px solid rgba(16,42,67,.22);border-radius:.18rem;background:#f8fafc}.christianity-offering-cards i.is-used{background:#cbd5e1;transform:rotate(90deg);transform-origin:center}.christianity-slot{min-height:5.8rem;border:1px dashed rgba(36,48,68,.22);border-radius:.5rem;background:#ffffff73}.christianity-hand{display:grid;grid-auto-columns:minmax(6rem,8rem);grid-auto-flow:column;gap:.55rem;overflow-x:auto;padding-bottom:.25rem}.christianity-actions{align-items:flex-start;padding:.75rem;border-radius:.75rem;background:#fff}.christianity-actions div{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}.christianity-actions button,.christianity-end-turn{min-height:2.4rem;padding:0 .75rem;font-weight:700}.christianity-actions button:not(:disabled),.christianity-end-turn{background:#102a43;color:#fff}.christianity-history{padding:.75rem;border-radius:.75rem;background:#fff}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible{outline:.1875rem solid rgba(37,99,235,.24);outline-offset:.125rem}@media (max-width: 720px){.christianity-shell{padding:.55rem 0;border-right:0;border-left:0;border-radius:0}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{align-items:stretch;flex-direction:column}.christianity-battle-zone{grid-template-columns:repeat(5,minmax(3.8rem,1fr));overflow-x:auto}}\n"] }); }
|
|
68232
68298
|
}
|
|
68233
68299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChristianityGameComponent, decorators: [{
|
|
68234
68300
|
type: Component,
|
|
@@ -68254,7 +68320,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68254
68320
|
</div>
|
|
68255
68321
|
<div class="christianity-offerings">
|
|
68256
68322
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68257
|
-
<strong>{{ opponent()
|
|
68323
|
+
<strong>{{ readyOfferings(opponent()) }}/{{ opponent().offerings.length }}</strong>
|
|
68324
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68325
|
+
@for (offering of opponent().offerings; track offering.instanceId) {
|
|
68326
|
+
<i [class.is-used]="!offering.ready"></i>
|
|
68327
|
+
}
|
|
68328
|
+
</div>
|
|
68258
68329
|
</div>
|
|
68259
68330
|
<div class="christianity-hidden-hand">
|
|
68260
68331
|
<span>{{ t('christianityHand') }}</span>
|
|
@@ -68317,9 +68388,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68317
68388
|
<div class="christianity-player__summary">
|
|
68318
68389
|
<div class="christianity-offerings">
|
|
68319
68390
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68320
|
-
<strong>{{ player()
|
|
68391
|
+
<strong>{{ readyOfferings(player()) }}/{{ player().offerings.length }}</strong>
|
|
68392
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68393
|
+
@for (offering of player().offerings; track offering.instanceId) {
|
|
68394
|
+
<i [class.is-used]="!offering.ready"></i>
|
|
68395
|
+
}
|
|
68396
|
+
</div>
|
|
68321
68397
|
</div>
|
|
68322
|
-
<button type="button" class="christianity-leader
|
|
68398
|
+
<button type="button" class="christianity-leader christianity-leader--target" (click)="attackLeader()">
|
|
68323
68399
|
<span>{{ player().leaderName }}</span>
|
|
68324
68400
|
<strong>{{ player().leaderHp }}/{{ player().leaderMaxHp }}</strong>
|
|
68325
68401
|
</button>
|
|
@@ -68340,9 +68416,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68340
68416
|
[class.is-disabled]="!canPlay(card)"
|
|
68341
68417
|
(click)="selectHandCard(cardId)"
|
|
68342
68418
|
>
|
|
68343
|
-
<small>
|
|
68419
|
+
<small>
|
|
68420
|
+
@if (card.type === 'offering') {
|
|
68421
|
+
{{ t('christianityOfferingCard') }}
|
|
68422
|
+
} @else {
|
|
68423
|
+
{{ t('christianityCost') }} {{ card.cost }}
|
|
68424
|
+
}
|
|
68425
|
+
</small>
|
|
68344
68426
|
<span>{{ card.name }}</span>
|
|
68345
|
-
<strong>
|
|
68427
|
+
<strong>
|
|
68428
|
+
@if (card.type === 'offering') {
|
|
68429
|
+
+{{ card.life }}
|
|
68430
|
+
} @else {
|
|
68431
|
+
{{ card.attack }} / {{ card.life }}
|
|
68432
|
+
}
|
|
68433
|
+
</strong>
|
|
68346
68434
|
</button>
|
|
68347
68435
|
}
|
|
68348
68436
|
</section>
|
|
@@ -68370,7 +68458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68370
68458
|
</section>
|
|
68371
68459
|
}
|
|
68372
68460
|
</main>
|
|
68373
|
-
`, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding
|
|
68461
|
+
`, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding:.75rem .25rem;border:1px solid rgba(36,48,68,.12);border-radius:.75rem;background:#f6f8fb}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.christianity-header h1,.christianity-header p,.christianity-history h2,.christianity-actions p{margin:0}.christianity-header h1{font-size:1.35rem;line-height:1.1}.christianity-header p,.christianity-turn span,.christianity-offerings span,.christianity-hidden-hand span,.christianity-deck span,.christianity-place span,.christianity-pile span,.christianity-leader span{color:#1f2933a3;font-size:.75rem}.christianity-turn,.christianity-leader,.christianity-offerings,.christianity-hidden-hand,.christianity-pile,.christianity-deck,.christianity-place{display:grid;gap:.15rem;min-width:5.25rem;padding:.55rem .65rem;border:1px solid rgba(36,48,68,.12);border-radius:.5rem;background:#fff}.christianity-turn.is-own-turn{border-color:#12806c59;background:#ecfdf5}.christianity-table{display:grid;gap:.75rem;padding:.55rem .35rem;border-radius:.75rem;background:#dceafb}.christianity-player{display:grid;gap:.65rem}.christianity-battle-zone{display:grid;grid-template-columns:repeat(5,minmax(4.2rem,1fr));gap:.5rem;min-height:7rem;padding:.55rem .4rem;border-radius:.75rem;background:#ffffffc2}.christianity-shared-zone{padding:.55rem .4rem;border-radius:.75rem;background:#ffffffe6}.christianity-card,.christianity-end-turn,.christianity-actions button,.christianity-pile,.christianity-leader--target{border:1px solid rgba(36,48,68,.16);border-radius:.5rem;background:#fff;color:inherit;font:inherit}.christianity-card{display:grid;align-content:space-between;min-height:5.8rem;padding:.5rem;text-align:left;box-shadow:0 .5rem 1.25rem #24304414}.christianity-card span{font-weight:700}.christianity-card strong{justify-self:end;padding:.15rem .35rem;border-radius:999px;background:#edf2f7;font-size:.8rem}.christianity-card.is-selected{border-color:#2563eb;box-shadow:0 0 0 .2rem #2563eb29}.christianity-card.is-disabled,.christianity-card.is-exhausted{opacity:.55}.christianity-card.is-target{border-color:#dc2626}.christianity-offering-cards{display:grid;grid-auto-flow:column;grid-auto-columns:.7rem;gap:.16rem;align-items:end;min-height:1.05rem}.christianity-offering-cards i{display:block;width:.65rem;height:.95rem;border:1px solid rgba(16,42,67,.22);border-radius:.18rem;background:#f8fafc}.christianity-offering-cards i.is-used{background:#cbd5e1;transform:rotate(90deg);transform-origin:center}.christianity-slot{min-height:5.8rem;border:1px dashed rgba(36,48,68,.22);border-radius:.5rem;background:#ffffff73}.christianity-hand{display:grid;grid-auto-columns:minmax(6rem,8rem);grid-auto-flow:column;gap:.55rem;overflow-x:auto;padding-bottom:.25rem}.christianity-actions{align-items:flex-start;padding:.75rem;border-radius:.75rem;background:#fff}.christianity-actions div{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}.christianity-actions button,.christianity-end-turn{min-height:2.4rem;padding:0 .75rem;font-weight:700}.christianity-actions button:not(:disabled),.christianity-end-turn{background:#102a43;color:#fff}.christianity-history{padding:.75rem;border-radius:.75rem;background:#fff}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible{outline:.1875rem solid rgba(37,99,235,.24);outline-offset:.125rem}@media (max-width: 720px){.christianity-shell{padding:.55rem 0;border-right:0;border-left:0;border-radius:0}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{align-items:stretch;flex-direction:column}.christianity-battle-zone{grid-template-columns:repeat(5,minmax(3.8rem,1fr));overflow-x:auto}}\n"] }]
|
|
68374
68462
|
}], ctorParameters: () => [] });
|
|
68375
68463
|
|
|
68376
68464
|
addIcons({ refreshOutline, sparklesOutline, trophyOutline });
|
|
@@ -68429,6 +68517,7 @@ class BubbleBlitzGameComponent {
|
|
|
68429
68517
|
this.animating = signal(false);
|
|
68430
68518
|
this.leaderboard = signal(this.readLeaderboard());
|
|
68431
68519
|
this.confirmAction = signal(undefined);
|
|
68520
|
+
this.confirmedAction = signal(undefined);
|
|
68432
68521
|
this.config = computed(() => MODE_CONFIG[this.mode()]);
|
|
68433
68522
|
this.feverReady = computed(() => this.fever() >= this.config().feverTarget);
|
|
68434
68523
|
this.feverProgress = computed(() => Math.min(100, Math.round((this.fever() / this.config().feverTarget) * 100)));
|
|
@@ -68608,13 +68697,12 @@ class BubbleBlitzGameComponent {
|
|
|
68608
68697
|
closeConfirmModal() {
|
|
68609
68698
|
this.confirmAction.set(undefined);
|
|
68610
68699
|
}
|
|
68611
|
-
|
|
68612
|
-
if (token !== 'confirm') {
|
|
68613
|
-
this.closeConfirmModal();
|
|
68614
|
-
return;
|
|
68615
|
-
}
|
|
68616
|
-
const action = this.confirmAction();
|
|
68700
|
+
handleConfirmModalDismissed() {
|
|
68617
68701
|
this.confirmAction.set(undefined);
|
|
68702
|
+
const action = this.confirmedAction();
|
|
68703
|
+
this.confirmedAction.set(undefined);
|
|
68704
|
+
if (!action)
|
|
68705
|
+
return;
|
|
68618
68706
|
if (action === 'restart') {
|
|
68619
68707
|
this.start();
|
|
68620
68708
|
return;
|
|
@@ -68627,6 +68715,15 @@ class BubbleBlitzGameComponent {
|
|
|
68627
68715
|
this.resetToGamesMenu();
|
|
68628
68716
|
}
|
|
68629
68717
|
}
|
|
68718
|
+
confirmPendingAction(token) {
|
|
68719
|
+
if (token !== 'confirm') {
|
|
68720
|
+
this.closeConfirmModal();
|
|
68721
|
+
return;
|
|
68722
|
+
}
|
|
68723
|
+
const action = this.confirmAction();
|
|
68724
|
+
this.confirmedAction.set(action);
|
|
68725
|
+
this.confirmAction.set(undefined);
|
|
68726
|
+
}
|
|
68630
68727
|
startTimer() {
|
|
68631
68728
|
this.stopTimer();
|
|
68632
68729
|
this.timer = window.setInterval(() => {
|
|
@@ -68930,7 +69027,7 @@ class BubbleBlitzGameComponent {
|
|
|
68930
69027
|
<ion-modal
|
|
68931
69028
|
[isOpen]="!!confirmAction()"
|
|
68932
69029
|
cssClass="val-modal-adaptive"
|
|
68933
|
-
(didDismiss)="
|
|
69030
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
68934
69031
|
>
|
|
68935
69032
|
<ng-template>
|
|
68936
69033
|
<val-modal-layout
|
|
@@ -69080,7 +69177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
69080
69177
|
<ion-modal
|
|
69081
69178
|
[isOpen]="!!confirmAction()"
|
|
69082
69179
|
cssClass="val-modal-adaptive"
|
|
69083
|
-
(didDismiss)="
|
|
69180
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
69084
69181
|
>
|
|
69085
69182
|
<ng-template>
|
|
69086
69183
|
<val-modal-layout
|
|
@@ -69144,6 +69241,7 @@ class MemoryGameComponent {
|
|
|
69144
69241
|
this.lockBoard = signal(false);
|
|
69145
69242
|
this.leaderboard = signal(this.readLeaderboard());
|
|
69146
69243
|
this.confirmAction = signal(undefined);
|
|
69244
|
+
this.confirmedAction = signal(undefined);
|
|
69147
69245
|
this.profileConfig = computed(() => PROFILE_CONFIG[this.profile()]);
|
|
69148
69246
|
this.pairCount = computed(() => this.profileConfig().pairs);
|
|
69149
69247
|
this.boardClass = computed(() => `memory-board ${this.profileConfig().boardClass}`);
|
|
@@ -69281,13 +69379,12 @@ class MemoryGameComponent {
|
|
|
69281
69379
|
closeConfirmModal() {
|
|
69282
69380
|
this.confirmAction.set(undefined);
|
|
69283
69381
|
}
|
|
69284
|
-
|
|
69285
|
-
if (token !== 'confirm') {
|
|
69286
|
-
this.closeConfirmModal();
|
|
69287
|
-
return;
|
|
69288
|
-
}
|
|
69289
|
-
const action = this.confirmAction();
|
|
69382
|
+
handleConfirmModalDismissed() {
|
|
69290
69383
|
this.confirmAction.set(undefined);
|
|
69384
|
+
const action = this.confirmedAction();
|
|
69385
|
+
this.confirmedAction.set(undefined);
|
|
69386
|
+
if (!action)
|
|
69387
|
+
return;
|
|
69291
69388
|
if (action === 'restart') {
|
|
69292
69389
|
this.start();
|
|
69293
69390
|
return;
|
|
@@ -69300,6 +69397,15 @@ class MemoryGameComponent {
|
|
|
69300
69397
|
this.resetToGamesMenu();
|
|
69301
69398
|
}
|
|
69302
69399
|
}
|
|
69400
|
+
confirmPendingAction(token) {
|
|
69401
|
+
if (token !== 'confirm') {
|
|
69402
|
+
this.closeConfirmModal();
|
|
69403
|
+
return;
|
|
69404
|
+
}
|
|
69405
|
+
const action = this.confirmAction();
|
|
69406
|
+
this.confirmedAction.set(action);
|
|
69407
|
+
this.confirmAction.set(undefined);
|
|
69408
|
+
}
|
|
69303
69409
|
flip(card) {
|
|
69304
69410
|
if (this.lockBoard() || card.flipped || card.matched || this.won() || this.failed())
|
|
69305
69411
|
return;
|
|
@@ -69614,7 +69720,7 @@ class MemoryGameComponent {
|
|
|
69614
69720
|
<ion-modal
|
|
69615
69721
|
[isOpen]="!!confirmAction()"
|
|
69616
69722
|
cssClass="val-modal-adaptive"
|
|
69617
|
-
(didDismiss)="
|
|
69723
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
69618
69724
|
>
|
|
69619
69725
|
<ng-template>
|
|
69620
69726
|
<val-modal-layout
|
|
@@ -69772,7 +69878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
69772
69878
|
<ion-modal
|
|
69773
69879
|
[isOpen]="!!confirmAction()"
|
|
69774
69880
|
cssClass="val-modal-adaptive"
|
|
69775
|
-
(didDismiss)="
|
|
69881
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
69776
69882
|
>
|
|
69777
69883
|
<ng-template>
|
|
69778
69884
|
<val-modal-layout
|
|
@@ -70118,6 +70224,7 @@ class SimonGameComponent {
|
|
|
70118
70224
|
this.activePad = signal(undefined);
|
|
70119
70225
|
this.leaderboard = signal(this.readLeaderboard());
|
|
70120
70226
|
this.confirmAction = signal(undefined);
|
|
70227
|
+
this.confirmedAction = signal(undefined);
|
|
70121
70228
|
this.modeConfig = computed(() => SIMON_MODES[this.mode()]);
|
|
70122
70229
|
this.bestRound = computed(() => this.modeLeaderboard()[0]?.round ?? 0);
|
|
70123
70230
|
this.modeLeaderboard = computed(() => this.leaderboard()
|
|
@@ -70217,13 +70324,12 @@ class SimonGameComponent {
|
|
|
70217
70324
|
closeConfirmModal() {
|
|
70218
70325
|
this.confirmAction.set(undefined);
|
|
70219
70326
|
}
|
|
70220
|
-
|
|
70221
|
-
if (token !== 'confirm') {
|
|
70222
|
-
this.closeConfirmModal();
|
|
70223
|
-
return;
|
|
70224
|
-
}
|
|
70225
|
-
const action = this.confirmAction();
|
|
70327
|
+
handleConfirmModalDismissed() {
|
|
70226
70328
|
this.confirmAction.set(undefined);
|
|
70329
|
+
const action = this.confirmedAction();
|
|
70330
|
+
this.confirmedAction.set(undefined);
|
|
70331
|
+
if (!action)
|
|
70332
|
+
return;
|
|
70227
70333
|
if (action === 'restart') {
|
|
70228
70334
|
this.start();
|
|
70229
70335
|
return;
|
|
@@ -70236,6 +70342,15 @@ class SimonGameComponent {
|
|
|
70236
70342
|
this.resetToGamesMenu();
|
|
70237
70343
|
}
|
|
70238
70344
|
}
|
|
70345
|
+
confirmPendingAction(token) {
|
|
70346
|
+
if (token !== 'confirm') {
|
|
70347
|
+
this.closeConfirmModal();
|
|
70348
|
+
return;
|
|
70349
|
+
}
|
|
70350
|
+
const action = this.confirmAction();
|
|
70351
|
+
this.confirmedAction.set(action);
|
|
70352
|
+
this.confirmAction.set(undefined);
|
|
70353
|
+
}
|
|
70239
70354
|
tap(pad) {
|
|
70240
70355
|
if (this.phase() !== 'waiting' || !this.acceptingInput)
|
|
70241
70356
|
return;
|
|
@@ -70479,7 +70594,7 @@ class SimonGameComponent {
|
|
|
70479
70594
|
<ion-modal
|
|
70480
70595
|
[isOpen]="!!confirmAction()"
|
|
70481
70596
|
cssClass="val-modal-adaptive"
|
|
70482
|
-
(didDismiss)="
|
|
70597
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
70483
70598
|
>
|
|
70484
70599
|
<ng-template>
|
|
70485
70600
|
<val-modal-layout
|
|
@@ -70609,7 +70724,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
70609
70724
|
<ion-modal
|
|
70610
70725
|
[isOpen]="!!confirmAction()"
|
|
70611
70726
|
cssClass="val-modal-adaptive"
|
|
70612
|
-
(didDismiss)="
|
|
70727
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
70613
70728
|
>
|
|
70614
70729
|
<ng-template>
|
|
70615
70730
|
<val-modal-layout
|