forked from External/mage
* Commander abilities - added support of cards with alternative spells like overload;
This commit is contained in:
parent
cb2730e0d5
commit
9db80a0cf3
4 changed files with 65 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue