diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/AbstractCommander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/AbstractCommander.java index 523aac06c74..5eeada82573 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/AbstractCommander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/AbstractCommander.java @@ -27,7 +27,8 @@ public abstract class AbstractCommander extends Constructed { PartnerValidator.instance, FriendsForeverValidator.instance, PartnerWithValidator.instance, - ChooseABackgroundValidator.instance + ChooseABackgroundValidator.instance, + DoctorsCompanionValidator.instance ); protected final List bannedCommander = new ArrayList<>(); protected final List bannedPartner = new ArrayList<>(); diff --git a/Mage.Sets/src/mage/cards/t/TheThirteenthDoctor.java b/Mage.Sets/src/mage/cards/t/TheThirteenthDoctor.java new file mode 100644 index 00000000000..70c628dc7c0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheThirteenthDoctor.java @@ -0,0 +1,69 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.UntapAllEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.FilterSpell; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.card.CastFromZonePredicate; +import mage.filter.predicate.permanent.CounterAnyPredicate; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TheThirteenthDoctor extends CardImpl { + + private static final FilterSpell filter + = new FilterSpell("a spell from anywhere other than your hand"); + private static final FilterPermanent filter2 + = new FilterControlledCreaturePermanent("creature you control with a counter on it"); + + static { + filter.add(Predicates.not(new CastFromZonePredicate(Zone.HAND))); + filter2.add(CounterAnyPredicate.instance); + } + + public TheThirteenthDoctor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.TIME_LORD); + this.subtype.add(SubType.DOCTOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Paradox -- Whenever you cast a spell from anywhere other than your hand, put a +1/+1 counter on target creature. + Ability ability = new SpellCastControllerTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filter, false + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability.withFlavorWord("Paradox")); + + // Team TARDIS -- At the beginning of your end step, untap each creature you control with a counter on it. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + new UntapAllEffect(filter2), TargetController.YOU, false + ).withFlavorWord("Team TARDIS")); + + } + + private TheThirteenthDoctor(final TheThirteenthDoctor card) { + super(card); + } + + @Override + public TheThirteenthDoctor copy() { + return new TheThirteenthDoctor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DoctorWho.java b/Mage.Sets/src/mage/sets/DoctorWho.java index 166f21359cb..da5a81055d3 100644 --- a/Mage.Sets/src/mage/sets/DoctorWho.java +++ b/Mage.Sets/src/mage/sets/DoctorWho.java @@ -26,6 +26,7 @@ public final class DoctorWho extends ExpansionSet { cards.add(new SetCardInfo("Plains", 197, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sarah Jane Smith", 6, Rarity.RARE, mage.cards.s.SarahJaneSmith.class)); cards.add(new SetCardInfo("Swamp", 201, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Thirteenth Doctor", 4, Rarity.MYTHIC, mage.cards.t.TheThirteenthDoctor.class)); cards.add(new SetCardInfo("Yasmin Khan", 7, Rarity.RARE, mage.cards.y.YasminKhan.class)); } } diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 5360eb685cc..8256fca6474 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -138,6 +138,7 @@ public enum SubType { DEVIL("Devil", SubTypeSet.CreatureType), DINOSAUR("Dinosaur", SubTypeSet.CreatureType), // With Ixalan now being spoiled, need this to be selectable DJINN("Djinn", SubTypeSet.CreatureType), + DOCTOR("Doctor", SubTypeSet.CreatureType), DOG("Dog", SubTypeSet.CreatureType), DRAGON("Dragon", SubTypeSet.CreatureType), DRAKE("Drake", SubTypeSet.CreatureType), @@ -378,6 +379,7 @@ public enum SubType { THALAKOS("Thalakos", SubTypeSet.CreatureType), THOPTER("Thopter", SubTypeSet.CreatureType), TIEFLING("Tiefling", SubTypeSet.CreatureType), + TIME_LORD("Time Lord", SubTypeSet.CreatureType), TRANDOSHAN("Trandoshan", SubTypeSet.CreatureType, true), // Star Wars THRULL("Thrull", SubTypeSet.CreatureType), TREEFOLK("Treefolk", SubTypeSet.CreatureType), diff --git a/Mage/src/main/java/mage/util/validation/DoctorsCompanionValidator.java b/Mage/src/main/java/mage/util/validation/DoctorsCompanionValidator.java new file mode 100644 index 00000000000..38146f15e10 --- /dev/null +++ b/Mage/src/main/java/mage/util/validation/DoctorsCompanionValidator.java @@ -0,0 +1,34 @@ +package mage.util.validation; + +import mage.abilities.keyword.DoctorsCompanionAbility; +import mage.cards.Card; +import mage.constants.SubType; + +/** + * @author TheElk801 + *

+ * We check for Brushwagg because it can't be a changeling + */ +public enum DoctorsCompanionValidator implements CommanderValidator { + instance; + + @Override + public boolean checkPartner(Card commander1, Card commander2) { + return commander1.getAbilities().containsClass(DoctorsCompanionAbility.class) + && commander2.hasSubTypeForDeckbuilding(SubType.TIME_LORD) + && commander2.hasSubTypeForDeckbuilding(SubType.DOCTOR) + && !commander2.hasSubTypeForDeckbuilding(SubType.BRUSHWAGG); + } + + @Override + public boolean checkBothPartners(Card commander1, Card commander2) { + return checkPartner(commander1, commander2) || checkPartner(commander2, commander1); + } + + @Override + public boolean specialCheck(Card commander) { + return commander.hasSubTypeForDeckbuilding(SubType.TIME_LORD) + && commander.hasSubTypeForDeckbuilding(SubType.DOCTOR) + && !commander.hasSubTypeForDeckbuilding(SubType.BRUSHWAGG); + } +}