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_TARGETto thetarget.Puts the enchantment written in this spell into play as soon as the minion is summoned from thetargetminion card.CastsSpellArg.SPELL2on the minions adjacent to the minion whose deathrattle is currently being processed.Transforms thetargetinto theSpellArg.CARD.Changes your current hero to the first card in theSpellArg.CARDSarray.Puts the last three cards the playerAttribute.ROASTEDinto the player'sSpellsource.ZonesMessage.Zones.HAND).Swaps thesourcesummoning 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.SPELLsubspell withEntityReference.OUTPUTas a reference toSpellArg.VALUErandom cards (or source cards of actors) stored on thesource.Casts theSpellArg.SPELLsubspell withEntityReference.OUTPUTas a reference toSpellArg.VALUErandom 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 byStoreEntitySpellon 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_TARGETto thetarget.Puts a copy of the last card the playerAttribute.ROASTEDinto the player'sSpellsource.ZonesMessage.Zones.HAND.Copies the lowest costCardof typeSpellsource.CardTypeMessage.CardType.MINIONin the player's hand.Gibes a minionSpellArg.HOW_MANYbattlecries that perform the selected spells fromCardFilter.Creates a card from a sequence of discovers.Creates a sideboard ofSpellArg.VALUEcards.Deals atargetactor'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 aSpellOverrideAuraLikeDuelSpell, 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 thetargetentity's text toRace.TOTEMminions for the rest of the game.Sets thetargetminion's attack and health to the highest values for attack and health found amongSpellArg.CARD_FILTER-filtered cards inCardSource.Causes theEntityReference.TRIGGER_HOSTto fight a random minion adjacent to it.DrainsSpellArg.VALUEhealth for eachtargetresolved from the perspective of eachSpellArg.SECONDARY_TARGET.FiresSpellArg.HOW_MANYmissiles at theSpellArg.TARGETentities.Buffs thetargetwith 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_HITlast 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 thetargetminion, and gives thesourcethe aftermath, "Resummon that minion."Puts a random secret into play.Casts aSpellArg.SPELLon the lastCardin theSpellsource.ZonesMessage.Zones.DECKof 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.VALUEcards the caster played.Shuffles 5/5 copies of all minions in the casting player's deck.Gives theSpellArg.SECONDARY_TARGETthe deathrattle, "Summontarget", and removestargetfrom wherever it is.Deprecated.Gives the target minion, "Deathrattle: Shuffle this minion into the caster's deck."Recasts theSpellArg.SPELLif any minions were destroyed.Deprecated.Recasts until at least one minion is destroyed.PutsSpellArg.CARDinto the caster's hand at the start of the caster's next turn.Receives a copy of all the cards stored onsourcebyStoreEntitySpell.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 thissourceactor as the source.Repeats the lastSpellArg.VALUEaftermaths triggered by owner of thesource.Resurrects and clears the entities stored on thesource.Reads theSpellArg.ATTRIBUTEfrom 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.SPELLsub-spell on each as thetarget, and then moves the card to theSpellsource.ZonesMessage.Zones.REMOVED_FROM_PLAYzone if they have not been moved out of set aside.Records thetargetminion'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.TARGETinto a list keyed by thesourceof the casting spell.Stores the race of thetargetonto thesourceorSpellArg.SECONDARY_TARGETin 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_FILTERSwith a card in the deck filtered with the second filter in the card filters array.Swaps the HP and the cost of thetarget.Swaps atargetminion with a random one in your hand.Puts text from a randomSpellDesc.getFilteredCards(GameContext, Player, Entity)card onto thetargetCard.Transforms thetargetcard into a card retrieved fromSpellUtils.getCards(GameContext, Player, Entity, Entity, SpellDesc), keeping important attributes likeAttribute.STARTED_IN_DECK,Attribute.STARTED_IN_HANDandAttribute.REMOVES_SELF_AT_END_OF_TURN(ghostly) consistent.TriggersSpellArg.VALUEdistinct aftermaths in the player's graveyard whose entities match theSpellArg.FILTERspecified.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 thetargetand randomly buffs among theSpellArg.SECONDARY_TARGETentities.