mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
* Commander - fixed that instant/sourcery/enchantment don't work from command zone (#5795);
This commit is contained in:
parent
bf20e7d656
commit
28924c1cb7
1 changed files with 9 additions and 2 deletions
|
@ -15,8 +15,15 @@ public class CastCommanderAbility extends SpellAbility {
|
|||
|
||||
public CastCommanderAbility(Card card) {
|
||||
super(card.getManaCost(), card.getName(), Zone.COMMAND, SpellAbilityType.BASE);
|
||||
this.costs = card.getSpellAbility() != null ? card.getSpellAbility().getCosts().copy() : new CostsImpl<>();
|
||||
this.timing = TimingRule.SORCERY;
|
||||
if (card.getSpellAbility() != null) {
|
||||
this.getCosts().addAll(card.getSpellAbility().getCosts().copy());
|
||||
this.getEffects().addAll(card.getSpellAbility().getEffects().copy());
|
||||
this.getTargets().addAll(card.getSpellAbility().getTargets().copy());
|
||||
this.timing = card.getSpellAbility().getTiming();
|
||||
} else {
|
||||
this.costs = new CostsImpl<>();
|
||||
this.timing = TimingRule.SORCERY;
|
||||
}
|
||||
this.usesStack = true;
|
||||
this.controllerId = card.getOwnerId();
|
||||
this.sourceId = card.getId();
|
||||
|
|
Loading…
Add table
Reference in a new issue