yasuki_core.engine.rules.modifiers.Modifier#

class Modifier(source_id, target_id, stat, amount, duration)[source]#

A continuous effect that adjusts one card’s stat by a fixed amount while active. Every stat change — a counter’s grant, an attachment’s bonus, an ability’s effect — is one of these, summed on demand to compute a card’s effective stat.

Attributes:
source_idstr

The card the modifier comes from — used to expire WHILE_SOURCE_IN_PLAY modifiers when it leaves play and to attribute the effect.

target_idstr

The card whose stat is adjusted.

statStat

Which stat is adjusted.

amountint

The bonus (positive) or penalty (negative) added to the stat.

durationDuration

When the modifier stops applying.

Methods

Modifier.__init__(source_id, target_id, ...)

Attributes

source_id

target_id

stat

amount

duration