[Y22] Implemented Suntail Squadron

This commit is contained in:
Evan Kranzler 2022-03-01 18:35:16 -05:00
parent 3e28f7585b
commit c5a4689623
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.s;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ConjureCardEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SuntailSquadron extends CardImpl {
public SuntailSquadron(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{W}");
// Conjure a card named Suntail Hawk into your hand. If you have fewer than 7 cards in hand, repeat this process.
this.getSpellAbility().addEffect(new SuntailSquadronEffect());
}
private SuntailSquadron(final SuntailSquadron card) {
super(card);
}
@Override
public SuntailSquadron copy() {
return new SuntailSquadron(this);
}
}
class SuntailSquadronEffect extends OneShotEffect {
SuntailSquadronEffect() {
super(Outcome.Benefit);
staticText = "conjure a card named Suntail Hawk into your hand. " +
"If you have fewer than 7 cards in hand, repeat this process";
}
private SuntailSquadronEffect(final SuntailSquadronEffect effect) {
super(effect);
}
@Override
public SuntailSquadronEffect copy() {
return new SuntailSquadronEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Effect effect = new ConjureCardEffect("Suntail Hawk");
do {
effect.apply(game, source);
} while (player.getHand().size() < 7);
return true;
}
}

View file

@ -29,6 +29,7 @@ public final class AlchemyInnistrad extends ExpansionSet {
cards.add(new SetCardInfo("Kindred Denial", 18, Rarity.UNCOMMON, mage.cards.k.KindredDenial.class));
cards.add(new SetCardInfo("Obsessive Collector", 19, Rarity.RARE, mage.cards.o.ObsessiveCollector.class));
cards.add(new SetCardInfo("Soulstealer Axe", 60, Rarity.UNCOMMON, mage.cards.s.SoulstealerAxe.class));
cards.add(new SetCardInfo("Suntail Squadron", 11, Rarity.RARE, mage.cards.s.SuntailSquadron.class));
cards.add(new SetCardInfo("Tireless Angler", 23, Rarity.RARE, mage.cards.t.TirelessAngler.class));
}
}