java.lang.Object
net.demilich.metastone.game.spells.desc.filter.EntityFilter
net.demilich.metastone.game.spells.desc.filter.CardFilter
All Implemented Interfaces:
java.io.Serializable, HasDesc<EntityFilterDesc>

public final class CardFilter
extends EntityFilter
Filters entities based on various properties of their source cards.

The supported properties are:

See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    CardFilter​(EntityFilterDesc desc)  
  • Method Summary

    Modifier and Type Method Description
    static CardFilter create​(com.hiddenswitch.spellsource.client.models.CardType cardType)  
    static CardFilter create​(com.hiddenswitch.spellsource.client.models.CardType cardType, java.lang.String race)  
    boolean equals​(java.lang.Object other)  
    protected boolean test​(GameContext context, Player player, Entity entity, Entity host)
    The subclasses of this class implement this method to actually perform the logic of the filtering.

    Methods inherited from class net.demilich.metastone.game.spells.desc.filter.EntityFilter

    getArg, getDesc, getTargetedEntities, hasArg, matcher, matches, setDesc

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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
      Returns:
    • equals

      public boolean equals​(java.lang.Object other)
      Overrides:
      equals in class EntityFilter
    • create

      public static CardFilter create​(com.hiddenswitch.spellsource.client.models.CardType cardType)
    • create

      public static CardFilter create​(com.hiddenswitch.spellsource.client.models.CardType cardType, java.lang.String race)