mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[NCC] Implemented Obscura Confluence
This commit is contained in:
parent
d275dd042b
commit
c944410e74
2 changed files with 117 additions and 0 deletions
116
Mage.Sets/src/mage/cards/o/ObscuraConfluence.java
Normal file
116
Mage.Sets/src/mage/cards/o/ObscuraConfluence.java
Normal file
|
@ -0,0 +1,116 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||
import mage.abilities.effects.keyword.ConniveSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ObscuraConfluence extends CardImpl {
|
||||
|
||||
public ObscuraConfluence(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}{U}{B}");
|
||||
|
||||
// Choose three. You may choose the same mode more than once.
|
||||
this.getSpellAbility().getModes().setMinModes(3);
|
||||
this.getSpellAbility().getModes().setMaxModes(3);
|
||||
this.getSpellAbility().getModes().setEachModeMoreThanOnce(true);
|
||||
|
||||
// • Until end of turn, target creature loses all abilities and has base power and toughness 1/1.
|
||||
this.getSpellAbility().addEffect(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn)
|
||||
.setText("until end of turn, target creature loses all abilities"));
|
||||
this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect(1, 1, Duration.EndOfTurn)
|
||||
.setText("and has base power and toughness 1/1"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// • Target creature connives.
|
||||
this.getSpellAbility().addMode(new Mode(new ObscuraConfluenceConniveEffect()).addTarget(new TargetCreaturePermanent()));
|
||||
|
||||
// • Target player returns a creature card from their graveyard to their hand.
|
||||
this.getSpellAbility().addMode(new Mode(new ObscuraConfluenceConniveEffect()).addTarget(new TargetPlayer()));
|
||||
}
|
||||
|
||||
private ObscuraConfluence(final ObscuraConfluence card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObscuraConfluence copy() {
|
||||
return new ObscuraConfluence(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ObscuraConfluenceConniveEffect extends OneShotEffect {
|
||||
|
||||
ObscuraConfluenceConniveEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target creature connives <i>(Draw a card, then discard a card. " +
|
||||
"If you discarded a nonland card, put a +1/+1 counter on that creature.)</i>";
|
||||
}
|
||||
|
||||
private ObscuraConfluenceConniveEffect(final ObscuraConfluenceConniveEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObscuraConfluenceConniveEffect copy() {
|
||||
return new ObscuraConfluenceConniveEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
return permanent != null && ConniveSourceEffect.connive(permanent, 1, source, game);
|
||||
}
|
||||
}
|
||||
|
||||
class ObscuraConfluenceReturnEffect extends OneShotEffect {
|
||||
|
||||
ObscuraConfluenceReturnEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target player returns a creature card from their graveyard to their hand";
|
||||
}
|
||||
|
||||
private ObscuraConfluenceReturnEffect(final ObscuraConfluenceReturnEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObscuraConfluenceReturnEffect copy() {
|
||||
return new ObscuraConfluenceReturnEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player == null || player.getGraveyard().count(
|
||||
StaticFilters.FILTER_CARD_CREATURE, game
|
||||
) < 1) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||
target.setNotTarget(true);
|
||||
player.choose(outcome, target, source, game);
|
||||
return player.moveCards(game.getCard(target.getFirstTarget()), Zone.HAND, source, game);
|
||||
}
|
||||
}
|
|
@ -205,6 +205,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Nightmare Unmaking", 253, Rarity.RARE, mage.cards.n.NightmareUnmaking.class));
|
||||
cards.add(new SetCardInfo("Noxious Gearhulk", 254, Rarity.MYTHIC, mage.cards.n.NoxiousGearhulk.class));
|
||||
cards.add(new SetCardInfo("Oblivion Stone", 373, Rarity.RARE, mage.cards.o.OblivionStone.class));
|
||||
cards.add(new SetCardInfo("Obscura Confluence", 76, Rarity.RARE, mage.cards.o.ObscuraConfluence.class));
|
||||
cards.add(new SetCardInfo("Oracle's Vault", 374, Rarity.RARE, mage.cards.o.OraclesVault.class));
|
||||
cards.add(new SetCardInfo("Orzhov Advokist", 207, Rarity.UNCOMMON, mage.cards.o.OrzhovAdvokist.class));
|
||||
cards.add(new SetCardInfo("Orzhov Signet", 375, Rarity.UNCOMMON, mage.cards.o.OrzhovSignet.class));
|
||||
|
|
Loading…
Reference in a new issue