* Commander abilities - added support of cards with alternative spells like overload;

This commit is contained in:
Oleg Agafonov 2019-07-14 01:06:07 +04:00
parent cb2730e0d5
commit 9db80a0cf3
4 changed files with 65 additions and 9 deletions

View file

@ -2,7 +2,6 @@ package mage.abilities.common;
import mage.abilities.SpellAbility;
import mage.cards.Card;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
/**
@ -10,12 +9,12 @@ import mage.constants.Zone;
*/
public class CastCommanderAbility extends SpellAbility {
public CastCommanderAbility(Card card) {
super(card.getSpellAbility());
public CastCommanderAbility(Card card, SpellAbility spellTemplate) {
super(spellTemplate);
this.newId();
this.setCardName(card.getName());
this.setCardName(spellTemplate.getCardName());
zone = Zone.COMMAND;
spellAbilityType = SpellAbilityType.BASE;
spellAbilityType = spellTemplate.getSpellAbilityType();
}
public CastCommanderAbility(final CastCommanderAbility ability) {