valtech-components 4.0.497 → 4.0.499

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,6 +31,7 @@ export declare class ChessimalsChallengeProgressService {
31
31
  private runsPath;
32
32
  private readLocalActiveRun;
33
33
  private writeLocalActiveRun;
34
+ private clearLocalActiveRun;
34
35
  private localActiveRunKey;
35
36
  private newestActiveRun;
36
37
  private runProgressScore;
@@ -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.497";
120
+ readonly valtechComponentsVersion = "4.0.499";
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>;
@@ -260,9 +260,11 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
260
260
  private shortUserId;
261
261
  private rangeValueToNumber;
262
262
  startChallenge(): void;
263
+ requestNewChallenge(): void;
263
264
  openChallengeView(): void;
264
265
  backToHome(): void;
265
266
  private createNewChallengeRun;
267
+ private resetChallengeSessionState;
266
268
  resumeChallenge(run?: ChessimalsChallengeRun): void;
267
269
  continueChallenge(): void;
268
270
  private startChallengeRound;
@@ -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;
@@ -374,6 +374,7 @@ export interface ChristianityGameState {
374
374
  turnCount: number;
375
375
  matchScore: Record<ChristianitySeat, number>;
376
376
  sharedDeck: string[];
377
+ placeZone: string[];
377
378
  historyZone: string[];
378
379
  players: Record<ChristianitySeat, ChristianityPlayerState>;
379
380
  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.497";
5
+ export declare const VERSION = "4.0.499";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.497",
3
+ "version": "4.0.499",
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';