Expand description
Central parsing module for the Forge DSL.
Mirrors Java’s FileSection.parseToMap() + CardTraitBase accessor
methods. All pipe-delimited parameter parsing and typed access goes
through the Params wrapper — no code should use raw
BTreeMap<String, String> for DSL parameters.
Re-exports§
pub use amount::AmountExpr;pub use cost::CostToken;pub use cost::CostTokenKind;
Modules§
- amount
- card_
script - compare
- Comparison utilities for Forge DSL expressions.
- cost
- Semantic names for Forge
Cost$token identifiers. - keys
- Compile-time constants for all DSL parameter keys.
Structs§
- Compiled
Selector - Typed wrapper around parsed DSL parameters.
- Compiled
Selector Alternative - Compiled
Selector Part - Param
Diagnostic - Param
Entry - Params
- Parsed
Card Script - Parsed
Params - Parsed
Params Report - Script
Ability - Script
Diagnostic - Script
Field - Script
Line - Script
Param Record - ScriptS
Var - Selector
- Selector
Alt - Semantic
Comparison - Semantic
Param - Semantic
Selector - Semantic
Selector Alternative - Semantic
Selector Part - Semantic
Transform
Enums§
- Card
Color Selector - Card
Identity Selector - Card
Selector Type - Card
State Selector - Card
Supertype Selector - Cast
Origin - Context
Predicate - Controller
Selector - Numeric
Selector Property - Param
Diagnostic Kind - Relation
Predicate - Script
Ability Record - Script
Diagnostic Kind - Script
Line Kind - ScriptS
VarNumeric Expression - ScriptS
VarObject Ref - ScriptS
VarValue - Selector
Compare Operator - Selector
Numeric Operand - Selector
Predicate - Semantic
Amount - Semantic
Comparison Operator - Semantic
Param Value - Semantic
Param Value Kind - Semantic
Produced Mana - Semantic
Produced Mana Combo - Target
Ref
Functions§
- cached_
compiled_ selector - enchant_
type_ matches_ card - Check if a card type matches an “Enchant
” keyword value. Used by aura SBA to verify the enchant restriction is still met. - enchant_
type_ to_ target_ params - Build a minimal targeting params string from an Enchant keyword payload.
Handles special cases like
Creature.inZoneGraveyardused by Animate Dead. - enchant_
type_ to_ valid_ tgts - parse_
classified_ or_ warn - Adapter: convert a parse result to Option, logging failures only when the raw input looks like it was intended to be the given kind.
- parse_
or_ warn - parse_
semantic_ param_ value - raw_get
- raw_
has_ any - raw_
has_ key - split_
param_ list_ value - strip_
times_ multiplier - Strip a
/Times.Nmultiplier suffix from a filter string. Returns (filter_without_suffix, multiplier).