yasuki_core.engine.rules.abilities.Ability#
- class Ability(phase, label, cost, targets, effects, all_targets=False, recruits_target=False)[source]#
An activated ability on an in-play card.
- Attributes:
- phase
Phase The phase the ability may be used in.
- label
str A short human description for the activation menu.
- cost
callable() Maps the source card to the effects paid to activate — applied before the ability’s own.
- targets
callable() Maps
(game, source_card)to the ids of the cards the ability may target — empty when none are legal, which also means the ability can’t be offered.- effects
callable() Maps
(source_card, target_card)to the effects the ability emits against a target.- all_targetsbool
Whether the ability hits every card
targetsreturns rather than one chosen among them — an untargeted “your other Farms” grant instead of a single pick. Default False.- recruits_targetbool
Whether the ability recruits its chosen target (paying for it and bringing it into play) rather than emitting
effectsagainst it — Modest Farm’s out-of-sequence recruit. Default False.
- phase
Methods
Ability.__init__(phase, label, cost, ...[, ...])Attributes
phaselabelcosttargetseffectsall_targetsrecruits_target