Alternative spell abilities: added support of modes and other extra things in commander, awaken, jump-start, spectacle, retrace and surge abilities;

This commit is contained in:
Oleg Agafonov 2019-06-21 17:11:44 +04:00
parent a8c047a2be
commit d25ae47104
10 changed files with 138 additions and 89 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.keyword;
import mage.abilities.SpellAbility;
@ -11,22 +10,21 @@ import mage.filter.common.FilterLandCard;
import mage.target.common.TargetCardInHand;
/**
*
* @author LevelX2
*/
public class RetraceAbility extends SpellAbility {
public RetraceAbility(Card card) {
super(card.getManaCost(), card.getName() + " with retrace", Zone.GRAVEYARD, SpellAbilityType.BASE_ALTERNATE);
this.getCosts().addAll(card.getSpellAbility().getCosts().copy());
super(card.getSpellAbility());
this.setCardName(card.getName() + " with retrace");
zone = Zone.GRAVEYARD;
spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
Cost cost = new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()));
cost.setText("");
this.addCost(cost);
this.getEffects().addAll(card.getSpellAbility().getEffects().copy());
this.getTargets().addAll(card.getSpellAbility().getTargets().copy());
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
this.timing = card.getSpellAbility().getTiming();
this.setRuleAtTheTop(true);
}
public RetraceAbility(final RetraceAbility ability) {