Log in

Filter() functions (DotP 2012)

Contents

AIMay

AddBadge

Filter cards having specified badge.

AddCardName

Filter cards having specified name.

AddCardType

Filter cards having specified type.

AddColour

Filter cards having specified color.

AddExtra

Currently known arguments defined for this function are as follows: FILTER_EXTRA_CREATURE_ATTACKING = 1 FILTER_EXTRA_CREATURE_BLOCKING = 2 FILTER_EXTRA_CREATURE_TAPPED = 4 FILTER_EXTRA_CREATURE_UNTAPPED = 8 FILTER_EXTRA_IS_TOKEN = 16 FILTER_EXTRA_NOT_TOKEN = 32 FILTER_EXTRA_FLIP_CARD_TYPES = 65536 FILTER_EXTRA_FLIP_SECOND_CARD_TYPES = 32768 FILTER_EXTRA_FLIP_SUB_TYPES = 131072 FILTER_EXTRA_FLIP_SUPER_TYPES = 262144 FILTER_EXTRA_FLIP_PLAYER = 524288 FILTER_EXTRA_FLIP_ZONE = 1048576 FILTER_EXTRA_FLIP_COLOUR = 2097152 FILTER_EXTRA_FLIP_CARD_REF = 4194304 FILTER_EXTRA_FLIP_CARD_INSTANCE = 8388608 FILTER_EXTRA_ANY_SUPER_TYPE = 16777216 FILTER_EXTRA_ANY_SUB_TYPE = 33554432 FILTER_EXTRA_FLIP_TEAM = 67108864 FILTER_EXTRA_FLIP_NAMES = 134217728 FILTER_EXTRA_FLIP_BADGES = 268435456 FILTER_EXTRA_FLIP_PLAYER_INSTANCE = 536870912

The FLIP arguments cause the filter to select everything NOT matching a previously filtered field - for example, adding a filter subtype of forest and adding the extra FILTER_EXTRA_FLIP_SUB_TYPES would cause all lands except forests to be filtered.

AddSecondCardType

AddSubType

Filter cards having specified sub-type (plant, kithkin, mountain, etc). How does this differ from SetSubTypes?

AddSupertype

Filter cards having specified super-type (eg legendary).

Clear

Clear the current filter.

Count

Returns a count of the cards matching the current filter.

CountStopAt

Short-circuit the count when the specificied number of valid matches is met. An optimization with seemingly dubious benefit.

May

If the filter is used to designate a target, may allows the designator to cancel without making a selection.

NotTargetted

PlayerAntiHint

If the filter is used to designate a target, this presumably allows the game to selectively control allowable targets according to the simplified targeting selection in the game's options, much like Good/BadF().

PlayerHint

If the filter is used to designate a target, this presumably allows the game to selectively control allowable targets according to the simplified targeting selection in the game's options, much like Good/BadF().

SetCardInstance

SetController

Filter cards currently under the control of the specified player.

SetControllersTeam

Filter cards currently under the control of the specified player's team.

SetConvertedCostMax

Filter cards whose converted mana cost is equal or less than the specified number.

SetConvertedCostValue

Filter cards whose converted mana cost is equal to the specified number.

SetFilterType

SetNeutral

If the filter is used to designate a target, this presumably prevents the game to from selectively controlling allowable targets according to the simplified targeting selection in the game's options, much like Good/BadF().

SetOwner

Filter cards having specified owner.

SetPlayer

Filter cards currently under the play of the specified player.

SetPlayerInstance

SetPortion

Limit the filter's consideration to the first X cards encountered, where X is the argument to SetPortion. Useful for testing the top X cards of a library or graveyard, for example.

SetPowerMax

Filter cards whose power is equal to or less than the specified amount.

SetPowerMin

Filter cards whose power is equal to or greater than the specified amount.

SetReversePortion

Limit the filter's consideration to the last X cards encountered, where X is the argument to SetPortion. Useful for testing the bottom X cards of a library or graveyard, for example.

SetStackObjectType

SetSubTypes

Filter cards having specified sub-type (plant, kithkin, mountain, etc). How does this differ from AddSubTypes?

SetUnique

SetZone

Filters cards located in specified zone (in play, library, graveyard, etc)