Skip to content

Extended card behavior

Oinite edited this page Oct 3, 2026 · 2 revisions

(mechanic from Cryptlib and Entropy)

Additional card buttons

Spectrallib extends the compatibility of cards so that regardless of which card area they are in, they retain some functionality. In particular:

  • Voucher cards and booster packs can now be redeemed and opened respectively in G.jokers, G.consumeables, and G.hand.
  • Deck cards (and Sleeve cards, if CardSleeves is installed) now have well-defined on-use behaviour; see Deck redeeming for more information. They can be used in G.jokers, G.consumeables, G.hand, and G.pack_cards.
  • Jokers in G.hand can be pulled back into G.jokers. While in G.hand, Jokers are not calculated during scoring.

Useable Jokers

Much like consumables, by defining the use(self, card, area, copier) method in a Joker's register, a "USE" button is added to the Joker. The method can_use(self, card) can also be defined to conditionally toggle the use button.

Additionally, by defining the method needs_use_button(self, card), the visibility of the use button can also be conditionally toggled; if the method is defined, the use button will only be visible if the method returns a truthy value.

CCD

CCD refers to the ability to apply any center to any playing card. When this occurs, the playing card decal (rank and suit) is imposed onto the center's sprite.

In this state, the behaviour of the center that a CCD card has will be present. For example, Joker-CCD playing cards will not be calculated during scoring if in G.hand, but will be calculated during scoring if in G.jokers. As another example, useable-CCD playing cards can be used in G.hand, in which case the card will be removed as usual due to usage.

To apply a center to a playing card, call the method Card:set_ability(center), where center is a key or value in G.P_CENTERS.

"CCD" stands for "consumable card in deck", as this functionality originally only applied to consumables.

Multiuse consumables

By defining cry_multiuse in a consumable's config table (in its register), or defining cry_multiuse in a card's ability table (given that the card has a consumable center), the card can be used multiple times, and will only be removed once cry_multiuse decreases to 0.

Clone this wiki locally