Implemented Survivors' Bond

This commit is contained in:
Evan Kranzler 2020-04-11 11:02:32 -04:00
parent 99b4d67c9c
commit 7efec1294f
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,56 @@
package mage.cards.s;
import mage.abilities.Mode;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SurvivorsBond extends CardImpl {
private static final FilterCard filter
= new FilterCreatureCard("Human creature card from your graveyard");
private static final FilterCard filter2
= new FilterCreatureCard("non-Human creature card from your graveyard");
static {
filter.add(SubType.HUMAN.getPredicate());
filter2.add(Predicates.not(SubType.HUMAN.getPredicate()));
}
public SurvivorsBond(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
// Choose one or both
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMinModes(2);
// Return target Human creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
// Return target non-Human creature card from your graveyard to your hand.
Mode mode = new Mode(new ReturnFromGraveyardToHandTargetEffect());
mode.addTarget(new TargetCardInYourGraveyard(filter2));
this.getSpellAbility().addMode(mode);
}
private SurvivorsBond(final SurvivorsBond card) {
super(card);
}
@Override
public SurvivorsBond copy() {
return new SurvivorsBond(this);
}
}

View file

@ -252,6 +252,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
cards.add(new SetCardInfo("Sprite Dragon", 211, Rarity.UNCOMMON, mage.cards.s.SpriteDragon.class));
cards.add(new SetCardInfo("Sudden Spinnerets", 171, Rarity.COMMON, mage.cards.s.SuddenSpinnerets.class));
cards.add(new SetCardInfo("Suffocating Fumes", 100, Rarity.COMMON, mage.cards.s.SuffocatingFumes.class));
cards.add(new SetCardInfo("Survivors' Bond", 172, Rarity.COMMON, mage.cards.s.SurvivorsBond.class));
cards.add(new SetCardInfo("Swamp", 266, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 267, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 268, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));