[LTR] Implement War of the Last Alliance

This commit is contained in:
theelk801 2023-06-02 08:45:50 -04:00
parent feaaa6300f
commit 6772a3956d
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.w;
import mage.abilities.common.SagaAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.effects.keyword.TheRingTemptsYouEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WarOfTheLastAlliance extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("legendary creature card");
static {
filter.add(SuperType.LEGENDARY.getPredicate());
}
public WarOfTheLastAlliance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
this.subtype.add(SubType.SAGA);
// (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
SagaAbility sagaAbility = new SagaAbility(this);
// I, II -- Search your library for a legendary creature card, reveal it, put it into your hand, then shuffle.
sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II,
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true)
);
// III -- Creatures you control gain double strike until end of turn. The Ring tempts you.
sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_III,
new GainAbilityControlledEffect(
DoubleStrikeAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURES
), new TheRingTemptsYouEffect()
);
}
private WarOfTheLastAlliance(final WarOfTheLastAlliance card) {
super(card);
}
@Override
public WarOfTheLastAlliance copy() {
return new WarOfTheLastAlliance(this);
}
}

View file

@ -89,6 +89,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("The Shire", 260, Rarity.RARE, mage.cards.t.TheShire.class));
cards.add(new SetCardInfo("Tom Bombadil", 234, Rarity.MYTHIC, mage.cards.t.TomBombadil.class));
cards.add(new SetCardInfo("Trailblazer's Boots", 398, Rarity.RARE, mage.cards.t.TrailblazersBoots.class));
cards.add(new SetCardInfo("War of the Last Alliance", 36, Rarity.RARE, mage.cards.w.WarOfTheLastAlliance.class));
cards.add(new SetCardInfo("Westfold Rider", 37, Rarity.COMMON, mage.cards.w.WestfoldRider.class));
cards.add(new SetCardInfo("Wizard's Rockets", 252, Rarity.COMMON, mage.cards.w.WizardsRockets.class));
cards.add(new SetCardInfo("Wose Pathfinder", 190, Rarity.COMMON, mage.cards.w.WosePathfinder.class));