Implemented Selfless Savior

This commit is contained in:
Evan Kranzler 2020-06-09 19:59:29 -04:00
parent 94bd458628
commit 2096229af8
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,55 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SelflessSavior extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("another target creature");
static {
filter.add(AnotherPredicate.instance);
}
public SelflessSavior(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
this.subtype.add(SubType.DOG);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Sacrifice Selfless Savior: Another target creature gains indestructible until end of turn.
Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn
), new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private SelflessSavior(final SelflessSavior card) {
super(card);
}
@Override
public SelflessSavior copy() {
return new SelflessSavior(this);
}
}

View file

@ -99,6 +99,7 @@ public final class CoreSet2021 extends ExpansionSet {
cards.add(new SetCardInfo("Runed Halo", 32, Rarity.RARE, mage.cards.r.RunedHalo.class));
cards.add(new SetCardInfo("Seasoned Hallowblade", 34, Rarity.UNCOMMON, mage.cards.s.SeasonedHallowblade.class));
cards.add(new SetCardInfo("See the Truth", 69, Rarity.RARE, mage.cards.s.SeeTheTruth.class));
cards.add(new SetCardInfo("Selfless Savior", 36, Rarity.UNCOMMON, mage.cards.s.SelflessSavior.class));
cards.add(new SetCardInfo("Shipwreck Dowser", 71, Rarity.UNCOMMON, mage.cards.s.ShipwreckDowser.class));
cards.add(new SetCardInfo("Sigiled Contender", 323, Rarity.UNCOMMON, mage.cards.s.SigiledContender.class));
cards.add(new SetCardInfo("Solemn Simulacrum", 239, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class));