-
Notifications
You must be signed in to change notification settings - Fork 151
Selectors
Jerome Leclanche edited this page Jul 13, 2015
·
1 revision
Selectors filter upon a list of entities from the point of view of an entity (the source).
The basic Selector class takes an Enum as argument and will test against the test(entity, source)
method of that enum. The method must return True if the test is successful, False if not.
Currently, the supported enums are CardType, Race, Zone, or Affiliation.
In addition to the base selector, there are some special selectors to make it easier to target entities in more elaborate ways:
- SelfSelector will always find the source.
- TargetSelector will always find the target of the source.
- AdjacentSelector(selector) will always find the minions adjacent to the entities selected by the selector. The selector argument itself must never return any non-minions.
- RandomSelector(selector) will always pick a random entity from the pool available from the selector argument. RandomSelector instances can be multiplied (eg. RandomSelector(selector) * 2) to pick more than 1 random target.
- The Fireplace Card API
- The Fireplace DSL
- Card introspection
- Creating and playing a Game
- The CardDefs.xml file
- Developer Quick Start
- How to enable logging in Hearthstone
- Frequently Asked Questions
- Game State
- Game Actions
- Powers and Card Actions
- Target Selection
- Events
- Enchantments