mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[ECL] Implement Perfect Intimidation
This commit is contained in:
parent
ed79a8e91f
commit
3d4338bf8e
2 changed files with 90 additions and 0 deletions
89
Mage.Sets/src/mage/cards/p/PerfectIntimidation.java
Normal file
89
Mage.Sets/src/mage/cards/p/PerfectIntimidation.java
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.counter.RemoveAllCountersPermanentTargetEffect;
|
||||||
|
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.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.common.TargetCardInHand;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PerfectIntimidation extends CardImpl {
|
||||||
|
|
||||||
|
public PerfectIntimidation(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||||
|
|
||||||
|
// Choose one or both --
|
||||||
|
// * Target opponent exiles two cards from their hand.
|
||||||
|
this.getSpellAbility().addEffect(new PerfectIntimidationEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||||
|
|
||||||
|
// * Remove all counters from target creature.
|
||||||
|
this.getSpellAbility().addMode(new Mode(new RemoveAllCountersPermanentTargetEffect())
|
||||||
|
.addTarget(new TargetCreaturePermanent()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private PerfectIntimidation(final PerfectIntimidation card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerfectIntimidation copy() {
|
||||||
|
return new PerfectIntimidation(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PerfectIntimidationEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
PerfectIntimidationEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "target opponent exiles two cards from their hand";
|
||||||
|
}
|
||||||
|
|
||||||
|
private PerfectIntimidationEffect(final PerfectIntimidationEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PerfectIntimidationEffect copy() {
|
||||||
|
return new PerfectIntimidationEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Cards cards = new CardsImpl();
|
||||||
|
switch (player.getHand().size()) {
|
||||||
|
case 0:
|
||||||
|
return false;
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
cards.addAll(player.getHand());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
TargetCard target = new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS);
|
||||||
|
player.choose(Outcome.Discard, player.getHand(), target, source, game);
|
||||||
|
cards.addAll(target.getTargets());
|
||||||
|
}
|
||||||
|
return player.moveCards(cards, Zone.EXILED, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -50,6 +50,7 @@ public final class LorwynEclipsed extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Overgrown Tomb", "350b", Rarity.RARE, mage.cards.o.OvergrownTomb.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Overgrown Tomb", "350b", Rarity.RARE, mage.cards.o.OvergrownTomb.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Overgrown Tomb", 266, Rarity.RARE, mage.cards.o.OvergrownTomb.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Overgrown Tomb", 266, Rarity.RARE, mage.cards.o.OvergrownTomb.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Overgrown Tomb", 350, Rarity.RARE, mage.cards.o.OvergrownTomb.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Overgrown Tomb", 350, Rarity.RARE, mage.cards.o.OvergrownTomb.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Perfect Intimidation", 115, Rarity.UNCOMMON, mage.cards.p.PerfectIntimidation.class));
|
||||||
cards.add(new SetCardInfo("Steam Vents", "348b", Rarity.RARE, mage.cards.s.SteamVents.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Steam Vents", "348b", Rarity.RARE, mage.cards.s.SteamVents.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Steam Vents", 267, Rarity.RARE, mage.cards.s.SteamVents.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Steam Vents", 267, Rarity.RARE, mage.cards.s.SteamVents.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Steam Vents", 348, Rarity.RARE, mage.cards.s.SteamVents.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Steam Vents", 348, Rarity.RARE, mage.cards.s.SteamVents.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue