Class NumberOfCopiesCondition

java.lang.Object
net.demilich.metastone.game.spells.desc.condition.Condition
net.demilich.metastone.game.spells.desc.condition.NumberOfCopiesCondition
All Implemented Interfaces:
Serializable, HasDesc<ConditionDesc>
Direct Known Subclasses:
HighlanderDeckCondition

public class NumberOfCopiesCondition extends Condition
Evaluates to true when the number of distinct card IDs in the ConditionArg.TARGET when filtered by ConditionArg.FILTER passes the ConditionArg.OPERATION with ConditionArg.VALUE.

For example, a condition that is true when there are two or less copies of all cards:

   
       {
         "description": "Decks can't have more than 2 copies of a card",
         "class": "NumberOfCopiesCondition",
         "target": "FRIENDLY_DECK",
         "operation": "LESS_OR_EQUAL",
         "value": 2
       }
   
 
See Also: