All Implemented Interfaces:, java.lang.Cloneable, java.lang.Comparable<Entity>, HasDesc<AuraDesc>, HasCard, Trigger
Direct Known Subclasses:
EffectlessAura, SpellAura

public class Aura
extends Enchantment
implements HasDesc<AuraDesc>
Auras represent ongoing effects applied to certain entities and is updated whenever (1) the board changes, (2) a sequence ends, (3) a special secondary trigger is fired, or (4) a condition is changed during these earlier events.

Because auras evaluate which entities they affect on board changes and sequence endings, they aren't affecting entities the moment they "come into play" (are attached to a host that is Entity.isInPlay()). However, since a BoardChangedEvent is fired right after a minion is put on the Zones.BATTLEFIELD during a GameLogic.summon(int, Minion, Entity, int, boolean) call, in practice auras come into play immediately. Specifically, a minion with an aura written on it will not be affecting entities by the BeforeSummonEvent event, but only by the first BoardChangedEvent (which comes before any battlecries are resolved or before control is given back to the player).

Auras have the following format (corresponding to AuraDesc):

                "class": An Aura class. When the class is Aura, the apply and remove effects below are used. Otherwise,
                         for classes like BuffAura, the apply and remove effects are provided by the class.
               "target": An EntityReference for all the entities affected by this aura
               "filter": A filter on those entities. Evaluated against every target entity in the
                         "target" specified.
          "applyEffect": A SpellDesc that corresponds to the spell to cast on a given entity when it transitions
                         from being unaffected to affected by this aura. The target is the entity newly under
                         the influence of the aura and source is the EntityReference.TRIGGER_HOST /
                         host of the aura.
         "removeEffect": A SpellDesc that corresponds to the spell to cast on an entity when it was previously
                         affected and it is now transitioning into not being affected. The target is the
                         entity newly under the influence of the aura and source is the
                         EntityReference.TRIGGER_HOST / host of the aura.
            "condition": A condition that is evaluated whenever the BoardChangedEvent is raised; the
                         WillEndSequenceEvent is raised; or "secondaryTrigger" is fired, against every entity that
                         could be or currently is affected by this aura. When the condition is true, the entity that is
                         affected remains affected; the entity that could not be affected is affected. When false, the entity
                         that is affected stops being affected, and an entity that is not yet affected will still not be
                         affected. target in the condition will be the entity, and source will be the
                         EntityReference.TRIGGER_HOST / host of the aura.
     "secondaryTrigger": Another trigger that, when fired, will cause this aura to reevaluate which entities are
                         affected. EntityReference.EVENT_TARGET will correspond to the
                         GameEvent.getTarget() processed by that trigger.

An aura is not an abstract class; it can be directly specified using an AuraDesc with a specific AuraArg.APPLY_EFFECT and AuraArg.REMOVE_EFFECT. The remove effect should reverse the consequences of the add effect. Since this is challenging to come up with without a background in software engineering, the BuffAura and AttributeAura should cover most cases of ongoing effects correctly.

The onGameEvent(GameEvent) method actually implements the evaluation of the condition, the filter, the target and the add/remove effects. Observe that unlike an Enchantment, which it inherits, auras do not respect configuration features like Enchantment.getMaxFires(). It is unclear how such features should be interpreted.

See Also:
for an aura that increases stats., for an aura that adds an attribute, that temporarily makes one card behave like another, Serialized Form