mirror of
https://github.com/correl/mage.git
synced 2024-12-29 11:09:17 +00:00
[MOC] Implement Begin the Invasion
This commit is contained in:
parent
2ff2f69628
commit
bc70bfc91e
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/b/BeginTheInvasion.java
Normal file
68
Mage.Sets/src/mage/cards/b/BeginTheInvasion.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardWithDifferentNameInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BeginTheInvasion extends CardImpl {
|
||||
|
||||
public BeginTheInvasion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{W}{U}{B}{R}{G}");
|
||||
|
||||
// Search your library for up to X battle cards with different names, put them onto the battlefield, then shuffle.
|
||||
this.getSpellAbility().addEffect(new BeginTheInvasionEffect());
|
||||
}
|
||||
|
||||
private BeginTheInvasion(final BeginTheInvasion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeginTheInvasion copy() {
|
||||
return new BeginTheInvasion(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BeginTheInvasionEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("battle cards with different names");
|
||||
|
||||
static {
|
||||
filter.add(CardType.BATTLE.getPredicate());
|
||||
}
|
||||
|
||||
BeginTheInvasionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "search your library for up to X battle cards with different names, " +
|
||||
"put them onto the battlefield, then shuffle";
|
||||
}
|
||||
|
||||
private BeginTheInvasionEffect(final BeginTheInvasionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeginTheInvasionEffect copy() {
|
||||
return new BeginTheInvasionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int xValue = source.getManaCostsToPay().getX();
|
||||
return new SearchLibraryPutInPlayEffect(
|
||||
new TargetCardWithDifferentNameInLibrary(0, xValue, filter), false, true
|
||||
).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -44,6 +44,7 @@ public final class MarchOfTheMachineCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Austere Command", 172, Rarity.RARE, mage.cards.a.AustereCommand.class));
|
||||
cards.add(new SetCardInfo("Banisher Priest", 173, Rarity.UNCOMMON, mage.cards.b.BanisherPriest.class));
|
||||
cards.add(new SetCardInfo("Battle Screech", 174, Rarity.UNCOMMON, mage.cards.b.BattleScreech.class));
|
||||
cards.add(new SetCardInfo("Begin the Invasion", 79, Rarity.MYTHIC, mage.cards.b.BeginTheInvasion.class));
|
||||
cards.add(new SetCardInfo("Blade Splicer", 175, Rarity.RARE, mage.cards.b.BladeSplicer.class));
|
||||
cards.add(new SetCardInfo("Bloodforged Battle-Axe", 349, Rarity.RARE, mage.cards.b.BloodforgedBattleAxe.class));
|
||||
cards.add(new SetCardInfo("Bloodline Pretender", 350, Rarity.UNCOMMON, mage.cards.b.BloodlinePretender.class));
|
||||
|
|
Loading…
Reference in a new issue