[ACR] Implement Staff of Eden, Vault's Key (#12869)

This commit is contained in:
Grath 2024-09-13 23:35:22 -04:00 committed by GitHub
parent ccd656c22a
commit ee8ae028d2
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,70 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.mageobject.PermanentPredicate;
import mage.target.common.TargetCardInGraveyard;
/**
*
* @author Grath
*/
public final class StaffOfEdenVaultsKey extends CardImpl {
private static final FilterCard filter = new FilterCard("legendary permanent card not named Staff of Eden, Vault's Key from a graveyard");
private static final FilterPermanent filter2 = new FilterControlledPermanent("permanent you control but don't own");
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter2);
private static final Hint hint = new ValueHint("Permanents you control but don't own", xValue);
static {
filter.add(SuperType.LEGENDARY.getPredicate());
filter.add(PermanentPredicate.instance);
filter.add(Predicates.not(new NamePredicate("Staff of Eden, Vault's Key")));
filter2.add(TargetController.NOT_YOU.getOwnerPredicate());
}
public StaffOfEdenVaultsKey(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
this.supertype.add(SuperType.LEGENDARY);
// When Staff of Eden, Vault's Key enters the battlefield, put target legendary permanent card not named Staff of Eden, Vault's Key from a graveyard onto the battlefield under your control.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect());
ability.addTarget(new TargetCardInGraveyard(filter));
this.addAbility(ability);
// {T}: Draw a card for each permanent you control but don't own.
ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(xValue), new TapSourceCost());
ability.addHint(hint);
this.addAbility(ability);
}
private StaffOfEdenVaultsKey(final StaffOfEdenVaultsKey card) {
super(card);
}
@Override
public StaffOfEdenVaultsKey copy() {
return new StaffOfEdenVaultsKey(this);
}
}

View file

@ -118,6 +118,7 @@ public final class AssassinsCreed extends ExpansionSet {
cards.add(new SetCardInfo("Silent Clearing", 115, Rarity.RARE, mage.cards.s.SilentClearing.class));
cards.add(new SetCardInfo("Smoke Bomb", 75, Rarity.UNCOMMON, mage.cards.s.SmokeBomb.class));
cards.add(new SetCardInfo("Spartan Veteran", 292, Rarity.COMMON, mage.cards.s.SpartanVeteran.class));
cards.add(new SetCardInfo("Staff of Eden, Vault's Key", 76, Rarity.MYTHIC, mage.cards.s.StaffOfEdenVaultsKey.class));
cards.add(new SetCardInfo("Stone Quarry", 300, Rarity.UNCOMMON, mage.cards.s.StoneQuarry.class));
cards.add(new SetCardInfo("Submerged Boneyard", 301, Rarity.UNCOMMON, mage.cards.s.SubmergedBoneyard.class));
cards.add(new SetCardInfo("Sunbaked Canyon", 111, Rarity.RARE, mage.cards.s.SunbakedCanyon.class));