From 6736f5f3b8c6776170acb019b44ab9097d0c5f2c Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 12 Jan 2020 21:59:56 +0400 Subject: [PATCH] * My turn condition - added card hints about turn; --- Mage.Sets/src/mage/cards/h/HardyVeteran.java | 7 ++++--- .../mage/cards/h/HermitOfTheNatterknolls.java | 8 +++---- .../src/mage/cards/h/HoofprintsOfTheStag.java | 8 ++++--- .../src/mage/cards/h/HumbleDefector.java | 21 +++++++------------ Mage.Sets/src/mage/cards/i/InstillEnergy.java | 20 +++++++++--------- .../src/mage/cards/j/JeeringInstigator.java | 18 +++++++++------- Mage.Sets/src/mage/cards/j/JoustingLance.java | 18 +++++++--------- .../mage/cards/l/LiciaSanguineTribune.java | 17 ++++++--------- .../mage/cards/l/LighthouseChronologist.java | 11 +++++----- .../cards/l/LoneWolfOfTheNatterknolls.java | 10 ++++----- Mage.Sets/src/mage/cards/m/Melee.java | 5 +++-- .../src/mage/cards/n/NahiriStormOfStone.java | 2 ++ .../src/mage/cards/n/NaiadOfHiddenCoves.java | 3 ++- Mage.Sets/src/mage/cards/n/NaturesChosen.java | 13 ++++++------ .../src/mage/cards/n/Nebuchadnezzar.java | 12 +++++------ Mage.Sets/src/mage/cards/n/Necrologia.java | 7 +++---- .../src/mage/cards/o/OakStreetInnkeeper.java | 14 +++++++------ Mage.Sets/src/mage/cards/o/OracleEnVec.java | 2 ++ .../src/mage/cards/p/PortalOfSanctuary.java | 2 ++ Mage.Sets/src/mage/cards/p/PouncingLynx.java | 3 ++- Mage.Sets/src/mage/cards/p/Prickleboar.java | 11 +++++----- Mage.Sets/src/mage/cards/r/RagMan.java | 7 +++++-- .../LimitedTimesPerTurnActivatedAbility.java | 3 +-- .../main/java/mage/abilities/hint/Hint.java | 7 +++++++ 24 files changed, 121 insertions(+), 108 deletions(-) diff --git a/Mage.Sets/src/mage/cards/h/HardyVeteran.java b/Mage.Sets/src/mage/cards/h/HardyVeteran.java index 35da5f8c2b..d9d76c6c72 100644 --- a/Mage.Sets/src/mage/cards/h/HardyVeteran.java +++ b/Mage.Sets/src/mage/cards/h/HardyVeteran.java @@ -1,7 +1,5 @@ - package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -9,6 +7,7 @@ import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -16,8 +15,9 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class HardyVeteran extends CardImpl { @@ -36,6 +36,7 @@ public final class HardyVeteran extends CardImpl { MyTurnCondition.instance, "As long as it's your turn, {this} gets +0/+2"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java b/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java index a1fe62de6b..a8398d432d 100644 --- a/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java +++ b/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java @@ -1,8 +1,5 @@ - package mage.cards.h; -import java.util.UUID; - import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -13,6 +10,7 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -21,6 +19,8 @@ import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterSpell; +import java.util.UUID; + /** * @author LevelX2 */ @@ -41,7 +41,7 @@ public final class HermitOfTheNatterknolls extends CardImpl { new SpellCastOpponentTriggeredAbility(new DrawCardSourceControllerEffect(1), new FilterSpell("a spell"), true), MyTurnCondition.instance, "Whenever an opponent casts a spell during your turn, draw a card." - )); + ).addHint(MyTurnHint.instance)); // At the beginning of each upkeep, if no spells were cast last turn, transform Hermit of the Natterknolls. this.addAbility(new TransformAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java b/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java index 9a2c60f339..1c11fd7e8b 100644 --- a/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java +++ b/Mage.Sets/src/mage/cards/h/HoofprintsOfTheStag.java @@ -1,7 +1,5 @@ - package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.DrawCardControllerTriggeredAbility; @@ -10,6 +8,7 @@ import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -18,8 +17,9 @@ import mage.constants.Zone; import mage.counters.CounterType; import mage.game.permanent.token.WhiteElementalToken; +import java.util.UUID; + /** - * * @author Loki */ public final class HoofprintsOfTheStag extends CardImpl { @@ -30,9 +30,11 @@ public final class HoofprintsOfTheStag extends CardImpl { // Whenever you draw a card, you may put a hoofprint counter on Hoofprints of the Stag. this.addAbility(new DrawCardControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.HOOFPRINT.createInstance(1)), true)); + // {2}{w}, Remove four hoofprint counters from Hoofprints of the Stag: Create a 4/4 white Elemental creature token with flying. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WhiteElementalToken(), 1), new ManaCostsImpl("{2}{W}"), MyTurnCondition.instance); ability.addCost(new RemoveCountersSourceCost(CounterType.HOOFPRINT.createInstance(4))); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HumbleDefector.java b/Mage.Sets/src/mage/cards/h/HumbleDefector.java index a2b58211c3..7ea21d0641 100644 --- a/Mage.Sets/src/mage/cards/h/HumbleDefector.java +++ b/Mage.Sets/src/mage/cards/h/HumbleDefector.java @@ -1,7 +1,5 @@ - package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -10,28 +8,24 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** - * * @author jeffwadsworth */ public final class HumbleDefector extends CardImpl { public HumbleDefector(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); @@ -40,6 +34,7 @@ public final class HumbleDefector extends CardImpl { // {T}: Draw two cards. Target opponent gains control of Humble Defector. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new HumbleDefectorEffect(), new TapSourceCost(), MyTurnCondition.instance); ability.addTarget(new TargetOpponent()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } @@ -72,7 +67,7 @@ class HumbleDefectorEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { controller.drawCards(2, game); } @@ -108,7 +103,7 @@ class HumbleDefectorControlSourceEffect extends ContinuousEffectImpl { Player targetOpponent = game.getPlayer(source.getFirstTarget()); Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null && targetOpponent != null) { - permanent.changeControllerId(targetOpponent.getId(), game); + permanent.changeControllerId(targetOpponent.getId(), game); } else { // no valid target exists, effect can be discarded discard(); diff --git a/Mage.Sets/src/mage/cards/i/InstillEnergy.java b/Mage.Sets/src/mage/cards/i/InstillEnergy.java index a1c89de400..2e3c9fce45 100644 --- a/Mage.Sets/src/mage/cards/i/InstillEnergy.java +++ b/Mage.Sets/src/mage/cards/i/InstillEnergy.java @@ -1,7 +1,5 @@ - package mage.cards.i; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -10,22 +8,19 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.UntapEnchantedEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AsThoughEffectType; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author anonymous */ public final class InstillEnergy extends CardImpl { @@ -40,10 +35,15 @@ public final class InstillEnergy extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); + // Enchanted creature can attack as though it had haste. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItHadHasteEnchantedEffect(Duration.WhileOnBattlefield))); + // {0}: Untap enchanted creature. Activate this ability only during your turn and only once each turn. - this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance)); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, + new UntapEnchantedEffect(), + new GenericManaCost(0), 1, MyTurnCondition.instance) + .addHint(MyTurnHint.instance)); } public InstillEnergy(final InstillEnergy card) { diff --git a/Mage.Sets/src/mage/cards/j/JeeringInstigator.java b/Mage.Sets/src/mage/cards/j/JeeringInstigator.java index 1e76e9844c..ef25c5df01 100644 --- a/Mage.Sets/src/mage/cards/j/JeeringInstigator.java +++ b/Mage.Sets/src/mage/cards/j/JeeringInstigator.java @@ -1,7 +1,5 @@ - package mage.cards.j; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; @@ -12,30 +10,33 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.MorphAbility; 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.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author emerald000 */ public final class JeeringInstigator extends CardImpl { - + static final private FilterCreaturePermanent filter = new FilterCreaturePermanent(); + static { filter.add(AnotherPredicate.instance); } public JeeringInstigator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.ROGUE); @@ -44,10 +45,10 @@ public final class JeeringInstigator extends CardImpl { // Morph {2}{R} this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{2}{R}"))); - + // When Jeering Instigator is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap it. That creature gains haste until end of turn. Ability ability = new ConditionalInterveningIfTriggeredAbility( - new TurnedFaceUpSourceTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn),false, false), + new TurnedFaceUpSourceTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), false, false), MyTurnCondition.instance, "When {this} is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn."); ability.setWorksFaceDown(true); @@ -58,6 +59,7 @@ public final class JeeringInstigator extends CardImpl { effect.setText("It gains haste until end of turn"); ability.addEffect(effect); ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JoustingLance.java b/Mage.Sets/src/mage/cards/j/JoustingLance.java index 18a92110e2..a6c9313663 100644 --- a/Mage.Sets/src/mage/cards/j/JoustingLance.java +++ b/Mage.Sets/src/mage/cards/j/JoustingLance.java @@ -1,26 +1,21 @@ - package mage.cards.j; -import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.Zone; +import mage.constants.*; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class JoustingLance extends CardImpl { @@ -32,11 +27,14 @@ public final class JoustingLance extends CardImpl { // Equipped creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); + // As long as it's your turn, equipped creature has first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT, Duration.WhileOnBattlefield), MyTurnCondition.instance, - "As long as it's your turn, equipped creature has first strike."))); + "As long as it's your turn, equipped creature has first strike.")) + .addHint(MyTurnHint.instance)); + // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); } diff --git a/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java b/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java index 599139b73f..aa1c372205 100644 --- a/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java +++ b/Mage.Sets/src/mage/cards/l/LiciaSanguineTribune.java @@ -1,7 +1,5 @@ - package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -13,25 +11,21 @@ import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.CounterType; import mage.game.Game; import mage.players.Player; import mage.util.CardUtil; import mage.watchers.common.PlayerGainedLifeWatcher; +import java.util.UUID; + /** - * * @author TheElk801 */ public final class LiciaSanguineTribune extends CardImpl { @@ -55,7 +49,8 @@ public final class LiciaSanguineTribune extends CardImpl { this.addAbility(LifelinkAbility.getInstance()); // Pay 5 life: Put three +1/+1 counters on Licia. Activate this ability only on your turn and only once each turn. - this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), new PayLifeCost(5), 1, MyTurnCondition.instance)); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), new PayLifeCost(5), 1, MyTurnCondition.instance) + .addHint(MyTurnHint.instance)); } public LiciaSanguineTribune(final LiciaSanguineTribune card) { diff --git a/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java b/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java index f67cdab317..4a08313041 100644 --- a/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java +++ b/Mage.Sets/src/mage/cards/l/LighthouseChronologist.java @@ -1,7 +1,5 @@ - package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Abilities; import mage.abilities.AbilitiesImpl; @@ -10,6 +8,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.abilities.keyword.LevelUpAbility; import mage.abilities.keyword.LevelerCardBuilder; import mage.cards.CardSetInfo; @@ -19,14 +18,15 @@ import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com, noxx */ public final class LighthouseChronologist extends LevelerCard { public LighthouseChronologist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.color.setBlue(true); @@ -44,7 +44,8 @@ public final class LighthouseChronologist extends LevelerCard { // At the beginning of each end step, if it's not your turn, take an extra turn after this one. Abilities abilities2 = new AbilitiesImpl<>(); abilities2.add(new BeginningOfEndStepTriggeredAbility( - Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(false), TargetController.ANY, NotMyTurnCondition.instance, false)); + Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(false), TargetController.ANY, NotMyTurnCondition.instance, false) + .addHint(NotMyTurnHint.instance)); this.addAbilities(LevelerCardBuilder.construct( new LevelerCardBuilder.LevelAbility(4, 6, abilities1, 2, 4), diff --git a/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java b/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java index 53b08ece1d..8f4739735b 100644 --- a/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java +++ b/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java @@ -1,7 +1,5 @@ - package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -12,6 +10,7 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -20,14 +19,15 @@ import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterSpell; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class LoneWolfOfTheNatterknolls extends CardImpl { public LoneWolfOfTheNatterknolls(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); this.subtype.add(SubType.WEREWOLF); this.power = new MageInt(3); this.toughness = new MageInt(5); @@ -41,7 +41,7 @@ public final class LoneWolfOfTheNatterknolls extends CardImpl { new SpellCastOpponentTriggeredAbility(new DrawCardSourceControllerEffect(2), new FilterSpell("a spell"), true), MyTurnCondition.instance, "Whenever an opponent casts a spell during your turn, draw two cards." - )); + ).addHint(MyTurnHint.instance)); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lone Wolf of the Natterknolls. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); diff --git a/Mage.Sets/src/mage/cards/m/Melee.java b/Mage.Sets/src/mage/cards/m/Melee.java index 4fe220c027..20ef8d91fa 100644 --- a/Mage.Sets/src/mage/cards/m/Melee.java +++ b/Mage.Sets/src/mage/cards/m/Melee.java @@ -1,4 +1,3 @@ - package mage.cards.m; import mage.abilities.Ability; @@ -14,6 +13,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.RemoveFromCombatTargetEffect; import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.hint.ConditionHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -42,7 +42,8 @@ public final class Melee extends CardImpl { Condition condition = new CompoundCondition(BeforeBlockersAreDeclaredCondition.instance, new IsPhaseCondition(TurnPhase.COMBAT), MyTurnCondition.instance); - this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, null, condition, "Cast this spell only during your turn and only during combat before blockers are declared")); + this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, null, condition, "Cast this spell only during your turn and only during combat before blockers are declared") + .addHint(new ConditionHint(condition, "Can cast melee (it's combat phase on your turn)"))); // You choose which creatures block this combat and how those creatures block. // (only the last resolved Melee spell's blocking effect applies) diff --git a/Mage.Sets/src/mage/cards/n/NahiriStormOfStone.java b/Mage.Sets/src/mage/cards/n/NahiriStormOfStone.java index 133cb36878..de392a787a 100644 --- a/Mage.Sets/src/mage/cards/n/NahiriStormOfStone.java +++ b/Mage.Sets/src/mage/cards/n/NahiriStormOfStone.java @@ -14,6 +14,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.cost.AbilitiesCostReductionControllerEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; @@ -62,6 +63,7 @@ public final class NahiriStormOfStone extends CardImpl { EquipAbility.class, "Equip" ), MyTurnCondition.instance, "and equip abilities you activate cost {1} less to activate" )); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); // -X: Nahiri, Storm of Stone deals X damage to target tapped creature. diff --git a/Mage.Sets/src/mage/cards/n/NaiadOfHiddenCoves.java b/Mage.Sets/src/mage/cards/n/NaiadOfHiddenCoves.java index 8d2a93bc74..788246645d 100644 --- a/Mage.Sets/src/mage/cards/n/NaiadOfHiddenCoves.java +++ b/Mage.Sets/src/mage/cards/n/NaiadOfHiddenCoves.java @@ -5,6 +5,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.decorator.ConditionalCostModificationEffect; import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -30,7 +31,7 @@ public final class NaiadOfHiddenCoves extends CardImpl { new SpellsCostReductionControllerEffect(StaticFilters.FILTER_CARD, 1), NotMyTurnCondition.instance, "As long as it's not your turn, " + "spells you cast cost {1} less to cast." - ))); + )).addHint(MyTurnHint.instance)); } private NaiadOfHiddenCoves(final NaiadOfHiddenCoves card) { diff --git a/Mage.Sets/src/mage/cards/n/NaturesChosen.java b/Mage.Sets/src/mage/cards/n/NaturesChosen.java index 744faaf1ec..5f98f28a0e 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesChosen.java +++ b/Mage.Sets/src/mage/cards/n/NaturesChosen.java @@ -1,7 +1,5 @@ - package mage.cards.n; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; @@ -13,12 +11,13 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.UntapEnchantedEffect; import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -28,8 +27,9 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author L_J */ public final class NaturesChosen extends CardImpl { @@ -44,7 +44,7 @@ public final class NaturesChosen extends CardImpl { } private static final FilterCreaturePermanent filterWhiteUntappedCreature = new FilterCreaturePermanent(" if enchanted creature is white and is untapped"); - + static { filterWhiteUntappedCreature.add(new ColorPredicate(ObjectColor.WHITE)); filterWhiteUntappedCreature.add(Predicates.not(TappedPredicate.instance)); @@ -62,7 +62,8 @@ public final class NaturesChosen extends CardImpl { this.addAbility(ability); // {0}: Untap enchanted creature. Activate this ability only during your turn and only once each turn. - this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance)); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance) + .addHint(MyTurnHint.instance)); // Tap enchanted creature: Untap target artifact, creature, or land. Activate this ability only if enchanted creature is white and is untapped and only once each turn. Effect effect = new UntapTargetEffect(); diff --git a/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java b/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java index 6a9271a242..e1ba7288f1 100644 --- a/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java +++ b/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java @@ -1,6 +1,5 @@ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -10,18 +9,16 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ChooseACardNameEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.*; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Outcome; -import mage.constants.SuperType; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** - * * @author fireshoes & L_J */ public final class Nebuchadnezzar extends CardImpl { @@ -39,6 +36,7 @@ public final class Nebuchadnezzar extends CardImpl { ability.addCost(new TapSourceCost()); ability.addEffect(new NebuchadnezzarEffect()); ability.addTarget(new TargetOpponent()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/Necrologia.java b/Mage.Sets/src/mage/cards/n/Necrologia.java index d1c3dc8a26..7ca833026d 100644 --- a/Mage.Sets/src/mage/cards/n/Necrologia.java +++ b/Mage.Sets/src/mage/cards/n/Necrologia.java @@ -1,7 +1,5 @@ - package mage.cards.n; -import java.util.UUID; import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.common.PayVariableLifeCost; @@ -12,14 +10,15 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.PhaseStep; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Necrologia extends CardImpl { public Necrologia(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{B}"); // Cast Necrologia only during your end step. this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, PhaseStep.END_TURN, MyTurnCondition.instance, diff --git a/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java b/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java index a25c0b1616..a755bbb573 100644 --- a/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java +++ b/Mage.Sets/src/mage/cards/o/OakStreetInnkeeper.java @@ -1,36 +1,37 @@ - package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.NotMyTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.hint.common.NotMyTurnHint; import mage.abilities.keyword.HexproofAbility; 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.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class OakStreetInnkeeper extends CardImpl { private static final FilterPermanent filter = new FilterControlledCreaturePermanent("tapped creatures you control"); + static { filter.add(TappedPredicate.instance); } public OakStreetInnkeeper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.ELF); this.power = new MageInt(1); @@ -40,7 +41,8 @@ public final class OakStreetInnkeeper extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, filter), NotMyTurnCondition.instance, - "As long as it's not your turn, tapped creatures you control have hexproof"))); + "As long as it's not your turn, tapped creatures you control have hexproof")) + .addHint(NotMyTurnHint.instance)); } diff --git a/Mage.Sets/src/mage/cards/o/OracleEnVec.java b/Mage.Sets/src/mage/cards/o/OracleEnVec.java index f79916b791..c3b9e8f6c3 100644 --- a/Mage.Sets/src/mage/cards/o/OracleEnVec.java +++ b/Mage.Sets/src/mage/cards/o/OracleEnVec.java @@ -13,6 +13,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.RequirementEffect; import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -47,6 +48,7 @@ public final class OracleEnVec extends CardImpl { // destroy each of the chosen creatures that didn’t attack this turn. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new OracleEnVecEffect(), new TapSourceCost(), MyTurnCondition.instance); ability.addTarget(new TargetOpponent()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability, new AttackedThisTurnWatcher()); } diff --git a/Mage.Sets/src/mage/cards/p/PortalOfSanctuary.java b/Mage.Sets/src/mage/cards/p/PortalOfSanctuary.java index 1e18b10514..4f85447991 100644 --- a/Mage.Sets/src/mage/cards/p/PortalOfSanctuary.java +++ b/Mage.Sets/src/mage/cards/p/PortalOfSanctuary.java @@ -6,6 +6,7 @@ import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.Cards; @@ -36,6 +37,7 @@ public final class PortalOfSanctuary extends CardImpl { ); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetControlledCreaturePermanent()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PouncingLynx.java b/Mage.Sets/src/mage/cards/p/PouncingLynx.java index aa0e629f74..079c481ebd 100644 --- a/Mage.Sets/src/mage/cards/p/PouncingLynx.java +++ b/Mage.Sets/src/mage/cards/p/PouncingLynx.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; @@ -36,7 +37,7 @@ public final class PouncingLynx extends CardImpl { "As long as it's your turn, " + "{this} has first strike." ) - )); + ).addHint(MyTurnHint.instance)); } private PouncingLynx(final PouncingLynx card) { diff --git a/Mage.Sets/src/mage/cards/p/Prickleboar.java b/Mage.Sets/src/mage/cards/p/Prickleboar.java index 71313c9286..2099844db1 100644 --- a/Mage.Sets/src/mage/cards/p/Prickleboar.java +++ b/Mage.Sets/src/mage/cards/p/Prickleboar.java @@ -1,7 +1,5 @@ - package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -10,22 +8,24 @@ import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; 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; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; +import java.util.UUID; + /** - * * @author Wehk */ public final class Prickleboar extends CardImpl { public Prickleboar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); this.subtype.add(SubType.BOAR); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -42,6 +42,7 @@ public final class Prickleboar extends CardImpl { "and has first strike"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect); ability.addEffect(gainAbilityEffect); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RagMan.java b/Mage.Sets/src/mage/cards/r/RagMan.java index 32d11b92a7..30e89cd39d 100644 --- a/Mage.Sets/src/mage/cards/r/RagMan.java +++ b/Mage.Sets/src/mage/cards/r/RagMan.java @@ -1,6 +1,5 @@ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -9,6 +8,7 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.abilities.hint.common.MyTurnHint; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; @@ -19,6 +19,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * @author Quercitron */ @@ -32,11 +34,12 @@ public final class RagMan extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - // {B}{B}{B}, {tap}: Target opponent reveals their hand and discards a creature card at random. Activate this ability only during your turn. + // {B}{B}{B}, {T}: Target opponent reveals their hand and discards a creature card at random. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new RevealHandTargetEffect(), new ManaCostsImpl("{B}{B}{B}"), MyTurnCondition.instance); ability.addCost(new TapSourceCost()); ability.addEffect(new RagManDiscardEffect()); ability.addTarget(new TargetOpponent()); + ability.addHint(MyTurnHint.instance); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java index d878be95c5..78e0aec13b 100644 --- a/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/LimitedTimesPerTurnActivatedAbility.java @@ -1,4 +1,3 @@ - package mage.abilities.common; import mage.abilities.ActivatedAbilityImpl; @@ -11,7 +10,6 @@ import mage.game.Game; import mage.util.CardUtil; /** - * * @author BetaSteward_at_googlemail.com */ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl { @@ -24,6 +22,7 @@ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl { this(zone, effect, cost, maxActivationsPerTurn, null); } + // TODO: add card hint about times activated, see https://github.com/magefree/mage/issues/5497 public LimitedTimesPerTurnActivatedAbility(Zone zone, Effect effect, Cost cost, int maxActivationsPerTurn, Condition condition) { super(zone, effect, cost); this.maxActivationsPerTurn = maxActivationsPerTurn; diff --git a/Mage/src/main/java/mage/abilities/hint/Hint.java b/Mage/src/main/java/mage/abilities/hint/Hint.java index 71a0ef8cbc..1209214005 100644 --- a/Mage/src/main/java/mage/abilities/hint/Hint.java +++ b/Mage/src/main/java/mage/abilities/hint/Hint.java @@ -10,6 +10,13 @@ import java.io.Serializable; */ public interface Hint extends Serializable { + // TODO: add card hint for ActivateIfConditionActivatedAbility + // * remove my turn condition from cards construction + // * test condition texts (add alternative texts to donditions like getHintText?) + // * add auto-capitalize of first symbol + // * add support of compound conditions + // see https://github.com/magefree/mage/issues/5497 + String getText(Game game, Ability ability); Hint copy();