valtech-components 4.0.630 → 4.0.633
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-adventure-data.mjs +3 -3
- package/esm2022/lib/components/organisms/mini-games/chessimals-adventure.component.mjs +75 -20
- package/esm2022/lib/components/organisms/mini-games/chessimals-engine.mjs +10 -10
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +11 -11
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +5 -5
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/services/auth/auth.service.mjs +78 -1
- package/esm2022/lib/services/auth/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +177 -45
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/molecules/cta-card/cta-card.component.d.ts +1 -1
- package/lib/components/molecules/metric-card/metric-card.component.d.ts +1 -1
- package/lib/components/molecules/phone-display/phone-display.component.d.ts +1 -1
- package/lib/components/organisms/account-view/account-view.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +1 -1
- package/lib/components/organisms/auth-cta/auth-cta.component.d.ts +1 -1
- package/lib/components/organisms/member-import-modal/member-import-modal.component.d.ts +1 -1
- package/lib/components/organisms/mini-games/chessimals-adventure.component.d.ts +4 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +1 -1
- package/lib/components/organisms/mini-games/memory-game.component.d.ts +1 -1
- package/lib/components/organisms/mini-games/types.d.ts +2 -2
- package/lib/components/organisms/notification-preferences-view/notification-preferences-view.component.d.ts +1 -1
- package/lib/components/organisms/organization-view/organization-view.component.d.ts +1 -1
- package/lib/services/auth/auth.service.d.ts +33 -0
- package/lib/services/auth/types.d.ts +35 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- /package/src/lib/assets/games/chessimals/challenge-avatars/{nightmare-magnus.png → nightmare-mandrill.png} +0 -0
|
@@ -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.633';
|
|
63
63
|
|
|
64
64
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
65
65
|
let isRefreshing = false;
|
|
@@ -8642,6 +8642,17 @@ class AuthService {
|
|
|
8642
8642
|
// vean. Ver ValtechAuthConfig.bootstrapSessionFromHint.
|
|
8643
8643
|
await this.bootstrapSessionFromHintCookie();
|
|
8644
8644
|
}
|
|
8645
|
+
else if (this.shouldBootstrapViaSSOBridge()) {
|
|
8646
|
+
// ADR-050 Modo B: esta app no comparte dominio raíz con el resto del
|
|
8647
|
+
// factory (bootstrapSessionFromHint no aplica — la cookie-hint nunca
|
|
8648
|
+
// llega aquí). Navegación de página completa al Auth Proxy Central;
|
|
8649
|
+
// vuelve con `?handoff=` si hay sesión activa. Ver
|
|
8650
|
+
// ValtechAuthConfig.bootstrapSessionFromBridge.
|
|
8651
|
+
this.redirectToSSOBridge();
|
|
8652
|
+
// No seguimos el resto de initialize() — la página está por navegar
|
|
8653
|
+
// fuera. Dejamos loading=true a propósito: el unload es inminente.
|
|
8654
|
+
return;
|
|
8655
|
+
}
|
|
8645
8656
|
// 5. Iniciar sincronización entre pestañas
|
|
8646
8657
|
if (this.config?.enableTabSync) {
|
|
8647
8658
|
this.syncService.start();
|
|
@@ -8711,6 +8722,72 @@ class AuthService {
|
|
|
8711
8722
|
this.clearState();
|
|
8712
8723
|
}
|
|
8713
8724
|
}
|
|
8725
|
+
/**
|
|
8726
|
+
* Nombre de la sessionStorage key usada como guarda anti-loop del bridge.
|
|
8727
|
+
* `sessionStorage` (no localStorage) — el guard debe expirar naturalmente al
|
|
8728
|
+
* cerrar la pestaña; una sesión de familia recién iniciada en otra pestaña
|
|
8729
|
+
* debe poder reintentar el bridge en una pestaña nueva.
|
|
8730
|
+
*/
|
|
8731
|
+
static { this.SSO_BRIDGE_GUARD_KEY = 'valtech_sso_bridge_attempted'; }
|
|
8732
|
+
/**
|
|
8733
|
+
* ¿Corresponde disparar el redirect al Auth Proxy Central (ADR-050 Modo B)?
|
|
8734
|
+
*
|
|
8735
|
+
* Falso si: la config no lo habilita, falta `ssoBridgeUrl`, no corremos en
|
|
8736
|
+
* un browser real (SSR/tests), o esta pestaña YA volvió de un intento de
|
|
8737
|
+
* bridge — sin este último guard, un bridge que redirige sin `?handoff`
|
|
8738
|
+
* (sin sesión) dispararía un bucle infinito de redirects en cada
|
|
8739
|
+
* `initialize()` posterior de la misma pestaña.
|
|
8740
|
+
*/
|
|
8741
|
+
shouldBootstrapViaSSOBridge() {
|
|
8742
|
+
if (!this.config?.bootstrapSessionFromBridge || !this.config?.ssoBridgeUrl) {
|
|
8743
|
+
return false;
|
|
8744
|
+
}
|
|
8745
|
+
if (typeof window === 'undefined' || typeof sessionStorage === 'undefined') {
|
|
8746
|
+
return false;
|
|
8747
|
+
}
|
|
8748
|
+
try {
|
|
8749
|
+
if (sessionStorage.getItem(AuthService.SSO_BRIDGE_GUARD_KEY) === '1') {
|
|
8750
|
+
return false;
|
|
8751
|
+
}
|
|
8752
|
+
}
|
|
8753
|
+
catch {
|
|
8754
|
+
// sessionStorage bloqueado (modo privado agresivo) — no arriesgar un
|
|
8755
|
+
// loop sin poder marcar el guard; nos abstenemos del bridge.
|
|
8756
|
+
return false;
|
|
8757
|
+
}
|
|
8758
|
+
return true;
|
|
8759
|
+
}
|
|
8760
|
+
/**
|
|
8761
|
+
* Navega la página completa al Auth Proxy Central con `redirect_uri` = la
|
|
8762
|
+
* URL actual. El backend valida la cookie `valtech_refresh` (visible solo
|
|
8763
|
+
* en su propio dominio, por eso el redirect debe ser top-level navigation
|
|
8764
|
+
* y no un fetch) y redirige de vuelta con `?handoff=TOKEN` si hay sesión.
|
|
8765
|
+
*
|
|
8766
|
+
* Marca el guard ANTES de navegar — si el bridge redirige sin `?handoff`
|
|
8767
|
+
* (sin sesión), el siguiente `initialize()` de esta pestaña no debe volver
|
|
8768
|
+
* a intentar el bridge.
|
|
8769
|
+
*/
|
|
8770
|
+
redirectToSSOBridge() {
|
|
8771
|
+
try {
|
|
8772
|
+
sessionStorage.setItem(AuthService.SSO_BRIDGE_GUARD_KEY, '1');
|
|
8773
|
+
}
|
|
8774
|
+
catch {
|
|
8775
|
+
// Si no podemos marcar el guard, mejor no navegar — evita el loop.
|
|
8776
|
+
return;
|
|
8777
|
+
}
|
|
8778
|
+
const redirectUri = window.location.href;
|
|
8779
|
+
const bridgeUrl = new URL(this.config.ssoBridgeUrl);
|
|
8780
|
+
bridgeUrl.searchParams.set('redirect_uri', redirectUri);
|
|
8781
|
+
console.log('[ValtechAuth] bootstrap — no local session, redirecting to SSO bridge');
|
|
8782
|
+
this.navigateToSSOBridgeUrl(bridgeUrl.toString());
|
|
8783
|
+
}
|
|
8784
|
+
/**
|
|
8785
|
+
* Navegación real (aislada en su propio método para poder espiarla en
|
|
8786
|
+
* tests unitarios sin que Karma navegue de verdad el runner).
|
|
8787
|
+
*/
|
|
8788
|
+
navigateToSSOBridgeUrl(url) {
|
|
8789
|
+
window.location.href = url;
|
|
8790
|
+
}
|
|
8714
8791
|
ngOnDestroy() {
|
|
8715
8792
|
this.stopRefreshTimer();
|
|
8716
8793
|
this.syncSubscription?.unsubscribe();
|
|
@@ -62430,12 +62507,12 @@ const MINI_GAMES_I18N = {
|
|
|
62430
62507
|
chessimalsAdventureA4N2Desc: 'La Matriarca controla el tablero completo. No bajes la guardia.',
|
|
62431
62508
|
chessimalsAdventureA4N3Title: 'La anaconda',
|
|
62432
62509
|
chessimalsAdventureA4N3Desc: 'Convierte cada ventaja pequeña en victoria. No hay descuido.',
|
|
62433
|
-
chessimalsAdventureA4N4Title: '
|
|
62510
|
+
chessimalsAdventureA4N4Title: 'El Gran Mandril',
|
|
62434
62511
|
chessimalsAdventureA4N4Desc: 'El jefe final. Modo pesadilla activo. Solo los mejores llegan aqui.',
|
|
62435
62512
|
chessimalsAdventureAct1Lore: 'Un viaje de mil batallas comienza con un solo movimiento. La Sabana te espera.',
|
|
62436
62513
|
chessimalsAdventureAct2Lore: 'La Jungla no tiene reglas claras. Aqui aprenderas a pensar antes de ver.',
|
|
62437
62514
|
chessimalsAdventureAct3Lore: 'El frio del Artico purifica la estrategia. Lo que no te quiebra, te hace mas preciso.',
|
|
62438
|
-
chessimalsAdventureAct4Lore: '
|
|
62515
|
+
chessimalsAdventureAct4Lore: 'El Gran Mandril lleva decadas sin perder. Hoy alguien llego dispuesto a cambiar eso.',
|
|
62439
62516
|
chessimalsAdventureA1N1Quote: 'Nuevo por aqui? Veamos cuanto duran tus piezas.',
|
|
62440
62517
|
chessimalsAdventureA1N2Quote: 'La Liebre siempre llega primero. Ya lo veras.',
|
|
62441
62518
|
chessimalsAdventureA1N5Quote: 'Pasan muchos por aqui. Yo sigo siendo el guardian.',
|
|
@@ -63310,12 +63387,12 @@ const MINI_GAMES_I18N = {
|
|
|
63310
63387
|
chessimalsAdventureA4N2Desc: 'The Matriarch controls the whole board. Stay sharp.',
|
|
63311
63388
|
chessimalsAdventureA4N3Title: 'The anaconda',
|
|
63312
63389
|
chessimalsAdventureA4N3Desc: 'Turns every small edge into a win. No slip-ups allowed.',
|
|
63313
|
-
chessimalsAdventureA4N4Title: '
|
|
63390
|
+
chessimalsAdventureA4N4Title: 'The Grand Mandrill',
|
|
63314
63391
|
chessimalsAdventureA4N4Desc: 'The final boss. Nightmare mode active. Only the best reach here.',
|
|
63315
63392
|
chessimalsAdventureAct1Lore: 'A journey of a thousand battles begins with a single move. The Savanna awaits.',
|
|
63316
63393
|
chessimalsAdventureAct2Lore: 'The Jungle has no clear rules. Here you will learn to think before you see.',
|
|
63317
63394
|
chessimalsAdventureAct3Lore: 'The Arctic cold purifies strategy. What does not break you makes you more precise.',
|
|
63318
|
-
chessimalsAdventureAct4Lore: '
|
|
63395
|
+
chessimalsAdventureAct4Lore: 'The Grand Mandrill has not lost in decades. Today, someone arrived ready to change that.',
|
|
63319
63396
|
chessimalsAdventureA1N1Quote: 'New here? Let us see how long your pieces last.',
|
|
63320
63397
|
chessimalsAdventureA1N2Quote: 'The Hare always arrives first. You will see.',
|
|
63321
63398
|
chessimalsAdventureA1N5Quote: 'Many pass through here. I am still the guardian.',
|
|
@@ -63594,7 +63671,7 @@ const CHESSIMALS_ADVENTURE_ACTS = [
|
|
|
63594
63671
|
id: 'a4-n4',
|
|
63595
63672
|
actId: 'act4',
|
|
63596
63673
|
type: 'boss',
|
|
63597
|
-
profileId: '
|
|
63674
|
+
profileId: 'mandrill',
|
|
63598
63675
|
difficulty: 'master',
|
|
63599
63676
|
boardSize: 8,
|
|
63600
63677
|
position: { x: 50, y: 12 },
|
|
@@ -63602,7 +63679,7 @@ const CHESSIMALS_ADVENTURE_ACTS = [
|
|
|
63602
63679
|
titleKey: 'chessimalsAdventureA4N4Title',
|
|
63603
63680
|
descriptionKey: 'chessimalsAdventureA4N4Desc',
|
|
63604
63681
|
quoteKey: 'chessimalsAdventureA4N4Quote',
|
|
63605
|
-
specialRule: 'nightmare-
|
|
63682
|
+
specialRule: 'nightmare-mandrill',
|
|
63606
63683
|
},
|
|
63607
63684
|
],
|
|
63608
63685
|
},
|
|
@@ -63745,6 +63822,12 @@ class ChessimalsAdventureComponent {
|
|
|
63745
63822
|
};
|
|
63746
63823
|
});
|
|
63747
63824
|
});
|
|
63825
|
+
this.ADV_ACT_THEMES = {
|
|
63826
|
+
act1: 'savanna',
|
|
63827
|
+
act2: 'jungle',
|
|
63828
|
+
act3: 'arctic',
|
|
63829
|
+
act4: 'coliseum',
|
|
63830
|
+
};
|
|
63748
63831
|
if (!this.i18n.hasNamespace('MiniGames')) {
|
|
63749
63832
|
this.i18n.registerContent('MiniGames', MINI_GAMES_I18N);
|
|
63750
63833
|
}
|
|
@@ -63755,17 +63838,14 @@ class ChessimalsAdventureComponent {
|
|
|
63755
63838
|
avatarSrc(profileId) {
|
|
63756
63839
|
return `assets/games/chessimals/challenge-avatars/${profileId}.png`;
|
|
63757
63840
|
}
|
|
63758
|
-
|
|
63759
|
-
|
|
63760
|
-
|
|
63761
|
-
|
|
63762
|
-
|
|
63763
|
-
|
|
63764
|
-
|
|
63765
|
-
|
|
63766
|
-
case 'mystery':
|
|
63767
|
-
return '❓';
|
|
63768
|
-
}
|
|
63841
|
+
actAssetSrc(actId) {
|
|
63842
|
+
return `assets/games/chessimals/adventure/acts/${this.ADV_ACT_THEMES[actId] ?? actId}.png`;
|
|
63843
|
+
}
|
|
63844
|
+
actBgSrc(actId) {
|
|
63845
|
+
return `assets/games/chessimals/adventure/backgrounds/${this.ADV_ACT_THEMES[actId] ?? actId}.png`;
|
|
63846
|
+
}
|
|
63847
|
+
nodeAssetSrc(type) {
|
|
63848
|
+
return `assets/games/chessimals/adventure/nodes/${type}.png`;
|
|
63769
63849
|
}
|
|
63770
63850
|
onNodeTap(nodeView) {
|
|
63771
63851
|
if (nodeView.status === 'locked')
|
|
@@ -63831,6 +63911,13 @@ class ChessimalsAdventureComponent {
|
|
|
63831
63911
|
</button>
|
|
63832
63912
|
|
|
63833
63913
|
<header class="adventure-hub__header">
|
|
63914
|
+
<img
|
|
63915
|
+
class="adventure-hub__hero"
|
|
63916
|
+
src="assets/games/chessimals/adventure/adventure-hero.png"
|
|
63917
|
+
alt=""
|
|
63918
|
+
aria-hidden="true"
|
|
63919
|
+
loading="lazy"
|
|
63920
|
+
/>
|
|
63834
63921
|
<p class="adventure-hub__eyebrow">{{ t('chessimalsAdventureEyebrow') }}</p>
|
|
63835
63922
|
<h1 class="adventure-hub__title">{{ t('chessimalsAdventureTitle') }}</h1>
|
|
63836
63923
|
<p class="adventure-hub__subtitle">{{ t('chessimalsAdventureSubtitle') }}</p>
|
|
@@ -63850,7 +63937,17 @@ class ChessimalsAdventureComponent {
|
|
|
63850
63937
|
}"
|
|
63851
63938
|
>
|
|
63852
63939
|
<div class="adventure-act__head">
|
|
63853
|
-
<
|
|
63940
|
+
<div
|
|
63941
|
+
class="adventure-act__head-bg"
|
|
63942
|
+
[style.background-image]="'url(' + actBgSrc(actView.act.id) + ')'"
|
|
63943
|
+
></div>
|
|
63944
|
+
<img
|
|
63945
|
+
class="adventure-act__icon"
|
|
63946
|
+
[src]="actAssetSrc(actView.act.id)"
|
|
63947
|
+
alt=""
|
|
63948
|
+
aria-hidden="true"
|
|
63949
|
+
loading="lazy"
|
|
63950
|
+
/>
|
|
63854
63951
|
<div class="adventure-act__meta">
|
|
63855
63952
|
<h2 class="adventure-act__name">{{ t(actView.act.titleKey) }}</h2>
|
|
63856
63953
|
<p class="adventure-act__desc">{{ t(actView.act.descriptionKey) }}</p>
|
|
@@ -63887,7 +63984,12 @@ class ChessimalsAdventureComponent {
|
|
|
63887
63984
|
loading="lazy"
|
|
63888
63985
|
/>
|
|
63889
63986
|
} @else {
|
|
63890
|
-
<
|
|
63987
|
+
<img
|
|
63988
|
+
class="adventure-node__icon-img"
|
|
63989
|
+
[src]="nodeAssetSrc(nodeView.node.type)"
|
|
63990
|
+
[alt]="t(nodeView.node.titleKey)"
|
|
63991
|
+
loading="lazy"
|
|
63992
|
+
/>
|
|
63891
63993
|
}
|
|
63892
63994
|
<span class="adventure-node__label">{{ t(nodeView.node.titleKey) }}</span>
|
|
63893
63995
|
<span class="adventure-node__stars">
|
|
@@ -63923,7 +64025,11 @@ class ChessimalsAdventureComponent {
|
|
|
63923
64025
|
[alt]="t(enc.node.titleKey)"
|
|
63924
64026
|
/>
|
|
63925
64027
|
} @else {
|
|
63926
|
-
<
|
|
64028
|
+
<img
|
|
64029
|
+
class="adventure-encounter__icon-img"
|
|
64030
|
+
[src]="nodeAssetSrc(enc.node.type)"
|
|
64031
|
+
[alt]="t(enc.node.titleKey)"
|
|
64032
|
+
/>
|
|
63927
64033
|
}
|
|
63928
64034
|
<div class="adventure-encounter__info">
|
|
63929
64035
|
<span class="adventure-encounter__name">{{ t(enc.node.titleKey) }}</span>
|
|
@@ -63940,7 +64046,7 @@ class ChessimalsAdventureComponent {
|
|
|
63940
64046
|
</button>
|
|
63941
64047
|
</div>
|
|
63942
64048
|
}
|
|
63943
|
-
`, isInline: true, styles: [":host{--chessimals-panel: #ffffff;--chessimals-surface: #fffaf1;--chessimals-border: rgba(46, 58, 44, .18);--chessimals-text: #2e3a2c;--chessimals-muted: #51643d;--chessimals-soft: rgba(111, 122, 60, .1);--chessimals-primary: #2e6f3e;--chessimals-primary-rgb: 46, 111, 62;--chessimals-secondary: #a8a06a;--chessimals-secondary-rgb: 168, 160, 106;--chessimals-selected: #37f28a;--chessimals-selected-rgb: 55, 242, 138;--chessimals-magic: #f7d45a;--chessimals-magic-rgb: 247, 212, 90;display:grid;gap:1.125rem;width:100%;max-width:min(100%,60rem);margin:0 auto;padding-bottom:2.5rem;color:var(--chessimals-text)}@media (prefers-color-scheme: dark){:host{--chessimals-panel: #172116;--chessimals-surface: #0f170f;--chessimals-border: rgba(242, 230, 213, .2);--chessimals-text: #f6f3e9;--chessimals-muted: #c8cfb1}}.adventure-hub__back{justify-self:start;border:1px solid rgba(var(--chessimals-primary-rgb),.16);border-radius:999px;padding:.45rem .72rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-size:.85rem;font-weight:950;cursor:pointer}.adventure-hub__header{padding:
|
|
64049
|
+
`, isInline: true, styles: [":host{--chessimals-panel: #ffffff;--chessimals-surface: #fffaf1;--chessimals-border: rgba(46, 58, 44, .18);--chessimals-text: #2e3a2c;--chessimals-muted: #51643d;--chessimals-soft: rgba(111, 122, 60, .1);--chessimals-primary: #2e6f3e;--chessimals-primary-rgb: 46, 111, 62;--chessimals-secondary: #a8a06a;--chessimals-secondary-rgb: 168, 160, 106;--chessimals-selected: #37f28a;--chessimals-selected-rgb: 55, 242, 138;--chessimals-magic: #f7d45a;--chessimals-magic-rgb: 247, 212, 90;display:grid;gap:1.125rem;width:100%;max-width:min(100%,60rem);margin:0 auto;padding-bottom:2.5rem;color:var(--chessimals-text)}@media (prefers-color-scheme: dark){:host{--chessimals-panel: #172116;--chessimals-surface: #0f170f;--chessimals-border: rgba(242, 230, 213, .2);--chessimals-text: #f6f3e9;--chessimals-muted: #c8cfb1}}.adventure-hub__back{justify-self:start;border:1px solid rgba(var(--chessimals-primary-rgb),.16);border-radius:999px;padding:.45rem .72rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-size:.85rem;font-weight:950;cursor:pointer}.adventure-hub__hero{width:100%;aspect-ratio:16 / 7;object-fit:cover;border-radius:1rem;display:block;margin-bottom:.25rem}.adventure-hub__header{padding:0 0 .5rem;text-align:center}.adventure-hub__eyebrow{font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--chessimals-muted);margin:0 0 .375rem}.adventure-hub__title{font-size:clamp(1.5rem,5vw,2rem);font-weight:800;margin:0 0 .375rem;color:var(--chessimals-text);line-height:1.1}.adventure-hub__subtitle{font-size:.875rem;color:var(--chessimals-muted);margin:0 0 .75rem;line-height:1.4}.adventure-hub__stars{display:inline-flex;align-items:center;gap:4px;background:var(--chessimals-surface);border:1px solid var(--chessimals-border);border-radius:20px;padding:4px 14px;font-weight:700;font-size:.95rem;color:var(--chessimals-magic)}.adventure-hub__stars ion-icon{color:var(--chessimals-magic);font-size:1rem}.adventure-hub__acts{display:grid;gap:.875rem}.adventure-act{border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);overflow:hidden}.adventure-act--locked{opacity:.55}.adventure-act--done{border-color:rgba(var(--chessimals-primary-rgb),.5)}.adventure-act__head{position:relative;display:flex;align-items:center;gap:.625rem;padding:.875rem 1rem;border-bottom:1px solid var(--chessimals-border);overflow:hidden}.adventure-act__head-bg{position:absolute;inset:0;background-size:cover;background-position:center;opacity:.12;pointer-events:none}.adventure-act__icon{width:2.5rem;height:2.5rem;object-fit:contain;flex-shrink:0;position:relative}.adventure-act__meta{flex:1;min-width:0;position:relative}.adventure-act__name{font-size:.9375rem;font-weight:700;margin:0 0 2px;color:var(--chessimals-text)}.adventure-act__desc{font-size:.8125rem;color:var(--chessimals-muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.adventure-act__lock{color:var(--chessimals-muted);font-size:1.125rem;flex-shrink:0;position:relative}.adventure-act__progress{font-size:.8125rem;font-weight:700;color:var(--chessimals-muted);flex-shrink:0;position:relative}.adventure-act__nodes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:.5rem;padding:.75rem}.adventure-node{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;padding:.75rem .375rem .625rem;border-radius:1rem;border:1px solid rgba(var(--chessimals-primary-rgb),.22);background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.62),transparent 22%),linear-gradient(135deg,rgba(var(--chessimals-primary-rgb),.06),rgba(var(--chessimals-secondary-rgb),.04)),var(--chessimals-panel);cursor:pointer;text-align:center;transition:transform .12s ease,border-color .12s ease;min-width:0;overflow:hidden;font:inherit;color:inherit}.adventure-node:active{transform:scale(.97)}.adventure-node--available{border-color:rgba(var(--chessimals-primary-rgb),.6);background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.74),transparent 22%),linear-gradient(135deg,rgba(var(--chessimals-primary-rgb),.12),rgba(var(--chessimals-secondary-rgb),.07)),var(--chessimals-panel)}.adventure-node--completed{border-color:rgba(var(--chessimals-selected-rgb),.5);background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.74),transparent 22%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.08),rgba(var(--chessimals-primary-rgb),.04)),var(--chessimals-panel)}.adventure-node--locked{opacity:.4;cursor:default}.adventure-node__avatar{width:2.75rem;height:2.75rem;border-radius:50%;object-fit:cover;border:2px solid var(--chessimals-border);flex-shrink:0;filter:var(--chessimals-animal-face-filter, none);background:var(--chessimals-animal-face-bg, #fffdf7)}.adventure-node--available .adventure-node__avatar{border-color:rgba(var(--chessimals-primary-rgb),.5)}.adventure-node--completed .adventure-node__avatar{border-color:rgba(var(--chessimals-selected-rgb),.5)}.adventure-node__icon-img{width:2.5rem;height:2.5rem;object-fit:contain;flex-shrink:0}.adventure-node__label{font-size:.75rem;font-weight:700;color:var(--chessimals-text);line-height:1.2;overflow-wrap:break-word;max-width:100%}.adventure-node__stars{display:flex;gap:1px}.adventure-node__star{font-size:.625rem;color:var(--chessimals-muted)}.adventure-node__star--filled{color:var(--chessimals-magic)}.adventure-node__badge{display:inline-block;font-size:.5625rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#7a5200;background:#f7d45abf;border:1px solid rgba(247,212,90,.9);border-radius:.375rem;padding:1px 5px;line-height:1.5}.adventure-act__lore{margin:0;padding:.5rem 1rem .625rem;font-size:.8125rem;font-style:italic;color:var(--chessimals-muted);line-height:1.5;border-bottom:1px solid var(--chessimals-border);opacity:.88}.adventure-encounter__backdrop{position:fixed;inset:0;z-index:20;background:#00000061;animation:adv-fade-in .18s ease}.adventure-encounter{position:fixed;bottom:0;left:0;right:0;z-index:21;background:var(--chessimals-panel);border-top:1px solid var(--chessimals-border);border-radius:1.25rem 1.25rem 0 0;padding:1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:.875rem;animation:adv-slide-up .22s cubic-bezier(.34,1.3,.64,1);max-width:480px;margin:0 auto}.adventure-encounter__close{position:absolute;top:1rem;right:1rem;background:var(--chessimals-surface);border:1px solid var(--chessimals-border);border-radius:50%;width:2rem;height:2rem;font-size:.8rem;color:var(--chessimals-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;font:inherit}.adventure-encounter__rival{display:flex;align-items:center;gap:.75rem}.adventure-encounter__avatar{width:3.25rem;height:3.25rem;border-radius:50%;object-fit:cover;border:2px solid var(--chessimals-border);flex-shrink:0;filter:var(--chessimals-animal-face-filter, none);background:var(--chessimals-animal-face-bg, #fffdf7)}.adventure-encounter__icon-img{width:3.25rem;height:3.25rem;object-fit:contain;flex-shrink:0}.adventure-encounter__info{display:flex;flex-direction:column;gap:.25rem}.adventure-encounter__name{font-size:1rem;font-weight:800;color:var(--chessimals-text);line-height:1.2}.adventure-encounter__boss-chip{display:inline-block;font-size:.5625rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#7a5200;background:#f7d45abf;border:1px solid rgba(247,212,90,.9);border-radius:.375rem;padding:1px 5px;line-height:1.5;align-self:flex-start}.adventure-encounter__quote{margin:0;font-size:.9375rem;font-style:italic;color:var(--chessimals-text);line-height:1.5;padding:.625rem .875rem;background:var(--chessimals-surface);border-left:3px solid rgba(var(--chessimals-primary-rgb),.5);border-radius:0 .5rem .5rem 0}.adventure-encounter__play{width:100%;padding:.875rem;border-radius:999px;border:none;background:var(--chessimals-primary);color:#fff;font:inherit;font-size:.9375rem;font-weight:800;cursor:pointer;transition:opacity .12s ease}.adventure-encounter__play:active{opacity:.82}@keyframes adv-fade-in{0%{opacity:0}to{opacity:1}}@keyframes adv-slide-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }] }); }
|
|
63944
64050
|
}
|
|
63945
64051
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChessimalsAdventureComponent, decorators: [{
|
|
63946
64052
|
type: Component,
|
|
@@ -63951,6 +64057,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
63951
64057
|
</button>
|
|
63952
64058
|
|
|
63953
64059
|
<header class="adventure-hub__header">
|
|
64060
|
+
<img
|
|
64061
|
+
class="adventure-hub__hero"
|
|
64062
|
+
src="assets/games/chessimals/adventure/adventure-hero.png"
|
|
64063
|
+
alt=""
|
|
64064
|
+
aria-hidden="true"
|
|
64065
|
+
loading="lazy"
|
|
64066
|
+
/>
|
|
63954
64067
|
<p class="adventure-hub__eyebrow">{{ t('chessimalsAdventureEyebrow') }}</p>
|
|
63955
64068
|
<h1 class="adventure-hub__title">{{ t('chessimalsAdventureTitle') }}</h1>
|
|
63956
64069
|
<p class="adventure-hub__subtitle">{{ t('chessimalsAdventureSubtitle') }}</p>
|
|
@@ -63970,7 +64083,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
63970
64083
|
}"
|
|
63971
64084
|
>
|
|
63972
64085
|
<div class="adventure-act__head">
|
|
63973
|
-
<
|
|
64086
|
+
<div
|
|
64087
|
+
class="adventure-act__head-bg"
|
|
64088
|
+
[style.background-image]="'url(' + actBgSrc(actView.act.id) + ')'"
|
|
64089
|
+
></div>
|
|
64090
|
+
<img
|
|
64091
|
+
class="adventure-act__icon"
|
|
64092
|
+
[src]="actAssetSrc(actView.act.id)"
|
|
64093
|
+
alt=""
|
|
64094
|
+
aria-hidden="true"
|
|
64095
|
+
loading="lazy"
|
|
64096
|
+
/>
|
|
63974
64097
|
<div class="adventure-act__meta">
|
|
63975
64098
|
<h2 class="adventure-act__name">{{ t(actView.act.titleKey) }}</h2>
|
|
63976
64099
|
<p class="adventure-act__desc">{{ t(actView.act.descriptionKey) }}</p>
|
|
@@ -64007,7 +64130,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
64007
64130
|
loading="lazy"
|
|
64008
64131
|
/>
|
|
64009
64132
|
} @else {
|
|
64010
|
-
<
|
|
64133
|
+
<img
|
|
64134
|
+
class="adventure-node__icon-img"
|
|
64135
|
+
[src]="nodeAssetSrc(nodeView.node.type)"
|
|
64136
|
+
[alt]="t(nodeView.node.titleKey)"
|
|
64137
|
+
loading="lazy"
|
|
64138
|
+
/>
|
|
64011
64139
|
}
|
|
64012
64140
|
<span class="adventure-node__label">{{ t(nodeView.node.titleKey) }}</span>
|
|
64013
64141
|
<span class="adventure-node__stars">
|
|
@@ -64043,7 +64171,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
64043
64171
|
[alt]="t(enc.node.titleKey)"
|
|
64044
64172
|
/>
|
|
64045
64173
|
} @else {
|
|
64046
|
-
<
|
|
64174
|
+
<img
|
|
64175
|
+
class="adventure-encounter__icon-img"
|
|
64176
|
+
[src]="nodeAssetSrc(enc.node.type)"
|
|
64177
|
+
[alt]="t(enc.node.titleKey)"
|
|
64178
|
+
/>
|
|
64047
64179
|
}
|
|
64048
64180
|
<div class="adventure-encounter__info">
|
|
64049
64181
|
<span class="adventure-encounter__name">{{ t(enc.node.titleKey) }}</span>
|
|
@@ -64060,7 +64192,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
64060
64192
|
</button>
|
|
64061
64193
|
</div>
|
|
64062
64194
|
}
|
|
64063
|
-
`, styles: [":host{--chessimals-panel: #ffffff;--chessimals-surface: #fffaf1;--chessimals-border: rgba(46, 58, 44, .18);--chessimals-text: #2e3a2c;--chessimals-muted: #51643d;--chessimals-soft: rgba(111, 122, 60, .1);--chessimals-primary: #2e6f3e;--chessimals-primary-rgb: 46, 111, 62;--chessimals-secondary: #a8a06a;--chessimals-secondary-rgb: 168, 160, 106;--chessimals-selected: #37f28a;--chessimals-selected-rgb: 55, 242, 138;--chessimals-magic: #f7d45a;--chessimals-magic-rgb: 247, 212, 90;display:grid;gap:1.125rem;width:100%;max-width:min(100%,60rem);margin:0 auto;padding-bottom:2.5rem;color:var(--chessimals-text)}@media (prefers-color-scheme: dark){:host{--chessimals-panel: #172116;--chessimals-surface: #0f170f;--chessimals-border: rgba(242, 230, 213, .2);--chessimals-text: #f6f3e9;--chessimals-muted: #c8cfb1}}.adventure-hub__back{justify-self:start;border:1px solid rgba(var(--chessimals-primary-rgb),.16);border-radius:999px;padding:.45rem .72rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-size:.85rem;font-weight:950;cursor:pointer}.adventure-hub__header{padding:
|
|
64195
|
+
`, styles: [":host{--chessimals-panel: #ffffff;--chessimals-surface: #fffaf1;--chessimals-border: rgba(46, 58, 44, .18);--chessimals-text: #2e3a2c;--chessimals-muted: #51643d;--chessimals-soft: rgba(111, 122, 60, .1);--chessimals-primary: #2e6f3e;--chessimals-primary-rgb: 46, 111, 62;--chessimals-secondary: #a8a06a;--chessimals-secondary-rgb: 168, 160, 106;--chessimals-selected: #37f28a;--chessimals-selected-rgb: 55, 242, 138;--chessimals-magic: #f7d45a;--chessimals-magic-rgb: 247, 212, 90;display:grid;gap:1.125rem;width:100%;max-width:min(100%,60rem);margin:0 auto;padding-bottom:2.5rem;color:var(--chessimals-text)}@media (prefers-color-scheme: dark){:host{--chessimals-panel: #172116;--chessimals-surface: #0f170f;--chessimals-border: rgba(242, 230, 213, .2);--chessimals-text: #f6f3e9;--chessimals-muted: #c8cfb1}}.adventure-hub__back{justify-self:start;border:1px solid rgba(var(--chessimals-primary-rgb),.16);border-radius:999px;padding:.45rem .72rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-size:.85rem;font-weight:950;cursor:pointer}.adventure-hub__hero{width:100%;aspect-ratio:16 / 7;object-fit:cover;border-radius:1rem;display:block;margin-bottom:.25rem}.adventure-hub__header{padding:0 0 .5rem;text-align:center}.adventure-hub__eyebrow{font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--chessimals-muted);margin:0 0 .375rem}.adventure-hub__title{font-size:clamp(1.5rem,5vw,2rem);font-weight:800;margin:0 0 .375rem;color:var(--chessimals-text);line-height:1.1}.adventure-hub__subtitle{font-size:.875rem;color:var(--chessimals-muted);margin:0 0 .75rem;line-height:1.4}.adventure-hub__stars{display:inline-flex;align-items:center;gap:4px;background:var(--chessimals-surface);border:1px solid var(--chessimals-border);border-radius:20px;padding:4px 14px;font-weight:700;font-size:.95rem;color:var(--chessimals-magic)}.adventure-hub__stars ion-icon{color:var(--chessimals-magic);font-size:1rem}.adventure-hub__acts{display:grid;gap:.875rem}.adventure-act{border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);overflow:hidden}.adventure-act--locked{opacity:.55}.adventure-act--done{border-color:rgba(var(--chessimals-primary-rgb),.5)}.adventure-act__head{position:relative;display:flex;align-items:center;gap:.625rem;padding:.875rem 1rem;border-bottom:1px solid var(--chessimals-border);overflow:hidden}.adventure-act__head-bg{position:absolute;inset:0;background-size:cover;background-position:center;opacity:.12;pointer-events:none}.adventure-act__icon{width:2.5rem;height:2.5rem;object-fit:contain;flex-shrink:0;position:relative}.adventure-act__meta{flex:1;min-width:0;position:relative}.adventure-act__name{font-size:.9375rem;font-weight:700;margin:0 0 2px;color:var(--chessimals-text)}.adventure-act__desc{font-size:.8125rem;color:var(--chessimals-muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.adventure-act__lock{color:var(--chessimals-muted);font-size:1.125rem;flex-shrink:0;position:relative}.adventure-act__progress{font-size:.8125rem;font-weight:700;color:var(--chessimals-muted);flex-shrink:0;position:relative}.adventure-act__nodes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:.5rem;padding:.75rem}.adventure-node{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;padding:.75rem .375rem .625rem;border-radius:1rem;border:1px solid rgba(var(--chessimals-primary-rgb),.22);background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.62),transparent 22%),linear-gradient(135deg,rgba(var(--chessimals-primary-rgb),.06),rgba(var(--chessimals-secondary-rgb),.04)),var(--chessimals-panel);cursor:pointer;text-align:center;transition:transform .12s ease,border-color .12s ease;min-width:0;overflow:hidden;font:inherit;color:inherit}.adventure-node:active{transform:scale(.97)}.adventure-node--available{border-color:rgba(var(--chessimals-primary-rgb),.6);background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.74),transparent 22%),linear-gradient(135deg,rgba(var(--chessimals-primary-rgb),.12),rgba(var(--chessimals-secondary-rgb),.07)),var(--chessimals-panel)}.adventure-node--completed{border-color:rgba(var(--chessimals-selected-rgb),.5);background:radial-gradient(circle at 18% 10%,rgba(255,255,255,.74),transparent 22%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.08),rgba(var(--chessimals-primary-rgb),.04)),var(--chessimals-panel)}.adventure-node--locked{opacity:.4;cursor:default}.adventure-node__avatar{width:2.75rem;height:2.75rem;border-radius:50%;object-fit:cover;border:2px solid var(--chessimals-border);flex-shrink:0;filter:var(--chessimals-animal-face-filter, none);background:var(--chessimals-animal-face-bg, #fffdf7)}.adventure-node--available .adventure-node__avatar{border-color:rgba(var(--chessimals-primary-rgb),.5)}.adventure-node--completed .adventure-node__avatar{border-color:rgba(var(--chessimals-selected-rgb),.5)}.adventure-node__icon-img{width:2.5rem;height:2.5rem;object-fit:contain;flex-shrink:0}.adventure-node__label{font-size:.75rem;font-weight:700;color:var(--chessimals-text);line-height:1.2;overflow-wrap:break-word;max-width:100%}.adventure-node__stars{display:flex;gap:1px}.adventure-node__star{font-size:.625rem;color:var(--chessimals-muted)}.adventure-node__star--filled{color:var(--chessimals-magic)}.adventure-node__badge{display:inline-block;font-size:.5625rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#7a5200;background:#f7d45abf;border:1px solid rgba(247,212,90,.9);border-radius:.375rem;padding:1px 5px;line-height:1.5}.adventure-act__lore{margin:0;padding:.5rem 1rem .625rem;font-size:.8125rem;font-style:italic;color:var(--chessimals-muted);line-height:1.5;border-bottom:1px solid var(--chessimals-border);opacity:.88}.adventure-encounter__backdrop{position:fixed;inset:0;z-index:20;background:#00000061;animation:adv-fade-in .18s ease}.adventure-encounter{position:fixed;bottom:0;left:0;right:0;z-index:21;background:var(--chessimals-panel);border-top:1px solid var(--chessimals-border);border-radius:1.25rem 1.25rem 0 0;padding:1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:.875rem;animation:adv-slide-up .22s cubic-bezier(.34,1.3,.64,1);max-width:480px;margin:0 auto}.adventure-encounter__close{position:absolute;top:1rem;right:1rem;background:var(--chessimals-surface);border:1px solid var(--chessimals-border);border-radius:50%;width:2rem;height:2rem;font-size:.8rem;color:var(--chessimals-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;font:inherit}.adventure-encounter__rival{display:flex;align-items:center;gap:.75rem}.adventure-encounter__avatar{width:3.25rem;height:3.25rem;border-radius:50%;object-fit:cover;border:2px solid var(--chessimals-border);flex-shrink:0;filter:var(--chessimals-animal-face-filter, none);background:var(--chessimals-animal-face-bg, #fffdf7)}.adventure-encounter__icon-img{width:3.25rem;height:3.25rem;object-fit:contain;flex-shrink:0}.adventure-encounter__info{display:flex;flex-direction:column;gap:.25rem}.adventure-encounter__name{font-size:1rem;font-weight:800;color:var(--chessimals-text);line-height:1.2}.adventure-encounter__boss-chip{display:inline-block;font-size:.5625rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#7a5200;background:#f7d45abf;border:1px solid rgba(247,212,90,.9);border-radius:.375rem;padding:1px 5px;line-height:1.5;align-self:flex-start}.adventure-encounter__quote{margin:0;font-size:.9375rem;font-style:italic;color:var(--chessimals-text);line-height:1.5;padding:.625rem .875rem;background:var(--chessimals-surface);border-left:3px solid rgba(var(--chessimals-primary-rgb),.5);border-radius:0 .5rem .5rem 0}.adventure-encounter__play{width:100%;padding:.875rem;border-radius:999px;border:none;background:var(--chessimals-primary);color:#fff;font:inherit;font-size:.9375rem;font-weight:800;cursor:pointer;transition:opacity .12s ease}.adventure-encounter__play:active{opacity:.82}@keyframes adv-fade-in{0%{opacity:0}to{opacity:1}}@keyframes adv-slide-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}\n"] }]
|
|
64064
64196
|
}], ctorParameters: () => [] });
|
|
64065
64197
|
|
|
64066
64198
|
const ANIMALS$1 = ['eagle', 'bull', 'kangaroo', 'lion'];
|
|
@@ -64195,10 +64327,10 @@ const CHESSIMALS_BOT_PROFILES = [
|
|
|
64195
64327
|
descriptionKey: 'chessimalsBotAnacondaBody',
|
|
64196
64328
|
},
|
|
64197
64329
|
{
|
|
64198
|
-
id: '
|
|
64330
|
+
id: 'mandrill',
|
|
64199
64331
|
difficulty: 'hard',
|
|
64200
64332
|
avatar: '♟',
|
|
64201
|
-
avatarSrc: `${CHESSIMALS_CHALLENGE_AVATAR_BASE}/nightmare-
|
|
64333
|
+
avatarSrc: `${CHESSIMALS_CHALLENGE_AVATAR_BASE}/nightmare-mandrill.png`,
|
|
64202
64334
|
labelKey: 'chessimalsBotMagnus',
|
|
64203
64335
|
descriptionKey: 'chessimalsBotMagnusBody',
|
|
64204
64336
|
},
|
|
@@ -64428,7 +64560,7 @@ const BOT_STYLES = {
|
|
|
64428
64560
|
trap: 1.02,
|
|
64429
64561
|
endgame: 1.86,
|
|
64430
64562
|
},
|
|
64431
|
-
|
|
64563
|
+
mandrill: {
|
|
64432
64564
|
advancement: 1.04,
|
|
64433
64565
|
capture: 1.22,
|
|
64434
64566
|
safety: 1.9,
|
|
@@ -64447,7 +64579,7 @@ const DEFAULT_BOT_PROFILE_BY_DIFFICULTY = {
|
|
|
64447
64579
|
easy: 'explorer',
|
|
64448
64580
|
normal: 'hunter',
|
|
64449
64581
|
hard: 'strategist',
|
|
64450
|
-
master: '
|
|
64582
|
+
master: 'mandrill',
|
|
64451
64583
|
};
|
|
64452
64584
|
function createChessimalsGame(boardSize = 6, options = {}) {
|
|
64453
64585
|
const pieces = [];
|
|
@@ -64536,7 +64668,7 @@ function chooseChessimalsBotMove(state, difficulty = 'normal', profileId = DEFAU
|
|
|
64536
64668
|
score: scoreBotMove(state, move, difficulty, style, challengePressure, false, options.nightmareMode),
|
|
64537
64669
|
}))
|
|
64538
64670
|
.sort((a, b) => b.score - a.score);
|
|
64539
|
-
const lookaheadLimit = options.nightmareMode === '
|
|
64671
|
+
const lookaheadLimit = options.nightmareMode === 'mandrill' || difficulty === 'master'
|
|
64540
64672
|
? 48
|
|
64541
64673
|
: difficulty === 'hard'
|
|
64542
64674
|
? 32
|
|
@@ -64857,8 +64989,8 @@ function scoreBotMove(state, move, difficulty, style, challengePressure = 0, inc
|
|
|
64857
64989
|
(targetPiece ? 120 : difficulty === 'hard' ? -60 - 170 * challengePressure : -30) *
|
|
64858
64990
|
style.power;
|
|
64859
64991
|
}
|
|
64860
|
-
if (nightmareMode === '
|
|
64861
|
-
score +=
|
|
64992
|
+
if (nightmareMode === 'mandrill' && move.kind === 'power') {
|
|
64993
|
+
score += scoreMandrillPowerPatience(state, move, targetPiece, style);
|
|
64862
64994
|
}
|
|
64863
64995
|
if (move.animal === 'lion')
|
|
64864
64996
|
score += nightmareMode === 'pride' ? 260 * style.power : -20 * style.power;
|
|
@@ -65002,7 +65134,7 @@ function tuneBotStyle(style, difficulty, challengePressure, nightmareMode = 'non
|
|
|
65002
65134
|
randomness: Math.min(style.randomness, 16),
|
|
65003
65135
|
};
|
|
65004
65136
|
}
|
|
65005
|
-
if (nightmareMode === '
|
|
65137
|
+
if (nightmareMode === 'mandrill') {
|
|
65006
65138
|
style = {
|
|
65007
65139
|
...style,
|
|
65008
65140
|
advancement: style.advancement * 1.04,
|
|
@@ -65070,7 +65202,7 @@ function chooseNightmareCapture(scored, nightmareMode) {
|
|
|
65070
65202
|
return undefined;
|
|
65071
65203
|
return best.score - capture.score <= 1800 ? capture.move : undefined;
|
|
65072
65204
|
}
|
|
65073
|
-
function
|
|
65205
|
+
function scoreMandrillPowerPatience(state, move, targetPiece, style) {
|
|
65074
65206
|
const color = state.currentTurn;
|
|
65075
65207
|
const fromAdvancement = color === 'white' ? state.boardSize - 1 - move.from.row : move.from.row;
|
|
65076
65208
|
const toAdvancement = color === 'white' ? state.boardSize - 1 - move.to.row : move.to.row;
|
|
@@ -67643,7 +67775,7 @@ const CHESSIMALS_CHALLENGE_LADDER = [
|
|
|
67643
67775
|
{
|
|
67644
67776
|
id: 'champion',
|
|
67645
67777
|
round: 8,
|
|
67646
|
-
profileId: '
|
|
67778
|
+
profileId: 'mandrill',
|
|
67647
67779
|
difficulty: 'master',
|
|
67648
67780
|
boardSize: 8,
|
|
67649
67781
|
introKey: 'chessimalsChallengeBotChampionIntro',
|
|
@@ -67686,7 +67818,7 @@ class ChessimalsGameComponent {
|
|
|
67686
67818
|
this.boardSizes = [6, 8];
|
|
67687
67819
|
this.localModes = ['one-device', 'bot'];
|
|
67688
67820
|
this.botDifficulties = ['easy', 'normal', 'hard', 'master', 'nightmare'];
|
|
67689
|
-
this.nightmareRivals = ['hunt', 'pride', '
|
|
67821
|
+
this.nightmareRivals = ['hunt', 'pride', 'mandrill'];
|
|
67690
67822
|
this.botProfiles = CHESSIMALS_BOT_PROFILES;
|
|
67691
67823
|
this.challengeLadder = CHESSIMALS_CHALLENGE_LADDER;
|
|
67692
67824
|
this.animals = ANIMALS;
|
|
@@ -67912,8 +68044,8 @@ class ChessimalsGameComponent {
|
|
|
67912
68044
|
if (difficulty === 'nightmare')
|
|
67913
68045
|
return [];
|
|
67914
68046
|
if (difficulty === 'master')
|
|
67915
|
-
return this.botProfiles.filter(profile => profile.id === '
|
|
67916
|
-
return this.botProfiles.filter(profile => profile.difficulty === difficulty && profile.id !== '
|
|
68047
|
+
return this.botProfiles.filter(profile => profile.id === 'mandrill');
|
|
68048
|
+
return this.botProfiles.filter(profile => profile.difficulty === difficulty && profile.id !== 'mandrill');
|
|
67917
68049
|
});
|
|
67918
68050
|
this.selectedBotProfile = computed(() => this.botProfiles.find(profile => profile.id === this.selectedBotProfileId()));
|
|
67919
68051
|
this.gameBotProfile = computed(() => {
|
|
@@ -68841,7 +68973,7 @@ class ChessimalsGameComponent {
|
|
|
68841
68973
|
return this.applyNightmarePreset(game, this.activeNightmareMode());
|
|
68842
68974
|
}
|
|
68843
68975
|
applyNightmarePreset(game, mode) {
|
|
68844
|
-
if (mode === '
|
|
68976
|
+
if (mode === 'mandrill') {
|
|
68845
68977
|
return {
|
|
68846
68978
|
...game,
|
|
68847
68979
|
players: {
|
|
@@ -70481,7 +70613,7 @@ class ChessimalsGameComponent {
|
|
|
70481
70613
|
else if (mode === 'pride')
|
|
70482
70614
|
this.selectedBotProfileId.set('predator');
|
|
70483
70615
|
else
|
|
70484
|
-
this.selectedBotProfileId.set('
|
|
70616
|
+
this.selectedBotProfileId.set('mandrill');
|
|
70485
70617
|
}
|
|
70486
70618
|
activeNightmareMode() {
|
|
70487
70619
|
if (this.selectedBotDifficulty() !== 'nightmare')
|
|
@@ -70497,7 +70629,7 @@ class ChessimalsGameComponent {
|
|
|
70497
70629
|
return this.t('chessimalsNightmareHunt');
|
|
70498
70630
|
if (mode === 'pride')
|
|
70499
70631
|
return this.t('chessimalsNightmarePride');
|
|
70500
|
-
if (mode === '
|
|
70632
|
+
if (mode === 'mandrill')
|
|
70501
70633
|
return this.t('chessimalsNightmareMagnus');
|
|
70502
70634
|
return this.t('chessimalsNightmareNone');
|
|
70503
70635
|
}
|
|
@@ -70506,7 +70638,7 @@ class ChessimalsGameComponent {
|
|
|
70506
70638
|
return this.t('chessimalsNightmareHuntBody');
|
|
70507
70639
|
if (mode === 'pride')
|
|
70508
70640
|
return this.t('chessimalsNightmarePrideBody');
|
|
70509
|
-
if (mode === '
|
|
70641
|
+
if (mode === 'mandrill')
|
|
70510
70642
|
return this.t('chessimalsNightmareMagnusBody');
|
|
70511
70643
|
return this.t('chessimalsNightmareNoneBody');
|
|
70512
70644
|
}
|
|
@@ -70515,8 +70647,8 @@ class ChessimalsGameComponent {
|
|
|
70515
70647
|
return 'assets/games/chessimals/challenge-avatars/nightmare-hunt.png';
|
|
70516
70648
|
if (mode === 'pride')
|
|
70517
70649
|
return 'assets/games/chessimals/challenge-avatars/nightmare-pride.png';
|
|
70518
|
-
if (mode === '
|
|
70519
|
-
return 'assets/games/chessimals/challenge-avatars/nightmare-
|
|
70650
|
+
if (mode === 'mandrill')
|
|
70651
|
+
return 'assets/games/chessimals/challenge-avatars/nightmare-mandrill.png';
|
|
70520
70652
|
return '';
|
|
70521
70653
|
}
|
|
70522
70654
|
nightmareModeGlyph(mode) {
|