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

@ -22,12 +22,15 @@ public class SpectacleAbility extends SpellAbility {
private String rule;
public SpectacleAbility(Card card, ManaCost spectacleCosts) {
super(spectacleCosts, card.getName() + " with spectacle", Zone.HAND, SpellAbilityType.BASE_ALTERNATE);
this.getCosts().addAll(card.getSpellAbility().getCosts().copy());
this.getEffects().addAll(card.getSpellAbility().getEffects().copy());
this.getTargets().addAll(card.getSpellAbility().getTargets().copy());
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
this.timing = card.getSpellAbility().getTiming();
super(card.getSpellAbility());
this.setCardName(card.getName() + " with spectacle");
zone = Zone.HAND;
spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
this.getManaCosts().clear();
this.getManaCostsToPay().clear();
this.addManaCost(spectacleCosts.copy());
this.setRuleAtTheTop(true);
this.rule = "Spectacle " + spectacleCosts.getText()
+ " <i>(You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn.)</i>";