- 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