valtech-components 4.0.498 → 4.0.500

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.
@@ -31,11 +31,6 @@ export declare class ChessimalsChallengeProgressService {
31
31
  private runsPath;
32
32
  private readLocalActiveRun;
33
33
  private writeLocalActiveRun;
34
- private clearLocalActiveRun;
35
- private localActiveRunKey;
36
- private newestActiveRun;
37
- private runProgressScore;
38
- private runTime;
39
34
  private withoutUndefined;
40
35
  static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsChallengeProgressService, never>;
41
36
  static ɵprov: i0.ɵɵInjectableDeclaration<ChessimalsChallengeProgressService>;
@@ -117,7 +117,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
117
117
  readonly botProfiles: ChessimalsBotProfile[];
118
118
  readonly challengeLadder: ChessimalsChallengeBot[];
119
119
  readonly animals: ChessimalsAnimalView[];
120
- readonly valtechComponentsVersion = "4.0.498";
120
+ readonly valtechComponentsVersion = "4.0.500";
121
121
  readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "game">;
122
122
  readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
123
123
  readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
@@ -182,7 +182,6 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
182
182
  readonly selectedBotProfile: import("@angular/core").Signal<ChessimalsBotProfile>;
183
183
  readonly gameBotProfile: import("@angular/core").Signal<ChessimalsBotProfile>;
184
184
  readonly activeChallengeBot: import("@angular/core").Signal<ChessimalsChallengeBot>;
185
- readonly resumableChallengeRun: import("@angular/core").Signal<ChessimalsChallengeRun>;
186
185
  set onlineGameId(value: string | null | undefined);
187
186
  miniGamesRoute: string;
188
187
  projectionMode: boolean;
@@ -260,16 +259,12 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
260
259
  private shortUserId;
261
260
  private rangeValueToNumber;
262
261
  startChallenge(): void;
263
- requestNewChallenge(): void;
264
262
  openChallengeView(): void;
265
263
  backToHome(): void;
266
264
  private createNewChallengeRun;
267
- private resetChallengeSessionState;
268
265
  resumeChallenge(run?: ChessimalsChallengeRun): void;
269
266
  continueChallenge(): void;
270
267
  private startChallengeRound;
271
- private enterChallengeRound;
272
- private isResumableChallengeRun;
273
268
  startGame(): void;
274
269
  private handleChallengeRoundFinished;
275
270
  private abandonChallengeIfNeeded;
@@ -281,7 +276,6 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
281
276
  restartGame(): void;
282
277
  exitTutorial(): void;
283
278
  resetToModeSetup(): void;
284
- private returnChallengeToMenu;
285
279
  resetToGamesMenu(): void;
286
280
  private resetFinishedLocalGameForNextVisit;
287
281
  requestRestartGame(): void;
@@ -317,9 +311,6 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
317
311
  private isPromotionMove;
318
312
  private animateMove;
319
313
  private applyAnimatedMove;
320
- private activeGameForRun;
321
- private persistActiveChallengeGame;
322
- private cloneChallengeGame;
323
314
  private playPowerUnlockSound;
324
315
  private queueBotTurnIfNeeded;
325
316
  private playBotTurn;
@@ -415,9 +406,6 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
415
406
  challengeOpeningBot(): ChessimalsChallengeBot;
416
407
  challengeMenuBot(): ChessimalsChallengeBot;
417
408
  challengeMenuRoundLabel(): string;
418
- challengeMenuLivesLabel(): string;
419
- challengeMenuClearedRound(): number;
420
- private challengeMenuRun;
421
409
  challengeBotName(bot: ChessimalsChallengeBot): string;
422
410
  challengeBotDifficultyLabel(bot: ChessimalsChallengeBot): string;
423
411
  challengeBotStyleLine(bot: ChessimalsChallengeBot): string;
@@ -443,7 +431,6 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
443
431
  challengeRivalVoiceLabel(): string;
444
432
  challengeRivalVoiceTitle(): string;
445
433
  challengeRivalVoiceBody(): string;
446
- private challengeVoiceText;
447
434
  challengeNextRivalLabel(): string;
448
435
  challengeContinueLabel(): string;
449
436
  challengeNextRivalHint(): string;
@@ -55,6 +55,7 @@ export declare class ChristianityGameComponent {
55
55
  protected readonly previewTilt: import("@angular/core").WritableSignal<ChristianityPreviewTilt>;
56
56
  protected readonly hoveredHandIndex: import("@angular/core").WritableSignal<number>;
57
57
  protected readonly draggingCardId: import("@angular/core").WritableSignal<string>;
58
+ protected readonly draggingAttackerInstanceId: import("@angular/core").WritableSignal<string>;
58
59
  protected readonly showHistory: import("@angular/core").WritableSignal<boolean>;
59
60
  protected readonly showGallery: import("@angular/core").WritableSignal<boolean>;
60
61
  protected readonly offeringsSeat: import("@angular/core").WritableSignal<ChristianitySeat>;
@@ -66,6 +67,8 @@ export declare class ChristianityGameComponent {
66
67
  protected readonly galleryType: import("@angular/core").WritableSignal<ChristianityGalleryTypeFilter>;
67
68
  protected readonly canDropOnBattleSlot: (drag: CdkDrag<string>) => boolean;
68
69
  protected readonly canDropOnOfferings: (drag: CdkDrag<string>) => boolean;
70
+ protected readonly canDropOnOpponentCharacter: (drag: CdkDrag<string>) => boolean;
71
+ protected readonly canDropOnOpponentLeader: (drag: CdkDrag<string>) => boolean;
69
72
  protected readonly player: import("@angular/core").Signal<ChristianityPlayerState>;
70
73
  protected readonly opponent: import("@angular/core").Signal<ChristianityPlayerState>;
71
74
  protected readonly currentPlayer: import("@angular/core").Signal<ChristianityPlayerState>;
@@ -129,6 +132,13 @@ export declare class ChristianityGameComponent {
129
132
  }>;
130
133
  protected battleSlotDropId(index: number): string;
131
134
  protected dropTargetIds(): string[];
135
+ protected ownAttackerDropSourceIds(): string[];
136
+ protected attackTargetDropIds(): string[];
137
+ protected opponentTargetDropId(card: ChristianityCharacterInstance): string;
138
+ protected topHistoryCard(): ChristianityCardDefinition | null;
139
+ protected activePlaceCard(): ChristianityCardDefinition | null;
140
+ protected isOpponentLeaderTarget(): boolean;
141
+ protected isOpponentCharacterTarget(card: ChristianityCharacterInstance): boolean;
132
142
  protected hiddenHandCards(count: number): unknown[];
133
143
  protected fanTransform(index: number, total: number, opponent: boolean): string;
134
144
  protected handCardZIndex(index: number): number;
@@ -149,8 +159,14 @@ export declare class ChristianityGameComponent {
149
159
  protected isDraggingOffering(): boolean;
150
160
  protected startDraggingCard(cardId: string): void;
151
161
  protected endDraggingCard(): void;
162
+ protected canDragAttacker(card: ChristianityCharacterInstance): boolean;
163
+ protected startDraggingAttacker(card: ChristianityCharacterInstance): void;
164
+ protected endDraggingAttacker(): void;
152
165
  protected dropOnBattleSlot(event: CdkDragDrop<number, unknown, string>, slotIndex: number): void;
153
166
  protected dropOnOfferings(event: CdkDragDrop<unknown, unknown, string>): void;
167
+ protected dropOnOpponentCharacter(event: CdkDragDrop<unknown, unknown, string>, target: ChristianityCharacterInstance): void;
168
+ protected dropOnOpponentLeader(event: CdkDragDrop<unknown, unknown, string>): void;
169
+ private isValidAttackerInstance;
154
170
  protected selectHandCard(cardId: string): void;
155
171
  protected playSelectedCard(slotIndex?: number): void;
156
172
  protected playCardFromHand(cardId: string, slotIndex?: number): void;
@@ -182,22 +198,20 @@ export declare class ChristianityGameComponent {
182
198
  private scheduleBotTurnIfNeeded;
183
199
  private runTutorialBotTurn;
184
200
  private resolveBotAttack;
185
- private advanceTurn;
186
- private evaluateVictory;
187
- private cleanupDestroyed;
201
+ private ruleMessages;
188
202
  protected inspectLeader(seat: ChristianitySeat): void;
189
203
  protected inspectOffering(offering: ChristianityOfferingInstance): void;
190
204
  protected offeringAbilityText(offering: ChristianityOfferingInstance): string;
191
205
  protected canUseOfferingAbility(offering: ChristianityOfferingInstance, seat: ChristianitySeat): boolean;
192
206
  protected useOfferingAbility(offering: ChristianityOfferingInstance, seat: ChristianitySeat): void;
193
207
  protected inspectDeck(): void;
208
+ protected inspectPlaceZone(): void;
194
209
  protected inspectHowToPlay(): void;
195
210
  protected inspectHandCard(cardId: string, fromHand?: boolean): void;
196
211
  protected inspectGalleryCard(cardId: string): void;
197
212
  protected inspectHistoryCard(cardId: string): void;
198
213
  private inspectCharacter;
199
214
  private cardPreviewMeta;
200
- private spendOfferings;
201
215
  static ɵfac: i0.ɵɵFactoryDeclaration<ChristianityGameComponent, never>;
202
216
  static ɵcmp: i0.ɵɵComponentDeclaration<ChristianityGameComponent, "val-christianity-game", never, {}, {}, never, never, true, never>;
203
217
  }
@@ -0,0 +1,40 @@
1
+ import { ChristianityCardDefinition, ChristianityGameState, ChristianityPlayerState, ChristianitySeat } from './types';
2
+ export declare const CHRISTIANITY_BATTLE_SLOTS = 4;
3
+ export interface ChristianityRuleMessages {
4
+ attacksOpponentLeader: string;
5
+ attacksYourLeader: string;
6
+ combatsAgainst: string;
7
+ drawsCard: string;
8
+ deckIsEmpty: string;
9
+ turnOf: string;
10
+ youWin: string;
11
+ opponentWins: string;
12
+ }
13
+ export interface ChristianityPlayCardResult {
14
+ game: ChristianityGameState;
15
+ played: boolean;
16
+ playedOfferingValue: number;
17
+ spentOfferings: number;
18
+ log: string[];
19
+ }
20
+ export interface ChristianityAttackResult {
21
+ game: ChristianityGameState;
22
+ attacked: boolean;
23
+ attackerDamage: number;
24
+ targetDamage: number;
25
+ log: string[];
26
+ }
27
+ export declare function readyOfferings(player: ChristianityPlayerState): number;
28
+ export declare function totalOfferings(player: ChristianityPlayerState): number;
29
+ export declare function canPlayCard(game: ChristianityGameState, seat: ChristianitySeat, card: ChristianityCardDefinition): boolean;
30
+ export declare function playCardFromHand(game: ChristianityGameState, seat: ChristianitySeat, card: ChristianityCardDefinition, options?: {
31
+ slotIndex?: number;
32
+ displayName?: string;
33
+ }): ChristianityPlayCardResult;
34
+ export declare function resolveAttackLeader(game: ChristianityGameState, attackerSeat: ChristianitySeat, attackerInstanceId: string, messages: ChristianityRuleMessages): ChristianityAttackResult;
35
+ export declare function resolveAttackCharacter(game: ChristianityGameState, attackerSeat: ChristianitySeat, attackerInstanceId: string, targetInstanceId: string, messages: ChristianityRuleMessages): ChristianityAttackResult;
36
+ export declare function advanceTurn(game: ChristianityGameState, messages: ChristianityRuleMessages): string[];
37
+ export declare function evaluateVictory(game: ChristianityGameState, log: string[], messages: ChristianityRuleMessages): void;
38
+ export declare function cleanupDestroyed(player: ChristianityPlayerState, game: ChristianityGameState): void;
39
+ export declare function spendOfferings(player: ChristianityPlayerState, cost: number): void;
40
+ export declare function opponentSeat(seat: ChristianitySeat): ChristianitySeat;
@@ -102,7 +102,6 @@ export interface ChessimalsChallengeRun {
102
102
  currentStreak: number;
103
103
  botLadder: string[];
104
104
  roundResults: ChessimalsChallengeRoundResult[];
105
- activeGame?: ChessimalsGameState;
106
105
  startedAt: string;
107
106
  updatedAt: string;
108
107
  finishedAt?: string;
@@ -374,6 +373,7 @@ export interface ChristianityGameState {
374
373
  turnCount: number;
375
374
  matchScore: Record<ChristianitySeat, number>;
376
375
  sharedDeck: string[];
376
+ placeZone: string[];
377
377
  historyZone: string[];
378
378
  players: Record<ChristianitySeat, ChristianityPlayerState>;
379
379
  log: string[];
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.498";
5
+ export declare const VERSION = "4.0.500";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.498",
3
+ "version": "4.0.500",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
package/public-api.d.ts CHANGED
@@ -341,6 +341,7 @@ export * from './lib/components/organisms/member-import-modal/member-import-moda
341
341
  export * from './lib/components/organisms/mini-games/chessimals-engine';
342
342
  export * from './lib/components/organisms/mini-games/chessimals-game.component';
343
343
  export * from './lib/components/organisms/mini-games/chessimals-online.service';
344
+ export * from './lib/components/organisms/mini-games/christianity-rules';
344
345
  export * from './lib/components/organisms/mini-games/christianity-game.component';
345
346
  export * from './lib/components/organisms/mini-games/bubble-blitz-game.component';
346
347
  export * from './lib/components/organisms/mini-games/memory-game.component';