mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[WOC] Implement Tegwyll's Scouring (#12891)
* Also add all reprints from Wilds of Eldraine Commander.
This commit is contained in:
parent
554ba8739e
commit
2b9b1c01bd
3 changed files with 139 additions and 34 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -14,14 +15,21 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility {
|
||||
|
||||
private final ManaCosts costsToAdd;
|
||||
private final Cost costsToAdd;
|
||||
|
||||
public PayMoreToCastAsThoughtItHadFlashAbility(Card card, ManaCosts<ManaCost> costsToAdd) {
|
||||
super(card.getSpellAbility().getManaCosts().copy(), card.getName() + " as though it had flash", Zone.HAND, SpellAbilityType.BASE_ALTERNATE);
|
||||
public PayMoreToCastAsThoughtItHadFlashAbility(Card card, Cost costsToAdd) {
|
||||
super(card.getSpellAbility().getManaCosts().copy(), card.getName(), Zone.HAND, SpellAbilityType.BASE_ALTERNATE);
|
||||
this.costsToAdd = costsToAdd;
|
||||
this.timing = TimingRule.INSTANT;
|
||||
this.setRuleAtTheTop(true);
|
||||
CardUtil.increaseCost(this, costsToAdd);
|
||||
|
||||
if(costsToAdd instanceof ManaCosts<?>) {
|
||||
ManaCosts<ManaCost> manaCosts = (ManaCosts<ManaCost>) costsToAdd;
|
||||
CardUtil.increaseCost(this, manaCosts);
|
||||
}
|
||||
else {
|
||||
this.addCost(costsToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
protected PayMoreToCastAsThoughtItHadFlashAbility(final PayMoreToCastAsThoughtItHadFlashAbility ability) {
|
||||
|
|
@ -38,10 +46,13 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility {
|
|||
public String getRule(boolean all) {
|
||||
return getRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "You may cast {this} as though it had flash if you pay " + costsToAdd.getText() + " more to cast it. <i>(You may cast it any time you could cast an instant.)</i>";
|
||||
if (costsToAdd instanceof ManaCosts) {
|
||||
return "You may cast {this} as though it had flash if you pay " + costsToAdd.getText() + " more to cast it. <i>(You may cast it any time you could cast an instant.)</i>";
|
||||
} else {
|
||||
return "You may cast {this} as though it had flash by " + costsToAdd.getText() + " in addition to paying its other costs.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue