[WHO] Implement The Fifth Doctor

This commit is contained in:
theelk801 2023-10-15 18:08:39 -04:00
parent 751739bb2b
commit 078fbe6eeb
2 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,75 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.effects.common.UntapAllEffect;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.EnteredThisTurnPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.watchers.common.AttackedThisTurnWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TheFifthDoctor extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(
"creature you control that didn't attack or enter the battlefield this turn"
);
static {
filter.add(Predicates.not(EnteredThisTurnPredicate.instance));
filter.add(TheFifthDoctorPredicate.instance);
}
public TheFifthDoctor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{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);
// Peaceful Coexistence -- At the beginning of your end step, put a +1/+1 counter on each creature you control that didn't attack or enter the battlefield this turn. Untap those creatures.
Ability ability = new BeginningOfEndStepTriggeredAbility(
new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter),
TargetController.YOU, false
);
ability.addEffect(new UntapAllEffect(filter).setText("Untap those creatures"));
this.addAbility(ability.withFlavorWord("Peaceful Coexistence"), new AttackedThisTurnWatcher());
}
private TheFifthDoctor(final TheFifthDoctor card) {
super(card);
}
@Override
public TheFifthDoctor copy() {
return new TheFifthDoctor(this);
}
}
enum TheFifthDoctorPredicate implements Predicate<Permanent> {
instance;
@Override
public boolean apply(Permanent input, Game game) {
return !game.getState().getWatcher(AttackedThisTurnWatcher.class).checkIfAttacked(input, game);
}
}

View file

@ -197,6 +197,7 @@ public final class DoctorWho extends ExpansionSet {
cards.add(new SetCardInfo("Terramorphic Expanse", 322, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class));
cards.add(new SetCardInfo("The Dalek Emperor", 120, Rarity.RARE, mage.cards.t.TheDalekEmperor.class));
cards.add(new SetCardInfo("The Eleventh Hour", 41, Rarity.RARE, mage.cards.t.TheEleventhHour.class));
cards.add(new SetCardInfo("The Fifth Doctor", 127, Rarity.RARE, mage.cards.t.TheFifthDoctor.class));
cards.add(new SetCardInfo("The Flux", 86, Rarity.RARE, mage.cards.t.TheFlux.class));
cards.add(new SetCardInfo("The Ninth Doctor", 148, Rarity.RARE, mage.cards.t.TheNinthDoctor.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Ninth Doctor", 432, Rarity.RARE, mage.cards.t.TheNinthDoctor.class, NON_FULL_USE_VARIOUS));