From 1a82eba77c53cc1d69a35f3cdee45deb6fad1cf0 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 12 Jan 2020 21:36:23 +0400 Subject: [PATCH] * My turn condition - added card hints about turn; --- .../src/mage/cards/b/BrinebornCutthroat.java | 4 +-- .../src/mage/cards/f/FatedInfatuation.java | 9 ++++--- .../src/mage/cards/f/FatedIntervention.java | 9 ++++--- .../src/mage/cards/f/FatedRetribution.java | 11 +++++--- Mage.Sets/src/mage/cards/f/FatedReturn.java | 9 ++++--- .../src/mage/cards/f/FeastingTrollKing.java | 3 ++- Mage.Sets/src/mage/cards/f/Fleshformer.java | 13 +++++----- .../src/mage/cards/f/ForceOfDespair.java | 3 ++- .../src/mage/cards/f/ForceOfNegation.java | 3 ++- Mage.Sets/src/mage/cards/f/ForceOfRage.java | 3 ++- Mage.Sets/src/mage/cards/f/ForceOfVigor.java | 3 ++- Mage.Sets/src/mage/cards/f/ForceOfVirtue.java | 3 ++- .../src/mage/cards/f/FreshFacedRecruit.java | 3 ++- Mage.Sets/src/mage/cards/g/GhostTown.java | 17 ++++++------ .../src/mage/cards/g/GideonBlackblade.java | 3 ++- .../src/mage/cards/g/GloryOfWarfare.java | 22 ++++++++-------- .../src/mage/cards/g/GruulSpellbreaker.java | 2 ++ .../src/mage/cards/g/GwendlynDiCorci.java | 11 ++++---- .../abilities/hint/common/NotMyTurnHint.java | 26 +++++++++++++++++++ 19 files changed, 101 insertions(+), 56 deletions(-) create mode 100644 Mage/src/main/java/mage/abilities/hint/common/NotMyTurnHint.java diff --git a/Mage.Sets/src/mage/cards/b/BrinebornCutthroat.java b/Mage.Sets/src/mage/cards/b/BrinebornCutthroat.java index 42f81fb31a..9324dd1889 100644 --- a/Mage.Sets/src/mage/cards/b/BrinebornCutthroat.java +++ b/Mage.Sets/src/mage/cards/b/BrinebornCutthroat.java @@ -5,7 +5,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; -import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.common.NotMyTurnHint; import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,7 +37,7 @@ public final class BrinebornCutthroat extends CardImpl { new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false ), NotMyTurnCondition.instance, "Whenever you cast a spell during an opponent's turn, " + "put a +1/+1 counter on {this}." - ).addHint(new ConditionHint(NotMyTurnCondition.instance, "It's not my turn"))); // TODO: replace to opponent's turn condition (team mode support in future) + ).addHint(NotMyTurnHint.instance)); // TODO: replace to opponent's turn condition (team mode support in future) } private BrinebornCutthroat(final BrinebornCutthroat card) { diff --git a/Mage.Sets/src/mage/cards/f/FatedInfatuation.java b/Mage.Sets/src/mage/cards/f/FatedInfatuation.java index d917934a14..f5b5f58cf2 100644 --- a/Mage.Sets/src/mage/cards/f/FatedInfatuation.java +++ b/Mage.Sets/src/mage/cards/f/FatedInfatuation.java @@ -1,30 +1,31 @@ - package mage.cards.f; -import java.util.UUID; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenCopyTargetEffect; import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class FatedInfatuation extends CardImpl { public FatedInfatuation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}{U}"); // Create a token that's a copy of target creature you control. If it's your turn, scry 2. this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, "If it's your turn, scry 2")); + this.getSpellAbility().addHint(MyTurnHint.instance); } public FatedInfatuation(final FatedInfatuation card) { diff --git a/Mage.Sets/src/mage/cards/f/FatedIntervention.java b/Mage.Sets/src/mage/cards/f/FatedIntervention.java index 6faa2d2019..92d6442d13 100644 --- a/Mage.Sets/src/mage/cards/f/FatedIntervention.java +++ b/Mage.Sets/src/mage/cards/f/FatedIntervention.java @@ -1,29 +1,30 @@ - package mage.cards.f; -import java.util.UUID; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.game.permanent.token.CentaurEnchantmentCreatureToken; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class FatedIntervention extends CardImpl { public FatedIntervention(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}{G}{G}"); // Create two 3/3 green Centaur enchantment creature tokens. If it's your turn, scry 2. this.getSpellAbility().addEffect(new CreateTokenEffect(new CentaurEnchantmentCreatureToken(), 2)); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, "If it's your turn, scry 2")); + this.getSpellAbility().addHint(MyTurnHint.instance); } public FatedIntervention(final FatedIntervention card) { diff --git a/Mage.Sets/src/mage/cards/f/FatedRetribution.java b/Mage.Sets/src/mage/cards/f/FatedRetribution.java index 13b602a5a2..d0a35a9ed8 100644 --- a/Mage.Sets/src/mage/cards/f/FatedRetribution.java +++ b/Mage.Sets/src/mage/cards/f/FatedRetribution.java @@ -1,36 +1,39 @@ - package mage.cards.f; -import java.util.UUID; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class FatedRetribution extends CardImpl { private static final FilterPermanent filter = new FilterPermanent("creatures and planeswalkers"); + static { filter.add(Predicates.or( CardType.CREATURE.getPredicate(), CardType.PLANESWALKER.getPredicate())); } + public FatedRetribution(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{W}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{W}{W}{W}"); // Destroy all creatures and planeswalkers. If it's your turn, scry 2. this.getSpellAbility().addEffect(new DestroyAllEffect(filter, false)); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, "If it's your turn, scry 2")); + this.getSpellAbility().addHint(MyTurnHint.instance); } public FatedRetribution(final FatedRetribution card) { diff --git a/Mage.Sets/src/mage/cards/f/FatedReturn.java b/Mage.Sets/src/mage/cards/f/FatedReturn.java index e3cf9f6e23..9dcc71df58 100644 --- a/Mage.Sets/src/mage/cards/f/FatedReturn.java +++ b/Mage.Sets/src/mage/cards/f/FatedReturn.java @@ -1,12 +1,11 @@ - package mage.cards.f; -import java.util.UUID; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -15,14 +14,15 @@ import mage.constants.Duration; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInGraveyard; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class FatedReturn extends CardImpl { public FatedReturn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{B}{B}{B}"); // Put target creature card from a graveyard onto the battlefield under your control. It gains indestructible. If it's your turn, scry 2. @@ -32,6 +32,7 @@ public final class FatedReturn extends CardImpl { "It gains indestructible")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, "If it's your turn, scry 2 (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)")); + this.getSpellAbility().addHint(MyTurnHint.instance); } public FatedReturn(final FatedReturn card) { diff --git a/Mage.Sets/src/mage/cards/f/FeastingTrollKing.java b/Mage.Sets/src/mage/cards/f/FeastingTrollKing.java index 8a8955c7da..af752d5c84 100644 --- a/Mage.Sets/src/mage/cards/f/FeastingTrollKing.java +++ b/Mage.Sets/src/mage/cards/f/FeastingTrollKing.java @@ -9,6 +9,7 @@ import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; @@ -57,7 +58,7 @@ public final class FeastingTrollKing extends CardImpl { new ReturnSourceFromGraveyardToBattlefieldEffect(), new SacrificeTargetCost(new TargetControlledPermanent(3, filter)), MyTurnCondition.instance - )); + ).addHint(MyTurnHint.instance)); } private FeastingTrollKing(final FeastingTrollKing card) { diff --git a/Mage.Sets/src/mage/cards/f/Fleshformer.java b/Mage.Sets/src/mage/cards/f/Fleshformer.java index e91958f5f8..696ca9a116 100644 --- a/Mage.Sets/src/mage/cards/f/Fleshformer.java +++ b/Mage.Sets/src/mage/cards/f/Fleshformer.java @@ -1,7 +1,5 @@ - package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -11,23 +9,25 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author jeffwadsworth */ public final class Fleshformer extends CardImpl { public Fleshformer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); @@ -43,8 +43,9 @@ public final class Fleshformer extends CardImpl { ability.addEffect(effect); ability.addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)); ability.addTarget(new TargetCreaturePermanent()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); - + } public Fleshformer(final Fleshformer card) { diff --git a/Mage.Sets/src/mage/cards/f/ForceOfDespair.java b/Mage.Sets/src/mage/cards/f/ForceOfDespair.java index f0ec1ce8c1..f182f037d3 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfDespair.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfDespair.java @@ -5,6 +5,7 @@ import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.ExileFromHandCost; import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -40,7 +41,7 @@ public final class ForceOfDespair extends CardImpl { new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance, "If it's not your turn, you may exile a black card from " + "your hand rather than pay this spell's mana cost." - )); + ).addHint(NotMyTurnHint.instance)); // Destroy all creatures that entered the battlefield this turn. this.getSpellAbility().addEffect(new DestroyAllEffect(filter2)); diff --git a/Mage.Sets/src/mage/cards/f/ForceOfNegation.java b/Mage.Sets/src/mage/cards/f/ForceOfNegation.java index 87927ca28d..f9ad6d4c91 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfNegation.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfNegation.java @@ -5,6 +5,7 @@ import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.ExileFromHandCost; import mage.abilities.effects.common.CounterTargetWithReplacementEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -36,7 +37,7 @@ public final class ForceOfNegation extends CardImpl { new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance, "If it's not your turn, you may exile a blue card from " + "your hand rather than pay this spell's mana cost." - )); + ).addHint(NotMyTurnHint.instance)); // Counter target noncreature spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED)); diff --git a/Mage.Sets/src/mage/cards/f/ForceOfRage.java b/Mage.Sets/src/mage/cards/f/ForceOfRage.java index 6072d57923..2dfd8cbccf 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfRage.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfRage.java @@ -9,6 +9,7 @@ import mage.abilities.costs.common.ExileFromHandCost; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -45,7 +46,7 @@ public final class ForceOfRage extends CardImpl { new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance, "If it's not your turn, you may exile a red card from " + "your hand rather than pay this spell's mana cost." - )); + ).addHint(NotMyTurnHint.instance)); // Create two 3/1 red Elemental creature tokens with trample and haste. Sacrifice those tokens at the beginning of your next upkeep. this.getSpellAbility().addEffect(new ForceOfRageEffect()); diff --git a/Mage.Sets/src/mage/cards/f/ForceOfVigor.java b/Mage.Sets/src/mage/cards/f/ForceOfVigor.java index ca84f4a5ee..b015ef4486 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfVigor.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfVigor.java @@ -5,6 +5,7 @@ import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.ExileFromHandCost; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -40,7 +41,7 @@ public final class ForceOfVigor extends CardImpl { new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance, "If it's not your turn, you may exile a green card from " + "your hand rather than pay this spell's mana cost." - )); + ).addHint(NotMyTurnHint.instance)); // Destroy up to two target artifacts and/or enchantments. this.getSpellAbility().addEffect(new DestroyTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/f/ForceOfVirtue.java b/Mage.Sets/src/mage/cards/f/ForceOfVirtue.java index 5a8adf54fe..c3f5c9c1c8 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfVirtue.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfVirtue.java @@ -6,6 +6,7 @@ import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.ExileFromHandCost; import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -36,7 +37,7 @@ public final class ForceOfVirtue extends CardImpl { new ExileFromHandCost(new TargetCardInHand(filter)), NotMyTurnCondition.instance, "If it's not your turn, you may exile a white card from " + "your hand rather than pay this spell's mana cost." - )); + ).addHint(NotMyTurnHint.instance)); // Flash this.addAbility(FlashAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/f/FreshFacedRecruit.java b/Mage.Sets/src/mage/cards/f/FreshFacedRecruit.java index 3076f0a122..846f232372 100644 --- a/Mage.Sets/src/mage/cards/f/FreshFacedRecruit.java +++ b/Mage.Sets/src/mage/cards/f/FreshFacedRecruit.java @@ -5,6 +5,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +32,7 @@ public final class FreshFacedRecruit extends CardImpl { this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield), MyTurnCondition.instance, "As long as it's your turn, {this} has first strike." - ))); + )).addHint(MyTurnHint.instance)); } private FreshFacedRecruit(final FreshFacedRecruit card) { diff --git a/Mage.Sets/src/mage/cards/g/GhostTown.java b/Mage.Sets/src/mage/cards/g/GhostTown.java index 96ea8f5a68..0746b74e0b 100644 --- a/Mage.Sets/src/mage/cards/g/GhostTown.java +++ b/Mage.Sets/src/mage/cards/g/GhostTown.java @@ -1,32 +1,33 @@ - package mage.cards.g; -import java.util.UUID; import mage.abilities.common.ActivateIfConditionActivatedAbility; -import mage.abilities.condition.InvertCondition; -import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import java.util.UUID; + /** - * * @author emerald000 */ public final class GhostTown extends CardImpl { public GhostTown(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); - + // {0}: Return Ghost Town to its owner's hand. Activate this ability only if it's not your turn. - this.addAbility(new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new GenericManaCost(0), new InvertCondition(MyTurnCondition.instance))); + this.addAbility(new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), + new GenericManaCost(0), NotMyTurnCondition.instance) + .addHint(NotMyTurnHint.instance)); } public GhostTown(final GhostTown card) { diff --git a/Mage.Sets/src/mage/cards/g/GideonBlackblade.java b/Mage.Sets/src/mage/cards/g/GideonBlackblade.java index f57cd82e97..a1da242b62 100644 --- a/Mage.Sets/src/mage/cards/g/GideonBlackblade.java +++ b/Mage.Sets/src/mage/cards/g/GideonBlackblade.java @@ -13,6 +13,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.PreventAllDamageToSourceEffect; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.VigilanceAbility; @@ -59,7 +60,7 @@ public final class GideonBlackblade extends CardImpl { new GideonBlackbladeToken(), "planeswalker", Duration.WhileOnBattlefield ), MyTurnCondition.instance, "As long as it's your turn, " + "{this} is a 4/4 Human Soldier creature with indestructible that's still a planeswalker." - ))); + )).addHint(MyTurnHint.instance)); // Prevent all damage that would be dealt to Gideon Blackblade during your turn. this.addAbility(new SimpleStaticAbility(new ConditionalPreventionEffect( diff --git a/Mage.Sets/src/mage/cards/g/GloryOfWarfare.java b/Mage.Sets/src/mage/cards/g/GloryOfWarfare.java index d224a521bf..bc3f31a429 100644 --- a/Mage.Sets/src/mage/cards/g/GloryOfWarfare.java +++ b/Mage.Sets/src/mage/cards/g/GloryOfWarfare.java @@ -1,42 +1,42 @@ - - package mage.cards.g; -import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; +import java.util.UUID; + /** - * * @author Loki */ public final class GloryOfWarfare extends CardImpl { - public GloryOfWarfare (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{W}"); - - - + public GloryOfWarfare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{W}"); + // As long as it’s your turn, creatures you control get +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield), MyTurnCondition.instance, - "As long as it's your turn, creatures you control get +2/+0"))); + "As long as it's your turn, creatures you control get +2/+0")) + .addHint(MyTurnHint.instance)); + + // As long as it’s not your turn, creatures you control get +0/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostControlledEffect(0, 2, Duration.WhileOnBattlefield), NotMyTurnCondition.instance, "As long as it's not your turn, creatures you control get +0/+2"))); } - public GloryOfWarfare (final GloryOfWarfare card) { + public GloryOfWarfare(final GloryOfWarfare card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java b/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java index 399e17078b..05d505fc7b 100644 --- a/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java +++ b/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java @@ -7,6 +7,7 @@ import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.GainAbilityControllerEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.HexproofAbility; import mage.abilities.keyword.RiotAbility; import mage.abilities.keyword.TrampleAbility; @@ -54,6 +55,7 @@ public final class GruulSpellbreaker extends CardImpl { Duration.WhileOnBattlefield ), MyTurnCondition.instance, "{this} have hexproof." )); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java b/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java index 1fe72eb28f..96971110c9 100644 --- a/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java +++ b/Mage.Sets/src/mage/cards/g/GwendlynDiCorci.java @@ -1,13 +1,12 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -16,23 +15,25 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.target.TargetPlayer; +import java.util.UUID; + /** - * * @author fireshoes */ public final class GwendlynDiCorci extends CardImpl { public GwendlynDiCorci(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{B}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(3); this.toughness = new MageInt(5); - // {tap}: Target player discards a card at random. Activate this ability only during your turn. + // {T}: Target player discards a card at random. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1, true), new TapSourceCost(), MyTurnCondition.instance); ability.addTarget(new TargetPlayer()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/hint/common/NotMyTurnHint.java b/Mage/src/main/java/mage/abilities/hint/common/NotMyTurnHint.java new file mode 100644 index 0000000000..718d8492c7 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/hint/common/NotMyTurnHint.java @@ -0,0 +1,26 @@ +package mage.abilities.hint.common; + +import mage.abilities.Ability; +import mage.abilities.condition.common.NotMyTurnCondition; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.game.Game; + +/** + * @author JayDi85 + */ +public enum NotMyTurnHint implements Hint { + + instance; + private static final ConditionHint hint = new ConditionHint(NotMyTurnCondition.instance, "It's not my turn"); + + @Override + public String getText(Game game, Ability ability) { + return hint.getText(game, ability); + } + + @Override + public Hint copy() { + return instance; + } +}