[TLE] Implement Lost in the Spirit World

This commit is contained in:
theelk801 2025-08-15 10:47:44 -04:00
parent 3b5ee47175
commit 5d5ce4e0ab
3 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,35 @@
package mage.cards.l;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.SpiritWorldToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class LostInTheSpiritWorld extends CardImpl {
public LostInTheSpiritWorld(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}");
// Return up to one target creature to its owner's hand. Create a 1/1 colorless Spirit creature token with "This token can't block or be blocked by non-Spirit creatures."
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1));
this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritWorldToken()));
}
private LostInTheSpiritWorld(final LostInTheSpiritWorld card) {
super(card);
}
@Override
public LostInTheSpiritWorld copy() {
return new LostInTheSpiritWorld(this);
}
}

View file

@ -58,6 +58,7 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
cards.add(new SetCardInfo("Komodo Rhino", 241, Rarity.COMMON, mage.cards.k.KomodoRhino.class)); cards.add(new SetCardInfo("Komodo Rhino", 241, Rarity.COMMON, mage.cards.k.KomodoRhino.class));
cards.add(new SetCardInfo("Kyoshi Warrior Guard", 216, Rarity.COMMON, mage.cards.k.KyoshiWarriorGuard.class)); cards.add(new SetCardInfo("Kyoshi Warrior Guard", 216, Rarity.COMMON, mage.cards.k.KyoshiWarriorGuard.class));
cards.add(new SetCardInfo("Lion Vulture", 232, Rarity.RARE, mage.cards.l.LionVulture.class)); cards.add(new SetCardInfo("Lion Vulture", 232, Rarity.RARE, mage.cards.l.LionVulture.class));
cards.add(new SetCardInfo("Lost in the Spirit World", 224, Rarity.UNCOMMON, mage.cards.l.LostInTheSpiritWorld.class));
cards.add(new SetCardInfo("Loyal Fire Sage", 242, Rarity.UNCOMMON, mage.cards.l.LoyalFireSage.class)); cards.add(new SetCardInfo("Loyal Fire Sage", 242, Rarity.UNCOMMON, mage.cards.l.LoyalFireSage.class));
cards.add(new SetCardInfo("Match the Odds", 253, Rarity.UNCOMMON, mage.cards.m.MatchTheOdds.class)); cards.add(new SetCardInfo("Match the Odds", 253, Rarity.UNCOMMON, mage.cards.m.MatchTheOdds.class));
cards.add(new SetCardInfo("Mechanical Glider", 256, Rarity.COMMON, mage.cards.m.MechanicalGlider.class)); cards.add(new SetCardInfo("Mechanical Glider", 256, Rarity.COMMON, mage.cards.m.MechanicalGlider.class));

View file

@ -0,0 +1,44 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
/**
* @author TheElk801
*/
public final class SpiritWorldToken extends TokenImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(Predicates.not(SubType.SPIRIT.getPredicate()));
}
public SpiritWorldToken() {
super("Spirit Token", "1/1 colorless Spirit creature token with \"This token can't block or be blocked by non-Spirit creatures.\"");
cardType.add(CardType.CREATURE);
subtype.add(SubType.SPIRIT);
power = new MageInt(1);
toughness = new MageInt(1);
Ability ability = new SimpleStaticAbility(new CantBlockCreaturesSourceEffect(filter).setText("this token can't block"));
ability.addEffect(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield).setText("or be blocked by non-Spirit creatures"));
this.addAbility(ability);
}
private SpiritWorldToken(final SpiritWorldToken token) {
super(token);
}
public SpiritWorldToken copy() {
return new SpiritWorldToken(this);
}
}