valtech-components 4.0.505 → 4.0.507
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-challenge-progress.service.mjs +43 -24
- package/esm2022/lib/components/organisms/mini-games/chessimals-challenge-state.mjs +44 -0
- package/esm2022/lib/components/organisms/mini-games/chessimals-engine.mjs +57 -16
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +66 -23
- package/esm2022/lib/components/organisms/mini-games/christianity-game.component.mjs +223 -72
- package/esm2022/lib/components/organisms/mini-games/christianity-rules.mjs +33 -2
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +9 -1
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +468 -132
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-challenge-progress.service.d.ts +2 -0
- package/lib/components/organisms/mini-games/chessimals-challenge-state.d.ts +3 -0
- package/lib/components/organisms/mini-games/chessimals-engine.d.ts +5 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +3 -1
- package/lib/components/organisms/mini-games/christianity-game.component.d.ts +29 -4
- package/lib/components/organisms/mini-games/christianity-rules.d.ts +9 -0
- package/lib/components/organisms/mini-games/types.d.ts +7 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export declare class ChessimalsChallengeProgressService {
|
|
|
22
22
|
emptyStats(): ChessimalsChallengeStats;
|
|
23
23
|
private readStats;
|
|
24
24
|
private normalizeStats;
|
|
25
|
+
normalizeRun(value: Partial<ChessimalsChallengeRun>, uid?: string): ChessimalsChallengeRun;
|
|
25
26
|
private addModeResult;
|
|
26
27
|
private emptyModeStats;
|
|
27
28
|
private normalizeModeStats;
|
|
@@ -31,6 +32,7 @@ export declare class ChessimalsChallengeProgressService {
|
|
|
31
32
|
private runsPath;
|
|
32
33
|
private readLocalActiveRun;
|
|
33
34
|
private writeLocalActiveRun;
|
|
35
|
+
private localActiveRunKey;
|
|
34
36
|
private withoutUndefined;
|
|
35
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsChallengeProgressService, never>;
|
|
36
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<ChessimalsChallengeProgressService>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ChessimalsChallengeRun } from './types';
|
|
2
|
+
export declare function normalizeChessimalsChallengeRun(value: Partial<ChessimalsChallengeRun>, uid?: string): ChessimalsChallengeRun;
|
|
3
|
+
export declare function chooseActiveChessimalsChallengeRun(values: Array<Partial<ChessimalsChallengeRun>>, uid?: string): ChessimalsChallengeRun | undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsGameMode, ChessimalsGameState, ChessimalsGameStatus, ChessimalsMove, ChessimalsMoveHistoryEntry, ChessimalsOnlineState, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
|
|
2
|
+
interface ChessimalsBotOptions {
|
|
3
|
+
challengeRound?: number;
|
|
4
|
+
}
|
|
2
5
|
export declare const CHESSIMALS_BOT_PROFILES: ChessimalsBotProfile[];
|
|
3
6
|
export interface CreateChessimalsGameOptions {
|
|
4
7
|
id?: string;
|
|
@@ -10,8 +13,9 @@ export declare function createChessimalsGame(boardSize?: ChessimalsBoardSize, op
|
|
|
10
13
|
export declare function getChessimalsPieceAt(state: ChessimalsGameState, position: ChessimalsPosition): ChessimalsPiece | undefined;
|
|
11
14
|
export declare function getChessimalsLegalMoves(state: ChessimalsGameState, pieceId: string, animal?: ChessimalsAnimalType): ChessimalsMove[];
|
|
12
15
|
export declare function getChessimalsAllLegalMoves(state: ChessimalsGameState, color?: ChessimalsPlayerColor): ChessimalsMove[];
|
|
13
|
-
export declare function chooseChessimalsBotMove(state: ChessimalsGameState, difficulty?: ChessimalsBotDifficulty, profileId?: ChessimalsBotProfileId): ChessimalsMove | undefined;
|
|
16
|
+
export declare function chooseChessimalsBotMove(state: ChessimalsGameState, difficulty?: ChessimalsBotDifficulty, profileId?: ChessimalsBotProfileId, options?: ChessimalsBotOptions): ChessimalsMove | undefined;
|
|
14
17
|
export declare function applyChessimalsMove(state: ChessimalsGameState, candidate: ChessimalsMove): ChessimalsGameState;
|
|
15
18
|
export declare function createChessimalsReviewState(state: ChessimalsGameState, entry: ChessimalsMoveHistoryEntry): ChessimalsGameState;
|
|
16
19
|
export declare function resignChessimalsGame(state: ChessimalsGameState, color: ChessimalsPlayerColor): ChessimalsGameState;
|
|
17
20
|
export declare function positionKey(position: ChessimalsPosition): string;
|
|
21
|
+
export {};
|
|
@@ -123,7 +123,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
123
123
|
readonly botProfiles: ChessimalsBotProfile[];
|
|
124
124
|
readonly challengeLadder: ChessimalsChallengeBot[];
|
|
125
125
|
readonly animals: ChessimalsAnimalView[];
|
|
126
|
-
readonly valtechComponentsVersion = "4.0.
|
|
126
|
+
readonly valtechComponentsVersion = "4.0.507";
|
|
127
127
|
readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "path" | "game">;
|
|
128
128
|
readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
|
|
129
129
|
readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
|
|
@@ -450,6 +450,8 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
450
450
|
challengeTensionMoment(): ChessimalsChallengeTensionView | undefined;
|
|
451
451
|
challengeHasNewRecord(): boolean;
|
|
452
452
|
totalChallengePowers(stats?: ChessimalsChallengeRoundStats): number;
|
|
453
|
+
private challengeRunRoundIndex;
|
|
454
|
+
private challengeRunRoundsWon;
|
|
453
455
|
private createGameScore;
|
|
454
456
|
private scoreChessimalsMove;
|
|
455
457
|
private colorFromPieceId;
|
|
@@ -8,7 +8,9 @@ interface ChristianityCardPreview {
|
|
|
8
8
|
meta: string;
|
|
9
9
|
body: string;
|
|
10
10
|
cardId?: string;
|
|
11
|
-
source?: 'hand' | 'board' | 'pile' | 'history';
|
|
11
|
+
source?: 'hand' | 'board' | 'pile' | 'history' | 'offerings';
|
|
12
|
+
seat?: ChristianitySeat;
|
|
13
|
+
offeringInstanceId?: string;
|
|
12
14
|
}
|
|
13
15
|
interface ChristianityInfoPanel {
|
|
14
16
|
title: string;
|
|
@@ -21,6 +23,12 @@ interface ChristianityPreviewRule {
|
|
|
21
23
|
title: string;
|
|
22
24
|
body: string;
|
|
23
25
|
}
|
|
26
|
+
interface ChristianityPreviewAbility {
|
|
27
|
+
index: number;
|
|
28
|
+
title: string;
|
|
29
|
+
body: string;
|
|
30
|
+
canUse: boolean;
|
|
31
|
+
}
|
|
24
32
|
interface ChristianityPreviewTilt {
|
|
25
33
|
rotateX: number;
|
|
26
34
|
rotateY: number;
|
|
@@ -53,6 +61,7 @@ export declare class ChristianityGameComponent {
|
|
|
53
61
|
protected readonly selectedPreview: import("@angular/core").WritableSignal<ChristianityCardPreview>;
|
|
54
62
|
protected readonly selectedInfo: import("@angular/core").WritableSignal<ChristianityInfoPanel>;
|
|
55
63
|
protected readonly previewTilt: import("@angular/core").WritableSignal<ChristianityPreviewTilt>;
|
|
64
|
+
protected readonly selectedPreviewAbilityIndex: import("@angular/core").WritableSignal<number>;
|
|
56
65
|
protected readonly hoveredHandIndex: import("@angular/core").WritableSignal<number>;
|
|
57
66
|
protected readonly draggingCardId: import("@angular/core").WritableSignal<string>;
|
|
58
67
|
protected readonly draggingAttackerInstanceId: import("@angular/core").WritableSignal<string>;
|
|
@@ -86,8 +95,17 @@ export declare class ChristianityGameComponent {
|
|
|
86
95
|
label: string;
|
|
87
96
|
}[]>;
|
|
88
97
|
protected readonly hasModalOverlay: import("@angular/core").Signal<boolean>;
|
|
89
|
-
protected readonly
|
|
90
|
-
|
|
98
|
+
protected readonly previewCarouselItems: import("@angular/core").Signal<({
|
|
99
|
+
kind: 'history';
|
|
100
|
+
cardId: string;
|
|
101
|
+
} | {
|
|
102
|
+
kind: 'offering';
|
|
103
|
+
offering: ChristianityOfferingInstance;
|
|
104
|
+
})[]>;
|
|
105
|
+
protected readonly canNavigatePreview: import("@angular/core").Signal<boolean>;
|
|
106
|
+
protected readonly previewPositionLabel: import("@angular/core").Signal<string>;
|
|
107
|
+
protected readonly previewAbilities: import("@angular/core").Signal<ChristianityPreviewAbility[]>;
|
|
108
|
+
protected readonly selectedPreviewAbility: import("@angular/core").Signal<ChristianityPreviewAbility>;
|
|
91
109
|
protected readonly splashStatusText: import("@angular/core").Signal<string>;
|
|
92
110
|
protected readonly startFeaturedCards: import("@angular/core").Signal<ChristianityCardDefinition[]>;
|
|
93
111
|
protected readonly futureModes: import("@angular/core").Signal<{
|
|
@@ -139,6 +157,7 @@ export declare class ChristianityGameComponent {
|
|
|
139
157
|
protected attackTargetDropIds(): string[];
|
|
140
158
|
protected opponentTargetDropId(card: ChristianityCharacterInstance): string;
|
|
141
159
|
protected topHistoryCard(): ChristianityCardDefinition | null;
|
|
160
|
+
protected topOffering(seat: ChristianitySeat): ChristianityOfferingInstance | null;
|
|
142
161
|
protected activePlaceCard(): ChristianityCardDefinition | null;
|
|
143
162
|
protected isOpponentLeaderTarget(): boolean;
|
|
144
163
|
protected isOpponentCharacterTarget(card: ChristianityCharacterInstance): boolean;
|
|
@@ -194,7 +213,9 @@ export declare class ChristianityGameComponent {
|
|
|
194
213
|
protected closeOfferings(): void;
|
|
195
214
|
protected openGallery(): void;
|
|
196
215
|
protected closeGallery(): void;
|
|
197
|
-
protected
|
|
216
|
+
protected navigatePreview(direction: -1 | 1): void;
|
|
217
|
+
private currentPreviewCarouselItems;
|
|
218
|
+
private currentPreviewCarouselIndex;
|
|
198
219
|
protected setGallerySearch(event: Event): void;
|
|
199
220
|
protected setGalleryType(event: Event): void;
|
|
200
221
|
protected tiltPreview(event: PointerEvent): void;
|
|
@@ -212,6 +233,10 @@ export declare class ChristianityGameComponent {
|
|
|
212
233
|
protected offeringAbilityText(offering: ChristianityOfferingInstance): string;
|
|
213
234
|
protected canUseOfferingAbility(offering: ChristianityOfferingInstance, seat: ChristianitySeat): boolean;
|
|
214
235
|
protected useOfferingAbility(offering: ChristianityOfferingInstance, seat: ChristianitySeat): void;
|
|
236
|
+
protected selectPreviewAbility(index: number): void;
|
|
237
|
+
protected useSelectedPreviewAbility(): void;
|
|
238
|
+
private selectedPreviewOffering;
|
|
239
|
+
private canUsePreviewAbility;
|
|
215
240
|
protected inspectDeck(): void;
|
|
216
241
|
protected inspectPlaceZone(): void;
|
|
217
242
|
protected inspectHowToPlay(): void;
|
|
@@ -24,6 +24,13 @@ export interface ChristianityAttackResult {
|
|
|
24
24
|
targetDamage: number;
|
|
25
25
|
log: string[];
|
|
26
26
|
}
|
|
27
|
+
export interface ChristianityOfferingAbilityResult {
|
|
28
|
+
game: ChristianityGameState;
|
|
29
|
+
resolved: boolean;
|
|
30
|
+
leaderDamage: number;
|
|
31
|
+
spentOfferings: number;
|
|
32
|
+
log: string[];
|
|
33
|
+
}
|
|
27
34
|
export declare function readyOfferings(player: ChristianityPlayerState): number;
|
|
28
35
|
export declare function totalOfferings(player: ChristianityPlayerState): number;
|
|
29
36
|
export declare function canPlayCard(game: ChristianityGameState, seat: ChristianitySeat, card: ChristianityCardDefinition): boolean;
|
|
@@ -31,6 +38,8 @@ export declare function playCardFromHand(game: ChristianityGameState, seat: Chri
|
|
|
31
38
|
slotIndex?: number;
|
|
32
39
|
displayName?: string;
|
|
33
40
|
}): ChristianityPlayCardResult;
|
|
41
|
+
export declare function canUseOfferingAbility(game: ChristianityGameState, seat: ChristianitySeat, offeringInstanceId: string): boolean;
|
|
42
|
+
export declare function resolveOfferingAbility(game: ChristianityGameState, seat: ChristianitySeat, offeringInstanceId: string): ChristianityOfferingAbilityResult;
|
|
34
43
|
export declare function resolveAttackLeader(game: ChristianityGameState, attackerSeat: ChristianitySeat, attackerInstanceId: string, messages: ChristianityRuleMessages): ChristianityAttackResult;
|
|
35
44
|
export declare function resolveAttackCharacter(game: ChristianityGameState, attackerSeat: ChristianitySeat, attackerInstanceId: string, targetInstanceId: string, messages: ChristianityRuleMessages): ChristianityAttackResult;
|
|
36
45
|
export declare function advanceTurn(game: ChristianityGameState, messages: ChristianityRuleMessages): string[];
|
|
@@ -92,10 +92,15 @@ export interface ChessimalsChallengeRoundResult {
|
|
|
92
92
|
export interface ChessimalsChallengeRun {
|
|
93
93
|
id: string;
|
|
94
94
|
userId?: string;
|
|
95
|
+
schemaVersion?: 2;
|
|
95
96
|
status: ChessimalsChallengeStatus;
|
|
96
97
|
livesStart: 3;
|
|
97
98
|
livesRemaining: number;
|
|
99
|
+
roundIndex?: number;
|
|
98
100
|
currentRound: number;
|
|
101
|
+
roundsWon?: number;
|
|
102
|
+
highestRoundReached?: number;
|
|
103
|
+
activeRoundId?: string;
|
|
99
104
|
wins: number;
|
|
100
105
|
losses: number;
|
|
101
106
|
bestStreakInRun: number;
|
|
@@ -103,6 +108,7 @@ export interface ChessimalsChallengeRun {
|
|
|
103
108
|
botLadder: string[];
|
|
104
109
|
roundResults: ChessimalsChallengeRoundResult[];
|
|
105
110
|
startedAt: string;
|
|
111
|
+
lastEventAt?: string;
|
|
106
112
|
updatedAt: string;
|
|
107
113
|
finishedAt?: string;
|
|
108
114
|
}
|
|
@@ -348,6 +354,7 @@ export interface ChristianityOfferingInstance {
|
|
|
348
354
|
abilityName?: string;
|
|
349
355
|
abilityText?: string;
|
|
350
356
|
abilityCost?: number;
|
|
357
|
+
abilityUsedThisTurn?: boolean;
|
|
351
358
|
}
|
|
352
359
|
export interface ChristianityPlayerState {
|
|
353
360
|
seat: ChristianitySeat;
|
package/lib/version.d.ts
CHANGED