Class CatalogueSource

All Implemented Interfaces:, HasDesc<CardSourceDesc>, HasCardCreationSideEffects, HasWeights
Direct Known Subclasses:

public class CatalogueSource
extends CardSource
implements HasCardCreationSideEffects, HasWeights
Returns a list of collectible cards from the DeckFormat for this game (from GameContext.getDeckFormat()) where class cards of the casting player's class appear 4x more than neutrals, and no other class cards appear.

This source has HasCardCreationSideEffects, which indicates that it doesn't refer to cards inside the game but rather generates new copies on the fly.

This source also has the aforementioned weights indicated by HasWeights.

This is the default card source for DiscoverSpell.

See Also:
for a card source that returns all cards in the deck format from all classes as frequently as neutrals., Serialized Form
  • Constructor Details

  • Method Details

    • create

      public static CatalogueSource create()
    • match

      protected CardList match​(GameContext context, Entity source, Player player)
      Description copied from class: CardSource
      Overridden by card source implementations to return a list of cards that usually get filtered in an EntityFilter.

      See the implementations for examples of how, e.g. the graveyard is turned into a CardList instance by iterating through all the actors in the graveyard and retrieving their Entity.getSourceCard().

      Specified by:
      match in class CardSource
      context - The game context
      source - The entity that is the origin of this matching operation
      player - The casting player
      A list of cards pre-filter.