[SNC] Implemented Raffine, Scheming Seer

This commit is contained in:
Evan Kranzler 2022-03-31 17:10:03 -04:00
parent 2640877ddc
commit 97bf230464
4 changed files with 145 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
import mage.abilities.effects.keyword.ConniveTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RaffineSchemingSeer extends CardImpl {
private static final DynamicValue xValue = new AttackingCreatureCount("attacking creatures");
private static final Hint hint = new ValueHint("Attacking creatures", xValue);
public RaffineSchemingSeer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SPHINX);
this.subtype.add(SubType.DEMON);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Ward {1}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}")));
// Whenever you attack, target creature connives X, where X is the number of attacking creatures.
Ability ability = new AttacksWithCreaturesTriggeredAbility(new ConniveTargetEffect(xValue), 1);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private RaffineSchemingSeer(final RaffineSchemingSeer card) {
super(card);
}
@Override
public RaffineSchemingSeer copy() {
return new RaffineSchemingSeer(this);
}
}

View file

@ -31,6 +31,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
cards.add(new SetCardInfo("Obscura Charm", 208, Rarity.UNCOMMON, mage.cards.o.ObscuraCharm.class));
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Raffine's Tower", 254, Rarity.RARE, mage.cards.r.RaffinesTower.class));
cards.add(new SetCardInfo("Raffine, Scheming Seer", 213, Rarity.MYTHIC, mage.cards.r.RaffineSchemingSeer.class));
cards.add(new SetCardInfo("Spara's Headquarters", 257, Rarity.RARE, mage.cards.s.SparasHeadquarters.class));
cards.add(new SetCardInfo("Swamp", 276, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Xander's Lounge", 260, Rarity.RARE, mage.cards.x.XandersLounge.class));

View file

@ -0,0 +1,83 @@
package mage.abilities.effects.keyword;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
* @author TheElk801
*/
public class ConniveTargetEffect extends OneShotEffect {
private final DynamicValue xValue;
public ConniveTargetEffect(int amount) {
this(StaticValue.get(amount));
}
public ConniveTargetEffect(DynamicValue xValue) {
super(Outcome.Benefit);
this.xValue = xValue;
}
private ConniveTargetEffect(final ConniveTargetEffect effect) {
super(effect);
this.xValue = effect.xValue;
}
@Override
public ConniveTargetEffect copy() {
return new ConniveTargetEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null) {
return false;
}
Player player = game.getPlayer(permanent.getControllerId());
if (player == null) {
return false;
}
int amount = xValue.calculate(game, source, this);
if (amount < 1) {
return false;
}
player.drawCards(amount, source, game);
int counters = player.discard(
amount, false, false, source, game
).count(StaticFilters.FILTER_CARDS_NON_LAND, game);
if (counters > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(counters), source, game);
}
return true;
}
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("target creature connives ");
sb.append(xValue);
if (!(xValue instanceof StaticValue)) {
sb.append(", where X is ");
sb.append(xValue.getMessage());
}
sb.append("<i>(Draw ");
sb.append(xValue);
sb.append(" cards, then discard ");
sb.append(xValue);
sb.append(" cards. Put a +1/+1 counter on that creature for each nonland card discarded this way.)</i>");
return sb.toString();
}
}

View file

@ -43921,6 +43921,7 @@ Brokers Ascendancy|Streets of New Capenna|170|R|{G}{W}{U}|Enchantment|||At the b
Cabaretti Charm|Streets of New Capenna|173|U|{R}{G}{W}|Instant|||Choose one —$• Cabaretti Charm deals damage equal to the number of creatures you control to target creature or planeswalker.$• Creatures you control get +1/+1 and gain trample until end of turn.$• Create two 1/1 green and white Citizen creature tokens.|
Maestros Charm|Streets of New Capenna|199|U|{U}{B}{R}|Instant|||Choose one —$• Look at the top five cards of your library. Put one of those cards into your hand and the rest into your graveyard.$• Each opponent loses 3 life and you gain 3 life.$• Maestros Charm deals 5 damage to target creature or planeswalker.|
Obscura Charm|Streets of New Capenna|208|U|{W}{U}{B}|Instant|||Choose one —$• Return target multicolored permanent card with mana value 3 or less from your graveyard to the battlefield tapped.$• Counter target instant or sorcery spell.$• Destroy target creature or planeswalker with mana value 3 or less.|
Raffine, Scheming Seer|Streets of New Capenna|213|M|{W}{U}{B}|Legendary Creature - Sphinx Demon|1|4|Flying, ward {1}$Whenever you attack, target creature connives X, where X is the number of attacking creatures.|
Jetmir's Garden|Streets of New Capenna|250|R||Land - Mountain Forest Plains|||({T}: Add {R}, {G}, or {W}.)$Jetmir's Garden enters the battlefield tapped.$Cycling {3}|
Raffine's Tower|Streets of New Capenna|254|R||Land - Plains Island Swamp|||({T}: Add {W}, {U}, or {B}.)$Raffine's Tower enters the battlefield tapped.$Cycling {3}|
Spara's Headquarters|Streets of New Capenna|257|R||Land - Forest Plains Island|||({T}: Add {G}, {W}, or {U}.)$Spara's Headquarters enters the battlefield tapped.$Cycling {3}|