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") ?