diff --git a/Mage.Sets/src/mage/cards/e/EvangelOfSynthesis.java b/Mage.Sets/src/mage/cards/e/EvangelOfSynthesis.java new file mode 100644 index 0000000000..176cb9559b --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EvangelOfSynthesis.java @@ -0,0 +1,73 @@ +package mage.cards.e; + +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.decorator.ConditionalContinuousEffect; +import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.game.Game; +import mage.watchers.common.CardsDrawnThisTurnWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class EvangelOfSynthesis extends CardImpl { + + public EvangelOfSynthesis(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{B}"); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Evangel of Synthesis enters the battlefield, draw a card, then discard a card. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new DrawDiscardControllerEffect(1, 1) + )); + + // As long as you've drawn two or more cards this turn, Evangel of Synthesis gets +1/+0 and has menace. + Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), + EvangelOfSynthesisCondition.instance, "as long as you've drawn " + + "two or more cards this turn, {this} gets +1/+0" + )); + ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect( + new MenaceAbility(false), Duration.WhileOnBattlefield + ), EvangelOfSynthesisCondition.instance, "and has menace")); + this.addAbility(ability.addHint(CardsDrawnThisTurnDynamicValue.getHint())); + } + + private EvangelOfSynthesis(final EvangelOfSynthesis card) { + super(card); + } + + @Override + public EvangelOfSynthesis copy() { + return new EvangelOfSynthesis(this); + } +} + +enum EvangelOfSynthesisCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class); + return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1; + } +} diff --git a/Mage.Sets/src/mage/cards/e/EvenTheScore.java b/Mage.Sets/src/mage/cards/e/EvenTheScore.java index b07af6fe13..290e2f01b1 100644 --- a/Mage.Sets/src/mage/cards/e/EvenTheScore.java +++ b/Mage.Sets/src/mage/cards/e/EvenTheScore.java @@ -31,7 +31,7 @@ public final class EvenTheScore extends CardImpl { new ManaCostsImpl<>("{U}{U}{U}"), EvenTheScoreCondition.instance ) - ).setRuleAtTheTop(true), new CardsDrawnThisTurnWatcher()); + ).setRuleAtTheTop(true)); // Draw X cards. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(ManacostVariableValue.REGULAR)); diff --git a/Mage.Sets/src/mage/cards/e/Eyekite.java b/Mage.Sets/src/mage/cards/e/Eyekite.java index 7e45ea536f..5c6c5d419f 100644 --- a/Mage.Sets/src/mage/cards/e/Eyekite.java +++ b/Mage.Sets/src/mage/cards/e/Eyekite.java @@ -5,6 +5,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -36,7 +37,7 @@ public final class Eyekite extends CardImpl { this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), EyekiteCondition.instance, "{this} gets +2/+0 as long as you've drawn two or more cards this turn." - ))); + )).addHint(CardsDrawnThisTurnDynamicValue.getHint())); } private Eyekite(final Eyekite card) { diff --git a/Mage.Sets/src/mage/cards/f/FistsOfFlame.java b/Mage.Sets/src/mage/cards/f/FistsOfFlame.java index cb9f3ed87c..73135a4626 100644 --- a/Mage.Sets/src/mage/cards/f/FistsOfFlame.java +++ b/Mage.Sets/src/mage/cards/f/FistsOfFlame.java @@ -11,7 +11,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.CardsDrawnThisTurnWatcher; import java.util.UUID; @@ -33,6 +32,7 @@ public final class FistsOfFlame extends CardImpl { StaticValue.get(0), Duration.EndOfTurn ).setText("and gets +1/+0 for each card you've drawn this turn.")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addHint(CardsDrawnThisTurnDynamicValue.getHint()); } private FistsOfFlame(final FistsOfFlame card) { diff --git a/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java b/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java index d3b9c5d55d..5233378013 100644 --- a/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java +++ b/Mage.Sets/src/mage/cards/k/KydeleChosenOfKruphix.java @@ -11,7 +11,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; -import mage.watchers.common.CardsDrawnThisTurnWatcher; import java.util.UUID; @@ -30,10 +29,10 @@ public final class KydeleChosenOfKruphix extends CardImpl { this.toughness = new MageInt(3); // {T}: Add {C} for each card you've drawn this turn. - DynamicManaAbility ability = new DynamicManaAbility( - Mana.ColorlessMana(1), CardsDrawnThisTurnDynamicValue.instance, - new TapSourceCost(), null, false, CardsDrawnThisTurnDynamicValue.instance); - this.addAbility(ability); + this.addAbility(new DynamicManaAbility( + Mana.ColorlessMana(1), CardsDrawnThisTurnDynamicValue.instance, + new TapSourceCost(), null, false, CardsDrawnThisTurnDynamicValue.instance + ).addHint(CardsDrawnThisTurnDynamicValue.getHint())); // Partner this.addAbility(PartnerAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/n/NikoAris.java b/Mage.Sets/src/mage/cards/n/NikoAris.java index 84c23b95cb..e9ac4eded1 100644 --- a/Mage.Sets/src/mage/cards/n/NikoAris.java +++ b/Mage.Sets/src/mage/cards/n/NikoAris.java @@ -28,7 +28,6 @@ import mage.game.events.GameEvent; import mage.game.permanent.token.ShardToken; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.watchers.common.CardsDrawnThisTurnWatcher; import java.util.Objects; import java.util.UUID; @@ -69,7 +68,7 @@ public final class NikoAris extends CardImpl { "{this} deals 2 damage to target tapped creature for each card you've drawn this turn" ), -1); ability.addTarget(new TargetPermanent(filter)); - this.addAbility(ability, new CardsDrawnThisTurnWatcher()); + this.addAbility(ability.addHint(CardsDrawnThisTurnDynamicValue.getHint())); // −1: Create a Shard token. this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new ShardToken()), -1)); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfHalaster.java b/Mage.Sets/src/mage/cards/s/ScionOfHalaster.java index 1f3b011b1e..3106562665 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfHalaster.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfHalaster.java @@ -29,9 +29,9 @@ public final class ScionOfHalaster extends CardImpl { // Commander creatures you own have "The first time you would draw a card each turn, instead look at the top two cards of your library. Put one of them into your graveyard and the other back on top of your library. Then draw a card." this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( - new SimpleStaticAbility(new ScionOfHalasterReplacementEffect()), + new SimpleStaticAbility(new ScionOfHalasterReplacementEffect()), Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER - )), new CardsDrawnThisTurnWatcher()); + ))); } private ScionOfHalaster(final ScionOfHalaster card) { diff --git a/Mage.Sets/src/mage/cards/t/ThunderingDjinn.java b/Mage.Sets/src/mage/cards/t/ThunderingDjinn.java index a8479e0ecb..e8a3b418b4 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderingDjinn.java +++ b/Mage.Sets/src/mage/cards/t/ThunderingDjinn.java @@ -11,7 +11,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.target.common.TargetAnyTarget; -import mage.watchers.common.CardsDrawnThisTurnWatcher; import java.util.UUID; @@ -31,11 +30,13 @@ public final class ThunderingDjinn extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever Thundering Djinn attacks, it deals damage to any target equal to the number of cards you've drawn this turn. - Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect( - CardsDrawnThisTurnDynamicValue.instance - ).setText("it deals damage to any target equal to the number of cards you've drawn this turn."), false); + Ability ability = new AttacksTriggeredAbility( + new DamageTargetEffect(CardsDrawnThisTurnDynamicValue.instance) + .setText("it deals damage to any target equal to the number of cards you've drawn this turn."), + false + ); ability.addTarget(new TargetAnyTarget()); - this.addAbility(ability); + this.addAbility(ability.addHint(CardsDrawnThisTurnDynamicValue.getHint())); } private ThunderingDjinn(final ThunderingDjinn card) { diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index cbf9c53843..5b7a377aaf 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -50,6 +50,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Disfigure", 91, Rarity.COMMON, mage.cards.d.Disfigure.class)); cards.add(new SetCardInfo("Drafna, Founder of Lat-Nam", 47, Rarity.RARE, mage.cards.d.DrafnaFounderOfLatNam.class)); cards.add(new SetCardInfo("Epic Confrontation", 176, Rarity.COMMON, mage.cards.e.EpicConfrontation.class)); + cards.add(new SetCardInfo("Evangel of Synthesis", 209, Rarity.UNCOMMON, mage.cards.e.EvangelOfSynthesis.class)); cards.add(new SetCardInfo("Fade from History", 177, Rarity.RARE, mage.cards.f.FadeFromHistory.class)); cards.add(new SetCardInfo("Fallaji Chaindancer", 134, Rarity.COMMON, mage.cards.f.FallajiChaindancer.class)); cards.add(new SetCardInfo("Fallaji Dragon Engine", 159, Rarity.UNCOMMON, mage.cards.f.FallajiDragonEngine.class)); diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsDrawnThisTurnDynamicValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsDrawnThisTurnDynamicValue.java index 513f0b8f18..a698b50701 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsDrawnThisTurnDynamicValue.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsDrawnThisTurnDynamicValue.java @@ -3,6 +3,7 @@ package mage.abilities.dynamicvalue.common; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; +import mage.abilities.hint.ValueHint; import mage.game.Game; import mage.watchers.common.CardsDrawnThisTurnWatcher; @@ -13,6 +14,7 @@ import mage.watchers.common.CardsDrawnThisTurnWatcher; */ public enum CardsDrawnThisTurnDynamicValue implements DynamicValue { instance; + private static final ValueHint hint = new ValueHint("Cards you've drawn this turn", instance); @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { @@ -35,7 +37,12 @@ public enum CardsDrawnThisTurnDynamicValue implements DynamicValue { @Override public String getMessage() { + return "card you've drawn this turn"; } + + public static ValueHint getHint() { + return hint; + } }