Class SpecificCardFilter

All Implemented Interfaces:, HasDesc<EntityFilterDesc>
Direct Known Subclasses:

public class SpecificCardFilter
extends EntityFilter
A card or actor will pass this filter if its Entity.getSourceCard() Card.getCardId() matches the EntityFilterArg.CARD argument.

If a EntityFilterArg.CARDS argument is specified, passes the filter if the target's source card matches any card in the list.

If a EntityFilterArg.SECONDARY_TARGET is specified, the card or actor will pass the filter if its card ID matches the card ID of the secondary target.

See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • create

      public static EntityFilterDesc create​(java.lang.String cardId)
    • test

      protected boolean test​(GameContext context, Player player, Entity entity, Entity host)
      Description copied from class: EntityFilter
      The subclasses of this class implement this method to actually perform the logic of the filtering. Observe that results from filtering other entities are not available here; this function is stateless in the sense that an earlier acceptance or rejection of an entity cannot influence the acceptance or rejection of a current entity.
      Specified by:
      test in class EntityFilter