diff --git a/Mage.Sets/src/mage/cards/p/PropheticTitan.java b/Mage.Sets/src/mage/cards/p/PropheticTitan.java new file mode 100644 index 0000000000..27c1c2e6bc --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PropheticTitan.java @@ -0,0 +1,87 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.Mode; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.hint.common.CardTypesInGraveyardHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PropheticTitan extends CardImpl { + + public PropheticTitan(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{R}"); + + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Delirium — When Prophetic Titan enters the battlefield, choose one. If there are four or more card types among cards in your graveyard, choose both. + // • Prophetic Titan deals 4 damage to any target. + // • Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in a random order. + this.addAbility(new PropheticTitanTriggeredAbility()); + } + + private PropheticTitan(final PropheticTitan card) { + super(card); + } + + @Override + public PropheticTitan copy() { + return new PropheticTitan(this); + } +} + +class PropheticTitanTriggeredAbility extends EntersBattlefieldTriggeredAbility { + + public PropheticTitanTriggeredAbility() { + super(new DamageTargetEffect(4), false, "Delirium — "); + this.addTarget(new TargetAnyTarget()); + this.addMode(new Mode(new LookLibraryAndPickControllerEffect( + StaticValue.get(4), false, StaticValue.get(1), + StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false + ).setBackInRandomOrder(true).setText("look at the top four cards of your library. " + + "Put one of them into your hand and the rest on the bottom of your library in a random order"))); + this.getModes().setChooseText( + "choose one. If there are four or more card types among cards in your graveyard, choose both." + ); + this.addHint(CardTypesInGraveyardHint.YOU); + } + + private PropheticTitanTriggeredAbility(final PropheticTitanTriggeredAbility ability) { + super(ability); + } + + @Override + public PropheticTitanTriggeredAbility copy() { + return new PropheticTitanTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (!super.checkTrigger(event, game)) { + return false; + } + int modes = DeliriumCondition.instance.apply(game, this) ? 2 : 1; + this.getModes().setMinModes(modes); + this.getModes().setMaxModes(modes); + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 4f30c76910..d826c0bd5f 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -120,6 +120,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Priest of Fell Rites", 208, Rarity.RARE, mage.cards.p.PriestOfFellRites.class)); cards.add(new SetCardInfo("Prismatic Ending", 25, Rarity.UNCOMMON, mage.cards.p.PrismaticEnding.class)); cards.add(new SetCardInfo("Profane Tutor", 97, Rarity.RARE, mage.cards.p.ProfaneTutor.class)); + cards.add(new SetCardInfo("Prophetic Titan", 209, Rarity.UNCOMMON, mage.cards.p.PropheticTitan.class)); cards.add(new SetCardInfo("Quirion Ranger", 285, Rarity.UNCOMMON, mage.cards.q.QuirionRanger.class)); cards.add(new SetCardInfo("Ravenous Squirrel", 211, Rarity.UNCOMMON, mage.cards.r.RavenousSquirrel.class)); cards.add(new SetCardInfo("Razortide Bridge", 252, Rarity.COMMON, mage.cards.r.RazortideBridge.class));