MakeCardEffect update "Amount" to allow for X

This commit is contained in:
Northmoc
2021-12-24 12:45:11 -05:00
parent 4e662db40c
commit e17119ed76

View File

@@ -29,7 +29,8 @@ public class MakeCardEffect extends SpellAbilityEffect {
name = AbilityUtils.getDefinedCards(source, sa.getParam("DefinedName"), sa).getFirst().getName(); name = AbilityUtils.getDefinedCards(source, sa.getParam("DefinedName"), sa).getFirst().getName();
} }
final ZoneType zone = ZoneType.smartValueOf(sa.getParamOrDefault("Zone", "Library")); final ZoneType zone = ZoneType.smartValueOf(sa.getParamOrDefault("Zone", "Library"));
int amount = sa.hasParam("Amount") ? Integer.parseInt(sa.getParam("Amount")) : 1; int amount = sa.hasParam("Amount") ?
AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("Amount"), sa) : 1;
CardCollection cards = new CardCollection(); CardCollection cards = new CardCollection();