valtech-components 4.0.611 → 4.0.612
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/christianity-bot.mjs +69 -0
- package/esm2022/lib/components/organisms/mini-games/christianity-catalog.mjs +247 -0
- package/esm2022/lib/components/organisms/mini-games/christianity-game.component.mjs +26 -397
- package/esm2022/lib/components/organisms/mini-games/christianity-tutorial.mjs +132 -0
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +260 -188
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +1 -1
- package/lib/components/organisms/mini-games/christianity-bot.d.ts +15 -0
- package/lib/components/organisms/mini-games/christianity-catalog.d.ts +18 -0
- package/lib/components/organisms/mini-games/christianity-game.component.d.ts +1 -9
- package/lib/components/organisms/mini-games/christianity-tutorial.d.ts +38 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -133,7 +133,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
133
133
|
readonly botProfiles: ChessimalsBotProfile[];
|
|
134
134
|
readonly challengeLadder: ChessimalsChallengeBot[];
|
|
135
135
|
readonly animals: ChessimalsAnimalView[];
|
|
136
|
-
readonly valtechComponentsVersion = "4.0.
|
|
136
|
+
readonly valtechComponentsVersion = "4.0.612";
|
|
137
137
|
readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "path" | "game">;
|
|
138
138
|
readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
|
|
139
139
|
readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChristianityCardDefinition, ChristianityGameState } from './types';
|
|
2
|
+
export interface ChristianityBotMessages {
|
|
3
|
+
botNoAttackers: string;
|
|
4
|
+
combatsAgainst: string;
|
|
5
|
+
attacksYourLeader: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChristianityImpactEvent {
|
|
8
|
+
id: string;
|
|
9
|
+
text: string;
|
|
10
|
+
tone: 'damage' | 'heal' | 'resource';
|
|
11
|
+
seat: 'P1' | 'P2';
|
|
12
|
+
target: 'leader' | 'battle' | 'offerings';
|
|
13
|
+
}
|
|
14
|
+
export declare function resolveBotPlays(game: ChristianityGameState, log: string[], nameResolver?: (card: ChristianityCardDefinition) => string, cardById?: (id: string) => ChristianityCardDefinition): void;
|
|
15
|
+
export declare function resolveBotAttack(game: ChristianityGameState, log: string[], impacts: Array<Omit<ChristianityImpactEvent, 'id'>>, messages: ChristianityBotMessages): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChristianityCardDefinition, ChristianityCardBibleReference, ChristianityGameState } from './types';
|
|
2
|
+
export interface ChristianityEditionCatalog {
|
|
3
|
+
edition?: {
|
|
4
|
+
id?: string;
|
|
5
|
+
number?: number;
|
|
6
|
+
slug?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
};
|
|
10
|
+
cards?: ChristianityCardDefinition[];
|
|
11
|
+
}
|
|
12
|
+
export declare const GENESIS_CATALOG_URL = "assets/games/christianity/data/01-genesis.cards.json";
|
|
13
|
+
export declare const GENESIS_ICON_URL = "assets/games/christianity/icons/1-icon.png";
|
|
14
|
+
export declare const SPLASH_MIN_DURATION_MS = 720;
|
|
15
|
+
export declare const STARTER_CARDS: Record<string, ChristianityCardDefinition>;
|
|
16
|
+
export declare const STARTING_GAME: ChristianityGameState;
|
|
17
|
+
export declare function formatScripture(bible?: ChristianityCardBibleReference): string | undefined;
|
|
18
|
+
export declare function normalizeCatalogCard(card: ChristianityCardDefinition, catalog: ChristianityEditionCatalog): ChristianityCardDefinition;
|
|
@@ -3,6 +3,7 @@ import { ChristianityCardRenderModel } from './christianity-card.component';
|
|
|
3
3
|
import { MiniGameCalloutMetadata } from './mini-game-callout.component';
|
|
4
4
|
import { MiniGameScorePopMetadata } from './mini-game-score-pop.component';
|
|
5
5
|
import { ChristianityCardDefinition, ChristianityCardType, ChristianityCharacterInstance, ChristianityGameState, ChristianityOfferingInstance, ChristianityPlayerState, ChristianitySeat } from './types';
|
|
6
|
+
import { ChristianityTutorialSetup } from './christianity-tutorial';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
interface ChristianityCardPreview {
|
|
8
9
|
title: string;
|
|
@@ -64,14 +65,6 @@ type ChristianityGalleryTypeFilter = 'all' | ChristianityCardType;
|
|
|
64
65
|
type ChristianityScreen = 'splash' | 'home' | 'table';
|
|
65
66
|
type ChristianityCatalogLoadState = 'loading' | 'ready' | 'fallback';
|
|
66
67
|
type ChristianityTutorialPhase = 'coin' | 'leader_pick' | 'in_progress' | 'finished';
|
|
67
|
-
interface ChristianityTutorialSetup {
|
|
68
|
-
coinWinner: ChristianitySeat;
|
|
69
|
-
leaderPicker: ChristianitySeat;
|
|
70
|
-
firstPlayer: ChristianitySeat;
|
|
71
|
-
availableLeaders: string[];
|
|
72
|
-
playerLeaderId?: string;
|
|
73
|
-
opponentLeaderId?: string;
|
|
74
|
-
}
|
|
75
68
|
export declare class ChristianityGameComponent {
|
|
76
69
|
private i18n;
|
|
77
70
|
private readonly document;
|
|
@@ -200,7 +193,6 @@ export declare class ChristianityGameComponent {
|
|
|
200
193
|
private tutorialLeaderCards;
|
|
201
194
|
private shuffleCards;
|
|
202
195
|
private prepareTutorialOpeningDeck;
|
|
203
|
-
private ensureOpeningOffering;
|
|
204
196
|
private cardSortKey;
|
|
205
197
|
private isClassicGalleryCard;
|
|
206
198
|
protected cardDefinition(cardId: string): ChristianityCardDefinition;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ChristianityCardDefinition, ChristianityCharacterInstance, ChristianityGameState, ChristianityPlayerState, ChristianitySeat } from './types';
|
|
2
|
+
export interface ChristianityTutorialSetup {
|
|
3
|
+
coinWinner: ChristianitySeat;
|
|
4
|
+
leaderPicker: ChristianitySeat;
|
|
5
|
+
firstPlayer: ChristianitySeat;
|
|
6
|
+
availableLeaders: string[];
|
|
7
|
+
playerLeaderId?: string;
|
|
8
|
+
opponentLeaderId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TutorialGameMessages {
|
|
11
|
+
turnOf: string;
|
|
12
|
+
tutorialLoaded: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TutorialGameOptions {
|
|
15
|
+
playerLeaderId?: string;
|
|
16
|
+
opponentLeaderId?: string;
|
|
17
|
+
firstPlayer?: ChristianitySeat;
|
|
18
|
+
seed?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const TUTORIAL_CHARACTER_LIMIT = 12;
|
|
21
|
+
export declare const TUTORIAL_OFFERING_LIMIT = 6;
|
|
22
|
+
export declare const TUTORIAL_OPENING_HAND_SIZE = 5;
|
|
23
|
+
export declare const TUTORIAL_LEADER_CHOICE_COUNT = 2;
|
|
24
|
+
export declare const TUTORIAL_LEADER_CHOICE_SECONDS = 15;
|
|
25
|
+
export declare const TUTORIAL_SEED = 20260728;
|
|
26
|
+
export declare function isClassicGalleryCard(card: ChristianityCardDefinition): boolean;
|
|
27
|
+
export declare function cardSortKey(card: ChristianityCardDefinition, nameResolver?: (card: ChristianityCardDefinition) => string): string;
|
|
28
|
+
export declare function tutorialLeaderCards(cards: ChristianityCardDefinition[], nameResolver?: (card: ChristianityCardDefinition) => string): ChristianityCardDefinition[];
|
|
29
|
+
export declare function findCardByName(cards: ChristianityCardDefinition[], namePart: string, nameResolver?: (card: ChristianityCardDefinition) => string): ChristianityCardDefinition | undefined;
|
|
30
|
+
export declare function shuffleCards(cards: ChristianityCardDefinition[], seed: number): ChristianityCardDefinition[];
|
|
31
|
+
export declare function prepareTutorialOpeningDeck(cards: ChristianityCardDefinition[]): ChristianityCardDefinition[];
|
|
32
|
+
export declare function createTutorialPlayer(seat: ChristianitySeat, leader: ChristianityCardDefinition | undefined, hand: string[] | undefined, battleZone: ChristianityCharacterInstance[], nameResolver?: (card: ChristianityCardDefinition) => string): ChristianityPlayerState;
|
|
33
|
+
export declare function createTutorialGame(cards: ChristianityCardDefinition[], options?: TutorialGameOptions, context?: {
|
|
34
|
+
messages?: TutorialGameMessages;
|
|
35
|
+
nameResolver?: (card: ChristianityCardDefinition) => string;
|
|
36
|
+
cardById?: (id: string) => ChristianityCardDefinition | undefined;
|
|
37
|
+
}): ChristianityGameState;
|
|
38
|
+
export declare function createTutorialSetup(leaders: ChristianityCardDefinition[]): ChristianityTutorialSetup;
|
package/lib/version.d.ts
CHANGED