* Commander: fixed that spells with dynamic/X targets doesn't work from command zone (#5852);

This commit is contained in:
Oleg Agafonov 2019-06-14 21:50:36 +04:00
parent 1d7cac3059
commit 75e5ad3d7b
2 changed files with 68 additions and 0 deletions

View file

@ -16,6 +16,8 @@ public class CastCommanderAbility extends SpellAbility {
this.getCosts().addAll(card.getSpellAbility().getCosts().copy());
this.getEffects().addAll(card.getSpellAbility().getEffects().copy());
this.getTargets().addAll(card.getSpellAbility().getTargets().copy());
this.setTargetAdjuster(card.getSpellAbility().getTargetAdjuster());
this.setCostAdjuster(card.getSpellAbility().getCostAdjuster());
this.timing = card.getSpellAbility().getTiming();
} else {
throw new IllegalStateException("Cast commander ability must be used with spell ability only: " + card.getName());