Package net.demilich.metastone.game.spells.custom
package net.demilich.metastone.game.spells.custom
Custom spells that are used to implement game effects that are too complex for card JSON.
-
ClassesClassDescriptionDestroys friendly minions.A base class for spells that have to repeat recasts based on whether or not minions have been destroyed.Copies the text written on the actor card pointed to by
SpellArg.SECONDARY_TARGET
to thetarget
.Puts the enchantment written in this spell into play as soon as the minion is summoned from thetarget
minion card.CastsSpellArg.SPELL2
on the minions adjacent to the minion whose deathrattle is currently being processed.Transforms thetarget
into theSpellArg.CARD
.Changes your current hero to the first card in theSpellArg.CARDS
array.Puts the last three cards the playerAttribute.ROASTED
into the player'sSpellsource.ZonesMessage.Zones.HAND
).Swaps thesource
summoning minion's health with thetargets
, splitting the health of the source among all the targets and gaining the sum of the targets' health.Gives thesource
(or the player entity, when the source is a spell or not in play) the enchantment, "Whenever a minion whose card is the same as the chosen minion is summoned, double the newly summoned minion's stats."Buffs the leftmost minion in the player's hand.Summons all the minions from the player's deck.Casts theSpellArg.SPELL
subspell withEntityReference.OUTPUT
as a reference toSpellArg.VALUE
random cards (or source cards of actors) stored on thesource
.Casts theSpellArg.SPELL
subspell withEntityReference.OUTPUT
as a reference toSpellArg.VALUE
random entities (exact cards or e.g.Casts a copy of the card played during the firing of aSpellCastedTrigger
.Discovers cards fromSpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc)
until their total cost is greater or equal toSpellArg.SECONDARY_VALUE
.Clears all entities stored byStoreEntitySpell
on thetarget
.Copies enchantments written on theSpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc, int)
cards and thetarget
(when specified) to the target specified inSpellArg.SECONDARY_TARGET
.Copies enchantments from theSpellArg.SECONDARY_TARGET
to thetarget
.Puts a copy of the last card the playerAttribute.ROASTED
into the player'sSpellsource.ZonesMessage.Zones.HAND
.Copies the lowest costCard
of typeSpellsource.CardTypeMessage.CardType.MINION
in the player's hand.Gibes a minionSpellArg.HOW_MANY
battlecries that perform the selected spells fromCardFilter
.Creates a card from a sequence of discovers.Creates a sideboard ofSpellArg.VALUE
cards.Deals atarget
actor's damage to minions adjacent to thetarget
.Forces a minion to deal its damage to the minions opposite of it.Destroys all minions except one.For eachtarget
, destroy it.Discards a card.Discovers a class card.A spell that has the same interpretation of arguments asDiscardSpell
, except the player chooses which cards to discard.A dummy spell used for a simpler implementation of Khadgar's effect with aSpellOverrideAura
LikeDuelSpell
, except a random attacker that is not a defender is chosen from theSpellArg.SECONDARY_TARGET
.Gives a minion or card, "Deathrattle: Resummon this minion." Uses the card ID to do the resummoning.Stores a list of entities in the environment, instead of on an attribute on an entity.Source 3 cards from other classes (i.e., Source 3 times, each time, select from cards from other classes.Creates a trigger that copies thetarget
entity's text toRace.TOTEM
minions for the rest of the game.Sets thetarget
minion's attack and health to the highest values for attack and health found amongSpellArg.CARD_FILTER
-filtered cards inCardSource
.Causes theEntityReference.TRIGGER_HOST
to fight a random minion adjacent to it.DrainsSpellArg.VALUE
health for eachtarget
resolved from the perspective of eachSpellArg.SECONDARY_TARGET
.FiresSpellArg.HOW_MANY
missiles at theSpellArg.TARGET
entities.Buffs thetarget
with the stats of the highest cost minion in the player's hand.Prompts the player to guess which card started in the opponent's deck in order to receive it.Gets theAttribute.LAST_HIT
last amount of damage dealt to thetarget
, and restores health in that amount to theSpellArg.SECONDARY_TARGET
.Turns a hero power into a spell card.Destroys thetarget
minion, and gives thesource
the aftermath, "Resummon that minion."Puts a random secret into play.Casts aSpellArg.SPELL
on the lastCard
in theSpellsource.ZonesMessage.Zones.DECK
of theSpellArg.TARGET_PLAYER
.Summon minions based on player's mana crystal count; deduct one mana crystal per minion summoned.Retrieves all the cards generated bySpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc, int)
and plays them randomly.Replays randomly the lastSpellArg.VALUE
cards the caster played.Shuffles 5/5 copies of all minions in the casting player's deck.Gives theSpellArg.SECONDARY_TARGET
the deathrattle, "Summontarget
", and removestarget
from wherever it is.Deprecated.Gives the target minion, "Deathrattle: Shuffle this minion into the caster's deck."Recasts theSpellArg.SPELL
if any minions were destroyed.Deprecated.Recasts until at least one minion is destroyed.PutsSpellArg.CARD
into the caster's hand at the start of the caster's next turn.Receives a copy of all the cards stored onsource
byStoreEntitySpell
.Receives the spells the opponent cast from their hand their previous turn.Removes cards from the top of the caster's deck until a minion is found.Repeats all other aftermaths the casting player has triggered as long as the source is in play.Retrieves a list of cards usingSpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc, int)
and plays their openers with thissource
actor as the source.Repeats the lastSpellArg.VALUE
aftermaths triggered by owner of thesource
.Resurrects and clears the entities stored on thesource
.Reads theSpellArg.ATTRIBUTE
from theSpellArg.SECONDARY_TARGET
, and puts therace
(tribe) specified in that attribute onto thetarget
.Generates the cards retrieved bySpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc)
rules, moves each card to theSpellsource.ZonesMessage.Zones.SET_ASIDE_ZONE
, casts theSpellArg.SPELL
sub-spell on each as thetarget
, and then moves the card to theSpellsource.ZonesMessage.Zones.REMOVED_FROM_PLAY
zone if they have not been moved out of set aside.Records thetarget
minion's deathrattles.Discover a minion in your graveyard.Forces the leftmost and rightmost enemy minions to attack their neighbors.Creates a skill from the specified spell.Stores the specifiedSpellArg.TARGET
into a list keyed by thesource
of the casting spell.Stores the race of thetarget
onto thesource
orSpellArg.SECONDARY_TARGET
in theSpellArg.ATTRIBUTE
.Summons all the friendly minions that died this turn.Summons a minion from the player's deck with the most copies in the deck.Swaps a card from the hand filtered using the first item in theSpellArg.CARD_FILTERS
with a card in the deck filtered with the second filter in the card filters array.Swaps the HP and the cost of thetarget
.Swaps atarget
minion with a random one in your hand.Puts text from a randomSpellDesc.getFilteredCards(GameContext, Player, Entity)
card onto thetarget
Card
.Transforms thetarget
card into a card retrieved fromSpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc)
, keeping important attributes likeAttribute.STARTED_IN_DECK
,Attribute.STARTED_IN_HAND
andAttribute.REMOVES_SELF_AT_END_OF_TURN
(ghostly) consistent.TriggersSpellArg.VALUE
distinct aftermaths in the player's graveyard whose entities match theSpellArg.FILTER
specified.Upgrades the player's hero power as specified in itsCardDesc.heroPower
.Buffs all minions in your hand and deck that have a copy in the graveyard.Replaces theSpellArg.TARGET_PLAYER
's deck with 30 random cards.Both players swap their leftmost and rightmost cards with their opponent.Drains damage from thetarget
and randomly buffs among theSpellArg.SECONDARY_TARGET
entities.