All Implemented Interfaces:
Serializable, Cloneable, Comparable<Entity>, HasCard, Trigger

public class Secret extends Enchantment
See Also:
  • Constructor Details

  • Method Details

    • process

      protected boolean process(int ownerId, SpellDesc spell, GameEvent event)
      Description copied from class: Enchantment
      Casts the effects of this enchantment.
      Overrides:
      process in class Enchantment
      Returns:
      true if processing succeeded.
    • onGameEvent

      public void onGameEvent(GameEvent event)
      Description copied from interface: Trigger
      Specified by:
      onGameEvent in interface Trigger
      Overrides:
      onGameEvent in class Enchantment
      Parameters:
      event - The game event this trigger is now processing.
    • getName

      public String getName()
      Description copied from class: Entity
      Gets the name of the entity (typically the name of the card that created this entity). Or, overridden by the Attribute.NAME attribute set in this entity's attributes.
      Overrides:
      getName in class Entity
      Returns:
      The name.
    • getEntityType

      public com.hiddenswitch.spellsource.rpc.Spellsource.EntityTypeMessage.EntityType getEntityType()
      Description copied from class: Entity
      Gets the type of entity this is. These will very nearly match up with the classes, but are primarily used for filters that e.g. draw a Spell or destroy all Secrets.
      Overrides:
      getEntityType in class Enchantment
      Returns:
      An Spellsource.EntityTypeMessage.EntityType
    • clone

      public Secret clone()
      Description copied from class: Entity
      Clone an entity, including its ID and location.

      Use this method for emulating an "immutable" view on an entity. This kind of cloning is not suitable for most gameplay situations, because using the clone will cause two entities with identical IDs and locations to exist. Instead, a subclass will provide a getCopy() method that is more helpful for gameplay.

      Specified by:
      clone in interface Trigger
      Overrides:
      clone in class Enchantment
      Returns:
      An exact clone.
    • cast

      protected void cast(int ownerId, SpellDesc spell, GameEvent event)
      Overrides:
      cast in class Enchantment
    • getZones

      public com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones[] getZones()
      Overrides:
      getZones in class Enchantment