- Volrath's Shapeshifter: unfortunately, the generic solution for AB Discard on a SVar didn't work (doesn't work with cloning, crashes the game), so resorting to a non-generic version specific to VS.

This commit is contained in:
Agetian
2018-01-19 22:16:16 +03:00
parent 056d66b865
commit 042693bf53
2 changed files with 7 additions and 8 deletions

View File

@@ -524,12 +524,12 @@ public final class StaticAbilityContinuous {
affectedCard.getCurrentState().addStaticAbility(stAb);
}
// Gain additional abilities (e.g. such as Volrath's Shapeshifter {2}: Discard a card)
if (params.containsKey("GainAbility")) {
for (String svarDef : params.get("GainAbility").split(",")) {
SpellAbility ab = AbilityFactory.getAbility(affectedCard.getState(CardStateName.OriginalText), svarDef);
affectedCard.addSpellAbility(ab);
}
// Add the ability "{2}: Discard a card" for Volrath's Shapeshifter
// TODO: Make this generic so that other SAs can be added onto custom cards if need be
if (params.containsKey("GainVolrathsDiscardAbility")) {
String abDiscard = "AB$ Discard | Cost$ 2 | Defined$ You | NumCards$ 1 | Mode$ TgtChoose | AILogic$ VolrathsShapeshifter | SpellDescription$ Discard a card.";
SpellAbility ab = AbilityFactory.getAbility(abDiscard, affectedCard);
affectedCard.addSpellAbility(ab);
}
// Remember the name and the timestamp of the card we're gaining text from, so we don't modify

View File

@@ -3,8 +3,7 @@ ManaCost:1 U U
Types:Creature Shapeshifter
PT:0/1
A:AB$ Discard | Cost$ 2 | Defined$ You | NumCards$ 1 | Mode$ TgtChoose | AILogic$ VolrathsShapeshifter | SpellDescription$ Discard a card.
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainTextOf$ Creature.TopGraveyard+YouCtrl | GainedTextHasThisStaticAbility$ True | GainAbility$ ABDiscard | Description$ ORIGINALTEXTONLY:As long as the top card of your graveyard is a creature card, CARDNAME has the full text of that card and has the text "{2}: Discard a card." (CARDNAME has that card's name, mana cost, color, types, abilities, power, and toughness.)
SVar:ABDiscard:AB$ Discard | Cost$ 2 | Defined$ You | NumCards$ 1 | Mode$ TgtChoose | AILogic$ VolrathsShapeshifter | SpellDescription$ Discard a card.
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainTextOf$ Creature.TopGraveyard+YouCtrl | GainedTextHasThisStaticAbility$ True | GainVolrathsDiscardAbility$ True | Description$ ORIGINALTEXTONLY:As long as the top card of your graveyard is a creature card, CARDNAME has the full text of that card and has the text "{2}: Discard a card." (CARDNAME has that card's name, mana cost, color, types, abilities, power, and toughness.)
SVar:NeedsOrderedGraveyard:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/volraths_shapeshifter.jpg
Oracle:As long as the top card of your graveyard is a creature card, Volrath's Shapeshifter has the full text of that card and has the text "{2}: Discard a card." (Volrath's Shapeshifter has that card's name, mana cost, color, types, abilities, power, and toughness.)