Class DeckCollectionSource
java.lang.Object
net.demilich.metastone.game.spells.desc.source.CardSource
net.demilich.metastone.game.spells.desc.source.DeckCollectionSource
- All Implemented Interfaces:
Serializable,HasDesc<CardSourceDesc>,HasCardCreationSideEffects
public class DeckCollectionSource
extends CardSource
implements Serializable, HasCardCreationSideEffects
Returns the list of cards from the deck in the user's collection named
CardSourceArg.COLLECTION_NAME. The
name is case insensitive, and the first deck found is used.
Uses the GameContext.getDeck(Player, String) method, which provides an implementation in server game
contexts.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CardListmatch(GameContext context, Entity source, Player player) Overridden by card source implementations to return a list of cards that usually get filtered in anEntityFilter.Methods inherited from class net.demilich.metastone.game.spells.desc.source.CardSource
getArg, getCards, getDesc, getTargetPlayer, hasArg, match, setDesc
-
Constructor Details
-
DeckCollectionSource
-
-
Method Details
-
match
Description copied from class:CardSourceOverridden by card source implementations to return a list of cards that usually get filtered in anEntityFilter.See the implementations for examples of how, e.g. the graveyard is turned into a
CardListinstance by iterating through all the actors in the graveyard and retrieving theirEntity.getSourceCard().- Specified by:
matchin classCardSource- Parameters:
context- The game contextsource- The entity that is the origin of this matching operationplayer- The casting player- Returns:
- A list of cards pre-filter.
-