Class TopCardsOfDeckSource
java.lang.Object
net.demilich.metastone.game.spells.desc.source.CardSource
net.demilich.metastone.game.spells.desc.source.DeckSource
net.demilich.metastone.game.spells.desc.source.TopCardsOfDeckSource
- All Implemented Interfaces:
Serializable
,HasDesc<CardSourceDesc>
- Direct Known Subclasses:
TopThreeCardsOfDeckSource
Returns the top N cards of the deck, where N is defined by the
CardSourceArg.VALUE
arg- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
howMany
(GameContext context, Entity source, Player player) protected CardList
match
(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.DeckSource
create
Methods inherited from class net.demilich.metastone.game.spells.desc.source.CardSource
getArg, getCards, getDesc, getTargetPlayer, hasArg, match, setDesc
-
Constructor Details
-
TopCardsOfDeckSource
-
-
Method Details
-
match
Description copied from class:CardSource
Overridden 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
CardList
instance by iterating through all the actors in the graveyard and retrieving theirEntity.getSourceCard()
.- Overrides:
match
in classDeckSource
- 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.
-
howMany
-