open-optcg 0.2.0-next.2 → 0.2.1-next.4

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.
Files changed (30) hide show
  1. package/dist/cards.js +1 -1
  2. package/dist/chunks/{chunk-CRP6FDKG.js → chunk-XXGYMN4U.js} +1 -1
  3. package/dist/decks.js +2 -2
  4. package/dist/engine.js +1 -1
  5. package/dist/types/internal/cards/src/generated-op18.d.ts +5852 -0
  6. package/dist/types/internal/cards/src/op18.d.ts +2 -0
  7. package/dist/types/internal/decks/src/index.d.ts +1 -0
  8. package/dist/types/internal/decks/src/sealed-values-op18.d.ts +1 -0
  9. package/dist/types/internal/decks/src/sealed-values.d.ts +5 -0
  10. package/dist/types/internal/engine-core/src/mechanic-dsl.d.ts +3 -0
  11. package/dist/types/internal/engine-core/src/mechanics/op18-black-reactions.d.ts +2 -0
  12. package/dist/types/internal/engine-core/src/mechanics/op18-black-static.d.ts +2 -0
  13. package/dist/types/internal/engine-core/src/mechanics/op18-black.d.ts +2 -0
  14. package/dist/types/internal/engine-core/src/mechanics/op18-blue-reactions.d.ts +2 -0
  15. package/dist/types/internal/engine-core/src/mechanics/op18-blue-static.d.ts +2 -0
  16. package/dist/types/internal/engine-core/src/mechanics/op18-blue.d.ts +2 -0
  17. package/dist/types/internal/engine-core/src/mechanics/op18-green-static.d.ts +2 -0
  18. package/dist/types/internal/engine-core/src/mechanics/op18-green.d.ts +2 -0
  19. package/dist/types/internal/engine-core/src/mechanics/op18-purple-reactions.d.ts +2 -0
  20. package/dist/types/internal/engine-core/src/mechanics/op18-purple-static.d.ts +2 -0
  21. package/dist/types/internal/engine-core/src/mechanics/op18-purple.d.ts +2 -0
  22. package/dist/types/internal/engine-core/src/mechanics/op18-red-reactions.d.ts +2 -0
  23. package/dist/types/internal/engine-core/src/mechanics/op18-red-static.d.ts +2 -0
  24. package/dist/types/internal/engine-core/src/mechanics/op18-red.d.ts +4 -0
  25. package/dist/types/internal/engine-core/src/mechanics/op18-yellow.d.ts +2 -0
  26. package/dist/types/internal/engine-core/src/mechanics/types.d.ts +1 -0
  27. package/dist/types/internal/engine-core/src/mechanics.d.ts +1 -0
  28. package/dist/types/internal/engine-core/src/reaction-rules.d.ts +3 -2
  29. package/dist/types/internal/engine-core/src/static-abilities.d.ts +4 -0
  30. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import type { CardRecord } from "./index.js";
2
+ export declare const op18Cards: readonly CardRecord[];
@@ -5,6 +5,7 @@ export { copyLimit, isEventRestricted, validateDeck, type DeckValidation, type E
5
5
  export { exportDeckList, parseDeckList } from "./decklist.js";
6
6
  export { deckCardRows, formatDeckCardRows, communityDeckCardRows, validateDeckCardRows, COMMUNITY_DECK_IDS, SECONDARY_SOURCE_ONLY, deckFormatReport, type DeckFormatReport, type DeckCardRow, type FormatDeckRowId, type CommunityDeckId, } from "./deck-provenance.js";
7
7
  export { autoBuildSealedDeck, autoBuildSealedDeckGrape, classifyGrape, GRAPE_FILL_ORDER, openPacks, playablePoolCards, poolCounts, rankSealedPoolCandidates, rankSealedPoolCandidatesGrape, requireSealedExpansion, sealedCardsByRarity, sealedDeckManifest, sealedExpansion, sealedPoolCoverage, sealedPoolIsBuildable, sealedSetPrefix, sealedSideboard, validateSealedDeck, BOOSTER_PACK, DEFAULT_SEALED_EXPANSION, SEALED_DECK_SIZE, SEALED_EXPANSIONS, SEALED_LEADER, SEALED_PACK_COUNT, type GrapeBucket, type GrapeBuildOptions, type GrapePMembership, type PackSlot, type RankedSealedCandidate, type SealedDeck, type SealedExpansion, type SealedPool, type SealedPoolCoverage, type SealedValidation, } from "./sealed.js";
8
+ export { autoBuildSealedDeckBest, hasSealedCardValues, rankSealedPoolCandidatesValue, SEALED_CARD_VALUES, } from "./sealed-values.js";
8
9
  export declare const FORMAT_DECK_IDS: readonly ["(Red) Monkey.D.Luffy - Starter Deck 31", "(Green) Roronoa Zoro - Starter Deck 32", "(Blue) Kuzan - Starter Deck 33", "(Purple) Charlotte Katakuri - Starter Deck 34", "(Red/Black) Sabo - Starter Deck 35", "(Yellow) Eustass Kid - Starter Deck 36"];
9
10
  export type FormatDeckId = (typeof FORMAT_DECK_IDS)[number];
10
11
  export declare const HAND_BUILT_DECK_IDS: readonly ["(Green/Blue) Monkey.D.Luffy - Official Feature Deck"];
@@ -0,0 +1 @@
1
+ export declare const OP18_CARD_VALUES: Readonly<Record<string, number>>;
@@ -0,0 +1,5 @@
1
+ import { type RankedSealedCandidate, type SealedDeck, type SealedPool } from "./sealed.js";
2
+ export declare const SEALED_CARD_VALUES: Readonly<Record<string, Readonly<Record<string, number>>>>;
3
+ export declare function hasSealedCardValues(expansion: string): boolean;
4
+ export declare function rankSealedPoolCandidatesValue(pool: SealedPool): RankedSealedCandidate[];
5
+ export declare function autoBuildSealedDeckBest(pool: SealedPool): SealedDeck;
@@ -546,6 +546,9 @@ export type MechanicEffect = {
546
546
  kind: "activate-event";
547
547
  binding: string;
548
548
  mainOnly?: true;
549
+ } | {
550
+ kind: "activate-trigger";
551
+ binding: string;
549
552
  };
550
553
  export interface MechanicProgram {
551
554
  effect: MechanicEffect;
@@ -0,0 +1,2 @@
1
+ import type { ReactionRule } from "../reaction-rules.js";
2
+ export declare const op18BlackReactionRules: readonly ReactionRule[];
@@ -0,0 +1,2 @@
1
+ import { type StaticAbility } from "../static-abilities.js";
2
+ export declare const op18BlackStaticAbilities: readonly StaticAbility[];
@@ -0,0 +1,2 @@
1
+ import { type SetMechanics } from "./registry.js";
2
+ export declare const op18BlackMechanics: SetMechanics;
@@ -0,0 +1,2 @@
1
+ import type { ReactionRule } from "../reaction-rules.js";
2
+ export declare const op18BlueReactionRules: readonly ReactionRule[];
@@ -0,0 +1,2 @@
1
+ import { type StaticAbility } from "../static-abilities.js";
2
+ export declare const op18BlueStaticAbilities: readonly StaticAbility[];
@@ -0,0 +1,2 @@
1
+ import { type SetMechanics } from "./registry.js";
2
+ export declare const op18BlueMechanics: SetMechanics;
@@ -0,0 +1,2 @@
1
+ import { type StaticAbility } from "../static-abilities.js";
2
+ export declare const op18GreenStaticAbilities: readonly StaticAbility[];
@@ -0,0 +1,2 @@
1
+ import { type SetMechanics } from "./registry.js";
2
+ export declare const op18GreenMechanics: SetMechanics;
@@ -0,0 +1,2 @@
1
+ import type { ReactionRule } from "../reaction-rules.js";
2
+ export declare const op18PurpleReactionRules: readonly ReactionRule[];
@@ -0,0 +1,2 @@
1
+ import type { StaticAbility } from "../static-abilities.js";
2
+ export declare const op18PurpleStaticAbilities: readonly StaticAbility[];
@@ -0,0 +1,2 @@
1
+ import { type SetMechanics } from "./registry.js";
2
+ export declare const op18PurpleMechanics: SetMechanics;
@@ -0,0 +1,2 @@
1
+ import type { ReactionRule } from "../reaction-rules.js";
2
+ export declare const op18RedReactionRules: readonly ReactionRule[];
@@ -0,0 +1,2 @@
1
+ import { type StaticAbility } from "../static-abilities.js";
2
+ export declare const op18RedStaticAbilities: readonly StaticAbility[];
@@ -0,0 +1,4 @@
1
+ import { type CardSelector } from "../mechanics.js";
2
+ import { type SetMechanics } from "./registry.js";
3
+ export declare const ANIMAL_ALABASTA: Omit<CardSelector, "player" | "zone">;
4
+ export declare const op18RedMechanics: SetMechanics;
@@ -0,0 +1,2 @@
1
+ import { type SetMechanics } from "./registry.js";
2
+ export declare const op18YellowMechanics: SetMechanics;
@@ -157,6 +157,7 @@ export interface ReplacementProgram {
157
157
  } | {
158
158
  kind: "return-don";
159
159
  count: number;
160
+ restsSelf?: boolean;
160
161
  } | {
161
162
  kind: "trash-self";
162
163
  } | {
@@ -17,6 +17,7 @@ export declare function parseOrderOption(optionId: string, count: number): numbe
17
17
  export declare function faceDownOption(index: number): string;
18
18
  export declare function parseFaceDownOption(optionId: string, count: number): number | undefined;
19
19
  export declare function findInstanceCardNumber(state: GameState, instanceId: string): string | undefined;
20
+ export declare function registerTriggerPrograms(registry: ReadonlyMap<string, MechanicProgram>): void;
20
21
  export declare function registerEventMainPrograms(registry: ReadonlyMap<string, {
21
22
  cost: number;
22
23
  donMinus?: number;
@@ -5,10 +5,11 @@ export interface ReactionRule {
5
5
  controller: "leader" | "board" | "stage";
6
6
  signal: {
7
7
  kind: "card-moved";
8
- from: "life" | "board" | "hand";
9
- to?: "trash" | "hand";
8
+ from: "life" | "board" | "hand" | "trash";
9
+ to?: "trash" | "hand" | "board";
10
10
  ko?: true;
11
11
  sourceType?: string;
12
+ sourceLeaderName?: string;
12
13
  movedType?: string;
13
14
  movedTypeIncluding?: string;
14
15
  movedAnyOfTypes?: readonly string[];
@@ -23,6 +23,10 @@ export interface StaticAbility {
23
23
  power?: PowerLayer;
24
24
  cost?: (context: AbilityContext) => number;
25
25
  costZone?: "hand";
26
+ handCounter?: {
27
+ category: string;
28
+ amount: number;
29
+ };
26
30
  keyword?: {
27
31
  keyword: Keyword;
28
32
  when: (context: AbilityContext) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-optcg",
3
- "version": "0.2.0-next.2",
3
+ "version": "0.2.1-next.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {