[ECL] Implement Sunderflock (#14238)

This commit is contained in:
Muz 2026-01-11 16:07:28 -06:00 committed by GitHub
parent b5fd1a6958
commit fe2aaaef60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue;
import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue.Quality;
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author muz
*/
public final class Sunderflock extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.ELEMENTAL, "Elementals you control");
private static final FilterPermanent filter2 = new FilterCreaturePermanent("non-Elemental creature");
static {
filter2.add(Predicates.not(SubType.ELEMENTAL.getPredicate()));
}
public Sunderflock(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{7}{U}{U}");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// This spell costs {X} less to cast, where X is the greatest mana value among Elementals you control.
this.addAbility(new SimpleStaticAbility(
Zone.ALL,
new SpellCostReductionSourceEffect(new GreatestAmongPermanentsValue(Quality.ManaValue, filter))
).setRuleAtTheTop(true)
.addHint(new GreatestAmongPermanentsValue(Quality.ManaValue, filter).getHint()));
// Flying
this.addAbility(FlyingAbility.getInstance());
// When this creature enters, if you cast it, return all non-Elemental creatures to their owners' hands.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new ReturnToHandFromBattlefieldAllEffect(filter2)
.setText("return all non-Elemental creatures to their owners' hands"),
false
).withInterveningIf(CastFromEverywhereSourceCondition.instance));
}
private Sunderflock(final Sunderflock card) {
super(card);
}
@Override
public Sunderflock copy() {
return new Sunderflock(this);
}
}

View file

@ -306,6 +306,8 @@ public final class LorwynEclipsed extends ExpansionSet {
cards.add(new SetCardInfo("Stratosoarer", 72, Rarity.COMMON, mage.cards.s.Stratosoarer.class));
cards.add(new SetCardInfo("Summit Sentinel", 73, Rarity.COMMON, mage.cards.s.SummitSentinel.class));
cards.add(new SetCardInfo("Sun-Dappled Celebrant", 37, Rarity.COMMON, mage.cards.s.SunDappledCelebrant.class));
cards.add(new SetCardInfo("Sunderflock", 309, Rarity.RARE, mage.cards.s.Sunderflock.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Sunderflock", 74, Rarity.RARE, mage.cards.s.Sunderflock.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Surly Farrier", 196, Rarity.COMMON, mage.cards.s.SurlyFarrier.class));
cards.add(new SetCardInfo("Swamp", 271, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 276, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));