@champions-digital-game/mod-sdk 0.50.0 → 0.51.0
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/README.md +3 -3
- package/dist/build.js +1 -1
- package/dist/chunks/chunk-6F73M3HY.js +1 -0
- package/dist/chunks/{chunk-JYDEFRIZ.js → chunk-EKR67REN.js} +10 -10
- package/dist/chunks/{chunk-URLIN52M.js → chunk-GK7LCLI7.js} +1 -1
- package/dist/chunks/chunk-JR3ALXBR.js +22 -0
- package/dist/chunks/{chunk-A3WBGQ2N.js → chunk-S3DCO2A6.js} +1 -1
- package/dist/chunks/chunk-TUJLFNR7.js +7 -0
- package/dist/chunks/{chunk-DKCXOHRM.js → chunk-Y6B5ZZGK.js} +1 -1
- package/dist/import.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mc-pack.js +2 -2
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/types/cards/src/dsl/abilities.d.ts +46 -1
- package/types/cards/src/dsl/effects.d.ts +19 -0
- package/types/cards/src/dsl/engine-only-features.d.ts +0 -10
- package/types/cards/src/dsl/values.d.ts +15 -2
- package/types/cards/src/playable/custom.d.ts +3 -2
- package/types/cards/src/wave2/ant/obligation-nemesis.d.ts +0 -1
- package/types/cards/src/wave5/sm/campaign/shield-tech.d.ts +2 -0
- package/types/content/src/index.d.ts +1 -1
- package/types/content/src/schema/cards/player-cards.d.ts +7 -0
- package/types/content/src/schema/packs.d.ts +5 -0
- package/types/engine/src/abilities.d.ts +40 -1
- package/types/engine/src/actions.d.ts +3 -1
- package/types/engine/src/campaign.d.ts +46 -0
- package/types/engine/src/cost-damage.d.ts +2 -2
- package/types/engine/src/events.d.ts +1 -1
- package/types/engine/src/index.d.ts +3 -3
- package/types/engine/src/keywords.d.ts +3 -3
- package/types/engine/src/legal.d.ts +22 -1
- package/types/engine/src/select.d.ts +4 -0
- package/types/engine/src/spec.d.ts +55 -1
- package/types/engine/src/stack.d.ts +5 -0
- package/types/engine/src/state.d.ts +14 -0
- package/types/engine/src/trigger-events.d.ts +13 -1
- package/dist/chunks/chunk-2XS47E3T.js +0 -7
- package/dist/chunks/chunk-HVUCR22H.js +0 -1
- package/dist/chunks/chunk-PB6KXNXP.js +0 -22
|
@@ -1934,6 +1934,15 @@ export declare const thwartAScheme: (n: Amount, slot?: string) => EffectSpec[];
|
|
|
1934
1934
|
export declare const damageAnEnemy: (n: Amount, slot?: string) => EffectSpec[];
|
|
1935
1935
|
/** "Remove N threat from a scheme." (not a thwart) */
|
|
1936
1936
|
export declare const removeThreatFromAScheme: (n: Amount, slot?: string) => EffectSpec[];
|
|
1937
|
+
/**
|
|
1938
|
+
* "… or resolve an 'Action' ability on a card you control" (War Machine Armor, `punisher-msp`; #890 item 6): the player
|
|
1939
|
+
* uses one Action ability of a card in play they control, paying its cost, at this moment (no Action timing asked).
|
|
1940
|
+
* `filter` narrows the cards; `optional` lets the player use none. `EffectSpec useActionAbility`.
|
|
1941
|
+
*/
|
|
1942
|
+
export declare const useActionAbility: (player?: PlayerRef, opts?: {
|
|
1943
|
+
readonly filter?: TargetQuery;
|
|
1944
|
+
readonly optional?: boolean;
|
|
1945
|
+
}) => EffectSpec;
|
|
1937
1946
|
/**
|
|
1938
1947
|
* "Deal a total of N damage divided among X you choose" (Wasp Sting) / "Remove a total of N threat from among
|
|
1939
1948
|
* schemes in play" (Inconspicuous): docs/phase7-wave2.md §3.7. A status name divides status cards: "place a total of 2
|
|
@@ -2117,6 +2126,16 @@ export declare const playFromHandReducingCost: (n: Amount, player?: PlayerRef, o
|
|
|
2117
2126
|
* it has several). `playSetAside(query("upgrade", { name: "Death-Glow" }))`.
|
|
2118
2127
|
*/
|
|
2119
2128
|
export declare const playSetAside: (filter?: TargetQuery, player?: PlayerRef) => EffectSpec;
|
|
2129
|
+
/**
|
|
2130
|
+
* "Play an Attack event from your discard pile, paying its costs" (Warzone, `punisher-msp`; #890 item 5): a card from
|
|
2131
|
+
* the player's own discard pile, played and paid for (`EffectSpec playFromHand.from: "discard"`). Not "as if it were in
|
|
2132
|
+
* your hand": a "from your hand" response does not answer it. `optional`: "you may play …"; `ignoreActionTiming`: an
|
|
2133
|
+
* event with an Action ability played outside the player's turn, as from a Response.
|
|
2134
|
+
*/
|
|
2135
|
+
export declare const playFromDiscard: (filter?: TargetQuery, player?: PlayerRef, opts?: {
|
|
2136
|
+
readonly optional?: boolean;
|
|
2137
|
+
readonly ignoreActionTiming?: boolean;
|
|
2138
|
+
}) => EffectSpec;
|
|
2120
2139
|
/**
|
|
2121
2140
|
* "Search their deck for a card and play that card, ignoring its resource cost. (Shuffle.)" (Fetch Quest, 39045,
|
|
2122
2141
|
* erratum RRG 1.8 p. 69; docs/phase7-wave6.md §3.70): the whole deck is searched, only a card the player could legally
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import type { AbilityRegistry } from "../../../engine/src/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* DSL shapes the engine supports that no base card uses yet, so the mod SDK's feature walk over the base registry
|
|
4
|
-
* (`dslFeatures(PLAYABLE_DEPS.abilities)`, `SUPPORTED_DSL_FEATURES`) would not find them, and a custom-content pack that
|
|
5
|
-
* uses them would be refused by a client that can run it (docs/custom-content-packs.md §6, §11.2). One small example
|
|
6
|
-
* definition per primitive, built with the same builders a pack script uses; the SDK walks these with the base
|
|
7
|
-
* registry. Never registered with the engine: no card id here is a real card, and nothing plays them.
|
|
8
|
-
*
|
|
9
|
-
* Add an entry with each engine primitive that lands for custom content before any base card uses it; it can go once a
|
|
10
|
-
* base card does.
|
|
11
|
-
*/
|
|
12
2
|
export declare const ENGINE_ONLY_DSL_EXAMPLES: AbilityRegistry;
|
|
13
3
|
/** Every example is a valid definition (checked by the DSL's own validator, as `defineAbilities` would). */
|
|
14
4
|
export declare const engineOnlyDslProblems: () => readonly string[];
|
|
@@ -1267,6 +1267,18 @@ export declare const eventDamageTakenBy: (of: TargetRef) => ValueSpec;
|
|
|
1267
1267
|
* lethal or defeated by a non-damage effect.
|
|
1268
1268
|
*/
|
|
1269
1269
|
export declare const defeatExcessDamage: ValueSpec;
|
|
1270
|
+
/**
|
|
1271
|
+
* In an "after X is defeated" ability on a scheme's defeat: the excess threat it recorded, the threat the defeating
|
|
1272
|
+
* removal attempted beyond what the scheme had (#890 item 8). 0 when it took exactly the last threat.
|
|
1273
|
+
*/
|
|
1274
|
+
export declare const defeatExcessThreat: ValueSpec;
|
|
1275
|
+
/**
|
|
1276
|
+
* "After a side scheme is overdefeated (more threat was removed from it than it had)" (The Rose's Hero Resistance and
|
|
1277
|
+
* Rose's Greenhouse, `the-rose-bf`): a response's `while` on a `schemeDefeated` pattern, true when the defeating removal
|
|
1278
|
+
* attempted more threat than the scheme had, whatever made it. The opposite of `exactlyDefeated`, which also asks for a
|
|
1279
|
+
* thwart.
|
|
1280
|
+
*/
|
|
1281
|
+
export declare const overdefeated: Predicate;
|
|
1270
1282
|
/** "If this minion was defeated with excess damage" (Shifting Apparition, `sm` 27091). */
|
|
1271
1283
|
export declare const defeatedWithExcessDamage: Predicate;
|
|
1272
1284
|
/**
|
|
@@ -1390,8 +1402,9 @@ export declare const duringVillainPhaseStepOne: Predicate;
|
|
|
1390
1402
|
export declare const duringTurnOf: (player?: PlayerRef) => Predicate;
|
|
1391
1403
|
/**
|
|
1392
1404
|
* "The first [card type] played each round" (Steve Rogers, Living Legend: "Reduce the cost of the first ally
|
|
1393
|
-
* played each round by 1"). FAQ "Steve Rogers (#1B)" (RRG 1.8 p. 59): applies to the very first ally
|
|
1394
|
-
*
|
|
1405
|
+
* played each round by 1"). FAQ "Steve Rogers (#1B)" (RRG 1.8 p. 59): applies to the very first ally played each
|
|
1406
|
+
* round, whatever form they're in when it's played — so this reads the round count, not the phase's. `player`: whose
|
|
1407
|
+
* plays count; `{ kind: "each" }` counts every player's ("played" names no player, so Living Legend uses it, #888).
|
|
1395
1408
|
*/
|
|
1396
1409
|
export declare const firstThisRound: (cardType: string, player?: PlayerRef) => Predicate;
|
|
1397
1410
|
/** "The total cost of all allies beneath it" (Hydra Prison, `trors`). */
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* - **A pack scenario** is built generically from its `Scenario` record, the way `coreScenario` builds a Core one: the
|
|
7
7
|
* villain's stages, the main scheme, the scenario's own sets, the picked modular sets, the Standard (and Expert) set,
|
|
8
|
-
* each hero's obligation and nemesis set. A pack scenario may use only the plain fields
|
|
8
|
+
* each hero's obligation and nemesis set. A pack scenario may use only the plain fields, `setAsideCardIds` and
|
|
9
|
+
* `setAsideModularSetCount` (`CUSTOM_SCENARIO_FIELDS`);
|
|
9
10
|
* anything a printed scenario needs a hand-written builder for (several villains, a set-aside deck, a villain choice)
|
|
10
11
|
* is refused by `customScenarioProblems` rather than built wrong.
|
|
11
12
|
* - **A pack modular set at a base scenario** is added to the base builder's own game: the base picks go through
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
* Base behaviour is untouched: with no custom content `playableScenarioWithCustom` is `playableScenario`.
|
|
17
18
|
*/
|
|
18
19
|
import { type AnyCard, type EncounterSet, type Scenario } from "../../../content/src/index.js";
|
|
19
|
-
import type
|
|
20
|
+
import { type GameSetupConfig } from "../../../engine/src/index.js";
|
|
20
21
|
import { type PlayableScenarioOptions } from "./index.js";
|
|
21
22
|
/** What a game takes from custom packs: their cards, encounter sets and scenario records, whole. */
|
|
22
23
|
export interface CustomContent {
|
|
@@ -32,7 +32,6 @@ export declare const ANT_MAN_OBLIGATION_NEMESIS: {
|
|
|
32
32
|
readonly "12026.tech-theft-constant": import("../../../../engine/src/index.js").AbilityDefinition;
|
|
33
33
|
readonly "12027.yellowjacket-constant": import("../../../../engine/src/index.js").AbilityDefinition;
|
|
34
34
|
readonly "12027.yellowjacket-constant-2": import("../../../../engine/src/index.js").AbilityDefinition;
|
|
35
|
-
readonly "12028.size-increase-constant": import("../../../../engine/src/index.js").AbilityDefinition;
|
|
36
35
|
readonly "12028.size-increase-forced-response": import("../../../../engine/src/index.js").AbilityDefinition;
|
|
37
36
|
readonly "12029.when-revealed": import("../../../../engine/src/index.js").AbilityDefinition;
|
|
38
37
|
};
|
|
@@ -61,6 +61,7 @@ export declare const SHIELD_TECH_CAMPAIGN_CARDS: {
|
|
|
61
61
|
readonly costEffects?: number;
|
|
62
62
|
readonly generates?: import("../../../../../engine/src/index.js").ResourceGeneration;
|
|
63
63
|
readonly generatesFor?: import("../../../../../engine/src/index.js").TargetQuery;
|
|
64
|
+
readonly generatesForAbility?: true;
|
|
64
65
|
readonly overpayOnly?: true;
|
|
65
66
|
readonly minX?: number;
|
|
66
67
|
readonly playCostReduction?: {
|
|
@@ -91,6 +92,7 @@ export declare const SHIELD_TECH_CAMPAIGN_CARDS: {
|
|
|
91
92
|
readonly costEffects?: number;
|
|
92
93
|
readonly generates?: import("../../../../../engine/src/index.js").ResourceGeneration;
|
|
93
94
|
readonly generatesFor?: import("../../../../../engine/src/index.js").TargetQuery;
|
|
95
|
+
readonly generatesForAbility?: true;
|
|
94
96
|
readonly overpayOnly?: true;
|
|
95
97
|
readonly minX?: number;
|
|
96
98
|
readonly playCostReduction?: {
|
|
@@ -3,7 +3,7 @@ export declare const CONTENT_VERSION = "0.0.0";
|
|
|
3
3
|
* Schema version for the card data shape itself (independent of how many
|
|
4
4
|
* cards/cycles have been ingested). Bump when a breaking shape change lands.
|
|
5
5
|
*/
|
|
6
|
-
export declare const SCHEMA_VERSION = "0.
|
|
6
|
+
export declare const SCHEMA_VERSION = "0.51.0";
|
|
7
7
|
export * from "./schema/index.js";
|
|
8
8
|
export * from "./data/index.js";
|
|
9
9
|
export * from "./import/index.js";
|
|
@@ -127,6 +127,13 @@ interface PlayerCardCommon extends BaseCard {
|
|
|
127
127
|
* `Deck` or `StarterDeck`, and not counted toward deck size. `validateDeck` refuses it in a card list.
|
|
128
128
|
*/
|
|
129
129
|
readonly separateDeck?: string;
|
|
130
|
+
/**
|
|
131
|
+
* An identity-specific card (`aspect: "hero:<identity id>"`) outside that identity's set (#890 item 13): a deck for
|
|
132
|
+
* that identity may include it, up to its `deckLimit`, and no deck must. A house-rule pack's card for an official
|
|
133
|
+
* hero ("Don't Make Me Angry!" for Hulk, `hulk-angry-bf`: "Permanent. Setup."), so the official precons and every
|
|
134
|
+
* other deck for that hero stay legal without it. Only on a card whose `aspect` names an identity.
|
|
135
|
+
*/
|
|
136
|
+
readonly optionalForIdentity?: true;
|
|
130
137
|
/**
|
|
131
138
|
* The aspect printed on an identity-specific card that also belongs to an aspect (wave 2). Spider-Woman's set holds
|
|
132
139
|
* Venom Blast (Aggression), Pheromones (Leadership), Contaminant Immunity (Protection) and Inconspicuous (Justice):
|
|
@@ -380,6 +380,11 @@ export interface PackPreview {
|
|
|
380
380
|
readonly schema: typeof PACK_PREVIEW_SCHEMA_VERSION;
|
|
381
381
|
readonly packId: string;
|
|
382
382
|
readonly version: string;
|
|
383
|
+
/**
|
|
384
|
+
* The pack's full description (`PackManifest.description`), so the store page shows it before the pack is installed,
|
|
385
|
+
* where the catalog has only its one-line `summary` (#890 item 18). Absent in a preview built before the field.
|
|
386
|
+
*/
|
|
387
|
+
readonly description?: string;
|
|
383
388
|
/**
|
|
384
389
|
* The card the store leads with: the hero identity of a hero pack (both faces), the villain (stage I) or main scheme
|
|
385
390
|
* of a scenario pack, the first scenario's villain of a campaign pack. `images` are its faces' pictures, pack paths.
|
|
@@ -1710,6 +1710,13 @@ export type RuleSpec =
|
|
|
1710
1710
|
| {
|
|
1711
1711
|
readonly kind: "attacksDealExtraDamage";
|
|
1712
1712
|
readonly amount: number;
|
|
1713
|
+
/**
|
|
1714
|
+
* `amount` for each counter of this type on the attacked character: "When a character with one or more Exposed
|
|
1715
|
+
* status cards is attacked, … that attack deals 1 additional damage for each" (Sentinel's Expose insert, the
|
|
1716
|
+
* `sentinel-tw` community pack; #890 item 10) is `{ amount: 1, perCounterOnTarget: "exposed" }`, the counters
|
|
1717
|
+
* then removed by the pack's own response to the attack. 0 counters: no additional damage.
|
|
1718
|
+
*/
|
|
1719
|
+
readonly perCounterOnTarget?: string;
|
|
1713
1720
|
readonly target: TargetQuery;
|
|
1714
1721
|
readonly attacker?: TargetQuery;
|
|
1715
1722
|
readonly while?: Predicate;
|
|
@@ -3473,6 +3480,15 @@ export interface AbilityCost {
|
|
|
3473
3480
|
* hit points" is the card's `max`, not an engine cap.
|
|
3474
3481
|
*/
|
|
3475
3482
|
readonly damageSelf?: number | ValueSpec | DamageSelfChoice;
|
|
3483
|
+
/**
|
|
3484
|
+
* "...and take 2 unpreventable damage" as part of a cost (Sentinel's "destroy" a Component, the `sentinel-tw`
|
|
3485
|
+
* community pack; #890 item 11): the `damageSelf` damage is dealt `unpreventable` (the MC62 insert's "cannot be
|
|
3486
|
+
* reduced or prevented", `EffectSpec dealDamage.unpreventable`), so neither a tough status card, a "prevent all
|
|
3487
|
+
* damage" constant nor a reduction stops the cost from being paid; the tough card stays. A "cannot take damage" rule
|
|
3488
|
+
* or a cap on the damage taken still does (RRG 1.8 "Cannot", p. 13): the cost is paid only if all of it is taken
|
|
3489
|
+
* (RRG 1.8 "Cost", p. 14). Only with a fixed or computed `damageSelf`, not a chosen one.
|
|
3490
|
+
*/
|
|
3491
|
+
readonly damageSelfUnpreventable?: true;
|
|
3476
3492
|
/**
|
|
3477
3493
|
* "Discard the top card of the encounter deck →", "choose a number from 1 to 5, discard that many cards from the top
|
|
3478
3494
|
* of the encounter deck →" (`EncounterDeckDiscardCost`, docs/phase7-wave9.md §3.43 (a)).
|
|
@@ -3761,6 +3777,16 @@ export interface AbilityCost {
|
|
|
3761
3777
|
* - Unlike `damageSelf` and `indirectDamage` ("take N damage"), which are not paid unless all of it is taken.
|
|
3762
3778
|
*/
|
|
3763
3779
|
readonly damageCards?: DamageCostPick;
|
|
3780
|
+
/**
|
|
3781
|
+
* "Flip [a card you control] →" (Sentinel's Components, the `sentinel-tw` community pack: "exhaust or destroy Arms
|
|
3782
|
+
* (Intact) →", where destroying flips the Component to its Destroyed side; #890 item 11): the picked cards in play,
|
|
3783
|
+
* each a double-sided card (`flipSide`) the payer controls, turn to their other face as the cost, keeping their state as
|
|
3784
|
+
* any same-type flip does (RRG 1.8 "Flip", p. 20), and each flip is announced (`cardFlipped`). The `flipSelf` of
|
|
3785
|
+
* another card: a candidate must have another face that no `cannotFlip` rule names (RRG 1.8 "Cost", p. 13: paid in
|
|
3786
|
+
* full or not at all). An exhausted card can still be flipped. A list is several picks paid together, as for
|
|
3787
|
+
* `exhaustCards`.
|
|
3788
|
+
*/
|
|
3789
|
+
readonly flipCards?: InPlayCostPick | readonly InPlayCostPick[];
|
|
3764
3790
|
/**
|
|
3765
3791
|
* "Find Touched and attach it to a character other than Rogue … →" (Energy Transfer, `rogue` 38007, erratum RRG 1.8
|
|
3766
3792
|
* p. 69; docs/phase7-wave6.md §3.49): as the cost, a card is attached to a host the payer picks. See `AttachCost`.
|
|
@@ -3979,7 +4005,7 @@ export interface TuckedCostPick extends InPlayCostPick {
|
|
|
3979
4005
|
/** The pick as a `TuckedCostPick` when it is one (`AbilityCost.discardTucked`), else null. */
|
|
3980
4006
|
export declare const tuckedPickOf: (pick: InPlayCostPick) => TuckedCostPick | null;
|
|
3981
4007
|
/** How an `InPlayCostPick` spends its cards. */
|
|
3982
|
-
export type InPlayCostMode = "exhaust" | "ready" | "return" | "discard" | "damage";
|
|
4008
|
+
export type InPlayCostMode = "exhaust" | "ready" | "return" | "discard" | "damage" | "flip";
|
|
3983
4009
|
/**
|
|
3984
4010
|
* Every `InPlayCostPick` a cost makes, in the order they are checked: the exhaust picks, the ready pick, the return
|
|
3985
4011
|
* pick, the discard pick, the tucked-card discard pick (mode `discard` too; told apart by `tuckedPickOf`), the damage
|
|
@@ -4228,6 +4254,11 @@ export interface AbilityDefinition {
|
|
|
4228
4254
|
* that leaves another way strands it under the RRG. Card text over the Rules Reference (RRG 1.8 "The Golden Rules",
|
|
4229
4255
|
* p. 4). Not inferred from the trigger: another card that only answers its host leaving ("draw 1 card") is still
|
|
4230
4256
|
* removed from the game (owner, 2026-10-18).
|
|
4257
|
+
*
|
|
4258
|
+
* Also on a player card that is not permanent and attaches itself by its own effect (Juston Seyfert, a support the
|
|
4259
|
+
* `sentinel-tw` community pack moves onto a side scheme: "After attached side scheme is defeated, put Juston Seyfert
|
|
4260
|
+
* in play under your control"; #890 item 12): it comes back unattached to its controller's play area instead of being
|
|
4261
|
+
* discarded with its host (`discardWithLeavingHost`).
|
|
4231
4262
|
*/
|
|
4232
4263
|
readonly staysWhenHostLeaves?: "leaves" | "defeated";
|
|
4233
4264
|
/**
|
|
@@ -4260,6 +4291,14 @@ export interface AbilityDefinition {
|
|
|
4260
4291
|
readonly generates?: ResourceGeneration;
|
|
4261
4292
|
/** Resource abilities only: "generate a [wild] resource for an event" — usable only while paying for a matching card. */
|
|
4262
4293
|
readonly generatesFor?: TargetQuery;
|
|
4294
|
+
/**
|
|
4295
|
+
* Resource abilities only: "generate a [wild] resource **for an upgrade ability**" (With Great Firepower, the
|
|
4296
|
+
* `spider-punisher-tw` community pack; #890 item 3): usable only while paying an ability's cost, the ability's card
|
|
4297
|
+
* matching `generatesFor` (an ability's payment is for its own card, docs/phase7-wave6.md §3.30), never to play a
|
|
4298
|
+
* card. A play payment (`isPlayPayment`: a card being played, and the card paid for) is refused, and so is a payment
|
|
4299
|
+
* for no card.
|
|
4300
|
+
*/
|
|
4301
|
+
readonly generatesForAbility?: true;
|
|
4263
4302
|
/**
|
|
4264
4303
|
* Resource abilities only: "Resource: Generate a [energy] resource **to overpay for a card**. (Limit once per card.)"
|
|
4265
4304
|
* (Mr. Hollywood, `wonder_man` 58009; docs/phase7-wave10-hero-packs.md H3.14). What the ability generates may join a
|
|
@@ -447,6 +447,8 @@ export interface ResourceDamageCost {
|
|
|
447
447
|
readonly instanceId: InstanceId;
|
|
448
448
|
readonly spender: PlayerId;
|
|
449
449
|
readonly amount: number;
|
|
450
|
+
/** The damage is unpreventable (`AbilityCost.damageSelfUnpreventable`). */
|
|
451
|
+
readonly unpreventable?: true;
|
|
450
452
|
}
|
|
451
453
|
/**
|
|
452
454
|
* A step of a resource ability's cost that `payCost` would push as an effects frame (Clarity of Purpose's "deal 1
|
|
@@ -914,7 +916,7 @@ export type ActionTiming = "turn" | "any";
|
|
|
914
916
|
* Where an effect plays a card from "as if it were in your hand" (`EffectSpec playFromHand.from`). `tuckedUnder` holds
|
|
915
917
|
* the resolved hosts: any card tucked under one of them (Med Lab 38028; docs/phase7-wave6.md §3.57), whoever owns it.
|
|
916
918
|
*/
|
|
917
|
-
export type PlayFromZone = "hand" | "setAside" | "deck" | DeckAsIfInHandPlayFrom | {
|
|
919
|
+
export type PlayFromZone = "hand" | "setAside" | "deck" | "discard" | DeckAsIfInHandPlayFrom | {
|
|
918
920
|
readonly tuckedUnder: readonly InstanceId[];
|
|
919
921
|
} | SeparateDeckPlayFrom;
|
|
920
922
|
/**
|
|
@@ -43,6 +43,26 @@ export interface CampaignDefinition {
|
|
|
43
43
|
* this, a node's instruction list is not a function of the definition alone and MC27 would force an engine change.
|
|
44
44
|
*/
|
|
45
45
|
readonly conditionalInstructions?: Readonly<Record<string, CampaignInstruction>>;
|
|
46
|
+
/**
|
|
47
|
+
* Brings a log saved by an older build up to the shape the current definition writes, when what a log *means*
|
|
48
|
+
* changed without any id changing (so `version` stays put and the log still loads). `resolveBetweenGames` runs these
|
|
49
|
+
* on the log first, before anything else reads it, every time it composes a game; its returned log carries the
|
|
50
|
+
* result, so the upgrade is persisted with the composed game (and a `nodeStart` retry restores to it).
|
|
51
|
+
*
|
|
52
|
+
* Engine bookkeeping, not printed rules: they are not traced as steps of the attempt. They may only rewrite log data
|
|
53
|
+
* (fields, grants, decks, removals). The runner throws on an upgrade that:
|
|
54
|
+
* - is not a `betweenGames` step;
|
|
55
|
+
* - asks for a choice (`choose`, or a `random` the players may decline);
|
|
56
|
+
* - draws from the campaign RNG (`random`);
|
|
57
|
+
* - sets cards aside or composes a villain or encounter sets (those feed a game, and the upgrade's run is thrown
|
|
58
|
+
* away);
|
|
59
|
+
* - moves the campaign's position or status (`markNode`, `progressNode`, `endCampaign`, or anything else that
|
|
60
|
+
* changes the next node, a node's mark or progress, or the status).
|
|
61
|
+
* The mod SDK holds them to the same pack limits as every other instruction. Each must also be idempotent, so a log
|
|
62
|
+
* already in the current shape, or one upgraded before, is left as it is. Absent: no upgrade.
|
|
63
|
+
* Issue #873: a Sinister Motives log saved before MC27 p. 22 node 13's flip moved to Setup.
|
|
64
|
+
*/
|
|
65
|
+
readonly logUpgrades?: readonly CampaignInstruction[];
|
|
46
66
|
/**
|
|
47
67
|
* What happens to a player eliminated from a game the rest of the table goes on to win (§4.6b). Absent means
|
|
48
68
|
* nothing does: the eliminated seat takes part in the Victory steps like any other seat, which is what a standard
|
|
@@ -876,6 +896,14 @@ export type CampaignOp = {
|
|
|
876
896
|
readonly kind: "setGrantFace";
|
|
877
897
|
readonly card: CampaignValue;
|
|
878
898
|
readonly face: string;
|
|
899
|
+
/**
|
|
900
|
+
* The face is reached by a campaign Setup flip each game, not by a permanent swap: the copy enters play on its
|
|
901
|
+
* front and the node's own `inGame` Setup instruction turns it (MC27 p. 22, "**Setup:** Each player flips their
|
|
902
|
+
* … upgrade to its Enhanced side", resolved at RRG v1.8 p. 51 setup step 13, after step 11's Setup keyword put
|
|
903
|
+
* the front into play). Recorded on the grant as `CampaignGrant.faceAtSetup`, so the log still says which face
|
|
904
|
+
* the card is on. Absent: the face is permanent and the copy enters play already on it (MC10 p. 12).
|
|
905
|
+
*/
|
|
906
|
+
readonly atSetup?: true;
|
|
879
907
|
}
|
|
880
908
|
/** MC10 p. 5's Tech upgrade choice; MC27 p. 22's "chooses an aspect card in their collection"; MC60 p. 9 step 4. */
|
|
881
909
|
| {
|
|
@@ -1363,6 +1391,12 @@ export interface CampaignGrant {
|
|
|
1363
1391
|
readonly leftOut?: true;
|
|
1364
1392
|
/** Which face the grant is on: MC10 p. 12's "Improved" side, MC27 p. 22's Enhanced side. */
|
|
1365
1393
|
readonly face?: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* `face` is reached by a campaign Setup flip each game (`setGrantFace`'s `atSetup`; MC27 p. 22, RRG v1.8 p. 51 step
|
|
1396
|
+
* 13), so the copy enters play on its front and is not in `CampaignSeatInput.grantFaces`. Absent: the copy enters
|
|
1397
|
+
* play already on `face` (MC10 p. 12). Only ever set alongside `face`.
|
|
1398
|
+
*/
|
|
1399
|
+
readonly faceAtSetup?: true;
|
|
1366
1400
|
/** The node that granted it, for the sheet and for `LossPolicy.retryBaseline`. */
|
|
1367
1401
|
readonly grantedAtNodeId: string;
|
|
1368
1402
|
}
|
|
@@ -1597,6 +1631,18 @@ export interface CampaignSeatInput {
|
|
|
1597
1631
|
* when every grant is exempt, so an input composed before the field existed is unchanged.
|
|
1598
1632
|
*/
|
|
1599
1633
|
readonly grantDeckSizes?: readonly GrantDeckSizeRule[];
|
|
1634
|
+
/**
|
|
1635
|
+
* The granted copies that are on another face (`CampaignGrant.face`): one entry per such copy in `deck`. MC10 p. 12
|
|
1636
|
+
* replaces a "Basic" Condition upgrade "with its 'Improved' side", so that copy enters play on that face at setup
|
|
1637
|
+
* (`putSetupCardsIntoPlay`); MC27 p. 22's Enhanced side the same way. Absent when no grant names a face, so every
|
|
1638
|
+
* earlier game input is unchanged.
|
|
1639
|
+
*/
|
|
1640
|
+
readonly grantFaces?: readonly CampaignGrantFace[];
|
|
1641
|
+
}
|
|
1642
|
+
/** One granted copy and the face the campaign log has it on (`CampaignSeatInput.grantFaces`). */
|
|
1643
|
+
export interface CampaignGrantFace {
|
|
1644
|
+
readonly cardId: CardId;
|
|
1645
|
+
readonly face: string;
|
|
1600
1646
|
}
|
|
1601
1647
|
/** An instruction the runner has already gated and ordered, ready for the engine to resolve at its window. */
|
|
1602
1648
|
export interface ResolvedInstruction {
|
|
@@ -47,7 +47,7 @@ export declare function costDamageEffects(amount: number, paidFor: Frame<"abilit
|
|
|
47
47
|
* status card (the Focused Rage FAQ entry, RRG 1.8 p. 57). Damage past its remaining hit points is still taken (it is
|
|
48
48
|
* then defeated), so hit points do not limit it.
|
|
49
49
|
*/
|
|
50
|
-
export declare function canTakeCostDamage(state: GameState, deps: EngineDeps, id: InstanceId, sourceId: InstanceId | null, amount: number): boolean;
|
|
50
|
+
export declare function canTakeCostDamage(state: GameState, deps: EngineDeps, id: InstanceId, sourceId: InstanceId | null, amount: number, unpreventable?: boolean): boolean;
|
|
51
51
|
/**
|
|
52
52
|
* Whether `id` can be picked for a "deal N damage to a [chosen] character →" cost (`AbilityCost.damageCards`) of
|
|
53
53
|
* `sourceId`'s ability: a character, and not one that cannot take damage from the source.
|
|
@@ -77,7 +77,7 @@ export declare function pickedCostDamageEffects(slot: string, amount: number): E
|
|
|
77
77
|
* Not to be confused with `AbilityCost.dealDamage` (`attach-cost.ts`, Energy Transfer): "If dealing damage is a cost,
|
|
78
78
|
* that cost is considered paid even if some or all of that damage is prevented" (same page), so it is never settled.
|
|
79
79
|
*/
|
|
80
|
-
export declare function selfCostDamageEffects(amount: number, paidFor: Frame<"ability"> | Frame<"playCard"> | null): EffectSpec[];
|
|
80
|
+
export declare function selfCostDamageEffects(amount: number, paidFor: Frame<"ability"> | Frame<"playCard"> | null, unpreventable?: boolean): EffectSpec[];
|
|
81
81
|
/** The plan vars holding the range a chosen "take any amount of damage →" cost is picked from (`damageSelfChoiceRange`). */
|
|
82
82
|
export declare const DAMAGE_SELF_MIN_VAR = "cost.damageSelf.min";
|
|
83
83
|
export declare const DAMAGE_SELF_MAX_VAR = "cost.damageSelf.max";
|
|
@@ -280,7 +280,7 @@ export type GameEvent = {
|
|
|
280
280
|
* an effect names (Med Lab 38028, Avengers Compound 58034), each "as if it were in your hand", with
|
|
281
281
|
* `countsAsFrom: "hand"` (`PlayOrigin`). A play from the hand logs neither.
|
|
282
282
|
*/
|
|
283
|
-
readonly from?: "deckTop" | "separateDeck" | "tucked" | "deck" | "setAside";
|
|
283
|
+
readonly from?: "deckTop" | "separateDeck" | "tucked" | "deck" | "setAside" | "discard";
|
|
284
284
|
readonly countsAsFrom?: "hand";
|
|
285
285
|
/**
|
|
286
286
|
* Present only for a play under an "as if it were in your hand" permission printed on a card in the player's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ENGINE_VERSION = "0.
|
|
1
|
+
export declare const ENGINE_VERSION = "0.51.0";
|
|
2
2
|
export type { PlayerId, InstanceId, ChoiceId, EncounterDeckId, FrameId, GroupId, TeamId } from "./ids.js";
|
|
3
3
|
export { playerId, instanceId, choiceId, encounterDeckId, frameId, groupId, teamId } from "./ids.js";
|
|
4
4
|
export type { GroupRef, PodNeutralArea, PodNeutralSetup, PodSetup, PodState, SharedEvent, SharedPodState, SharedResult, SharedThreatCause, } from "./pod.js";
|
|
@@ -49,7 +49,7 @@ export { characterTitledAs, identityCardTitledAs } from "./titles.js";
|
|
|
49
49
|
export type { CostChoices, CostPartPayers, CostSelection, DelegableCostPart } from "./commands.js";
|
|
50
50
|
export { DELEGABLE_COST_PARTS } from "./commands.js";
|
|
51
51
|
export type { DeferredEffects, ReportTarget, Vars } from "./stack.js";
|
|
52
|
-
export { attackPreventedVars, currentActivationFrameId, PAID_CARDS_SLOT, PAID_IN_PLAY_CARDS_SLOT } from "./stack.js";
|
|
52
|
+
export { attackPreventedVars, currentActivationFrameId, PAID_CARDS_SLOT, PAID_IN_PLAY_CARDS_SLOT, READIED_CARDS_SLOT, } from "./stack.js";
|
|
53
53
|
export { abilityUseKey, BORROWED_BOOST_ICONS_SLOT, DEFAULT_DEPS, fixedResourcesOf, GRANTED_BY_SLOT, inPlayPicksOf, tuckedPickOf, labeledResolvedVar, isResourcesChoice, NO_ABILITIES, playableAsIfInHandOf, resourcesChoiceOf, } from "./abilities.js";
|
|
54
54
|
export type { InPlayCostMode, ResourcesChoice } from "./abilities.js";
|
|
55
55
|
export type { AbilityTimingWord, BoostCardDestination, CardDestination, DefeatDestination, DefeatPlacement, CardSelector, CharacterNames, EffectSpec, LastingUntil, LastingGrantUntil, NextBasicPowerUntil, PairLimit, PlayerRef, PlayerZone, Predicate, ScenarioDeckSource, SchemeValueName, StatName, BasicPowerName, BasicPowerTerms, StatComparison, StatusName, CollectionSearchFilter, TargetCategory, TargetQuery, TargetRef, ValueSpec, AttachCategory, } from "./spec.js";
|
|
@@ -58,7 +58,7 @@ export type { AbilityTimingWord, BoostCardDestination, CardDestination, DefeatDe
|
|
|
58
58
|
* into, the log it writes, and the two values that cross the game/campaign boundary. Types only; the runner that
|
|
59
59
|
* interprets them is below (docs/campaign-mode-design.md §11).
|
|
60
60
|
*/
|
|
61
|
-
export type { CampaignAttempt, CampaignAttemptOutcome, CampaignCardFace, CampaignChoiceRecord, CampaignChoiceSource, CampaignDefinition, CampaignGameInput, CampaignGameQuery, CampaignGameResult, CampaignGrant, CampaignGraph, CampaignHistoryEntry, CampaignInGameWrites, CampaignInstruction, CampaignLog, CampaignLogValueSpec, CampaignLogSnapshot, CampaignLogView, CampaignNode, CampaignOp, CampaignPosition, CampaignPredicate, CampaignScenarioRef, CampaignSeat, CampaignSeatInput, CampaignStatus, CampaignStep, CampaignStepTrace, CampaignValue, CampaignWindow, CollectionFilter, EliminationPolicy, GrantDeckSize, GrantDeckSizeRule, GrantPermanence, LogFieldDef, LogFieldType, LogValue, LogValueContent, LogValueSeal, LogWrite, LogWriteMode, LogWriteSpec, LossPolicy, ResolvedInstruction, } from "./campaign.js";
|
|
61
|
+
export type { CampaignAttempt, CampaignAttemptOutcome, CampaignCardFace, CampaignChoiceRecord, CampaignChoiceSource, CampaignDefinition, CampaignGameInput, CampaignGameQuery, CampaignGameResult, CampaignGrant, CampaignGrantFace, CampaignGraph, CampaignHistoryEntry, CampaignInGameWrites, CampaignInstruction, CampaignLog, CampaignLogValueSpec, CampaignLogSnapshot, CampaignLogView, CampaignNode, CampaignOp, CampaignPosition, CampaignPredicate, CampaignScenarioRef, CampaignSeat, CampaignSeatInput, CampaignStatus, CampaignStep, CampaignStepTrace, CampaignValue, CampaignWindow, CollectionFilter, EliminationPolicy, GrantDeckSize, GrantDeckSizeRule, GrantPermanence, LogFieldDef, LogFieldType, LogValue, LogValueContent, LogValueSeal, LogWrite, LogWriteMode, LogWriteSpec, LossPolicy, ResolvedInstruction, } from "./campaign.js";
|
|
62
62
|
export { CAMPAIGN_LOG_SCHEMA, CAMPAIGN_WINDOW_ORDER, DEFAULT_CAMPAIGN_WINDOW, grantDeckSizesOf, includedGrantsOf, NO_CAMPAIGN_WRITES, } from "./campaign.js";
|
|
63
63
|
/**
|
|
64
64
|
* The campaign runner (docs/campaign-mode-design.md §7): the four pure functions that compose the next scenario,
|
|
@@ -60,8 +60,8 @@ export declare function hasGrantedPermanent(state: GameState, id: InstanceId, de
|
|
|
60
60
|
* `permanentProtectsFrom`).
|
|
61
61
|
*/
|
|
62
62
|
export declare function hasLostPermanent(state: GameState, id: InstanceId, deps?: EngineDeps): boolean;
|
|
63
|
-
export declare function keywordsOf(state: GameState, id: InstanceId, deps?: EngineDeps): readonly KeywordInstance[];
|
|
64
|
-
export declare const hasKeyword: (state: GameState, id: InstanceId, name: KeywordName, deps?: EngineDeps) => boolean;
|
|
63
|
+
export declare function keywordsOf(state: GameState, id: InstanceId, deps?: EngineDeps, notFrom?: InstanceId | null): readonly KeywordInstance[];
|
|
64
|
+
export declare const hasKeyword: (state: GameState, id: InstanceId, name: KeywordName, deps?: EngineDeps, notFrom?: InstanceId | null) => boolean;
|
|
65
65
|
/**
|
|
66
66
|
* Permanent (RRG 1.8 "Permanent", p. 32): "Effects on cards not from this card's set cannot defeat this card, remove
|
|
67
67
|
* this card from play, or blank any part of its text box." Read off the printed card as well as its keywords right
|
|
@@ -76,7 +76,7 @@ export declare function isPermanent(state: GameState, id: InstanceId, deps?: Eng
|
|
|
76
76
|
* counts, docs/phase7-wave5.md §4.1 Q45). Inside a keyword-grant scan only printed keywords are read (see
|
|
77
77
|
* `readingKeywordGrants`).
|
|
78
78
|
*/
|
|
79
|
-
export declare function queryHasKeyword(state: GameState, id: InstanceId, name: KeywordName, deps: EngineDeps): boolean;
|
|
79
|
+
export declare function queryHasKeyword(state: GameState, id: InstanceId, name: KeywordName, deps: EngineDeps, notFrom?: InstanceId | null): boolean;
|
|
80
80
|
/** RRG "Keywords": repeated instances of a numbered keyword add their values together. */
|
|
81
81
|
export declare function keywordTotal(state: GameState, id: InstanceId, name: "retaliate" | "incite" | "hinder" | "victory", deps?: EngineDeps): number;
|
|
82
82
|
export declare const usesKeyword: (state: GameState, id: InstanceId, deps?: EngineDeps) => Extract<KeywordInstance, {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* what to pay with.
|
|
13
13
|
*/
|
|
14
14
|
import type { AbilityId, ResourceIconType } from "../../content/src/index.js";
|
|
15
|
-
import { type EngineDeps } from "./abilities.js";
|
|
15
|
+
import { type AbilityCost, type EngineDeps } from "./abilities.js";
|
|
16
16
|
import type { PendingChoice } from "./choices.js";
|
|
17
17
|
import { type Command, type CostChoices, type CostSelection, type DelegableCostPart } from "./commands.js";
|
|
18
18
|
import { type EngineErrorCode } from "./errors.js";
|
|
@@ -218,6 +218,17 @@ export type LegalActions = {
|
|
|
218
218
|
readonly legal: readonly LegalAction[];
|
|
219
219
|
readonly illegal: readonly IllegalAction[];
|
|
220
220
|
};
|
|
221
|
+
type CostChoiceSet = {
|
|
222
|
+
readonly costChoices: CostChoices | undefined;
|
|
223
|
+
readonly target: InstanceId | null;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* The cost-choice sets a regular `useAbility` of `source`'s ability is tried with (`costChoiceSets`, its hand discard
|
|
227
|
+
* defaulted as `legalActions` defaults it): one per legal pick of a chosen card, a card whose printed cost is paid, an
|
|
228
|
+
* attach host, a character a cost damages or heals, a target or a Special to resolve. For an effect that initiates
|
|
229
|
+
* an Action itself (`EffectSpec useActionAbility`, PR #903 review), so it judges and asks the same choices.
|
|
230
|
+
*/
|
|
231
|
+
export declare function abilityCostChoiceSets(state: GameState, deps: EngineDeps, playerId: PlayerId, source: InstanceId, cost: AbilityCost | undefined): readonly CostChoiceSet[];
|
|
221
232
|
/** A "Forced Action" its player could trigger right now, with a command that does (`outstandingForcedActions`). */
|
|
222
233
|
export interface OutstandingForcedAction {
|
|
223
234
|
readonly playerId: PlayerId;
|
|
@@ -241,6 +252,15 @@ export declare const forcedActionOptionId: (instanceId: InstanceId, abilityId: A
|
|
|
241
252
|
* to act, so what is on the stack or which step the game is in does not matter. An eliminated player has none.
|
|
242
253
|
*/
|
|
243
254
|
export declare function outstandingForcedActions(state: GameState, playerId: PlayerId, deps?: EngineDeps): readonly OutstandingForcedAction[];
|
|
255
|
+
/**
|
|
256
|
+
* Whether `playerId` could use the Action `abilityId` of `instanceId` were it their moment to act, as
|
|
257
|
+
* `outstandingForcedActions` asks it: `evaluateAbility` on the state as their turn, with nothing resolving and nothing
|
|
258
|
+
* asked, so the cost, its choices, its branches and the payment are judged exactly as for a regular use (the same
|
|
259
|
+
* wallets, the same "when spent" and chosen-amount handling). For an effect that initiates an Action itself out of turn
|
|
260
|
+
* (`EffectSpec useActionAbility`, #890 item 6; PR #903 reviews). The `LegalAction` (its `costBranches`, `costCounters`
|
|
261
|
+
* and `example`) or null.
|
|
262
|
+
*/
|
|
263
|
+
export declare function abilityUsableAsTheirMoment(state: GameState, deps: EngineDeps, playerId: PlayerId, instanceId: InstanceId, abilityId: AbilityId): LegalAction | null;
|
|
244
264
|
/**
|
|
245
265
|
* Every action `playerId` could take right now, split into legal (with an
|
|
246
266
|
* example command and legal targets) and illegal (with the engine's reason).
|
|
@@ -432,3 +452,4 @@ export type CostHelpAnswer = {
|
|
|
432
452
|
* those over (RRG 1.8 "Cost", p. 14; owner answer 21B).
|
|
433
453
|
*/
|
|
434
454
|
export declare function costHelpFor(state: GameState, playerId: PlayerId, action: ActionRef, helperId: PlayerId, options?: Pick<PaymentContext, "costSelection" | "abilityId">, deps?: EngineDeps): readonly CostHelpAnswer[];
|
|
455
|
+
export {};
|
|
@@ -453,6 +453,8 @@ export type QueryExclusion = "unknownCard"
|
|
|
453
453
|
| "hasExcludedKeyword"
|
|
454
454
|
/** Matches none of the query's `anyOf` alternatives, or matches the query it must not (`not`). */
|
|
455
455
|
| "matchesNoAlternative" | "wrongName" | "wrongPrintedId" | "wrongFacedown"
|
|
456
|
+
/** Not on the face the query's `flipped` asks for. */
|
|
457
|
+
| "wrongFlipped"
|
|
456
458
|
/** The card prints no form keyword of the query's `printedForm` type (docs/phase7-wave4.md §3.1). */
|
|
457
459
|
| "wrongForm"
|
|
458
460
|
/** No ability with one of the query's `abilityTiming` words (docs/phase7-wave4.md §3.33), or none printed with a `printsAbility` label. */
|
|
@@ -957,6 +959,8 @@ export declare function activeAbilityRefs(state: GameState, id: InstanceId, deps
|
|
|
957
959
|
* bubbles"), read as `activeAbilityRefs` reads them: `TargetQuery hasTaggedAbility`, `ValueSpec taggedAbilities`.
|
|
958
960
|
*/
|
|
959
961
|
export declare function taggedAbilityCount(state: GameState, id: InstanceId, tag: string, deps: EngineDeps): number;
|
|
962
|
+
/** `activeAbilityRefs` less the abilities the card gains from rules: its live printed abilities. */
|
|
963
|
+
export declare function activePrintedAbilityRefs(state: GameState, id: InstanceId, deps: EngineDeps): readonly AbilityReference[];
|
|
960
964
|
/** One ability a card gains from a rule in effect, and the card whose constant gives it (null: a scenario rule). */
|
|
961
965
|
export interface GrantedAbility {
|
|
962
966
|
readonly abilityId: AbilityId;
|
|
@@ -119,6 +119,16 @@ export interface TargetQuery {
|
|
|
119
119
|
readonly withKeyword?: KeywordName;
|
|
120
120
|
/** Excludes cards that have this keyword now (printed or granted), read exactly as `withKeyword` reads it. */
|
|
121
121
|
readonly withoutKeyword?: KeywordName;
|
|
122
|
+
/**
|
|
123
|
+
* `withKeyword` / `withoutKeyword` leave out what the query's own card (`self`) grants by a constant ability:
|
|
124
|
+
* "Attached villain gains steady. If it already has steady or stalwart, it gets +4[per_hero] hit points instead"
|
|
125
|
+
* (Rose's Greenhouse, the `the-rose-bf` community pack; #890 item 9) asks whether the villain has steady apart from
|
|
126
|
+
* the attachment's own grant, which would otherwise always answer yes. Every other source still counts: printed
|
|
127
|
+
* keywords, other cards' constants and lasting grants. Asked from inside a keyword grant's own `while` (as that card
|
|
128
|
+
* asks it), the other cards' grants are read one level deep, not printed keywords only as other queries there are:
|
|
129
|
+
* with its own grant left out the scan cannot reach itself (`keywords.ts` `queryHasKeyword`).
|
|
130
|
+
*/
|
|
131
|
+
readonly keywordNotFromSelf?: true;
|
|
122
132
|
/**
|
|
123
133
|
* Matches at least one of these queries, each read in this query's own context: "choose an attachment, non-Elite
|
|
124
134
|
* minion, or non-permanent side scheme" (Vivian, `ironheart` 29024) is `{ anyOf: [query("attachment"),
|
|
@@ -266,6 +276,14 @@ export interface TargetQuery {
|
|
|
266
276
|
readonly canFlip?: true;
|
|
267
277
|
/** In play facedown as something else ("each facedown Drone minion"). */
|
|
268
278
|
readonly facedown?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Showing the other face of a double-sided card (`flipSide`; `CardInstance.flipped`), or its front (false). For a
|
|
281
|
+
* card whose two faces print the same title, where `name` cannot tell them apart: MC27 p. 22's "**Setup:** Each
|
|
282
|
+
* player flips their 'Campaign - S.H.I.E.L.D. Tech' upgrade to its Enhanced side" flips only a copy still on its
|
|
283
|
+
* front, since `flipCard` turns a card over whichever face is up. Always false for a villain, a main scheme stage or
|
|
284
|
+
* an `otherFaceId` card, whose face is kept elsewhere: do not use it to tell their sides apart.
|
|
285
|
+
*/
|
|
286
|
+
readonly flipped?: boolean;
|
|
269
287
|
/**
|
|
270
288
|
* The card's boost area prints a star icon (★), or does not: "If that card has a star icon (★) in the boost area,
|
|
271
289
|
* defeat the attacked minion" (Longshot 35033, `wolv`) is `{ starIcon: true }` over the discarded card.
|
|
@@ -1201,6 +1219,17 @@ export type ValueSpec = {
|
|
|
1201
1219
|
readonly kind: "defeatExcessDamage";
|
|
1202
1220
|
readonly consequential?: boolean;
|
|
1203
1221
|
}
|
|
1222
|
+
/**
|
|
1223
|
+
* The excess threat the triggering `schemeDefeated` event recorded (`schemeDefeated.excessThreat`): how much more
|
|
1224
|
+
* threat the defeating removal attempted than the scheme had, after every modifier (#890 item 8). 0 when the removal
|
|
1225
|
+
* took exactly the last threat, for a defeat no removal made, or any other event. "After a side scheme is
|
|
1226
|
+
* overdefeated (more threat was removed from it than it had)" (The Rose, the `the-rose-bf` community pack: Hero
|
|
1227
|
+
* Resistance, Rose's Greenhouse) is this at least 1, from any removal, a thwart's or not; the threat counterpart of
|
|
1228
|
+
* `defeatExcessDamage`.
|
|
1229
|
+
*/
|
|
1230
|
+
| {
|
|
1231
|
+
readonly kind: "defeatExcessThreat";
|
|
1232
|
+
}
|
|
1204
1233
|
/**
|
|
1205
1234
|
* Arithmetic on another value: "2 damage for each counter (max 10)" → `{ value, times: 2, max: 10 }`; "X is 1 more
|
|
1206
1235
|
* than" → `plus: 1`; "half of the cards in your hand, rounded down" (Man Out of Time, `cap` pack) → `{ value:
|
|
@@ -3203,7 +3232,27 @@ export type EffectSpec =
|
|
|
3203
3232
|
readonly bind: string;
|
|
3204
3233
|
}
|
|
3205
3234
|
/** "Cancel that card's boost ability" (Target Acquired): only before that ability resolves. `bind`: `<bind>.made`. */
|
|
3235
|
+
/**
|
|
3236
|
+
* "… or resolve an 'Action' ability on a card you control" (War Machine Armor, the `punisher-msp` community pack;
|
|
3237
|
+
* #890 item 6): the player uses one Action ability of a card in play they control as they could on their own turn,
|
|
3238
|
+
* its cost paid (the author's answer, 2026-11-17: "Yes you pay the cost"), at this effect's moment, which need not be
|
|
3239
|
+
* their turn (the Action timing is not asked, as `playFromHand.ignoreActionTiming` does not ask it of an event).
|
|
3240
|
+
* Everything else about using the ability applies: its condition, limit and targets (`useAbility`), and its form: an
|
|
3241
|
+
* "Action", a "Hero Action" or an "Alter-Ego Action" may be picked, each only in its own form (the designer, PR #903).
|
|
3242
|
+
* Only printed abilities (`activePrintedAbilityRefs`): an Action another card grants is not "on a card you control".
|
|
3243
|
+
*
|
|
3244
|
+
* The player picks among the abilities that could be used now (each checked by triggering it on a copy of the game),
|
|
3245
|
+
* then answers what using it on their turn would ask: the branch of an either/or cost, each choice of cards in play
|
|
3246
|
+
* its cost makes, and its resources in a `spendResources` choice priced as an ability's payment (so a resource "for
|
|
3247
|
+
* an upgrade ability" pays). `filter`: only cards matching it. `optional`: the player may pick none. With nothing
|
|
3248
|
+
* usable, nothing happens.
|
|
3249
|
+
*/
|
|
3206
3250
|
| {
|
|
3251
|
+
readonly kind: "useActionAbility";
|
|
3252
|
+
readonly player: PlayerRef;
|
|
3253
|
+
readonly filter?: TargetQuery;
|
|
3254
|
+
readonly optional?: boolean;
|
|
3255
|
+
} | {
|
|
3207
3256
|
readonly kind: "cancelBoostAbility";
|
|
3208
3257
|
readonly bind?: string;
|
|
3209
3258
|
}
|
|
@@ -4639,6 +4688,11 @@ export type EffectSpec =
|
|
|
4639
4688
|
* such card prints "as if it were in your hand"); one from `"deck"` or a separate deck does not unless marked
|
|
4640
4689
|
* `asIfInHand` (`PlayOrigin`, `actions.ts`). RRG 1.8 FAQ "Magik (#30A)", p. 64.
|
|
4641
4690
|
*
|
|
4691
|
+
* `"discard"`: a card from the player's own discard pile ("play an Attack event from your discard pile, paying its
|
|
4692
|
+
* costs", Warzone, `punisher-msp`; #890 item 5). It is a play (RRG 1.8 "Play, Put Into Play", p. 32) from that
|
|
4693
|
+
* pile, not one "as if it were in your hand": the log's `cardPlayed` carries `from: "discard"` and no
|
|
4694
|
+
* `countsAsFrom`, so a "from your hand" response does not answer it.
|
|
4695
|
+
*
|
|
4642
4696
|
* `{ deck: "search", asIfInHand: true }`: `"deck"` for text that says "as if it were in your hand" ("search your
|
|
4643
4697
|
* deck for an ally and play it as if it were in your hand, reducing its resource cost by 2", Calling in Favors
|
|
4644
4698
|
* 61008; hero-pack spec H3.16). The same search, play and shuffle; the log's `cardPlayed` carries `from: "deck",
|
|
@@ -4646,7 +4700,7 @@ export type EffectSpec =
|
|
|
4646
4700
|
* So an "after you play [this card] from your hand" response (`EventPattern.playedFromHand`) answers it, as it
|
|
4647
4701
|
* does not answer the plain `"deck"` play.
|
|
4648
4702
|
*/
|
|
4649
|
-
readonly from?: "hand" | "setAside" | "deck" | {
|
|
4703
|
+
readonly from?: "hand" | "setAside" | "deck" | "discard" | {
|
|
4650
4704
|
readonly deck: "search";
|
|
4651
4705
|
readonly asIfInHand: true;
|
|
4652
4706
|
} | {
|
|
@@ -1238,6 +1238,11 @@ export declare const PAID_CARDS_SLOT = "paid.cards";
|
|
|
1238
1238
|
* spent as cards ("paid with a resource card", Concussive Blast). Bound and carried as `PAID_CARDS_SLOT` is.
|
|
1239
1239
|
*/
|
|
1240
1240
|
export declare const PAID_IN_PLAY_CARDS_SLOT = "paid.inPlayCards";
|
|
1241
|
+
/**
|
|
1242
|
+
* The slot an `endPhaseCardsReadied` event hands its answering abilities: the player's cards the end-of-player-phase
|
|
1243
|
+
* ready step readied ("for each 2 upgrades you readied this way", #890 item 1).
|
|
1244
|
+
*/
|
|
1245
|
+
export declare const READIED_CARDS_SLOT = "readied.cards";
|
|
1241
1246
|
/**
|
|
1242
1247
|
* The cards that paid for the play of `instanceId` while that play is still resolving, as the bindings its own
|
|
1243
1248
|
* abilities start with (`PAID_CARDS_SLOT`); empty when none did or the card is not being played. The slot twin of
|