mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Implemented Auspicious Starrix
This commit is contained in:
parent
8566344399
commit
c0c60c47c6
2 changed files with 91 additions and 0 deletions
90
Mage.Sets/src/mage/cards/a/AuspiciousStarrix.java
Normal file
90
Mage.Sets/src/mage/cards/a/AuspiciousStarrix.java
Normal file
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.MutatesSourceTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.SourceMutatedCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.MutateAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AuspiciousStarrix extends CardImpl {
|
||||
|
||||
public AuspiciousStarrix(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
||||
|
||||
this.subtype.add(SubType.ELK);
|
||||
this.subtype.add(SubType.BEAST);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Mutate {5}{G}
|
||||
this.addAbility(new MutateAbility(this, "{5}{G}"));
|
||||
|
||||
// Whenever this creature mutates, exile cards from the top of your library until you exile X permanent cards, where X is the number of times this creature has mutated. Put those permanent cards onto the battlefield.
|
||||
this.addAbility(new MutatesSourceTriggeredAbility(new AuspiciousStarrixEffect()));
|
||||
}
|
||||
|
||||
private AuspiciousStarrix(final AuspiciousStarrix card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuspiciousStarrix copy() {
|
||||
return new AuspiciousStarrix(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AuspiciousStarrixEffect extends OneShotEffect {
|
||||
|
||||
AuspiciousStarrixEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile cards from the top of your library until you exile X permanent cards, " +
|
||||
"where X is the number of times this creature has mutated. " +
|
||||
"Put those permanent cards onto the battlefield.";
|
||||
}
|
||||
|
||||
private AuspiciousStarrixEffect(final AuspiciousStarrixEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuspiciousStarrixEffect copy() {
|
||||
return new AuspiciousStarrixEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int xValue = SourceMutatedCount.instance.calculate(game, source, this);
|
||||
int count = 0;
|
||||
Cards toExile = new CardsImpl();
|
||||
Cards toBattlefield = new CardsImpl();
|
||||
for (Card card : player.getLibrary().getCards(game)) {
|
||||
if (card != null && card.isPermanent()) {
|
||||
toBattlefield.add(card);
|
||||
count++;
|
||||
}
|
||||
toExile.add(card);
|
||||
if (count >= xValue) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
player.moveCards(toExile, Zone.EXILED, source, game);
|
||||
return player.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
|
@ -69,6 +69,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Almighty Brushwagg", 143, Rarity.COMMON, mage.cards.a.AlmightyBrushwagg.class));
|
||||
cards.add(new SetCardInfo("Anticipate", 40, Rarity.COMMON, mage.cards.a.Anticipate.class));
|
||||
cards.add(new SetCardInfo("Archipelagore", 41, Rarity.UNCOMMON, mage.cards.a.Archipelagore.class));
|
||||
cards.add(new SetCardInfo("Auspicious Starrix", 144, Rarity.UNCOMMON, mage.cards.a.AuspiciousStarrix.class));
|
||||
cards.add(new SetCardInfo("Avian Oddity", 42, Rarity.UNCOMMON, mage.cards.a.AvianOddity.class));
|
||||
cards.add(new SetCardInfo("Barrier Breach", 145, Rarity.UNCOMMON, mage.cards.b.BarrierBreach.class));
|
||||
cards.add(new SetCardInfo("Bastion of Remembrance", 73, Rarity.UNCOMMON, mage.cards.b.BastionOfRemembrance.class));
|
||||
|
|
Loading…
Reference in a new issue