[TLA] Implement The Blue Spirit

This commit is contained in:
theelk801 2025-11-17 09:38:59 -05:00
parent aa2fd2534e
commit 08a0fa285e
2 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,73 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.IsPhaseCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.watchers.common.SpellsCastWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TheBlueSpirit extends CardImpl {
private static final Condition condition = new IsPhaseCondition(TurnPhase.COMBAT);
public TheBlueSpirit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.subtype.add(SubType.ALLY);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// You may cast the first creature spell you cast each turn as though it had flash.
this.addAbility(new SimpleStaticAbility(new ConditionalAsThoughEffect(
new CastAsThoughItHadFlashAllEffect(
Duration.WhileOnBattlefield, StaticFilters.FILTER_CARD_CREATURE
), TheBlueSpiritCondition.instance
).setText("you may cast the first creature spell you cast each turn as though it had flash")));
// Whenever a nontoken creature you control enters during combat, draw a card.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN
).withTriggerCondition(condition));
}
private TheBlueSpirit(final TheBlueSpirit card) {
super(card);
}
@Override
public TheBlueSpirit copy() {
return new TheBlueSpirit(this);
}
}
enum TheBlueSpiritCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
return game
.getState()
.getWatcher(SpellsCastWatcher.class)
.getSpellsCastThisTurn(source.getControllerId())
.stream()
.noneMatch(spell -> spell.isCreature(game));
}
}

View file

@ -264,6 +264,8 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
cards.add(new SetCardInfo("Taunting Challenge", 46, Rarity.MYTHIC, mage.cards.t.TauntingChallenge.class));
cards.add(new SetCardInfo("Teferi's Protection", 7, Rarity.MYTHIC, mage.cards.t.TeferisProtection.class));
cards.add(new SetCardInfo("The Art of Tea", 129, Rarity.COMMON, mage.cards.t.TheArtOfTea.class));
cards.add(new SetCardInfo("The Blue Spirit", 178, Rarity.RARE, mage.cards.t.TheBlueSpirit.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Blue Spirit", 90, Rarity.RARE, mage.cards.t.TheBlueSpirit.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Cabbage Merchant", 134, Rarity.RARE, mage.cards.t.TheCabbageMerchant.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Cabbage Merchant", 203, Rarity.RARE, mage.cards.t.TheCabbageMerchant.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Duke, Rebel Sentry", 76, Rarity.UNCOMMON, mage.cards.t.TheDukeRebelSentry.class));