too much lag

too much lag
High Quality Resources for Collectible Card Games
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=70&t=16141
public class AEtherRift extends CardImpl {
public AEtherRift(UUID ownerId) {
super(ownerId, 227, "AEther Rift", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{G}");
this.expansionSetCode = "INV";
this.color.setRed(true);
this.color.setGreen(true);
// At the beginning of your upkeep, discard a card at random. If you discard a creature card this way, return it from your graveyard to the battlefield unless any player pays 5 life.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AEtherRiftEffect(), TargetController.YOU, false));
}
public AEtherRift(final AEtherRift card) {
super(card);
}
@Override
public AEtherRift copy() {
return new AEtherRift(this);
}
}
class AEtherRiftEffect extends OneShotEffect {
public AEtherRiftEffect() {
super(Outcome.Benefit);
this.staticText = "discard a card at random. If you discard a creature card this way, return it from your graveyard to the battlefield unless any player pays 5 life";
}
public AEtherRiftEffect(final AEtherRiftEffect effect) {
super(effect);
}
@Override
public AEtherRiftEffect copy() {
return new AEtherRiftEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Card card = controller.discardOne(true, source, game);
if (card != null && card.getCardType().contains(CardType.CREATURE)) {
Effect returnEffect = new ReturnFromGraveyardToBattlefieldTargetEffect();
returnEffect.setTargetPointer(new FixedTarget(card.getId()));
Effect doEffect = new DoUnlessAnyPlayerPaysEffect(returnEffect, new PayLifeCost(5),
"Pay 5 life to prevent " + card.getLogName() + " to return from graveyard to battlefield?");
return doEffect.apply(game, source);
}
return true;
}
return false;
}
}
I'm not sure if I got your problem correctly.kleedrac wrote:One more quick question - can existing cards be revised? I've got a Marrow-Gnawer commander deck I can't use because it contains several Relentless Rats (which is legal) but would I have to put that in the card or the rules for commander?
The specific error I get is as follows;LevelX wrote:I'm not sure if I got your problem correctly.kleedrac wrote:One more quick question - can existing cards be revised? I've got a Marrow-Gnawer commander deck I can't use because it contains several Relentless Rats (which is legal) but would I have to put that in the card or the rules for commander?
The legality of a deck is checked with classes in the package mage.deck of the project "Mage Deck Constructed".
There is a class Commander.java and a class "Commander Duel.java" that do the format check for the Commander formats.
E.g. the check that a commander deck can have multiple Relentless Rats or Shadowborn Apostle is already implemented there.
So I don't understand why you can't use your deck.