Class Entity

All Implemented Interfaces:, java.lang.Cloneable, java.lang.Comparable<Entity>, HasCard
Direct Known Subclasses:
Actor, Card, Enchantment, Player

public abstract class Entity
extends CustomCloneable
implements, HasCard, java.lang.Comparable<Entity>
An in-game entity.

Entities are targetable objects in a match. The player, hero, hero power card, minions, cards in hand, cards in deck, cards in graveyard, secrets and certain kinds of triggers are all entities.

Entities are only created, never destroyed. Entities have a EntityLocation; each location (index, zone and player) can have only one entity occupying it at any time. Destroyed entities go to the Zones.GRAVEYARD or Zones.REMOVED_FROM_PLAY zone. EntityZone lists located in the Player objects are reponsible for making sure entities are in only one place at a time.

Entities all have attributes, which contain their state. As simple maps, entity attributes can be manipulated, copied, etc. Most effects interact with an entity's attributes.

Entities are mutable. Use clone() to create an "immutable" view of an entity. However, for effects that need copies of entities, typically a getCopy() method is used, like Card.getCopy().

This entity class will contain all the game engine information. It is not suitable to show to clients directly, because it may contain information that should be secret from an opponent. For example, Secret entities should have their description or card IDs visible to their opponents.

See Also:
Serialized Form