mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
[C21] Implemented Reinterpret
This commit is contained in:
parent
73df6929e9
commit
16f1ae7b99
2 changed files with 68 additions and 0 deletions
67
Mage.Sets/src/mage/cards/r/Reinterpret.java
Normal file
67
Mage.Sets/src/mage/cards/r/Reinterpret.java
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
package mage.cards.r;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.cost.CastWithoutPayingManaCostEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class Reinterpret extends CardImpl {
|
||||||
|
|
||||||
|
public Reinterpret(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{R}");
|
||||||
|
|
||||||
|
// Counter target spell. You may cast a spell with an equal or lesser mana value from your hand without paying its mana cost.
|
||||||
|
this.getSpellAbility().addEffect(new ReinterpretEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetSpell());
|
||||||
|
}
|
||||||
|
|
||||||
|
private Reinterpret(final Reinterpret card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Reinterpret copy() {
|
||||||
|
return new Reinterpret(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ReinterpretEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
ReinterpretEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "counter target spell. You may cast a spell with an " +
|
||||||
|
"equal or lesser mana value from your hand without paying its mana cost";
|
||||||
|
}
|
||||||
|
|
||||||
|
private ReinterpretEffect(final ReinterpretEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReinterpretEffect copy() {
|
||||||
|
return new ReinterpretEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Spell spell = game.getSpell(source.getFirstTarget());
|
||||||
|
if (spell == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int manaValue = spell.getConvertedManaCost();
|
||||||
|
spell.counter(source, game);
|
||||||
|
new CastWithoutPayingManaCostEffect(manaValue).apply(game, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -68,6 +68,7 @@ public final class Commander2021Edition extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Pia Nalaar", 177, Rarity.RARE, mage.cards.p.PiaNalaar.class));
|
cards.add(new SetCardInfo("Pia Nalaar", 177, Rarity.RARE, mage.cards.p.PiaNalaar.class));
|
||||||
cards.add(new SetCardInfo("Pilgrim's Eye", 257, Rarity.COMMON, mage.cards.p.PilgrimsEye.class));
|
cards.add(new SetCardInfo("Pilgrim's Eye", 257, Rarity.COMMON, mage.cards.p.PilgrimsEye.class));
|
||||||
cards.add(new SetCardInfo("Quicksmith Genius", 178, Rarity.UNCOMMON, mage.cards.q.QuicksmithGenius.class));
|
cards.add(new SetCardInfo("Quicksmith Genius", 178, Rarity.UNCOMMON, mage.cards.q.QuicksmithGenius.class));
|
||||||
|
cards.add(new SetCardInfo("Reinterpret", 73, Rarity.RARE, mage.cards.r.Reinterpret.class));
|
||||||
cards.add(new SetCardInfo("Replication Technique", 31, Rarity.RARE, mage.cards.r.ReplicationTechnique.class));
|
cards.add(new SetCardInfo("Replication Technique", 31, Rarity.RARE, mage.cards.r.ReplicationTechnique.class));
|
||||||
cards.add(new SetCardInfo("Return to Dust", 100, Rarity.UNCOMMON, mage.cards.r.ReturnToDust.class));
|
cards.add(new SetCardInfo("Return to Dust", 100, Rarity.UNCOMMON, mage.cards.r.ReturnToDust.class));
|
||||||
cards.add(new SetCardInfo("Rout", 101, Rarity.RARE, mage.cards.r.Rout.class));
|
cards.add(new SetCardInfo("Rout", 101, Rarity.RARE, mage.cards.r.Rout.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue