This commit is contained in:
androosss 2025-12-16 15:37:14 -06:00 committed by GitHub
commit 0380422e9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 148 additions and 1 deletions

View file

@ -1465,6 +1465,7 @@ public class ScryfallImageSupportTokens {
put("CNS/Emblem Dack", "https://api.scryfall.com/cards/tcns/9/en?format=image"); put("CNS/Emblem Dack", "https://api.scryfall.com/cards/tcns/9/en?format=image");
put("CNS/Demon", "https://api.scryfall.com/cards/tcns/2/en?format=image"); put("CNS/Demon", "https://api.scryfall.com/cards/tcns/2/en?format=image");
put("CNS/Elephant", "https://api.scryfall.com/cards/tcns/5/en?format=image"); put("CNS/Elephant", "https://api.scryfall.com/cards/tcns/5/en?format=image");
put("CNS/Ogre", "https://api.scryfall.com/cards/tcns/4/en?format=image");
put("CNS/Spirit", "https://api.scryfall.com/cards/tcns/1/en?format=image"); put("CNS/Spirit", "https://api.scryfall.com/cards/tcns/1/en?format=image");
put("CNS/Squirrel", "https://api.scryfall.com/cards/tcns/6/en?format=image"); put("CNS/Squirrel", "https://api.scryfall.com/cards/tcns/6/en?format=image");
put("CNS/Wolf", "https://api.scryfall.com/cards/tcns/7/en?format=image"); put("CNS/Wolf", "https://api.scryfall.com/cards/tcns/7/en?format=image");

View file

@ -0,0 +1,117 @@
package mage.cards.g;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.FilterPermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Ogre44Token;
import mage.players.Player;
import mage.players.PlayerList;
import mage.target.Target;
import mage.target.TargetPermanent;
import mage.util.CardUtil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
/**
*
* @author androosss
*/
public final class GrenzosRebuttal extends CardImpl {
public GrenzosRebuttal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
// Put a 4/4 red Ogre creature token onto the battlefield. Starting with you, each player chooses an artifact, a creature, and a land from among the permanents controlled by the player to their left. Destroy each permanent chosen this way.
this.getSpellAbility().addEffect(new CreateTokenEffect(new Ogre44Token()));
this.getSpellAbility().addEffect(new GrenzosRebuttalEffect());
}
private GrenzosRebuttal(final GrenzosRebuttal card) {
super(card);
}
@Override
public GrenzosRebuttal copy() {
return new GrenzosRebuttal(this);
}
}
class GrenzosRebuttalEffect extends OneShotEffect {
private static final List<CardType> cardTypes = Arrays.asList(
CardType.ARTIFACT, CardType.CREATURE, CardType.LAND
);
GrenzosRebuttalEffect() {
super(Outcome.Benefit);
this.staticText = "Starting with you, each player chooses an artifact, a creature, and a land from among the permanents controlled by the player to their left. " + "Destroy each permanent chosen this way.";
}
private GrenzosRebuttalEffect(final GrenzosRebuttalEffect effect) {
super(effect);
}
@Override
public GrenzosRebuttalEffect copy() {
return new GrenzosRebuttalEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
UUID controllerId = source.getControllerId();
Player controller = game.getPlayer(controllerId);
if (controller == null) {
return false;
}
List<Permanent> chosenPermanents = new ArrayList<>();
PlayerList playerList = game.getState().getPlayersInRange(controllerId, game, true);
Player currentPlayer = game.getPlayer(playerList.get());
boolean firstIteration = true;
for (Player nextPlayer = game.getPlayer(playerList.getNext()); !currentPlayer.getId().equals(controllerId) || firstIteration; nextPlayer = game.getPlayer(playerList.getNext())) {
if (currentPlayer != null) {
for (CardType cardType : cardTypes) {
String cardTypeText = CardUtil.addArticle(cardType.toString());
FilterPermanent filter = new FilterPermanent(
cardTypeText + " controlled by " + nextPlayer.getLogName());
filter.add(cardType.getPredicate());
filter.add(new ControllerIdPredicate(nextPlayer.getId()));
Target target = new TargetPermanent(1, 1, filter, true);
if (target.canChoose(currentPlayer.getId(), source, game)) {
currentPlayer.chooseTarget(Outcome.Benefit, target, source, game);
Permanent artifact = game.getPermanent(target.getFirstTarget());
if (artifact != null) {
chosenPermanents.add(artifact);
}
target.clearChosen();
}
}
}
firstIteration = false;
currentPlayer = nextPlayer;
}
for (Permanent permanent : chosenPermanents) {
permanent.destroy(source, game);
}
return true;
}
}

View file

@ -92,6 +92,7 @@ public final class Conspiracy extends ExpansionSet {
cards.add(new SetCardInfo("Gnarlid Pack", 166, Rarity.COMMON, mage.cards.g.GnarlidPack.class)); cards.add(new SetCardInfo("Gnarlid Pack", 166, Rarity.COMMON, mage.cards.g.GnarlidPack.class));
cards.add(new SetCardInfo("Grenzo, Dungeon Warden", 47, Rarity.RARE, mage.cards.g.GrenzoDungeonWarden.class)); cards.add(new SetCardInfo("Grenzo, Dungeon Warden", 47, Rarity.RARE, mage.cards.g.GrenzoDungeonWarden.class));
cards.add(new SetCardInfo("Grenzo's Cutthroat", 32, Rarity.COMMON, mage.cards.g.GrenzosCutthroat.class)); cards.add(new SetCardInfo("Grenzo's Cutthroat", 32, Rarity.COMMON, mage.cards.g.GrenzosCutthroat.class));
cards.add(new SetCardInfo("Grenzo's Rebuttal", 33, Rarity.RARE, mage.cards.g.GrenzosRebuttal.class));
cards.add(new SetCardInfo("Grixis Illusionist", 99, Rarity.COMMON, mage.cards.g.GrixisIllusionist.class)); cards.add(new SetCardInfo("Grixis Illusionist", 99, Rarity.COMMON, mage.cards.g.GrixisIllusionist.class));
cards.add(new SetCardInfo("Grudge Keeper", 28, Rarity.COMMON, mage.cards.g.GrudgeKeeper.class)); cards.add(new SetCardInfo("Grudge Keeper", 28, Rarity.COMMON, mage.cards.g.GrudgeKeeper.class));
cards.add(new SetCardInfo("Guardian Zendikon", 71, Rarity.COMMON, mage.cards.g.GuardianZendikon.class)); cards.add(new SetCardInfo("Guardian Zendikon", 71, Rarity.COMMON, mage.cards.g.GuardianZendikon.class));

View file

@ -0,0 +1,28 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author androosss
*/
public final class Ogre44Token extends TokenImpl {
public Ogre44Token() {
super("Ogre Token", "4/4 red Ogre creature token");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add(SubType.OGRE);
power = new MageInt(4);
toughness = new MageInt(4);
}
private Ogre44Token(final Ogre44Token token) {
super(token);
}
public Ogre44Token copy() {
return new Ogre44Token(this);
}
}

View file

@ -452,7 +452,7 @@
|Generate|TOK:CNS|Construct|||DarettiConstructToken| |Generate|TOK:CNS|Construct|||DarettiConstructToken|
|Generate|TOK:CNS|Demon|||DemonFlyingToken| |Generate|TOK:CNS|Demon|||DemonFlyingToken|
|Generate|TOK:CNS|Elephant|||ElephantToken| |Generate|TOK:CNS|Elephant|||ElephantToken|
#un-implemented card|Generate|TOK:CNS|Ogre|| |Generate|TOK:CNS|Ogre|||Ogre44Token|
|Generate|TOK:CNS|Spirit|||SpiritWhiteToken| |Generate|TOK:CNS|Spirit|||SpiritWhiteToken|
|Generate|TOK:CNS|Squirrel|||SquirrelToken| |Generate|TOK:CNS|Squirrel|||SquirrelToken|
|Generate|TOK:CNS|Wolf|||WolfToken| |Generate|TOK:CNS|Wolf|||WolfToken|