Expand description
AbilityFactory — factory for creating spell abilities from card scripts.
Mirrors Java’s AbilityFactory.java.
Parses ability strings (AB$, SP$, DB$, ST$ prefixed) and constructs
the corresponding SpellAbility with all sub-abilities resolved.
Enums§
- Ability
Record Type - The record type prefix for an ability definition.
Mirrors Java’s
AbilityFactory.AbilityRecordType.
Constants§
- ADDITIONAL_
ABILITY_ KEYS - Keys used for additional sub-abilities in ability scripts.
Mirrors Java’s
AbilityFactory.additionalAbilityKeys.
Functions§
- adjust_
change_ zone_ target - Adjust the change-zone target for effects that move cards between zones.
Mirrors Java’s
AbilityFactory.adjustChangeZoneTarget(MapOfParams, SpellAbility). - build_
fused_ ability - Build a fused spell ability for split/fused cards.
Mirrors Java’s
AbilityFactory.buildFusedAbility(Card). - build_
spell_ ability - Build a SpellAbility chain from a card’s ability text, walking SubAbility$
SVars to construct the linked list.
Mirrors Java’s
AbilityFactory.getAbility()+ sub-ability chain construction. - build_
spell_ ability_ for_ card_ cast - Build a spell ability for card-casting contexts.
- build_
spell_ ability_ from_ host_ card - Build a SpellAbility chain from script text using a concrete host card.
- get_
ability - Java-name alias for
build_spell_ability_from_host_card. MirrorsAbilityFactory.getAbility(String abString, Card card). - get_
map_ params - Parse a pipe-delimited ability string into a key-value map.
Mirrors Java’s
AbilityFactory.getMapParams(). - parse_
ability_ cost - Parse the cost of an ability from its parameters.
Mirrors Java’s
AbilityFactory.parseAbilityCost(Card, MapOfParams, RecordType).