DefinedName fix

This commit is contained in:
paul_snoops
2022-03-19 18:17:57 +00:00
parent 38b99375d0
commit 15fae9232c
2 changed files with 7 additions and 4 deletions

View File

@@ -32,7 +32,10 @@ public class MakeCardEffect extends SpellAbilityEffect {
}
}
if (sa.hasParam("DefinedName")) {
name = AbilityUtils.getDefinedCards(source, sa.getParam("DefinedName"), sa).getFirst().getName();
final CardCollection def = AbilityUtils.getDefinedCards(source, sa.getParam("DefinedName"), sa);
if (def.size() > 0) {
name = def.getFirst().getName();
}
}
final ZoneType zone = ZoneType.smartValueOf(sa.getParamOrDefault("Zone", "Library"));
int amount = sa.hasParam("Amount") ?

View File

@@ -2,7 +2,7 @@ Name:Holographic Double
ManaCost:U
Types:Creature Illusion
PT:1/1
A:AB$ ChooseCard | Cost$ U ExileFromHand<1/CARDNAME> | ActivationZone$ Hand | ChoiceZone$ Hand | Choices$ Card.Creature+YouOwn | ChoiceTitle$ Choose up to one creature card in your hand | Amount$ 1 | SubAbility$ DBConjure | StackDescription$ SpellDescription | SpellDescription$ Choose a creature card in your hand. Conjure a duplicate of it into your hand.
SVar:DBConjure:DB$ MakeCard | DefinedName$ ChosenCard | Zone$ Hand | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True | ClearChosenCard$ True
A:AB$ ChooseCard | Cost$ U ExileFromHand<1/CARDNAME> | ActivationZone$ Hand | Mandatory$ True | ChoiceZone$ Hand | Choices$ Creature.YouOwn | ChoiceDesc$ creature | FromDesc$ from their hand | ChoiceTitle$ Choose a creature card in your hand | Amount$ 1 | SubAbility$ DBConjure | SpellDescription$ Choose a creature card in your hand.
SVar:DBConjure:DB$ MakeCard | DefinedName$ ChosenCard | Zone$ Hand | SubAbility$ DBCleanup | StackDescription$ {p:You} conjures a duplicate of it into their hand. | SpellDescription$ Conjure a duplicate of it into your hand.
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
Oracle:{U}, Exile Holographic Double from your hand: Choose a creature card in your hand. Conjure a duplicate of it into your hand.