Fa triggers malament
This commit is contained in:
@@ -116,6 +116,9 @@ function formatSelector(selector: ObjectSelector): string {
|
||||
if (selector.colors?.length) {
|
||||
text += `.withColor(${selector.colors.map(color => quote(COLOR_NAMES[color] ?? color)).join(', ')})`
|
||||
}
|
||||
if (selector.excludeColors?.length) {
|
||||
text += `.withoutColor(${selector.excludeColors.map(color => quote(COLOR_NAMES[color] ?? color)).join(', ')})`
|
||||
}
|
||||
if (selector.supertypes?.length) {
|
||||
text += `.withSupertype(${selector.supertypes.map(quote).join(', ')})`
|
||||
}
|
||||
@@ -315,7 +318,7 @@ export function formatEffect(effect: Effect): string {
|
||||
case 'create_token':
|
||||
return effect.copyOf
|
||||
? `createToken(${formatPlayer(effect.player)}, ${formatValue(effect.amount)}, copyOf(${formatTarget(effect.copyOf)}${effect.notLegendary ? ', { notLegendary: true }' : ''}))`
|
||||
: `createToken(${formatPlayer(effect.player)}, ${formatValue(effect.amount)}, ${formatToken(effect.token)})`
|
||||
: `createToken(${formatPlayer(effect.player)}, ${formatValue(effect.amount)}, ${formatToken(effect.token)}${effect.attachTo ? `, { attachTo: ${formatTarget(effect.attachTo)} }` : ''})`
|
||||
case 'destroy':
|
||||
return `destroy(${formatTarget(effect.target)})`
|
||||
case 'exile':
|
||||
@@ -560,6 +563,8 @@ function formatCondition(condition: Condition): string {
|
||||
return `attackedWithCreatures(${condition.atLeast})`
|
||||
case 'library_at_most':
|
||||
return `libraryAtMost(${condition.atMost})`
|
||||
case 'event_subject_toughness_at_most':
|
||||
return `eventSubjectToughnessAtMost(${condition.amount})`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,6 +656,11 @@ function formatStaticEffect(effect: StaticEffect): string {
|
||||
return `searchRestriction(${quote(effect.who)}, ${formatValue(effect.amount)})`
|
||||
case 'exile_instead_of_graveyard':
|
||||
return `exileInsteadOfGraveyard(${effect.owner ? quote(effect.owner) : ''})`
|
||||
case 'token_multiplier':
|
||||
return `tokenMultiplier(${effect.multiplier}${optionArg([
|
||||
['who', effect.who === 'each_player' ? quote('each_player') : undefined],
|
||||
['creatureOnly', effect.creatureOnly ? 'true' : undefined],
|
||||
])})`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user