diff --git a/Mage.Sets/src/mage/cards/d/DoctorDoom.java b/Mage.Sets/src/mage/cards/d/DoctorDoom.java new file mode 100644 index 00000000000..1006beb5aad --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DoctorDoom.java @@ -0,0 +1,83 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.DoombotToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DoctorDoom extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent("you control an artifact creature or a Plan"); + + static { + filter.add(Predicates.or( + Predicates.and( + CardType.ARTIFACT.getPredicate(), + CardType.CREATURE.getPredicate() + ), + SubType.PLAN.getPredicate() + )); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); + private static final Hint hint = new ConditionHint(condition); + + public DoctorDoom(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCIENTIST); + this.subtype.add(SubType.VILLAIN); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Doctor Doom enters, create two 3/3 colorless Robot Villain artifact creature tokens named Doombot. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new DoombotToken(), 2))); + + // As long as you control an artifact creature or a Plan, Doctor Doom has indestructible. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), condition, + "as long as you control an artifact creature or a Plan, {this} has indestructible" + )).addHint(hint)); + + // At the beginning of your end step, you draw a card and lose 1 life. + Ability ability = new BeginningOfEndStepTriggeredAbility(new DrawCardSourceControllerEffect(1, true)); + ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); + this.addAbility(ability); + } + + private DoctorDoom(final DoctorDoom card) { + super(card); + } + + @Override + public DoctorDoom copy() { + return new DoctorDoom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java b/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java index f7e9b564014..f9622f96e7c 100644 --- a/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java +++ b/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java @@ -25,6 +25,8 @@ public final class MarvelSuperHeroes extends ExpansionSet { cards.add(new SetCardInfo("Bruce Banner", 49, Rarity.MYTHIC, mage.cards.b.BruceBanner.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Captain America, Super-Soldier", 387, Rarity.MYTHIC, mage.cards.c.CaptainAmericaSuperSoldier.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Captain America, Super-Soldier", 9, Rarity.MYTHIC, mage.cards.c.CaptainAmericaSuperSoldier.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Doctor Doom", 394, Rarity.MYTHIC, mage.cards.d.DoctorDoom.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Doctor Doom", 95, Rarity.MYTHIC, mage.cards.d.DoctorDoom.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Moon Girl and Devil Dinosaur", 223, Rarity.RARE, mage.cards.m.MoonGirlAndDevilDinosaur.class)); cards.add(new SetCardInfo("Quicksilver, Brash Blur", 148, Rarity.RARE, mage.cards.q.QuicksilverBrashBlur.class)); cards.add(new SetCardInfo("Super-Skrull", 115, Rarity.RARE, mage.cards.s.SuperSkrull.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index e565b4b9d04..1cfe065e997 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -45,6 +45,7 @@ public enum SubType { CASE("Case", SubTypeSet.EnchantmentType), CLASS("Class", SubTypeSet.EnchantmentType), CURSE("Curse", SubTypeSet.EnchantmentType), + PLAN("Plan", SubTypeSet.EnchantmentType), ROLE("Role", SubTypeSet.EnchantmentType), ROOM("Room", SubTypeSet.EnchantmentType), RUNE("Rune", SubTypeSet.EnchantmentType), diff --git a/Mage/src/main/java/mage/game/permanent/token/DoombotToken.java b/Mage/src/main/java/mage/game/permanent/token/DoombotToken.java new file mode 100644 index 00000000000..eb2edf84eb9 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/DoombotToken.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class DoombotToken extends TokenImpl { + + public DoombotToken() { + super("Doombot", "3/3 colorless Robot Villain artifact creature token named Doombot"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ROBOT); + subtype.add(SubType.VILLAIN); + power = new MageInt(3); + toughness = new MageInt(3); + } + + private DoombotToken(final DoombotToken token) { + super(token); + } + + public DoombotToken copy() { + return new DoombotToken(this); + } +}