Class OpenerDesc

java.lang.Object
net.demilich.metastone.game.spells.desc.OpenerDesc
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HasEntrySet<BattlecryDescArg,​java.lang.Object>, AbstractEnchantmentDesc<Opener>

public final class OpenerDesc
extends java.lang.Object
implements java.io.Serializable, HasEntrySet<BattlecryDescArg,​java.lang.Object>, java.lang.Cloneable, AbstractEnchantmentDesc<Opener>
The object describing a battlecry.

Like a spell, battlecries take targetSelection, assumed to be TargetSelection.NONE if not specified in the JSON.

For example, this battlecry summons a 2/1 minion:

      {
          "spell": {
              "class": "SummonSpell",
              "boardPositionRelative": "RIGHT",
              "card": "token_ooze",
              "targetPlayer": "SELF"
          }
      }
 
This battlecry deals 2 damage to the chosen minion:
     {
         "targetSelection": "MINIONS",
         "spell": {
             "class": "DamageSpell",
             "value": 2
         }
     }
 
This battlecry implements, "If you're holding a spell, deal 1 damage."
     {
         "targetSelection": "ANY",
         "spell": {
             "class": "DamageSpell",
             "value": 1
         },
         "condition": {
             "class": "HoldsCardCondition",
             "cardFilter": {
                 "class": "CardFilter",
                 "cardType": "SPELL"
             }
         }
     }
 
This battlecry is one of two for "Choose One - Deal 2 damage, or Draw a Card". Notice the flavorful name.
     {
         "spell": {
             "class": "DrawCardSpell"
         },
         "name": "Study in the Library",
         "description": "Draw a Card"
     }
 
See Also:
to see how the battlecry action is processed., Serialized Form