diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java index bb1450c09b3..ba7a803118a 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java @@ -519,7 +519,7 @@ public final class StaticAbilityContinuous { // Enable this in case Volrath's original image is to be used affectedCard.getState(CardStateName.Original).setImageKey(affectedCard.getState(CardStateName.OriginalText).getImageKey()); - // Activated abilities (statics and repleffects are apparently copied via copyState?) + // Activated abilities (statics and repleffects) and triggers are apparently copied via copyState? for (SpellAbility sa : gainTextSource.getSpellAbilities()) { if (sa instanceof AbilityActivated) { SpellAbility newSA = ((AbilityActivated) sa).getCopy(); @@ -531,22 +531,18 @@ public final class StaticAbilityContinuous { } } - // Triggered abilities - apparently now copied elsewhere, so commenting out not to double them, - // pending further testing - /* - for (Trigger t : gainTextSource.getTriggers()) { - affectedCard.addTrigger(t.getCopyForHostCard(affectedCard)); - }*/ - // Volrath's Shapeshifter shapeshifting ability needs to be added onto the new text if (params.containsKey("GainedTextHasThisStaticAbility")) { affectedCard.getCurrentState().addStaticAbility(stAb); } - // Add the ability "{2}: Discard a card" - 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); + // 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); + } + } // Remember the name and the timestamp of the card we're gaining text from, so we don't modify // the card too aggressively when unnecessary diff --git a/forge-gui/res/cardsfolder/v/volraths_shapeshifter.txt b/forge-gui/res/cardsfolder/v/volraths_shapeshifter.txt index 9a5aaf51ecb..6ff57578e72 100644 --- a/forge-gui/res/cardsfolder/v/volraths_shapeshifter.txt +++ b/forge-gui/res/cardsfolder/v/volraths_shapeshifter.txt @@ -3,7 +3,8 @@ 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 | 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.) +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. 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.) \ No newline at end of file