forked from External/mage
[TLA] Implement Aang's Journey
This commit is contained in:
parent
b470f0b679
commit
6008dc279e
3 changed files with 73 additions and 8 deletions
64
Mage.Sets/src/mage/cards/a/AangsJourney.java
Normal file
64
Mage.Sets/src/mage/cards/a/AangsJourney.java
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.common.TargetCardAndOrCardInLibrary;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AangsJourney extends CardImpl {
|
||||
|
||||
private static final Predicate<Card> predicate = Predicates.and(
|
||||
SuperType.BASIC.getPredicate(),
|
||||
CardType.LAND.getPredicate()
|
||||
);
|
||||
|
||||
public AangsJourney(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}");
|
||||
|
||||
this.subtype.add(SubType.LESSON);
|
||||
|
||||
// Kicker {2}
|
||||
this.addAbility(new KickerAbility("{2}"));
|
||||
|
||||
// Search your library for a basic land card. If this spell was kicked, instead search your library for a basic land card and a Shrine card. Reveal those cards, put them into your hand, then shuffle.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new SearchLibraryPutInHandEffect(new TargetCardAndOrCardInLibrary(
|
||||
predicate, SubType.SHRINE.getPredicate(),
|
||||
"a basic land card and/or a Shrine card"
|
||||
), true),
|
||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true),
|
||||
KickedCondition.ONCE, "search your library for a basic land card. If this spell was kicked, " +
|
||||
"instead search your library for a basic land card and a Shrine card. " +
|
||||
"Reveal those cards, put them into your hand, then shuffle"
|
||||
));
|
||||
|
||||
// You gain 2 life.
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(2).concatBy("<br>"));
|
||||
}
|
||||
|
||||
private AangsJourney(final AangsJourney card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AangsJourney copy() {
|
||||
return new AangsJourney(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Aang's Iceberg", 336, Rarity.RARE, mage.cards.a.AangsIceberg.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Aang's Iceberg", 5, Rarity.RARE, mage.cards.a.AangsIceberg.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Aang's Journey", 1, Rarity.COMMON, mage.cards.a.AangsJourney.class));
|
||||
cards.add(new SetCardInfo("Aang, Master of Elements", 207, Rarity.MYTHIC, mage.cards.a.AangMasterOfElements.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Aang, Master of Elements", 363, Rarity.MYTHIC, mage.cards.a.AangMasterOfElements.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Aang, the Last Airbender", 4, Rarity.UNCOMMON, mage.cards.a.AangTheLastAirbender.class));
|
||||
|
|
|
|||
|
|
@ -38,14 +38,6 @@ public class TargetCardAndOrCardInLibrary extends TargetCardInLibrary {
|
|||
|
||||
private final PredicateCardAssignment assignment;
|
||||
|
||||
/**
|
||||
* a [firstType] card and/or a [secondType] card
|
||||
*/
|
||||
protected TargetCardAndOrCardInLibrary(Predicate<? super Card> firstPredicate, Predicate<? super Card> secondPredicate, String filterText) {
|
||||
super(0, 2, makeFilter(firstPredicate, secondPredicate, filterText));
|
||||
this.assignment = new PredicateCardAssignment(firstPredicate, secondPredicate);
|
||||
}
|
||||
|
||||
public TargetCardAndOrCardInLibrary(CardType firstType, CardType secondType) {
|
||||
this(firstType.getPredicate(), secondType.getPredicate(), makeFilterText(
|
||||
CardUtil.getTextWithFirstCharLowerCase(firstType.toString()),
|
||||
|
|
@ -60,6 +52,14 @@ public class TargetCardAndOrCardInLibrary extends TargetCardInLibrary {
|
|||
this(firstType.getPredicate(), secondType.getPredicate(), makeFilterText(firstType.getDescription(), secondType.getDescription()));
|
||||
}
|
||||
|
||||
/**
|
||||
* a [firstType] card and/or a [secondType] card
|
||||
*/
|
||||
public TargetCardAndOrCardInLibrary(Predicate<? super Card> firstPredicate, Predicate<? super Card> secondPredicate, String filterText) {
|
||||
super(0, 2, makeFilter(firstPredicate, secondPredicate, filterText));
|
||||
this.assignment = new PredicateCardAssignment(firstPredicate, secondPredicate);
|
||||
}
|
||||
|
||||
protected TargetCardAndOrCardInLibrary(final TargetCardAndOrCardInLibrary target) {
|
||||
super(target);
|
||||
this.assignment = target.assignment;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue