[TLE] Implement Jet, Rebel Leader

This commit is contained in:
theelk801 2025-11-11 11:39:22 -05:00
parent 97f57fc0e0
commit ee99f7b094
3 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,50 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JetRebelLeader extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 3 or less");
static {
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}
public JetRebelLeader(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.REBEL);
this.subtype.add(SubType.ALLY);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Whenever Jet attacks, look at the top five cards of your library. You may put a creature card with mana value 3 or less from among them onto the battlefield tapped and attacking. Put the rest on the bottom of your library in a random order.
this.addAbility(new AttacksTriggeredAbility(new LookLibraryAndPickControllerEffect(
5, 1, filter, PutCards.BATTLEFIELD_TAPPED_ATTACKING, PutCards.BOTTOM_RANDOM
)));
}
private JetRebelLeader(final JetRebelLeader card) {
super(card);
}
@Override
public JetRebelLeader copy() {
return new JetRebelLeader(this);
}
}

View file

@ -141,6 +141,8 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
cards.add(new SetCardInfo("Iroh, Dragon of the West", 194, Rarity.RARE, mage.cards.i.IrohDragonOfTheWest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Iroh, Firebending Instructor", 240, Rarity.UNCOMMON, mage.cards.i.IrohFirebendingInstructor.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Iroh, Firebending Instructor", 282, Rarity.UNCOMMON, mage.cards.i.IrohFirebendingInstructor.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Jet, Rebel Leader", 172, Rarity.RARE, mage.cards.j.JetRebelLeader.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Jet, Rebel Leader", 78, Rarity.RARE, mage.cards.j.JetRebelLeader.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Join the Dance", 50, Rarity.MYTHIC, mage.cards.j.JoinTheDance.class));
cards.add(new SetCardInfo("Katara, Heroic Healer", 215, Rarity.UNCOMMON, mage.cards.k.KataraHeroicHealer.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Katara, Heroic Healer", 269, Rarity.UNCOMMON, mage.cards.k.KataraHeroicHealer.class, NON_FULL_USE_VARIOUS));

View file

@ -6,7 +6,11 @@ import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.Set;
/**
* @author awjackson
@ -17,6 +21,7 @@ public enum PutCards {
GRAVEYARD(Outcome.Discard, Zone.GRAVEYARD, "into your graveyard"),
BATTLEFIELD(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield"),
BATTLEFIELD_TAPPED(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield tapped"),
BATTLEFIELD_TAPPED_ATTACKING(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield tapped and attacking"),
BATTLEFIELD_TRANSFORMED(Outcome.PutCardInPlay, Zone.BATTLEFIELD, "onto the battlefield transformed"),
EXILED(Outcome.Exile, Zone.EXILED, "into exile"), // may need special case code to generate correct text
TOP_OR_BOTTOM(Outcome.Benefit, Zone.LIBRARY, "on the top or bottom of your library"),
@ -75,6 +80,15 @@ public enum PutCards {
return player.putCardsOnBottomOfLibrary(new CardsImpl(card), game, source, false);
case BATTLEFIELD_TAPPED:
return player.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
case BATTLEFIELD_TAPPED_ATTACKING:
if (player.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null)) {
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
if (permanent != null) {
game.getCombat().addAttackingCreature(permanent.getId(), game);
}
return true;
}
return false;
case SHUFFLE:
return player.shuffleCardsToLibrary(card, game, source);
case BATTLEFIELD_TRANSFORMED:
@ -101,6 +115,18 @@ public enum PutCards {
return player.putCardsOnBottomOfLibrary(cards, game, source, false);
case BATTLEFIELD_TAPPED:
return player.moveCards(cards.getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null);
case BATTLEFIELD_TAPPED_ATTACKING:
Set<Card> cardSet = cards.getCards(game);
if (player.moveCards(cardSet, Zone.BATTLEFIELD, source, game, true, false, false, null)) {
for (Card card : cardSet) {
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
if (permanent != null) {
game.getCombat().addAttackingCreature(permanent.getId(), game);
}
}
return true;
}
return false;
case SHUFFLE:
return player.shuffleCardsToLibrary(cards, game, source);
case BATTLEFIELD_TRANSFORMED: