mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Implemented Thought Distortion
This commit is contained in:
parent
c10ccac6dc
commit
d9d62585db
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/t/ThoughtDistortion.java
Normal file
83
Mage.Sets/src/mage/cards/t/ThoughtDistortion.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CantBeCounteredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ThoughtDistortion extends CardImpl {
|
||||
|
||||
public ThoughtDistortion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}");
|
||||
|
||||
// This spell can't be countered.
|
||||
this.addAbility(new CantBeCounteredAbility());
|
||||
|
||||
// Target opponent reveals their hand. Exile all noncreature, nonland cards from that player's hand and graveyard.
|
||||
this.getSpellAbility().addEffect(new ThoughtDistortionEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
private ThoughtDistortion(final ThoughtDistortion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThoughtDistortion copy() {
|
||||
return new ThoughtDistortion(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ThoughtDistortionEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterNonlandCard();
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
ThoughtDistortionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Target opponent reveals their hand. Exile all noncreature, " +
|
||||
"nonland cards from that player's hand and graveyard.";
|
||||
}
|
||||
|
||||
private ThoughtDistortionEffect(final ThoughtDistortionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThoughtDistortionEffect copy() {
|
||||
return new ThoughtDistortionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
player.revealCards(source, player.getHand(), game);
|
||||
Cards cards = new CardsImpl(player.getHand().getCards(filter, game));
|
||||
cards.addAll(player.getGraveyard().getCards(filter, game));
|
||||
return player.moveCards(cards, Zone.EXILED, source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -51,6 +51,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Negate", 69, Rarity.COMMON, mage.cards.n.Negate.class));
|
||||
cards.add(new SetCardInfo("Octoprophet", 70, Rarity.COMMON, mage.cards.o.Octoprophet.class));
|
||||
cards.add(new SetCardInfo("Silverback Shaman", 195, Rarity.COMMON, mage.cards.s.SilverbackShaman.class));
|
||||
cards.add(new SetCardInfo("Thought Distortion", 117, Rarity.UNCOMMON, mage.cards.t.ThoughtDistortion.class));
|
||||
cards.add(new SetCardInfo("Thrashing Brontodon", 197, Rarity.UNCOMMON, mage.cards.t.ThrashingBrontodon.class));
|
||||
cards.add(new SetCardInfo("Unsummon", 78, Rarity.COMMON, mage.cards.u.Unsummon.class));
|
||||
cards.add(new SetCardInfo("Yarok's Fenlurker", 123, Rarity.UNCOMMON, mage.cards.y.YaroksFenlurker.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue