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:
phasePhase

The phase the ability may be used in.

labelstr

A short human description for the activation menu.

costcallable()

Maps the source card to the effects paid to activate — applied before the ability’s own.

targetscallable()

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.

effectscallable()

Maps (source_card, target_card) to the effects the ability emits against a target.

all_targetsbool

Whether the ability hits every card targets returns 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 effects against it — Modest Farm’s out-of-sequence recruit. Default False.

Methods

Ability.__init__(phase, label, cost, ...[, ...])

Attributes

phase

label

cost

targets

effects

all_targets

recruits_target