[C21] Implemented Adrix and Nev, Twincasters

This commit is contained in:
Evan Kranzler 2021-04-06 18:23:08 -04:00
parent 2c72efb63a
commit bcb9e410dd
4 changed files with 89 additions and 11 deletions

View file

@ -0,0 +1,45 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.replacement.CreateTwiceThatManyTokensEffect;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class AdrixAndNevTwincasters extends CardImpl {
public AdrixAndNevTwincasters(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// If one or more tokens would be created under your control, twice that many of those tokens are created instead.
this.addAbility(new SimpleStaticAbility(new CreateTwiceThatManyTokensEffect()));
}
private AdrixAndNevTwincasters(final AdrixAndNevTwincasters card) {
super(card);
}
@Override
public AdrixAndNevTwincasters copy() {
return new AdrixAndNevTwincasters(this);
}
}

View file

@ -3,13 +3,11 @@ package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.replacement.CreateTwiceThatManyTokensEffect;
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.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@ -25,11 +23,10 @@ public final class DoublingSeason extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
// If an effect would create one or more tokens under your control, it creates twice that many of those tokens instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreateTwiceThatManyTokensEffect()));
this.addAbility(new SimpleStaticAbility(new DoublingSeasonTokenEffect()));
// If an effect would put one or more counters on a permanent you control, it puts twice that many of those counters on that permanent instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DoublingSeasonCounterEffect()));
this.addAbility(new SimpleStaticAbility(new DoublingSeasonCounterEffect()));
}
private DoublingSeason(final DoublingSeason card) {
@ -42,16 +39,52 @@ public final class DoublingSeason extends CardImpl {
}
}
class DoublingSeasonTokenEffect extends ReplacementEffectImpl {
DoublingSeasonTokenEffect() {
super(Duration.WhileOnBattlefield, Outcome.Copy);
staticText = "If an effect would create one or more tokens under your control, " +
"it creates twice that many of those tokens instead";
}
private DoublingSeasonTokenEffect(final DoublingSeasonTokenEffect effect) {
super(effect);
}
@Override
public DoublingSeasonTokenEffect copy() {
return new DoublingSeasonTokenEffect(this);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.CREATE_TOKEN;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
// TODO: this should only apply to effects
return event.getPlayerId().equals(source.getControllerId());
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(event.getAmount() * 2);
return false;
}
}
class DoublingSeasonCounterEffect extends ReplacementEffectImpl {
boolean landPlayed = false; // a played land is not an effect
private boolean landPlayed = false; // a played land is not an effect
DoublingSeasonCounterEffect() {
super(Duration.WhileOnBattlefield, Outcome.BoostCreature, false);
staticText = "If an effect would put one or more counters on a permanent you control, it puts twice that many of those counters on that permanent instead";
}
DoublingSeasonCounterEffect(final DoublingSeasonCounterEffect effect) {
private DoublingSeasonCounterEffect(final DoublingSeasonCounterEffect effect) {
super(effect);
}

View file

@ -20,6 +20,7 @@ public final class Commander2021Edition extends ExpansionSet {
this.blockName = "Command Zone";
this.hasBasicLands = false;
cards.add(new SetCardInfo("Adrix and Nev, Twincasters", 9, Rarity.MYTHIC, mage.cards.a.AdrixAndNevTwincasters.class));
cards.add(new SetCardInfo("Ancient Den", 276, Rarity.SPECIAL, mage.cards.a.AncientDen.class));
cards.add(new SetCardInfo("Angel of the Ruins", 11, Rarity.RARE, mage.cards.a.AngelOfTheRuins.class));
cards.add(new SetCardInfo("Arcane Signet", 234, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common.replacement;
import mage.abilities.Ability;
@ -9,17 +8,17 @@ import mage.game.Game;
import mage.game.events.GameEvent;
/**
*
* @author LevelX2
*/
public class CreateTwiceThatManyTokensEffect extends ReplacementEffectImpl {
public CreateTwiceThatManyTokensEffect() {
super(Duration.WhileOnBattlefield, Outcome.Copy);
staticText = "If an effect would create one or more tokens under your control, it creates twice that many of those tokens instead";
staticText = "if one or more tokens would be created under your control, " +
"twice that many of those tokens are created instead";
}
public CreateTwiceThatManyTokensEffect(final CreateTwiceThatManyTokensEffect effect) {
private CreateTwiceThatManyTokensEffect(final CreateTwiceThatManyTokensEffect effect) {
super(effect);
}