diff --git a/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java
index 2261c9e2a7..9f41899a3a 100644
--- a/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java
+++ b/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java
@@ -1,14 +1,9 @@
package mage.client.util.gui;
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.Locale;
-import javax.swing.*;
-import mage.client.dialog.PreferencesDialog;
-import static mage.client.dialog.PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE;
import mage.client.MageFrame;
+import mage.client.dialog.PreferencesDialog;
+import mage.client.table.PlayersChatPanel;
import mage.client.util.GUISizeHelper;
-import mage.client.table.*;
import mage.constants.*;
import mage.view.CardView;
import mage.view.CounterView;
@@ -17,6 +12,13 @@ import org.jdesktop.swingx.JXPanel;
import org.mage.card.arcane.ManaSymbols;
import org.mage.card.arcane.UI;
+import javax.swing.*;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Locale;
+
+import static mage.client.dialog.PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE;
+
public final class GuiDisplayUtil {
private static final Font cardNameFont = new Font("Calibri", Font.BOLD, 15);
@@ -30,32 +32,32 @@ public final class GuiDisplayUtil {
}
public static void restoreDividerLocations(Rectangle bounds, String lastDividerLocation, JComponent component) {
- String currentBounds = Double.toString(bounds.getWidth()) + 'x' + Double.toString(bounds.getHeight());
- String savedBounds = PreferencesDialog.getCachedValue(KEY_MAGE_PANEL_LAST_SIZE, null);
- // use divider positions only if screen size is the same as it was the time the settings were saved
- if (savedBounds != null && savedBounds.equals(currentBounds)) {
- if (lastDividerLocation != null && component != null) {
- if (component instanceof JSplitPane) {
- JSplitPane jSplitPane = (JSplitPane) component;
- jSplitPane.setDividerLocation(Integer.parseInt(lastDividerLocation));
- }
+ String currentBounds = Double.toString(bounds.getWidth()) + 'x' + bounds.getHeight();
+ String savedBounds = PreferencesDialog.getCachedValue(KEY_MAGE_PANEL_LAST_SIZE, null);
+ // use divider positions only if screen size is the same as it was the time the settings were saved
+ if (savedBounds != null && savedBounds.equals(currentBounds)) {
+ if (lastDividerLocation != null && component != null) {
+ if (component instanceof JSplitPane) {
+ JSplitPane jSplitPane = (JSplitPane) component;
+ jSplitPane.setDividerLocation(Integer.parseInt(lastDividerLocation));
+ }
- if (component instanceof PlayersChatPanel) {
- PlayersChatPanel playerChatPanel = (PlayersChatPanel) component;
- playerChatPanel.setSplitDividerLocation(Integer.parseInt(lastDividerLocation));
- }
+ if (component instanceof PlayersChatPanel) {
+ PlayersChatPanel playerChatPanel = (PlayersChatPanel) component;
+ playerChatPanel.setSplitDividerLocation(Integer.parseInt(lastDividerLocation));
+ }
+ }
}
- }
}
public static void saveCurrentBoundsToPrefs() {
- Rectangle rec = MageFrame.getDesktop().getBounds();
- String currentBounds = Double.toString(rec.getWidth()) + 'x' + Double.toString(rec.getHeight());
- PreferencesDialog.saveValue(KEY_MAGE_PANEL_LAST_SIZE, currentBounds);
+ Rectangle rec = MageFrame.getDesktop().getBounds();
+ String currentBounds = Double.toString(rec.getWidth()) + 'x' + rec.getHeight();
+ PreferencesDialog.saveValue(KEY_MAGE_PANEL_LAST_SIZE, currentBounds);
}
public static void saveDividerLocationToPrefs(String dividerPrefKey, int position) {
- PreferencesDialog.saveValue(dividerPrefKey, Integer.toString(position));
+ PreferencesDialog.saveValue(dividerPrefKey, Integer.toString(position));
}
public static JXPanel getDescription(CardView card, int width, int height) {
@@ -204,6 +206,10 @@ public final class GuiDisplayUtil {
return textLines;
}
+ public static String getHintIconHtml(String iconName, int symbolSize) {
+ return "";
+ }
+
public static StringBuilder getRulefromCardView(CardView card, TextLines textLines) {
String manaCost = "";
for (String m : card.getManaCost()) {
@@ -236,7 +242,7 @@ public final class GuiDisplayUtil {
buffer.append("
");
buffer.append(card.getDisplayName());
if (card.isGameObject()) {
- buffer.append(" [").append(card.getId().toString().substring(0, 3)).append(']');
+ buffer.append(" [").append(card.getId().toString(), 0, 3).append(']');
}
buffer.append(" | Delirium — Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls"
);
ability.addTarget(new TargetCreaturePermanent(filter));
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/a/AngelOfRenewal.java b/Mage.Sets/src/mage/cards/a/AngelOfRenewal.java
index 85b19cabf8..09c42722ee 100644
--- a/Mage.Sets/src/mage/cards/a/AngelOfRenewal.java
+++ b/Mage.Sets/src/mage/cards/a/AngelOfRenewal.java
@@ -1,20 +1,18 @@
-
package mage.cards.a;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
-import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class AngelOfRenewal extends CardImpl {
@@ -29,9 +27,7 @@ public final class AngelOfRenewal extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Angel of Renewal enters the battlefield, you gain 1 life for each creature you control.
- this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(
- new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)
- )));
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(CreaturesYouControlCount.instance)));
}
public AngelOfRenewal(final AngelOfRenewal card) {
diff --git a/Mage.Sets/src/mage/cards/a/AngelicExaltation.java b/Mage.Sets/src/mage/cards/a/AngelicExaltation.java
index a85f1acfe4..df3b3f66f8 100644
--- a/Mage.Sets/src/mage/cards/a/AngelicExaltation.java
+++ b/Mage.Sets/src/mage/cards/a/AngelicExaltation.java
@@ -1,16 +1,15 @@
package mage.cards.a;
import mage.abilities.TriggeredAbilityImpl;
-import mage.abilities.dynamicvalue.DynamicValue;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
-import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.target.targetpointer.FixedTarget;
@@ -26,7 +25,7 @@ public final class AngelicExaltation extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
// Whenever a creature you control attacks alone, it gets +X/+X until end of turn, where X is the number of creatures you control.
- this.addAbility(new AngelicExaltationAbility());
+ this.addAbility(new AngelicExaltationAbility().addHint(CreaturesYouControlHint.instance));
}
private AngelicExaltation(final AngelicExaltation card) {
@@ -41,10 +40,8 @@ public final class AngelicExaltation extends CardImpl {
class AngelicExaltationAbility extends TriggeredAbilityImpl {
- private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
-
public AngelicExaltationAbility() {
- super(Zone.BATTLEFIELD, new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true), false);
+ super(Zone.BATTLEFIELD, new BoostTargetEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, true), false);
}
public AngelicExaltationAbility(final AngelicExaltationAbility ability) {
diff --git a/Mage.Sets/src/mage/cards/a/AppealAuthority.java b/Mage.Sets/src/mage/cards/a/AppealAuthority.java
index 2a66436ed4..3fd64be5f6 100644
--- a/Mage.Sets/src/mage/cards/a/AppealAuthority.java
+++ b/Mage.Sets/src/mage/cards/a/AppealAuthority.java
@@ -1,17 +1,14 @@
-
package mage.cards.a;
-import java.util.UUID;
-import mage.abilities.dynamicvalue.DynamicValue;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.AftermathAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
-import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
@@ -23,8 +20,9 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class AppealAuthority extends SplitCard {
@@ -36,10 +34,10 @@ public final class AppealAuthority extends SplitCard {
// Until end of turn, target creature gains trample and gets +X/+X, where X is the number of creatures you control.
getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
.setText("Until end of turn, target creature gains trample"));
- DynamicValue controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control"));
- getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, true)
+ getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, true)
.setText("and gets +X/+X, where X is the number of creatures you control"));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
+ getLeftHalfCard().getSpellAbility().addHint(CreaturesYouControlHint.instance);
// Authority
// Aftermath
diff --git a/Mage.Sets/src/mage/cards/a/Arboria.java b/Mage.Sets/src/mage/cards/a/Arboria.java
index 6fa2572c54..11b2d7ba0a 100644
--- a/Mage.Sets/src/mage/cards/a/Arboria.java
+++ b/Mage.Sets/src/mage/cards/a/Arboria.java
@@ -1,7 +1,5 @@
-
package mage.cards.a;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
@@ -17,8 +15,9 @@ import mage.game.permanent.PermanentToken;
import mage.watchers.common.CastSpellYourLastTurnWatcher;
import mage.watchers.common.PermanentsEnteredBattlefieldYourLastTurnWatcher;
+import java.util.UUID;
+
/**
- *
* @author spjspj
*/
public final class Arboria extends CardImpl {
@@ -60,6 +59,10 @@ class ArboriaEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
CastSpellYourLastTurnWatcher watcher = game.getState().getWatcher(CastSpellYourLastTurnWatcher.class);
if (watcher != null && watcher.getAmountOfSpellsCastOnPlayersTurn(defenderId) > 0) {
return true;
diff --git a/Mage.Sets/src/mage/cards/a/ArchOfOrazca.java b/Mage.Sets/src/mage/cards/a/ArchOfOrazca.java
index e82387ae22..3ebbf6f70e 100644
--- a/Mage.Sets/src/mage/cards/a/ArchOfOrazca.java
+++ b/Mage.Sets/src/mage/cards/a/ArchOfOrazca.java
@@ -1,13 +1,12 @@
-
package mage.cards.a;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
@@ -15,8 +14,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class ArchOfOrazca extends CardImpl {
@@ -36,6 +36,7 @@ public final class ArchOfOrazca extends CardImpl {
new GenericManaCost(5),
CitysBlessingCondition.instance);
ability.addCost(new TapSourceCost());
+ ability.addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/a/ArchwayAngel.java b/Mage.Sets/src/mage/cards/a/ArchwayAngel.java
index 20da6285c5..ebab4bd07d 100644
--- a/Mage.Sets/src/mage/cards/a/ArchwayAngel.java
+++ b/Mage.Sets/src/mage/cards/a/ArchwayAngel.java
@@ -5,6 +5,7 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -39,6 +40,7 @@ public final class ArchwayAngel extends CardImpl {
// When Archway Angel enters the battlefield, you gain 2 life for each Gate you control.
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter, 2)));
+ ability.addHint(GateYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/a/AutumnalGloom.java b/Mage.Sets/src/mage/cards/a/AutumnalGloom.java
index ca41a7b3d6..f9cbe9fe74 100644
--- a/Mage.Sets/src/mage/cards/a/AutumnalGloom.java
+++ b/Mage.Sets/src/mage/cards/a/AutumnalGloom.java
@@ -1,7 +1,7 @@
-
package mage.cards.a;
import java.util.UUID;
+
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,13 +19,12 @@ import mage.constants.TargetController;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class AutumnalGloom extends CardImpl {
public AutumnalGloom(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.transformable = true;
this.secondSideCardClazz = AncientOfTheEquinox.class;
@@ -35,6 +35,7 @@ public final class AutumnalGloom extends CardImpl {
this.addAbility(new TransformAbility());
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, DeliriumCondition.instance, false);
ability.setAbilityWord(AbilityWord.DELIRIUM);
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/b/BackwoodsSurvivalists.java b/Mage.Sets/src/mage/cards/b/BackwoodsSurvivalists.java
index f6da0d428d..7a8e9af331 100644
--- a/Mage.Sets/src/mage/cards/b/BackwoodsSurvivalists.java
+++ b/Mage.Sets/src/mage/cards/b/BackwoodsSurvivalists.java
@@ -1,7 +1,7 @@
-
package mage.cards.b;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,13 +19,12 @@ import mage.constants.SubType;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class BackwoodsSurvivalists extends CardImpl {
public BackwoodsSurvivalists(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.HUMAN, SubType.WARRIOR);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
@@ -33,6 +33,7 @@ public final class BackwoodsSurvivalists extends CardImpl {
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.instance, "Delirium — {this} gets +1/+1");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), DeliriumCondition.instance, "and has trample as long as there are four or more card types among cards in your graveyard."));
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/b/BarrageOfBoulders.java b/Mage.Sets/src/mage/cards/b/BarrageOfBoulders.java
index ccb1ae6068..df45e9b8d4 100644
--- a/Mage.Sets/src/mage/cards/b/BarrageOfBoulders.java
+++ b/Mage.Sets/src/mage/cards/b/BarrageOfBoulders.java
@@ -1,24 +1,25 @@
-
package mage.cards.b;
-import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalRestrictionEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.combat.CantBlockAllEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
-import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
+import java.util.UUID;
+
+import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
+
/**
- *
* @author LevelX2
*/
public final class BarrageOfBoulders extends CardImpl {
@@ -41,6 +42,7 @@ public final class BarrageOfBoulders extends CardImpl {
new LockedInCondition(FerociousCondition.instance), null);
effect.setText(" Ferocious — If you control a creature with power 4 or greater, creatures can't block this turn");
this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public BarrageOfBoulders(final BarrageOfBoulders card) {
diff --git a/Mage.Sets/src/mage/cards/b/BattleHymn.java b/Mage.Sets/src/mage/cards/b/BattleHymn.java
index acb098f955..d1693a5748 100644
--- a/Mage.Sets/src/mage/cards/b/BattleHymn.java
+++ b/Mage.Sets/src/mage/cards/b/BattleHymn.java
@@ -1,17 +1,15 @@
-
package mage.cards.b;
-import java.util.UUID;
import mage.Mana;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.mana.DynamicManaEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author North
*/
public final class BattleHymn extends CardImpl {
@@ -20,7 +18,7 @@ public final class BattleHymn extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Add {R} for each creature you control.
- this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)));
+ this.getSpellAbility().addEffect(new DynamicManaEffect(Mana.RedMana(1), CreaturesYouControlCount.instance));
}
public BattleHymn(final BattleHymn card) {
diff --git a/Mage.Sets/src/mage/cards/b/BattleSquadron.java b/Mage.Sets/src/mage/cards/b/BattleSquadron.java
index 92964174fa..d5f534705d 100644
--- a/Mage.Sets/src/mage/cards/b/BattleSquadron.java
+++ b/Mage.Sets/src/mage/cards/b/BattleSquadron.java
@@ -1,11 +1,10 @@
-
package mage.cards.b;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -13,26 +12,26 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
+
+import java.util.UUID;
/**
- *
* @author fireshoes
*/
public final class BattleSquadron extends CardImpl {
public BattleSquadron(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.subtype.add(SubType.GOBLIN);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Flying
this.addAbility(FlyingAbility.getInstance());
-
+
// Battle Squadron's power and toughness are each equal to the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(
- new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame))
+ .addHint(CreaturesYouControlHint.instance));
}
public BattleSquadron(final BattleSquadron card) {
diff --git a/Mage.Sets/src/mage/cards/b/BeguilerOfWills.java b/Mage.Sets/src/mage/cards/b/BeguilerOfWills.java
index ca8fd468ce..bda675f792 100644
--- a/Mage.Sets/src/mage/cards/b/BeguilerOfWills.java
+++ b/Mage.Sets/src/mage/cards/b/BeguilerOfWills.java
@@ -1,12 +1,11 @@
-
package mage.cards.b;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -18,14 +17,15 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
+import java.util.UUID;
+
/**
- *
* @author North
*/
public final class BeguilerOfWills extends CardImpl {
public BeguilerOfWills(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.HUMAN, SubType.WIZARD);
this.power = new MageInt(1);
@@ -36,6 +36,7 @@ public final class BeguilerOfWills extends CardImpl {
new GainControlTargetEffect(Duration.Custom),
new TapSourceCost());
ability.addTarget(new BeguilerOfWillsTarget());
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/c/Camaraderie.java b/Mage.Sets/src/mage/cards/c/Camaraderie.java
index 9baba360db..1e0880911b 100644
--- a/Mage.Sets/src/mage/cards/c/Camaraderie.java
+++ b/Mage.Sets/src/mage/cards/c/Camaraderie.java
@@ -1,9 +1,9 @@
package mage.cards.c;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -13,8 +13,9 @@ import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author TheElk801
*/
public final class Camaraderie extends CardImpl {
@@ -24,6 +25,7 @@ public final class Camaraderie extends CardImpl {
// You gain X life and draw X cards, where X is the number of creatures you control. Creatures you control get +1/+1 until end of turn.
this.getSpellAbility().addEffect(new CamaraderieEffect());
+ this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
public Camaraderie(final Camaraderie card) {
diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java b/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java
index 79b077a5d3..00e0561590 100644
--- a/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java
+++ b/Mage.Sets/src/mage/cards/c/ChampionOfLambholt.java
@@ -1,7 +1,5 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
@@ -10,11 +8,7 @@ import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Duration;
-import mage.constants.TargetController;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
@@ -22,6 +16,8 @@ import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
* @author noxx
*/
@@ -79,7 +75,7 @@ class ChampionOfLambholtEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
- if (sourcePermanent != null && attacker.isControlledBy(sourcePermanent.getControllerId())) {
+ if (sourcePermanent != null && attacker != null && attacker.isControlledBy(sourcePermanent.getControllerId())) {
return blocker.getPower().getValue() >= sourcePermanent.getPower().getValue();
}
return true;
diff --git a/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java b/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java
index 9118e1f5d6..70285f2e54 100644
--- a/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java
+++ b/Mage.Sets/src/mage/cards/c/ChancellorOfTheForge.java
@@ -1,7 +1,5 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.ChancellorAbility;
@@ -9,6 +7,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -21,8 +20,9 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.token.GoblinToken;
+import java.util.UUID;
+
/**
- *
* @author BetaSteward
*/
public final class ChancellorOfTheForge extends CardImpl {
@@ -46,7 +46,8 @@ public final class ChancellorOfTheForge extends CardImpl {
// When Chancellor of the Forge enters the battlefield, create X 1/1 red Goblin creature tokens with haste, where X is the number of creatures you control.
DynamicValue value = new PermanentsOnBattlefieldCount(filter);
- this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(true), value), false));
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(true), value), false)
+ .addHint(CreaturesYouControlHint.instance));
}
public ChancellorOfTheForge(final ChancellorOfTheForge card) {
diff --git a/Mage.Sets/src/mage/cards/c/Chaosphere.java b/Mage.Sets/src/mage/cards/c/Chaosphere.java
index c7b2180bf4..dae8b6f7b7 100644
--- a/Mage.Sets/src/mage/cards/c/Chaosphere.java
+++ b/Mage.Sets/src/mage/cards/c/Chaosphere.java
@@ -1,7 +1,5 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
@@ -20,8 +18,9 @@ import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author jeffwadsworth
*/
public final class Chaosphere extends CardImpl {
@@ -80,6 +79,9 @@ class ChaosphereEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.hasAbility(FlyingAbility.getInstance().getId(), game);
}
diff --git a/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java b/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java
index 64cc6041eb..58c8cdd961 100644
--- a/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java
+++ b/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java
@@ -8,6 +8,7 @@ import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.ConditionHint;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@@ -27,6 +28,7 @@ public final class ChargingWarBoar extends CardImpl {
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(new FilterControlledPlaneswalkerPermanent(SubType.DOMRI));
+ private static final ConditionHint hint = new ConditionHint(condition, "You control Domri planeswalker");
public ChargingWarBoar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}");
@@ -51,6 +53,7 @@ public final class ChargingWarBoar extends CardImpl {
TrampleAbility.getInstance(), Duration.WhileOnBattlefield
), condition, "and has trample"
));
+ ability.addHint(hint);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/c/ChorusOfMight.java b/Mage.Sets/src/mage/cards/c/ChorusOfMight.java
index 4480ae2717..04a33b7f04 100644
--- a/Mage.Sets/src/mage/cards/c/ChorusOfMight.java
+++ b/Mage.Sets/src/mage/cards/c/ChorusOfMight.java
@@ -1,8 +1,5 @@
-
-
package mage.cards.c;
-import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@@ -11,21 +8,22 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class ChorusOfMight extends CardImpl {
public ChorusOfMight(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
+
-
// Until end of turn, target creature gets +1/+1 for each creature you control and gains trample.
- PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
+ PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn, true));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
diff --git a/Mage.Sets/src/mage/cards/c/ClearTheStage.java b/Mage.Sets/src/mage/cards/c/ClearTheStage.java
index fd5266eddf..b642591b6f 100644
--- a/Mage.Sets/src/mage/cards/c/ClearTheStage.java
+++ b/Mage.Sets/src/mage/cards/c/ClearTheStage.java
@@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -33,6 +34,7 @@ public final class ClearTheStage extends CardImpl {
this.getSpellAbility().addEffect(new ClearTheStageEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, filter));
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
private ClearTheStage(final ClearTheStage card) {
diff --git a/Mage.Sets/src/mage/cards/c/CollectiveUnconscious.java b/Mage.Sets/src/mage/cards/c/CollectiveUnconscious.java
index 9e9df9e93a..e3de225ee5 100644
--- a/Mage.Sets/src/mage/cards/c/CollectiveUnconscious.java
+++ b/Mage.Sets/src/mage/cards/c/CollectiveUnconscious.java
@@ -1,26 +1,25 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author Plopman
*/
public final class CollectiveUnconscious extends CardImpl {
public CollectiveUnconscious(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}");
// Draw a card for each creature you control.
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)));
}
public CollectiveUnconscious(final CollectiveUnconscious card) {
diff --git a/Mage.Sets/src/mage/cards/c/ColossalMajesty.java b/Mage.Sets/src/mage/cards/c/ColossalMajesty.java
index abd4bd9d6f..b82fb0a92b 100644
--- a/Mage.Sets/src/mage/cards/c/ColossalMajesty.java
+++ b/Mage.Sets/src/mage/cards/c/ColossalMajesty.java
@@ -1,17 +1,18 @@
package mage.cards.c;
-import java.util.UUID;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
+import java.util.UUID;
+
/**
- *
* @author TheElk801
*/
public final class ColossalMajesty extends CardImpl {
@@ -27,9 +28,9 @@ public final class ColossalMajesty extends CardImpl {
),
FerociousCondition.instance,
"At the beginning of your upkeep, "
- + "if you control a creature with power 4 or greater, "
- + "draw a card."
- ));
+ + "if you control a creature with power 4 or greater, "
+ + "draw a card."
+ ).addHint(FerociousHint.instance));
}
public ColossalMajesty(final ColossalMajesty card) {
diff --git a/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java b/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java
index b8efd50953..41257a501d 100644
--- a/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java
+++ b/Mage.Sets/src/mage/cards/c/ConclavePhalanx.java
@@ -1,7 +1,5 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@@ -11,16 +9,17 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author jonubuu
*/
public final class ConclavePhalanx extends CardImpl {
public ConclavePhalanx(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
@@ -31,7 +30,7 @@ public final class ConclavePhalanx extends CardImpl {
this.addAbility(new ConvokeAbility());
// When Conclave Phalanx enters the battlefield, you gain 1 life for each creature you control.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(
- new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))));
+ new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE))));
}
public ConclavePhalanx(final ConclavePhalanx card) {
diff --git a/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java b/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java
index 516570b6a7..68aade0911 100644
--- a/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java
+++ b/Mage.Sets/src/mage/cards/c/CraterhoofBehemoth.java
@@ -1,27 +1,26 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility;
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.TargetController;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
+import java.util.UUID;
+
/**
- *
* @author North
*/
public final class CraterhoofBehemoth extends CardImpl {
@@ -33,7 +32,7 @@ public final class CraterhoofBehemoth extends CardImpl {
}
public CraterhoofBehemoth(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}{G}");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(5);
@@ -43,8 +42,8 @@ public final class CraterhoofBehemoth extends CardImpl {
// When Craterhoof Behemoth enters the battlefield, creatures you control gain trample and get +X/+X until end of turn, where X is the number of creatures you control.
Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter));
- PermanentsOnBattlefieldCount controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control"), null);
- ability.addEffect(new BoostControlledEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, filter, false, true));
+ ability.addEffect(new BoostControlledEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, filter, false, true));
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/c/CratersClaws.java b/Mage.Sets/src/mage/cards/c/CratersClaws.java
index acdea1c74a..a4b2b4dbfb 100644
--- a/Mage.Sets/src/mage/cards/c/CratersClaws.java
+++ b/Mage.Sets/src/mage/cards/c/CratersClaws.java
@@ -1,19 +1,19 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.IntPlusDynamicValue;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetAnyTarget;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
public final class CratersClaws extends CardImpl {
@@ -28,8 +28,9 @@ public final class CratersClaws extends CardImpl {
new DamageTargetEffect(ManacostVariableValue.instance),
FerociousCondition.instance,
"{this} deals X damage to any target."
- + " Ferocious — {this} deals X plus 2 damage to that permanent or player instead if you control a creature with power 4 or greater"));
+ + " Ferocious — {this} deals X plus 2 damage to that permanent or player instead if you control a creature with power 4 or greater"));
this.getSpellAbility().addTarget(new TargetAnyTarget());
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public CratersClaws(final CratersClaws card) {
diff --git a/Mage.Sets/src/mage/cards/c/CropSigil.java b/Mage.Sets/src/mage/cards/c/CropSigil.java
index 134273c25d..4c95be8935 100644
--- a/Mage.Sets/src/mage/cards/c/CropSigil.java
+++ b/Mage.Sets/src/mage/cards/c/CropSigil.java
@@ -1,7 +1,7 @@
-
package mage.cards.c;
import java.util.UUID;
+
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
@@ -10,6 +10,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -20,7 +21,6 @@ import mage.game.events.GameEvent;
import mage.target.common.TargetCardInYourGraveyard;
/**
- *
* @author fireshoes
*/
public final class CropSigil extends CardImpl {
@@ -34,7 +34,7 @@ public final class CropSigil extends CardImpl {
}
public CropSigil(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
// At the beginning of your upkeep, you may put the top card of your library into your graveyard.
this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PutTopCardOfLibraryIntoGraveControllerEffect(1), true));
@@ -44,10 +44,11 @@ public final class CropSigil extends CardImpl {
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(true), new ManaCostsImpl<>("{2}{G}"),
DeliriumCondition.instance,
"Delirium — {2}{G}, Sacrifice {this}: Return up to one target creature card and up to one target land card from your graveyard to your hand. "
- + "Activate this ability only if there are four or more card types among cards in your graveyard");
+ + "Activate this ability only if there are four or more card types among cards in your graveyard");
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterCreature));
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterLand));
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java b/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java
index 59dbb7d432..c2f31d056b 100644
--- a/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java
+++ b/Mage.Sets/src/mage/cards/c/CrownHunterHireling.java
@@ -1,7 +1,5 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@@ -11,14 +9,15 @@ import mage.abilities.effects.common.BecomesMonarchSourceEffect;
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.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class CrownHunterHireling extends CardImpl {
@@ -66,6 +65,9 @@ class CrownHunterHirelingCantAttackEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
return defenderId.equals(game.getMonarchId());
}
diff --git a/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java b/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java
index 50aa3f3735..bab744a9a5 100644
--- a/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java
+++ b/Mage.Sets/src/mage/cards/c/CrusaderOfOdric.java
@@ -1,27 +1,26 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
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.common.FilterControlledCreaturePermanent;
+
+import java.util.UUID;
/**
- *
* @author Loki
*/
public final class CrusaderOfOdric extends CardImpl {
public CrusaderOfOdric(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
@@ -29,7 +28,8 @@ public final class CrusaderOfOdric extends CardImpl {
this.toughness = new MageInt(0);
// Crusader of Odric's power and toughness are each equal to the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame))
+ .addHint(CreaturesYouControlHint.instance));
}
public CrusaderOfOdric(final CrusaderOfOdric card) {
diff --git a/Mage.Sets/src/mage/cards/c/CryptbornHorror.java b/Mage.Sets/src/mage/cards/c/CryptbornHorror.java
index 9328ab0493..16d72c1098 100644
--- a/Mage.Sets/src/mage/cards/c/CryptbornHorror.java
+++ b/Mage.Sets/src/mage/cards/c/CryptbornHorror.java
@@ -1,7 +1,5 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
@@ -11,14 +9,15 @@ import mage.abilities.keyword.TrampleAbility;
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.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class CryptbornHorror extends CardImpl {
@@ -26,7 +25,7 @@ public final class CryptbornHorror extends CardImpl {
private static final String rule = "with X +1/+1 counters on it, where X is the total life lost by your opponents this turn";
public CryptbornHorror(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B/R}{B/R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B/R}{B/R}");
this.subtype.add(SubType.HORROR);
this.color.setBlack(true);
this.color.setRed(true);
@@ -64,7 +63,7 @@ class CryptbornHorrorEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanentEntering(source.getSourceId());
if (permanent != null) {
- int oll = new OpponentsLostLifeCount().calculate(game, source, this);
+ int oll = OpponentsLostLifeCount.instance.calculate(game, source, this);
if (oll > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(oll), source, game);
}
diff --git a/Mage.Sets/src/mage/cards/c/CrypticSerpent.java b/Mage.Sets/src/mage/cards/c/CrypticSerpent.java
index c7e91127ba..fb28357301 100644
--- a/Mage.Sets/src/mage/cards/c/CrypticSerpent.java
+++ b/Mage.Sets/src/mage/cards/c/CrypticSerpent.java
@@ -1,23 +1,28 @@
-
package mage.cards.c;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGraveyardEffect;
+import mage.abilities.hint.ValueHint;
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.filter.common.FilterInstantOrSorceryCard;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class CrypticSerpent extends CardImpl {
+ private static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY);
+
public CrypticSerpent(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
@@ -26,7 +31,8 @@ public final class CrypticSerpent extends CardImpl {
this.toughness = new MageInt(5);
// Cryptic Serpent costs {1} less to cast for each instant and sorcery card in your graveyard.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterInstantOrSorceryCard())));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterInstantOrSorceryCard()))
+ .addHint(new ValueHint("Instant and sorcery card in your graveyard", cardsCount)));
}
public CrypticSerpent(final CrypticSerpent card) {
diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java b/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java
index 88ace23bc5..8ef3bfb6bd 100644
--- a/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java
+++ b/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java
@@ -1,21 +1,21 @@
-
package mage.cards.d;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
-import mage.constants.SubType;
-import mage.abilities.keyword.DeathtouchAbility;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
+import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import mage.constants.SubType;
+
+import java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class DeadeyeBrawler extends CardImpl {
@@ -37,7 +37,8 @@ public final class DeadeyeBrawler extends CardImpl {
// Whenever Deadeye Brawler deals combat damage to a player, if you have the city's blessing, draw a card.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new DrawCardSourceControllerEffect(1), false, false), CitysBlessingCondition.instance,
- "Whenever {this} deals combat damage to a player, if you have the city's blessing, draw a card."));
+ "Whenever {this} deals combat damage to a player, if you have the city's blessing, draw a card.")
+ .addHint(CitysBlessingHint.instance));
}
diff --git a/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java b/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java
index 6ce0f5c06f..c1d241523b 100644
--- a/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java
+++ b/Mage.Sets/src/mage/cards/d/DeathcapCultivator.java
@@ -1,12 +1,13 @@
-
package mage.cards.d;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.GreenManaAbility;
@@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class DeathcapCultivator extends CardImpl {
public DeathcapCultivator(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(2);
@@ -33,11 +33,12 @@ public final class DeathcapCultivator extends CardImpl {
// {T}: Add {B} or {G}.
this.addAbility(new BlackManaAbility());
this.addAbility(new GreenManaAbility());
-
+
// Delirium — Deathcap Cultivator has deathtouch as long as there are four or more card types among cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield),
- DeliriumCondition.instance, "Delirium — {this} has deathtouch as long as there are four or more card types among cards in your graveyard")));
+ DeliriumCondition.instance, "Delirium — {this} has deathtouch as long as there are four or more card types among cards in your graveyard"))
+ .addHint(DeliriumHint.instance));
}
public DeathcapCultivator(final DeathcapCultivator card) {
diff --git a/Mage.Sets/src/mage/cards/d/DenseCanopy.java b/Mage.Sets/src/mage/cards/d/DenseCanopy.java
index df435bc7cb..308cbe8ae1 100644
--- a/Mage.Sets/src/mage/cards/d/DenseCanopy.java
+++ b/Mage.Sets/src/mage/cards/d/DenseCanopy.java
@@ -1,7 +1,5 @@
-
package mage.cards.d;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
@@ -16,14 +14,15 @@ import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class DenseCanopy extends CardImpl {
public DenseCanopy(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
// Creatures with flying can block only creatures with flying.
@@ -64,6 +63,9 @@ class DenseCanopyCantBlockEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.hasAbility(FlyingAbility.getInstance().getId(), game);
}
diff --git a/Mage.Sets/src/mage/cards/d/DescendUponTheSinful.java b/Mage.Sets/src/mage/cards/d/DescendUponTheSinful.java
index 53e4c70a16..1d287daa38 100644
--- a/Mage.Sets/src/mage/cards/d/DescendUponTheSinful.java
+++ b/Mage.Sets/src/mage/cards/d/DescendUponTheSinful.java
@@ -1,12 +1,13 @@
-
package mage.cards.d;
import java.util.UUID;
+
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ExileAllEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -14,13 +15,12 @@ import mage.filter.StaticFilters;
import mage.game.permanent.token.AngelToken;
/**
- *
* @author fireshoes
*/
public final class DescendUponTheSinful extends CardImpl {
public DescendUponTheSinful(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
// Exile all creatures
this.getSpellAbility().addEffect(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES));
@@ -29,6 +29,7 @@ public final class DescendUponTheSinful extends CardImpl {
Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance);
effect.setText(" Delirium — Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard");
this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addHint(DeliriumHint.instance);
}
public DescendUponTheSinful(final DescendUponTheSinful card) {
diff --git a/Mage.Sets/src/mage/cards/d/DesperateSentry.java b/Mage.Sets/src/mage/cards/d/DesperateSentry.java
index a1e51ea1b3..28dc4fe5c5 100644
--- a/Mage.Sets/src/mage/cards/d/DesperateSentry.java
+++ b/Mage.Sets/src/mage/cards/d/DesperateSentry.java
@@ -1,7 +1,7 @@
-
package mage.cards.d;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility;
@@ -10,6 +10,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -19,13 +20,12 @@ import mage.constants.Zone;
import mage.game.permanent.token.EldraziHorrorToken;
/**
- *
* @author LevelX2
*/
public final class DesperateSentry extends CardImpl {
public DesperateSentry(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(1);
@@ -39,6 +39,7 @@ public final class DesperateSentry extends CardImpl {
new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance,
"Delirium — {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard.");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/d/DragonGrip.java b/Mage.Sets/src/mage/cards/d/DragonGrip.java
index f84bd0ffa2..9280f0c4a2 100644
--- a/Mage.Sets/src/mage/cards/d/DragonGrip.java
+++ b/Mage.Sets/src/mage/cards/d/DragonGrip.java
@@ -1,7 +1,5 @@
-
package mage.cards.d;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.FerociousCondition;
@@ -12,6 +10,7 @@ import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
@@ -20,21 +19,23 @@ import mage.constants.*;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class DragonGrip extends CardImpl {
public DragonGrip(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
this.subtype.add(SubType.AURA);
// Ferocious - If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash.
AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame);
effect.setText("Ferocious — If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash");
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalAsThoughEffect(effect,
- FerociousCondition.instance)));
+ FerociousCondition.instance))
+ .addHint(FerociousHint.instance));
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
diff --git a/Mage.Sets/src/mage/cards/d/DuskCharger.java b/Mage.Sets/src/mage/cards/d/DuskCharger.java
index 8f807004e2..7ff23518a1 100644
--- a/Mage.Sets/src/mage/cards/d/DuskCharger.java
+++ b/Mage.Sets/src/mage/cards/d/DuskCharger.java
@@ -1,7 +1,5 @@
-
package mage.cards.d;
-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.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -17,8 +16,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class DuskCharger extends CardImpl {
@@ -37,7 +37,7 @@ public final class DuskCharger extends CardImpl {
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance,
"{this} gets +2/+2 as long as you have the city's blessing");
- Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/d/DwarvenPriest.java b/Mage.Sets/src/mage/cards/d/DwarvenPriest.java
index 3078944ff1..edf1d6dece 100644
--- a/Mage.Sets/src/mage/cards/d/DwarvenPriest.java
+++ b/Mage.Sets/src/mage/cards/d/DwarvenPriest.java
@@ -1,19 +1,17 @@
-
package mage.cards.d;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.GainLifeEffect;
-import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.StaticFilters;
+import mage.constants.SubType;
+
+import java.util.UUID;
/**
- *
* @author TheElk801
*/
public final class DwarvenPriest extends CardImpl {
@@ -27,9 +25,7 @@ public final class DwarvenPriest extends CardImpl {
this.toughness = new MageInt(4);
// When Dwarven Priest enters the battlefield, you gain 1 life for each creature you control.
- this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(
- new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)
- )));
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(CreaturesYouControlCount.instance)));
}
public DwarvenPriest(final DwarvenPriest card) {
diff --git a/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java b/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java
index 06414d035e..79873645d2 100644
--- a/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java
+++ b/Mage.Sets/src/mage/cards/e/ElderOfLaurels.java
@@ -1,29 +1,28 @@
-
package mage.cards.e;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
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.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author North
*/
public final class ElderOfLaurels extends CardImpl {
public ElderOfLaurels(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.HUMAN);
this.subtype.add(SubType.ADVISOR);
@@ -31,11 +30,11 @@ public final class ElderOfLaurels extends CardImpl {
this.toughness = new MageInt(3);
// {3}{G}: Target creature gets +X/+X until end of turn, where X is the number of creatures you control.
- PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true),
+ new BoostTargetEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, true),
new ManaCostsImpl("{3}{G}"));
ability.addTarget(new TargetCreaturePermanent());
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/e/Exogorth.java b/Mage.Sets/src/mage/cards/e/Exogorth.java
index 5fcb04443f..1475b478f5 100644
--- a/Mage.Sets/src/mage/cards/e/Exogorth.java
+++ b/Mage.Sets/src/mage/cards/e/Exogorth.java
@@ -1,7 +1,5 @@
-
package mage.cards.e;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -12,14 +10,15 @@ import mage.abilities.keyword.TrampleAbility;
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.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author Styxo
*/
public final class Exogorth extends CardImpl {
@@ -84,6 +83,9 @@ class CanBlockOnlySpaceflightEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.getAbilities().contains(SpaceflightAbility.getInstance());
}
diff --git a/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java b/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java
index 90dfa5684c..7f2f2564cd 100644
--- a/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java
+++ b/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java
@@ -1,7 +1,7 @@
-
package mage.cards.e;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@@ -11,6 +11,7 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.TransformSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -24,7 +25,6 @@ import mage.game.permanent.token.EldraziHorrorToken;
import mage.target.common.TargetControlledPermanent;
/**
- *
* @author LevelX2
*/
public final class ExtricatorOfSin extends CardImpl {
@@ -36,7 +36,7 @@ public final class ExtricatorOfSin extends CardImpl {
}
public ExtricatorOfSin(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(0);
@@ -55,7 +55,8 @@ public final class ExtricatorOfSin extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, false),
DeliriumCondition.instance,
"Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, "
- + " transform {this}."));
+ + " transform {this}.")
+ .addHint(DeliriumHint.instance));
}
public ExtricatorOfSin(final ExtricatorOfSin card) {
diff --git a/Mage.Sets/src/mage/cards/f/FeedTheClan.java b/Mage.Sets/src/mage/cards/f/FeedTheClan.java
index 63a5945c35..264c5571d9 100644
--- a/Mage.Sets/src/mage/cards/f/FeedTheClan.java
+++ b/Mage.Sets/src/mage/cards/f/FeedTheClan.java
@@ -1,22 +1,22 @@
-
package mage.cards.f;
-import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class FeedTheClan extends CardImpl {
public FeedTheClan(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// You gain 5 life.
// Ferocious - You gain 10 life instead if you control a creature with power 4 or greater
@@ -25,7 +25,7 @@ public final class FeedTheClan extends CardImpl {
new GainLifeEffect(5),
FerociousCondition.instance,
"You gain 5 life. Ferocious — You gain 10 life instead if you control a creature with power 4 or greater"));
-
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public FeedTheClan(final FeedTheClan card) {
diff --git a/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java b/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java
index 57230b6b87..35f5be6fd2 100644
--- a/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java
+++ b/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java
@@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageAllEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -30,6 +31,7 @@ public final class FlamesOfTheRazeBoar extends CardImpl {
// Flames of the Raze-Boar deals 4 damage to target creature an opponent controls. Then Flames of the Raze-Boar deals 2 damage to each other creature that player controls if you control a creature with power 4 or greater.
this.getSpellAbility().addEffect(new FlamesOfTheRazeBoarEffect());
this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent());
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
private FlamesOfTheRazeBoar(final FlamesOfTheRazeBoar card) {
diff --git a/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java b/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java
index 5f806e6506..28d008efd6 100644
--- a/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java
+++ b/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java
@@ -1,7 +1,5 @@
-
package mage.cards.f;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksEachCombatStaticAbility;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
@@ -10,6 +8,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
@@ -19,8 +18,9 @@ import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class FlamewakePhoenix extends CardImpl {
@@ -46,7 +46,7 @@ public final class FlamewakePhoenix extends CardImpl {
TargetController.YOU, false, false),
FerociousCondition.instance,
"Ferocious — At the beginning of combat on your turn, if you control a creature with power 4 or greater, you may pay {R}. If you do, return {this} from your graveyard to the battlefield."
- ));
+ ).addHint(FerociousHint.instance));
}
public FlamewakePhoenix(final FlamewakePhoenix card) {
diff --git a/Mage.Sets/src/mage/cards/f/FolkMedicine.java b/Mage.Sets/src/mage/cards/f/FolkMedicine.java
index f89a831614..ec8785eb2e 100644
--- a/Mage.Sets/src/mage/cards/f/FolkMedicine.java
+++ b/Mage.Sets/src/mage/cards/f/FolkMedicine.java
@@ -1,7 +1,5 @@
-
package mage.cards.f;
-import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@@ -11,19 +9,20 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TimingRule;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author fireshoes
*/
public final class FolkMedicine extends CardImpl {
public FolkMedicine(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// You gain 1 life for each creature you control.
- DynamicValue amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
+ DynamicValue amount = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
this.getSpellAbility().addEffect(new GainLifeEffect(amount));
// Flashback {1}{W}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT));
diff --git a/Mage.Sets/src/mage/cards/f/ForceAway.java b/Mage.Sets/src/mage/cards/f/ForceAway.java
index 186de960f8..766dc39d9f 100644
--- a/Mage.Sets/src/mage/cards/f/ForceAway.java
+++ b/Mage.Sets/src/mage/cards/f/ForceAway.java
@@ -1,34 +1,35 @@
-
package mage.cards.f;
-import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class ForceAway extends CardImpl {
public ForceAway(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Return target creature to its owner's hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Ferocious — If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card.
- Effect effect = new ConditionalOneShotEffect(new DrawDiscardControllerEffect(1,1, true),
- FerociousCondition.instance , " Ferocious — If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card");
+ Effect effect = new ConditionalOneShotEffect(new DrawDiscardControllerEffect(1, 1, true),
+ FerociousCondition.instance, " Ferocious — If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card");
this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public ForceAway(final ForceAway card) {
diff --git a/Mage.Sets/src/mage/cards/f/FoundryChampion.java b/Mage.Sets/src/mage/cards/f/FoundryChampion.java
index 235f269014..bdc56fb7bf 100644
--- a/Mage.Sets/src/mage/cards/f/FoundryChampion.java
+++ b/Mage.Sets/src/mage/cards/f/FoundryChampion.java
@@ -1,25 +1,25 @@
package mage.cards.f;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget;
+import java.util.UUID;
+
/**
- *
* @author Plopman
*/
public final class FoundryChampion extends CardImpl {
@@ -33,8 +33,9 @@ public final class FoundryChampion extends CardImpl {
this.toughness = new MageInt(4);
//When Foundry Champion enters the battlefield, it deals damage to any target equal to the number of creatures you control.
- Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), "it"));
+ Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(CreaturesYouControlCount.instance, "it"));
ability.addTarget(new TargetAnyTarget());
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
//{R}: Foundry Champion gets +1/+0 until end of turn.
diff --git a/Mage.Sets/src/mage/cards/f/FrontierMastodon.java b/Mage.Sets/src/mage/cards/f/FrontierMastodon.java
index cb19bf01a4..505c938a10 100644
--- a/Mage.Sets/src/mage/cards/f/FrontierMastodon.java
+++ b/Mage.Sets/src/mage/cards/f/FrontierMastodon.java
@@ -1,25 +1,25 @@
-
package mage.cards.f;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class FrontierMastodon extends CardImpl {
public FrontierMastodon(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.ELEPHANT);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
@@ -28,8 +28,8 @@ public final class FrontierMastodon extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
FerociousCondition.instance,
- "Ferocious — {this} enters the battlefield with a +1/+1 counter on it if you control a creature with power 4 or greater.",""
- ));
+ "Ferocious — {this} enters the battlefield with a +1/+1 counter on it if you control a creature with power 4 or greater.", ""
+ ).addHint(FerociousHint.instance));
}
public FrontierMastodon(final FrontierMastodon card) {
diff --git a/Mage.Sets/src/mage/cards/g/GateColossus.java b/Mage.Sets/src/mage/cards/g/GateColossus.java
index 0855be3d71..633370862b 100644
--- a/Mage.Sets/src/mage/cards/g/GateColossus.java
+++ b/Mage.Sets/src/mage/cards/g/GateColossus.java
@@ -8,6 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
+import mage.abilities.hint.common.GateYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
@@ -39,7 +40,8 @@ public final class GateColossus extends CardImpl {
this.toughness = new MageInt(8);
// This spell costs {1} less to cast for each Gate you control.
- this.addAbility(new SimpleStaticAbility(Zone.STACK, new GateColossusCostReductionEffect()));
+ this.addAbility(new SimpleStaticAbility(Zone.STACK, new GateColossusCostReductionEffect())
+ .addHint(GateYouControlHint.instance));
// Gate Colossus can't be blocked by creatures with power 2 or less.
this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
diff --git a/Mage.Sets/src/mage/cards/g/GatebreakerRam.java b/Mage.Sets/src/mage/cards/g/GatebreakerRam.java
index 5a9a159ea4..8ef7e9738b 100644
--- a/Mage.Sets/src/mage/cards/g/GatebreakerRam.java
+++ b/Mage.Sets/src/mage/cards/g/GatebreakerRam.java
@@ -10,6 +10,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
@@ -51,7 +52,7 @@ public final class GatebreakerRam extends CardImpl {
this.addAbility(new SimpleStaticAbility(
new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield)
.setText("{this} gets +1/+1 for each Gate you control.")
- ));
+ ).addHint(GateYouControlHint.instance));
// As long as you control two or more Gates, Gatebreaker Ram has vigilance and trample.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
diff --git a/Mage.Sets/src/mage/cards/g/GatekeeperGargoyle.java b/Mage.Sets/src/mage/cards/g/GatekeeperGargoyle.java
index bc1dc58488..43a3218777 100644
--- a/Mage.Sets/src/mage/cards/g/GatekeeperGargoyle.java
+++ b/Mage.Sets/src/mage/cards/g/GatekeeperGargoyle.java
@@ -1,32 +1,24 @@
package mage.cards.g;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.GateYouControlCount;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
-import mage.constants.SubType;
+import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import mage.constants.SubType;
import mage.counters.CounterType;
-import mage.filter.FilterPermanent;
-import mage.filter.common.FilterControlledPermanent;
-import mage.filter.predicate.mageobject.SubtypePredicate;
+
+import java.util.UUID;
/**
- *
* @author TheElk801
*/
public final class GatekeeperGargoyle extends CardImpl {
- private static final FilterPermanent filter = new FilterControlledPermanent();
-
- static {
- filter.add(new SubtypePredicate(SubType.GATE));
- }
-
public GatekeeperGargoyle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
@@ -41,9 +33,9 @@ public final class GatekeeperGargoyle extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(
CounterType.P1P1.createInstance(),
- new PermanentsOnBattlefieldCount(filter), true
+ GateYouControlCount.instance, true
), "with a +1/+1 counter on it for each Gate you control"
- ));
+ ).addHint(GateYouControlHint.instance));
}
public GatekeeperGargoyle(final GatekeeperGargoyle card) {
diff --git a/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java b/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java
index 7b11a00be5..879fce467c 100644
--- a/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java
+++ b/Mage.Sets/src/mage/cards/g/GeistHonoredMonk.java
@@ -1,30 +1,30 @@
-
package mage.cards.g;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.VigilanceAbility;
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.common.FilterControlledCreaturePermanent;
import mage.game.permanent.token.SpiritWhiteToken;
+import java.util.UUID;
+
/**
* @author nantuko
*/
public final class GeistHonoredMonk extends CardImpl {
public GeistHonoredMonk(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MONK);
@@ -34,7 +34,8 @@ public final class GeistHonoredMonk extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
// Geist-Honored Monk's power and toughness are each equal to the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame))
+ .addHint(CreaturesYouControlHint.instance));
// When Geist-Honored Monk enters the battlefield, create two 1/1 white Spirit creature tokens with flying.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("ISD"), 2)));
diff --git a/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java b/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java
index f2b3c24037..4e01c10e3f 100644
--- a/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java
+++ b/Mage.Sets/src/mage/cards/g/GeistOfTheLonelyVigil.java
@@ -1,13 +1,14 @@
-
package mage.cards.g;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class GeistOfTheLonelyVigil extends CardImpl {
public GeistOfTheLonelyVigil(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
@@ -40,7 +40,7 @@ public final class GeistOfTheLonelyVigil extends CardImpl {
new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
DeliriumCondition.instance);
effect.setText("Delirium — {this} can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard");
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DeliriumHint.instance));
}
public GeistOfTheLonelyVigil(final GeistOfTheLonelyVigil card) {
diff --git a/Mage.Sets/src/mage/cards/g/GibberingFiend.java b/Mage.Sets/src/mage/cards/g/GibberingFiend.java
index 024fd71faa..bc508eb7c0 100644
--- a/Mage.Sets/src/mage/cards/g/GibberingFiend.java
+++ b/Mage.Sets/src/mage/cards/g/GibberingFiend.java
@@ -1,7 +1,7 @@
-
package mage.cards.g;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -17,13 +18,12 @@ import mage.constants.TargetController;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class GibberingFiend extends CardImpl {
public GibberingFiend(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.DEVIL);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
@@ -37,7 +37,8 @@ public final class GibberingFiend extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.OPPONENT, false, true),
DeliriumCondition.instance,
"Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
- + "{this} deals 1 damage to that player."));
+ + "{this} deals 1 damage to that player.")
+ .addHint(DeliriumHint.instance));
}
public GibberingFiend(final GibberingFiend card) {
diff --git a/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java b/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java
index 632d3e4f30..c46079038b 100644
--- a/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java
+++ b/Mage.Sets/src/mage/cards/g/GlaiveOfTheGuildpact.java
@@ -1,12 +1,12 @@
package mage.cards.g;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.GateYouControlCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.VigilanceAbility;
@@ -16,23 +16,14 @@ import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
-import mage.filter.FilterPermanent;
-import mage.filter.common.FilterControlledPermanent;
-import mage.filter.predicate.mageobject.SubtypePredicate;
+
+import java.util.UUID;
/**
- *
* @author TheElk801
*/
public final class GlaiveOfTheGuildpact extends CardImpl {
- private static final FilterPermanent filter
- = new FilterControlledPermanent("Gate you control");
-
- static {
- filter.add(new SubtypePredicate(SubType.GATE));
- }
-
public GlaiveOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
@@ -42,7 +33,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl {
Ability ability = new SimpleStaticAbility(
Zone.BATTLEFIELD,
new BoostEquippedEffect(
- new PermanentsOnBattlefieldCount(filter),
+ GateYouControlCount.instance,
new StaticValue(0)
)
);
@@ -52,6 +43,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl {
ability.addEffect(new GainAbilityAttachedEffect(
new MenaceAbility(), AttachmentType.EQUIPMENT
).setText("and menace"));
+ ability.addHint(GateYouControlHint.instance);
this.addAbility(ability);
// Equip {3}
diff --git a/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java b/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java
index 27d2a2bc20..599aae3564 100644
--- a/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java
+++ b/Mage.Sets/src/mage/cards/g/GnarlwoodDryad.java
@@ -1,13 +1,14 @@
-
package mage.cards.g;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -17,13 +18,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class GnarlwoodDryad extends CardImpl {
public GnarlwoodDryad(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
this.subtype.add(SubType.DRYAD);
this.subtype.add(SubType.HORROR);
this.power = new MageInt(1);
@@ -37,6 +37,7 @@ public final class GnarlwoodDryad extends CardImpl {
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), DeliriumCondition.instance,
"Delirium — {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard.");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/g/GoblinGathering.java b/Mage.Sets/src/mage/cards/g/GoblinGathering.java
index 3c6dec39ae..7f93f57fbc 100644
--- a/Mage.Sets/src/mage/cards/g/GoblinGathering.java
+++ b/Mage.Sets/src/mage/cards/g/GoblinGathering.java
@@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -27,6 +28,7 @@ public final class GoblinGathering extends CardImpl {
this.getSpellAbility().addEffect(new CreateTokenEffect(
new GoblinToken(), GoblinGatheringDynamicValue.instance
));
+ this.getSpellAbility().addHint(new ValueHint("You can create tokens", GoblinGatheringDynamicValue.instance));
}
private GoblinGathering(final GoblinGathering card) {
diff --git a/Mage.Sets/src/mage/cards/g/GoblinGoon.java b/Mage.Sets/src/mage/cards/g/GoblinGoon.java
index eff8408b09..823e5f8a92 100644
--- a/Mage.Sets/src/mage/cards/g/GoblinGoon.java
+++ b/Mage.Sets/src/mage/cards/g/GoblinGoon.java
@@ -1,7 +1,5 @@
-
package mage.cards.g;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,22 +7,23 @@ import mage.abilities.effects.RestrictionEffect;
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.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
public final class GoblinGoon extends CardImpl {
public GoblinGoon(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.MUTANT);
this.power = new MageInt(6);
@@ -32,7 +31,7 @@ public final class GoblinGoon extends CardImpl {
// Goblin Goon can't attack unless you control more creatures than defending player.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinGoonCantAttackEffect()));
-
+
// Goblin Goon can't block unless you control more creatures than attacking player.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinGoonCantBlockEffect()));
}
@@ -65,24 +64,25 @@ class GoblinGoonCantAttackEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
UUID defendingPlayerId;
Player defender = game.getPlayer(defenderId);
if (defender == null) {
Permanent permanent = game.getPermanent(defenderId);
if (permanent != null) {
defendingPlayerId = permanent.getControllerId();
- }
- else {
+ } else {
return false;
}
- }
- else {
+ } else {
defendingPlayerId = defenderId;
}
if (defendingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), defendingPlayerId, game);
- }
- else {
+ } else {
return true;
}
}
@@ -111,6 +111,9 @@ class GoblinGoonCantBlockEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
UUID attackingPlayerId = attacker.getControllerId();
if (attackingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), attackingPlayerId, game);
diff --git a/Mage.Sets/src/mage/cards/g/GoblinLyre.java b/Mage.Sets/src/mage/cards/g/GoblinLyre.java
index 1626668511..822f0633d1 100644
--- a/Mage.Sets/src/mage/cards/g/GoblinLyre.java
+++ b/Mage.Sets/src/mage/cards/g/GoblinLyre.java
@@ -1,25 +1,23 @@
-
package mage.cards.g;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetOpponentOrPlaneswalker;
+import java.util.UUID;
+
/**
- *
* @author L_J
*/
public final class GoblinLyre extends CardImpl {
@@ -66,7 +64,7 @@ class GoblinLyreEffect extends OneShotEffect {
Player opponent = game.getPlayerOrPlaneswalkerController(getTargetPointer().getFirst(game, source));
if (controller != null) {
if (controller.flipCoin(source, game, true)) {
- int damage = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()).calculate(game, source, this);
+ int damage = CreaturesYouControlCount.instance.calculate(game, source, this);
if (opponent != null) {
return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true) > 0;
}
diff --git a/Mage.Sets/src/mage/cards/g/GoldenDemise.java b/Mage.Sets/src/mage/cards/g/GoldenDemise.java
index fb6cc3f53d..91641ac77d 100644
--- a/Mage.Sets/src/mage/cards/g/GoldenDemise.java
+++ b/Mage.Sets/src/mage/cards/g/GoldenDemise.java
@@ -1,11 +1,10 @@
-
package mage.cards.g;
-import java.util.UUID;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.keyword.AscendEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -14,8 +13,9 @@ import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class GoldenDemise extends CardImpl {
@@ -35,6 +35,7 @@ public final class GoldenDemise extends CardImpl {
CitysBlessingCondition.instance,
"All creatures get -2/-2 until end of turn. If you have the city's blessing, instead only creatures your opponents control get -2/-2 until end of turn"
));
+ this.getSpellAbility().addHint(CitysBlessingHint.instance);
}
public GoldenDemise(final GoldenDemise card) {
diff --git a/Mage.Sets/src/mage/cards/g/GrimFlayer.java b/Mage.Sets/src/mage/cards/g/GrimFlayer.java
index 90bda82138..de4d208c74 100644
--- a/Mage.Sets/src/mage/cards/g/GrimFlayer.java
+++ b/Mage.Sets/src/mage/cards/g/GrimFlayer.java
@@ -1,7 +1,7 @@
-
package mage.cards.g;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
@@ -11,6 +11,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -21,13 +22,12 @@ import mage.constants.Zone;
import mage.filter.FilterCard;
/**
- *
* @author fireshoes
*/
public final class GrimFlayer extends CardImpl {
public GrimFlayer(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2);
@@ -47,7 +47,8 @@ public final class GrimFlayer extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
DeliriumCondition.instance,
- "Delirium — {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard")));
+ "Delirium — {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard"))
+ .addHint(DeliriumHint.instance));
}
public GrimFlayer(final GrimFlayer card) {
diff --git a/Mage.Sets/src/mage/cards/h/HarshSustenance.java b/Mage.Sets/src/mage/cards/h/HarshSustenance.java
index 45fee5cd27..3f9cfd9000 100644
--- a/Mage.Sets/src/mage/cards/h/HarshSustenance.java
+++ b/Mage.Sets/src/mage/cards/h/HarshSustenance.java
@@ -1,36 +1,34 @@
-
package mage.cards.h;
-import java.util.UUID;
-import mage.abilities.dynamicvalue.DynamicValue;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class HarshSustenance extends CardImpl {
public HarshSustenance(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}{B}");
// Harsh Sustenance deals X damage to any target and you gain X life, where X is the number of creatures you control.
- DynamicValue xValue = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
- Effect effect = new DamageTargetEffect(xValue);
+ Effect effect = new DamageTargetEffect(CreaturesYouControlCount.instance);
effect.setText("{this} deals X damage to any target");
getSpellAbility().addEffect(effect);
getSpellAbility().addTarget(new TargetAnyTarget());
- effect = new GainLifeEffect(xValue);
+ effect = new GainLifeEffect(CreaturesYouControlCount.instance);
effect.setText("and you gain X life, where X is the number of creatures you control");
getSpellAbility().addEffect(effect);
+ getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
public HarshSustenance(final HarshSustenance card) {
diff --git a/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java
index 83b21abffc..9f575ad13e 100644
--- a/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java
+++ b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java
@@ -1,28 +1,28 @@
-
package mage.cards.h;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.DeathtouchAbility;
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 java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class HeirOfTheWilds extends CardImpl {
public HeirOfTheWilds(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
@@ -33,10 +33,11 @@ public final class HeirOfTheWilds extends CardImpl {
this.addAbility(DeathtouchAbility.getInstance());
// Ferocious - Whenever Heir of the Wilds attacks, if you control a creature with power 4 or greater, Heir of the Wilds gets +1/+1 until end of turn.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
- new AttacksTriggeredAbility(new BoostSourceEffect(1,1,Duration.EndOfTurn), false),
+ new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false),
FerociousCondition.instance,
"Ferocious — Whenever {this} attacks, if you control a creature with power 4 or greater, {this} gets +1/+1 until end of turn."
);
+ ability.addHint(FerociousHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/h/HoldTheGates.java b/Mage.Sets/src/mage/cards/h/HoldTheGates.java
index 583c79e1b3..4efa8b303a 100644
--- a/Mage.Sets/src/mage/cards/h/HoldTheGates.java
+++ b/Mage.Sets/src/mage/cards/h/HoldTheGates.java
@@ -1,46 +1,37 @@
-
package mage.cards.h;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.GateYouControlCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
+import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
-import mage.constants.SubType;
import mage.constants.Zone;
-import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
-import mage.filter.common.FilterControlledPermanent;
-import mage.filter.predicate.mageobject.SubtypePredicate;
+
+import java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class HoldTheGates extends CardImpl {
- private static final FilterPermanent filter = new FilterControlledPermanent();
-
- static {
- filter.add(new SubtypePredicate(SubType.GATE));
- }
-
public HoldTheGates(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
// Creatures you control get +0/+1 for each Gate you control and have vigilance.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
- new BoostControlledEffect(new StaticValue(0),new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield));
+ new BoostControlledEffect(new StaticValue(0), GateYouControlCount.instance, Duration.WhileOnBattlefield));
ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))
.setText("Creatures you control get +0/+1 for each Gate you control and have vigilance"));
+ ability.addHint(GateYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java b/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java
index 27be329e5d..f66fce3513 100644
--- a/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java
+++ b/Mage.Sets/src/mage/cards/h/HoundOfTheFarbogs.java
@@ -1,13 +1,14 @@
-
package mage.cards.h;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,7 +19,6 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class HoundOfTheFarbogs extends CardImpl {
@@ -26,7 +26,7 @@ public final class HoundOfTheFarbogs extends CardImpl {
final static private String RULE = "{this} has menace as long as there are four or more card types among cards in your graveyard";
public HoundOfTheFarbogs(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.HOUND);
this.power = new MageInt(5);
@@ -36,6 +36,7 @@ public final class HoundOfTheFarbogs extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE));
ability.setAbilityWord(AbilityWord.DELIRIUM);
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java b/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java
index d873f78870..adc5c9483b 100644
--- a/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java
+++ b/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java
@@ -1,13 +1,12 @@
-
package mage.cards.h;
-import java.util.UUID;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GetEmblemEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -19,8 +18,9 @@ import mage.filter.StaticFilters;
import mage.game.command.emblems.HuatliRadiantChampionEmblem;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class HuatliRadiantChampion extends CardImpl {
@@ -41,6 +41,7 @@ public final class HuatliRadiantChampion extends CardImpl {
LoyaltyAbility ability2 = new LoyaltyAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true)
.setText("Target creature gets +X/+X until end of turn, where X is the number of creatures you control"), -1);
ability2.addTarget(new TargetCreaturePermanent());
+ ability2.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability2);
// -8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may draw a card."
diff --git a/Mage.Sets/src/mage/cards/i/IcyBlast.java b/Mage.Sets/src/mage/cards/i/IcyBlast.java
index 2df2b53a35..2d9034b5a1 100644
--- a/Mage.Sets/src/mage/cards/i/IcyBlast.java
+++ b/Mage.Sets/src/mage/cards/i/IcyBlast.java
@@ -1,4 +1,3 @@
-
package mage.cards.i;
import mage.abilities.Ability;
@@ -8,6 +7,7 @@ import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -35,6 +35,7 @@ public final class IcyBlast extends CardImpl {
effect.setText(" Ferocious — If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().setTargetAdjuster(IcyBlastAdjuster.instance);
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public IcyBlast(final IcyBlast card) {
diff --git a/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java b/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java
index b624891e7a..39f31ee20e 100644
--- a/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java
+++ b/Mage.Sets/src/mage/cards/i/IllusionistsGambit.java
@@ -1,9 +1,5 @@
-
package mage.cards.i;
-import java.util.List;
-import java.util.Objects;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
import mage.abilities.condition.common.OnOpponentsTurnCondition;
@@ -13,24 +9,23 @@ import mage.abilities.effects.RequirementEffect;
import mage.abilities.effects.RestrictionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.PhaseStep;
-import mage.constants.TurnPhase;
+import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.turn.Phase;
import mage.game.turn.TurnMod;
+import java.util.List;
+import java.util.Objects;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class IllusionistsGambit extends CardImpl {
public IllusionistsGambit(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
// Cast Illusionist's Gambit only during the declare blockers step on an opponent's turn.
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(PhaseStep.DECLARE_BLOCKERS, OnOpponentsTurnCondition.instance));
@@ -122,9 +117,7 @@ class IllusionistsGambitRequirementEffect extends RequirementEffect {
@Override
public boolean isInactive(Ability source, Game game) {
if (game.getTurn().getStepType() == PhaseStep.END_COMBAT) {
- if (!Objects.equals(game.getTurn().getPhase(), phase)) {
- return true;
- }
+ return !Objects.equals(game.getTurn().getPhase(), phase);
}
return false;
}
@@ -166,25 +159,23 @@ class IllusionistsGambitRestrictionEffect extends RestrictionEffect {
@Override
public boolean isInactive(Ability source, Game game) {
if (game.getTurn().getStepType() == PhaseStep.END_COMBAT) {
- if (!Objects.equals(game.getTurn().getPhase(), phase)) {
- return true;
- }
+ return !Objects.equals(game.getTurn().getPhase(), phase);
}
return false;
}
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
if (defenderId.equals(source.getControllerId())) {
return false;
}
// planeswalker
Permanent permanent = game.getPermanent(defenderId);
- if (permanent != null && permanent.isControlledBy(source.getControllerId())
- && permanent.isPlaneswalker()) {
- return false;
- }
- return true;
+ return permanent == null || !permanent.isControlledBy(source.getControllerId())
+ || !permanent.isPlaneswalker();
}
@Override
diff --git a/Mage.Sets/src/mage/cards/i/InexorableBlob.java b/Mage.Sets/src/mage/cards/i/InexorableBlob.java
index 2d2a1d64ef..2e733c9c92 100644
--- a/Mage.Sets/src/mage/cards/i/InexorableBlob.java
+++ b/Mage.Sets/src/mage/cards/i/InexorableBlob.java
@@ -1,12 +1,13 @@
-
package mage.cards.i;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -14,7 +15,6 @@ import mage.constants.SubType;
import mage.game.permanent.token.InexorableBlobOozeToken;
/**
- *
* @author fireshoes
*/
public final class InexorableBlob extends CardImpl {
@@ -30,7 +30,8 @@ public final class InexorableBlob extends CardImpl {
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new InexorableBlobOozeToken(), 1, true, true), false),
DeliriumCondition.instance,
"Delirium — Whenever {this} attacks and there are at least four card types among cards in your graveyard, "
- + "create a 3/3 green Ooze creature token tapped and attacking."));
+ + "create a 3/3 green Ooze creature token tapped and attacking.")
+ .addHint(DeliriumHint.instance));
}
public InexorableBlob(final InexorableBlob card) {
diff --git a/Mage.Sets/src/mage/cards/i/InquisitorsOx.java b/Mage.Sets/src/mage/cards/i/InquisitorsOx.java
index be222161c9..7f78acaae8 100644
--- a/Mage.Sets/src/mage/cards/i/InquisitorsOx.java
+++ b/Mage.Sets/src/mage/cards/i/InquisitorsOx.java
@@ -1,7 +1,7 @@
-
package mage.cards.i;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public final class InquisitorsOx extends CardImpl {
public InquisitorsOx(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.OX);
this.power = new MageInt(2);
this.toughness = new MageInt(5);
@@ -34,6 +34,7 @@ public final class InquisitorsOx extends CardImpl {
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, "Delirium — {this} gets +1/+0");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), DeliriumCondition.instance, "and has vigilance as long as there are four or more card types among cards in your graveyard."));
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/i/InvasiveSurgery.java b/Mage.Sets/src/mage/cards/i/InvasiveSurgery.java
index b9e404d48c..432597bd9c 100644
--- a/Mage.Sets/src/mage/cards/i/InvasiveSurgery.java
+++ b/Mage.Sets/src/mage/cards/i/InvasiveSurgery.java
@@ -1,12 +1,13 @@
-
package mage.cards.i;
import java.util.UUID;
+
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -19,7 +20,6 @@ import mage.players.Player;
import mage.target.TargetSpell;
/**
- *
* @author LevelX2
*/
public final class InvasiveSurgery extends CardImpl {
@@ -31,13 +31,13 @@ public final class InvasiveSurgery extends CardImpl {
}
public InvasiveSurgery(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Counter target sorcery spell.
// Delirium — If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles their library.
this.getSpellAbility().addEffect(new InvasiveSurgeryEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter));
-
+ this.getSpellAbility().addHint(DeliriumHint.instance);
}
public InvasiveSurgery(final InvasiveSurgery card) {
diff --git a/Mage.Sets/src/mage/cards/i/IronclawCurse.java b/Mage.Sets/src/mage/cards/i/IronclawCurse.java
index 93d16b6851..84e5ce57a7 100644
--- a/Mage.Sets/src/mage/cards/i/IronclawCurse.java
+++ b/Mage.Sets/src/mage/cards/i/IronclawCurse.java
@@ -1,7 +1,5 @@
-
package mage.cards.i;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
@@ -10,19 +8,15 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.AttachmentType;
-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 L_J
*/
public final class IronclawCurse extends CardImpl {
@@ -73,6 +67,9 @@ class IronclawCurseEffect extends CantBlockAttachedEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (enchantment == null) {
return false;
diff --git a/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java b/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java
index c130b759ab..0dd3df0283 100644
--- a/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java
+++ b/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java
@@ -1,7 +1,5 @@
-
package mage.cards.i;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@@ -12,6 +10,8 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
+import mage.abilities.hint.ValueHint;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -24,8 +24,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.SpiderToken;
import mage.target.common.TargetOpponent;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class IshkanahGrafwidow extends CardImpl {
@@ -37,7 +38,7 @@ public final class IshkanahGrafwidow extends CardImpl {
}
public IshkanahGrafwidow(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIDER);
this.power = new MageInt(3);
@@ -52,13 +53,15 @@ public final class IshkanahGrafwidow extends CardImpl {
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SpiderToken(), 3), false),
DeliriumCondition.instance,
"Delirium — When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, "
- + "create three 1/2 green Spider creature tokens with reach.");
+ + "create three 1/2 green Spider creature tokens with reach.");
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
// {5}{B}: Target opponent loses 1 life for each Spider you control.
PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter);
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(count), new ManaCostsImpl("{6}{B}"));
ability.addTarget(new TargetOpponent());
+ ability.addHint(new ValueHint("Spiders you control", count));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/j/JunkyoBell.java b/Mage.Sets/src/mage/cards/j/JunkyoBell.java
index 8b0cc736cb..d1130ab462 100644
--- a/Mage.Sets/src/mage/cards/j/JunkyoBell.java
+++ b/Mage.Sets/src/mage/cards/j/JunkyoBell.java
@@ -1,27 +1,27 @@
-
package mage.cards.j;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.SacrificeTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.TargetController;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
+import java.util.UUID;
+
/**
* @author LevelX
*/
@@ -32,10 +32,13 @@ public final class JunkyoBell extends CardImpl {
// At the beginning of your upkeep, you may have target creature you control get +X/+X until end of turn,
// where X is the number of creatures you control. If you do, sacrifice that creature at the beginning of the next end step.
- PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
- Ability ability = new BeginningOfUpkeepTriggeredAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true), TargetController.YOU, true);
+ Ability ability = new BeginningOfUpkeepTriggeredAbility(
+ new BoostTargetEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, true),
+ TargetController.YOU,
+ true);
ability.addTarget(new TargetControlledCreaturePermanent());
ability.addEffect(new JunkyoBellSacrificeEffect());
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/k/KayasWrath.java b/Mage.Sets/src/mage/cards/k/KayasWrath.java
index d6e4145e90..d09c9904cd 100644
--- a/Mage.Sets/src/mage/cards/k/KayasWrath.java
+++ b/Mage.Sets/src/mage/cards/k/KayasWrath.java
@@ -3,6 +3,7 @@ package mage.cards.k;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -23,6 +24,7 @@ public final class KayasWrath extends CardImpl {
// Destroy all creatures. You gain life equal to the number of creatures you controlled that were destroyed this way.
this.getSpellAbility().addEffect(new KayasWrathEffect());
+ this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
private KayasWrath(final KayasWrath card) {
diff --git a/Mage.Sets/src/mage/cards/k/KessigDireSwine.java b/Mage.Sets/src/mage/cards/k/KessigDireSwine.java
index 8817eb2d2f..1ae9339127 100644
--- a/Mage.Sets/src/mage/cards/k/KessigDireSwine.java
+++ b/Mage.Sets/src/mage/cards/k/KessigDireSwine.java
@@ -1,12 +1,13 @@
-
package mage.cards.k;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -16,13 +17,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class KessigDireSwine extends CardImpl {
public KessigDireSwine(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.subtype.add(SubType.BOAR);
this.subtype.add(SubType.HORROR);
this.power = new MageInt(6);
@@ -31,7 +31,8 @@ public final class KessigDireSwine extends CardImpl {
// Delirium — Kessig Dire Swine has trample as long as there are four or more card types among cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield),
- DeliriumCondition.instance, "Delirium — {this} has trample as long as there are four or more card types among cards in your graveyard")));
+ DeliriumCondition.instance, "Delirium — {this} has trample as long as there are four or more card types among cards in your graveyard"))
+ .addHint(DeliriumHint.instance));
}
public KessigDireSwine(final KessigDireSwine card) {
diff --git a/Mage.Sets/src/mage/cards/k/KindlyStranger.java b/Mage.Sets/src/mage/cards/k/KindlyStranger.java
index 5a738cd6c2..637a0e7a83 100644
--- a/Mage.Sets/src/mage/cards/k/KindlyStranger.java
+++ b/Mage.Sets/src/mage/cards/k/KindlyStranger.java
@@ -1,4 +1,3 @@
-
package mage.cards.k;
import java.util.UUID;
@@ -8,6 +7,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.TransformSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -32,7 +32,8 @@ public final class KindlyStranger extends CardImpl {
// Delirium — {2}{B}: Transform Kindly Stranger. Activate this ability only if there are four or more card types among cards in your graveyard.
this.addAbility(new TransformAbility());
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
- new TransformSourceEffect(true), new ManaCostsImpl<>("{2}{B}"), DeliriumCondition.instance));
+ new TransformSourceEffect(true), new ManaCostsImpl<>("{2}{B}"), DeliriumCondition.instance)
+ .addHint(DeliriumHint.instance));
}
public KindlyStranger(final KindlyStranger card) {
diff --git a/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java b/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java
index f43b8dece3..6fe1524aa3 100644
--- a/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java
+++ b/Mage.Sets/src/mage/cards/k/KolaghanForerunners.java
@@ -1,30 +1,30 @@
-
package mage.cards.k;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.DashAbility;
import mage.abilities.keyword.TrampleAbility;
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.common.FilterControlledCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class KolaghanForerunners extends CardImpl {
public KolaghanForerunners(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.BERSERKER);
this.power = new MageInt(0);
@@ -35,7 +35,7 @@ public final class KolaghanForerunners extends CardImpl {
// Kolaghan Forerunners' power is equal to the number of creatures you control.
Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creatures you control")), Duration.EndOfGame);
- this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, effect).addHint(CreaturesYouControlHint.instance));
// Dash {2}{R}
this.addAbility(new DashAbility(this, "{2}{R}"));
diff --git a/Mage.Sets/src/mage/cards/k/KumenasAwakening.java b/Mage.Sets/src/mage/cards/k/KumenasAwakening.java
index 0dfc5df142..a154eee7ba 100644
--- a/Mage.Sets/src/mage/cards/k/KumenasAwakening.java
+++ b/Mage.Sets/src/mage/cards/k/KumenasAwakening.java
@@ -1,20 +1,20 @@
-
package mage.cards.k;
-import java.util.UUID;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardAllEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class KumenasAwakening extends CardImpl {
@@ -29,7 +29,8 @@ public final class KumenasAwakening extends CardImpl {
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), new DrawCardAllEffect(1), CitysBlessingCondition.instance,
"each player draws a card. If you have the city's blessing, instead only you draw a card"),
- TargetController.YOU, false));
+ TargetController.YOU, false)
+ .addHint(CitysBlessingHint.instance));
}
public KumenasAwakening(final KumenasAwakening card) {
diff --git a/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java b/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java
index 7224e608d1..6bf725d945 100644
--- a/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java
+++ b/Mage.Sets/src/mage/cards/m/MajesticMyriarch.java
@@ -1,7 +1,5 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
@@ -13,32 +11,17 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
-import mage.abilities.keyword.DeathtouchAbility;
-import mage.abilities.keyword.DoubleStrikeAbility;
-import mage.abilities.keyword.FirstStrikeAbility;
-import mage.abilities.keyword.FlyingAbility;
-import mage.abilities.keyword.HasteAbility;
-import mage.abilities.keyword.HexproofAbility;
-import mage.abilities.keyword.IndestructibleAbility;
-import mage.abilities.keyword.LifelinkAbility;
-import mage.abilities.keyword.MenaceAbility;
-import mage.abilities.keyword.ReachAbility;
-import mage.abilities.keyword.TrampleAbility;
-import mage.abilities.keyword.VigilanceAbility;
+import mage.abilities.keyword.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.TargetController;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class MajesticMyriarch extends CardImpl {
@@ -51,7 +34,7 @@ public final class MajesticMyriarch extends CardImpl {
this.toughness = new MageInt(0);
// Majestic Myriarch's power and toughness are each equal to twice the number of creatures you control.
- DynamicValue xValue= new MultipliedValue(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), 2);
+ DynamicValue xValue = new MultipliedValue(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), 2);
Effect effect = new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame);
effect.setText("{this}'s power and toughness are each equal to twice the number of creatures you control");
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
@@ -104,7 +87,7 @@ class MajesticMyriarchEffect extends OneShotEffect {
MajesticMyriarchEffect() {
super(Outcome.BoostCreature);
this.staticText = "if you control a creature with flying, Majestic Myriarch gains flying until end of turn. " +
- "The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance.";
+ "The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance.";
}
MajesticMyriarchEffect(final MajesticMyriarchEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/m/ManicScribe.java b/Mage.Sets/src/mage/cards/m/ManicScribe.java
index d97181341d..26db45a69d 100644
--- a/Mage.Sets/src/mage/cards/m/ManicScribe.java
+++ b/Mage.Sets/src/mage/cards/m/ManicScribe.java
@@ -1,7 +1,7 @@
-
package mage.cards.m;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffect;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -17,13 +18,12 @@ import mage.constants.TargetController;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class ManicScribe extends CardImpl {
public ManicScribe(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.power = new MageInt(0);
@@ -38,7 +38,8 @@ public final class ManicScribe extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(3), TargetController.OPPONENT, false, true),
DeliriumCondition.instance,
"Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
- + "that player puts the top three cards of their library into their graveyard."));
+ + "that player puts the top three cards of their library into their graveyard.")
+ .addHint(DeliriumHint.instance));
}
public ManicScribe(final ManicScribe card) {
diff --git a/Mage.Sets/src/mage/cards/m/MassiveRaid.java b/Mage.Sets/src/mage/cards/m/MassiveRaid.java
index 02504c5141..15a636332a 100644
--- a/Mage.Sets/src/mage/cards/m/MassiveRaid.java
+++ b/Mage.Sets/src/mage/cards/m/MassiveRaid.java
@@ -1,28 +1,27 @@
-
package mage.cards.m;
-import java.util.UUID;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget;
+import java.util.UUID;
+
/**
- *
* @author jeffwadsworth
*/
public final class MassiveRaid extends CardImpl {
public MassiveRaid(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}");
-
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}");
// Massive Raid deals damage to any target equal to the number of creatures you control.
- this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())));
+ this.getSpellAbility().addEffect(new DamageTargetEffect(CreaturesYouControlCount.instance));
this.getSpellAbility().addTarget(new TargetAnyTarget());
+ this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
public MassiveRaid(final MassiveRaid card) {
diff --git a/Mage.Sets/src/mage/cards/m/MasteryOfTheUnseen.java b/Mage.Sets/src/mage/cards/m/MasteryOfTheUnseen.java
index 998060e9eb..fd31f8c868 100644
--- a/Mage.Sets/src/mage/cards/m/MasteryOfTheUnseen.java
+++ b/Mage.Sets/src/mage/cards/m/MasteryOfTheUnseen.java
@@ -1,7 +1,5 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.TurnedFaceUpAllTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@@ -12,23 +10,24 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class MasteryOfTheUnseen extends CardImpl {
public MasteryOfTheUnseen(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
// Whenever a permanent you control is turned face up, you gain 1 life for each creature you control.
this.addAbility(new TurnedFaceUpAllTriggeredAbility(
- new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())),
+ new GainLifeEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)),
new FilterControlledPermanent("a permanent you control")));
-
+
// {3}{W}: Manifest the top card of your library.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{3}{W}")));
}
diff --git a/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java
index 8c17f8b06a..9d78d64c7f 100644
--- a/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java
+++ b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java
@@ -1,12 +1,11 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@@ -19,8 +18,9 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class MausoleumHarpy extends CardImpl {
@@ -49,7 +49,8 @@ public final class MausoleumHarpy extends CardImpl {
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter),
CitysBlessingCondition.instance,
- "Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on {this}. "));
+ "Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on {this}. ")
+ .addHint(CitysBlessingHint.instance));
}
diff --git a/Mage.Sets/src/mage/cards/m/MazesEnd.java b/Mage.Sets/src/mage/cards/m/MazesEnd.java
index d76dbd7271..c575930d28 100644
--- a/Mage.Sets/src/mage/cards/m/MazesEnd.java
+++ b/Mage.Sets/src/mage/cards/m/MazesEnd.java
@@ -1,18 +1,16 @@
-
-
package mage.cards.m;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
+import mage.abilities.hint.ValueHint;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -27,20 +25,24 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class MazesEnd extends CardImpl {
private static final FilterCard filterCard = new FilterCard("Gate card");
+
static {
filterCard.add(new SubtypePredicate(SubType.GATE));
}
public MazesEnd(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
+ super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Maze's End enters the battlefield tapped.
@@ -54,8 +56,8 @@ public final class MazesEnd extends CardImpl {
ability.addEffect(new MazesEndEffect());
ability.addCost(new TapSourceCost());
ability.addCost(new ReturnToHandFromBattlefieldSourceCost());
+ ability.addHint(new ValueHint("Gates with different names you control", GatesWithDifferentNamesYouControlCount.instance));
this.addAbility(ability);
-
}
public MazesEnd(final MazesEnd card) {
@@ -68,6 +70,40 @@ public final class MazesEnd extends CardImpl {
}
}
+enum GatesWithDifferentNamesYouControlCount implements DynamicValue {
+
+ instance;
+
+ @Override
+ public int calculate(Game game, Ability sourceAbility, Effect effect) {
+ List names = new ArrayList<>();
+ for (Permanent permanent : game.getBattlefield().getAllActivePermanents(sourceAbility.getControllerId())) {
+ if (permanent.hasSubtype(SubType.GATE, game)) {
+ if (!names.contains(permanent.getName())) {
+ names.add(permanent.getName());
+ }
+ }
+ }
+ return names.size();
+ }
+
+ @Override
+ public GatesWithDifferentNamesYouControlCount copy() {
+ return instance;
+ }
+
+ @Override
+ public String toString() {
+ return "X";
+ }
+
+ @Override
+ public String getMessage() {
+ return "Gates with different names you control";
+ }
+}
+
+
class MazesEndEffect extends OneShotEffect {
public MazesEndEffect() {
@@ -86,15 +122,8 @@ class MazesEndEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- List names = new ArrayList<>();
- for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
- if (permanent.hasSubtype(SubType.GATE, game)) {
- if (!names.contains(permanent.getName())) {
- names.add(permanent.getName());
- }
- }
- }
- if (names.size() >= 10) {
+ int count = GatesWithDifferentNamesYouControlCount.instance.calculate(game, source, this);
+ if (count >= 10) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
controller.won(game);
@@ -102,5 +131,4 @@ class MazesEndEffect extends OneShotEffect {
}
return false;
}
-
}
diff --git a/Mage.Sets/src/mage/cards/m/MightBeyondReason.java b/Mage.Sets/src/mage/cards/m/MightBeyondReason.java
index a074981fd7..dc6a309053 100644
--- a/Mage.Sets/src/mage/cards/m/MightBeyondReason.java
+++ b/Mage.Sets/src/mage/cards/m/MightBeyondReason.java
@@ -1,10 +1,11 @@
-
package mage.cards.m;
import java.util.UUID;
+
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -12,13 +13,12 @@ import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
/**
- *
* @author LevelX2
*/
public final class MightBeyondReason extends CardImpl {
public MightBeyondReason(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
// Put two +1/+1 counter on target creature.
// Delirium — Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard.
@@ -27,9 +27,10 @@ public final class MightBeyondReason extends CardImpl {
new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)),
DeliriumCondition.instance,
"Put two +1/+1 counter on target creature. "
- + "Delirium — Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard"
+ + "Delirium — Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard"
));
getSpellAbility().addTarget(new TargetCreaturePermanent());
+ getSpellAbility().addHint(DeliriumHint.instance);
}
public MightBeyondReason(final MightBeyondReason card) {
diff --git a/Mage.Sets/src/mage/cards/m/MightOfTheMasses.java b/Mage.Sets/src/mage/cards/m/MightOfTheMasses.java
index cfce861ea9..4a2fb1a42f 100644
--- a/Mage.Sets/src/mage/cards/m/MightOfTheMasses.java
+++ b/Mage.Sets/src/mage/cards/m/MightOfTheMasses.java
@@ -1,27 +1,26 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author North
*/
public final class MightOfTheMasses extends CardImpl {
public MightOfTheMasses(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
-
- PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
+ // Target creature gets +1/+1 until end of turn for each creature you control.
+ PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn, true));
}
diff --git a/Mage.Sets/src/mage/cards/m/MindwrackDemon.java b/Mage.Sets/src/mage/cards/m/MindwrackDemon.java
index 1bcd1ff238..1eb9c35992 100644
--- a/Mage.Sets/src/mage/cards/m/MindwrackDemon.java
+++ b/Mage.Sets/src/mage/cards/m/MindwrackDemon.java
@@ -1,7 +1,7 @@
-
package mage.cards.m;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@@ -11,6 +11,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@@ -20,13 +21,12 @@ import mage.constants.SubType;
import mage.constants.TargetController;
/**
- *
* @author fireshoes
*/
public final class MindwrackDemon extends CardImpl {
public MindwrackDemon(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add(SubType.DEMON);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
@@ -45,6 +45,7 @@ public final class MindwrackDemon extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(4), TargetController.YOU, false),
new InvertCondition(DeliriumCondition.instance),
"Delirium — At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard.");
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/m/MinionsMurmurs.java b/Mage.Sets/src/mage/cards/m/MinionsMurmurs.java
index f94253c5d9..94fb18394a 100644
--- a/Mage.Sets/src/mage/cards/m/MinionsMurmurs.java
+++ b/Mage.Sets/src/mage/cards/m/MinionsMurmurs.java
@@ -1,9 +1,8 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -12,8 +11,9 @@ import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author Derpthemeus
*/
public final class MinionsMurmurs extends CardImpl {
@@ -23,6 +23,7 @@ public final class MinionsMurmurs extends CardImpl {
// You draw X cards and you lose X life, where X is the number of creatures you control.
this.getSpellAbility().addEffect(new MinionsMurmursEffect());
+ this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
public MinionsMurmurs(final MinionsMurmurs card) {
diff --git a/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java b/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java
index 7f195643e6..9d359363d6 100644
--- a/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java
+++ b/Mage.Sets/src/mage/cards/m/MirriWeatherlightDuelist.java
@@ -1,7 +1,5 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
@@ -14,20 +12,14 @@ import mage.abilities.effects.common.AddContinuousEffectToGame;
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.Layer;
-import mage.constants.Outcome;
-import mage.constants.SubLayer;
-import mage.constants.SuperType;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author TheElk801
*/
public final class MirriWeatherlightDuelist extends CardImpl {
@@ -87,6 +79,9 @@ class MirriWeatherlightDuelistBlockRestrictionEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
for (UUID creature : game.getCombat().getBlockers()) {
if (game.getPlayer(game.getPermanent(creature).getOwnerId()).hasOpponent(attacker.getControllerId(), game)) {
return false;
diff --git a/Mage.Sets/src/mage/cards/m/MobJustice.java b/Mage.Sets/src/mage/cards/m/MobJustice.java
index 8bc8519c22..467506ca6f 100644
--- a/Mage.Sets/src/mage/cards/m/MobJustice.java
+++ b/Mage.Sets/src/mage/cards/m/MobJustice.java
@@ -1,18 +1,17 @@
-
package mage.cards.m;
-import java.util.UUID;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetPlayerOrPlaneswalker;
+import java.util.UUID;
+
/**
- *
* @author LoneFox
*/
public final class MobJustice extends CardImpl {
@@ -21,10 +20,11 @@ public final class MobJustice extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}");
// Mob Justice deals damage to target player equal to the number of creatures you control.
- Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()));
+ Effect effect = new DamageTargetEffect(CreaturesYouControlCount.instance);
effect.setText("{this} deals damage to target player or planeswalker equal to the number of creatures you control");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
+ this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
public MobJustice(final MobJustice card) {
diff --git a/Mage.Sets/src/mage/cards/m/MoggToady.java b/Mage.Sets/src/mage/cards/m/MoggToady.java
index 3b4d527761..9afd5a3116 100644
--- a/Mage.Sets/src/mage/cards/m/MoggToady.java
+++ b/Mage.Sets/src/mage/cards/m/MoggToady.java
@@ -1,7 +1,5 @@
-
package mage.cards.m;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,29 +7,30 @@ import mage.abilities.effects.RestrictionEffect;
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.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author emerald000 & L_J
*/
public final class MoggToady extends CardImpl {
public MoggToady(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.power = new MageInt(2);
this.toughness = new MageInt(2);
// Mogg Toady can't attack unless you control more creatures than defending player.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MoggToadyCantAttackEffect()));
-
+
// Mogg Toady can't block unless you control more creatures than attacking player.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MoggToadyCantBlockEffect()));
}
@@ -64,24 +63,25 @@ class MoggToadyCantAttackEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
UUID defendingPlayerId;
Player defender = game.getPlayer(defenderId);
if (defender == null) {
Permanent permanent = game.getPermanent(defenderId);
if (permanent != null) {
defendingPlayerId = permanent.getControllerId();
- }
- else {
+ } else {
return false;
}
- }
- else {
+ } else {
defendingPlayerId = defenderId;
}
if (defendingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), defendingPlayerId, game);
- }
- else {
+ } else {
return true;
}
}
@@ -110,6 +110,9 @@ class MoggToadyCantBlockEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
UUID attackingPlayerId = attacker.getControllerId();
if (attackingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), attackingPlayerId, game);
diff --git a/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java b/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java
index 5fdcecb14f..77b4378ae4 100644
--- a/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java
+++ b/Mage.Sets/src/mage/cards/m/MoldgrafScavenger.java
@@ -1,12 +1,13 @@
-
package mage.cards.m;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -15,13 +16,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class MoldgrafScavenger extends CardImpl {
public MoldgrafScavenger(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.FUNGUS);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
@@ -30,7 +30,8 @@ public final class MoldgrafScavenger extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield),
DeliriumCondition.instance,
- "Delirium — {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard")));
+ "Delirium — {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard"))
+ .addHint(DeliriumHint.instance));
}
public MoldgrafScavenger(final MoldgrafScavenger card) {
diff --git a/Mage.Sets/src/mage/cards/m/MonstrousHound.java b/Mage.Sets/src/mage/cards/m/MonstrousHound.java
index 06dc331a67..c89875a1ac 100644
--- a/Mage.Sets/src/mage/cards/m/MonstrousHound.java
+++ b/Mage.Sets/src/mage/cards/m/MonstrousHound.java
@@ -1,24 +1,24 @@
package mage.cards.m;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.RestrictionEffect;
-import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author jeffwadsworth
*/
public final class MonstrousHound extends CardImpl {
@@ -71,6 +71,10 @@ class CantAttackUnlessControllerControlsMoreLandsEffect extends RestrictionEffec
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
UUID defendingPlayerId;
Player defender = game.getPlayer(defenderId);
if (defender == null) {
@@ -115,6 +119,9 @@ class CantBlockUnlessControllerControlsMoreLandsEffect extends RestrictionEffect
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
UUID attackingPlayerId = attacker.getControllerId();
if (attackingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledLandPermanent(),
diff --git a/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java b/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java
index b0bf0de8ee..3c5936be5f 100644
--- a/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java
+++ b/Mage.Sets/src/mage/cards/m/MoorlandDrifter.java
@@ -1,12 +1,13 @@
-
package mage.cards.m;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -15,20 +16,19 @@ import mage.constants.SubType;
import mage.constants.Zone;
/**
- *
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public final class MoorlandDrifter extends CardImpl {
public MoorlandDrifter(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Delirium — Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard.
- ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), DeliriumCondition.instance, "Delirium — Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard.");
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
+ ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), DeliriumCondition.instance, "Delirium — Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard.");
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DeliriumHint.instance));
}
public MoorlandDrifter(final MoorlandDrifter card) {
diff --git a/Mage.Sets/src/mage/cards/m/Mournwillow.java b/Mage.Sets/src/mage/cards/m/Mournwillow.java
index 5a1fe7ec50..a75563af3e 100644
--- a/Mage.Sets/src/mage/cards/m/Mournwillow.java
+++ b/Mage.Sets/src/mage/cards/m/Mournwillow.java
@@ -1,13 +1,14 @@
-
package mage.cards.m;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.RestrictionEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,13 +19,12 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
/**
- *
* @author fireshoes
*/
public final class Mournwillow extends CardImpl {
public Mournwillow(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}");
this.subtype.add(SubType.PLANT);
this.subtype.add(SubType.SKELETON);
this.power = new MageInt(3);
@@ -39,7 +39,8 @@ public final class Mournwillow extends CardImpl {
new EntersBattlefieldTriggeredAbility(new MournwillowEffect(), false),
DeliriumCondition.instance,
"Delirium — When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, "
- + "creatures with power 2 or less can't block this turn.");
+ + "creatures with power 2 or less can't block this turn.");
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/n/NehebTheEternal.java b/Mage.Sets/src/mage/cards/n/NehebTheEternal.java
index 58bd4f5e39..c56200a21f 100644
--- a/Mage.Sets/src/mage/cards/n/NehebTheEternal.java
+++ b/Mage.Sets/src/mage/cards/n/NehebTheEternal.java
@@ -1,7 +1,5 @@
-
package mage.cards.n;
-import java.util.UUID;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
@@ -18,8 +16,9 @@ import mage.constants.TargetController;
import mage.game.Game;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author spjspj
*/
public final class NehebTheEternal extends CardImpl {
@@ -74,7 +73,7 @@ class NehebTheEternalManaEffect extends ManaEffect {
@Override
public Mana produceMana(boolean netMana, Game game, Ability source) {
- return Mana.RedMana(new OpponentsLostLifeCount().calculate(game, source, this));
+ return Mana.RedMana(OpponentsLostLifeCount.instance.calculate(game, source, this));
}
@Override
diff --git a/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java b/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java
index 2edac2bd3e..d7ddf06f57 100644
--- a/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java
+++ b/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java
@@ -1,7 +1,7 @@
-
package mage.cards.o;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@@ -9,6 +9,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -18,13 +19,12 @@ import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
/**
- *
* @author fireshoes
*/
public final class ObsessiveSkinner extends CardImpl {
public ObsessiveSkinner(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(1);
@@ -43,6 +43,7 @@ public final class ObsessiveSkinner extends CardImpl {
"Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "put a +1/+1 counter on target creature.");
ability.addTarget(new TargetCreaturePermanent());
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java b/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java
index 4a41c8e08d..4d57054223 100644
--- a/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java
+++ b/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java
@@ -1,13 +1,12 @@
-
-
package mage.cards.o;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.hint.ConditionHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -16,8 +15,9 @@ import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
@@ -25,12 +25,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
public final class OpalLakeGatekeepers extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
+
static {
filter.add(new SubtypePredicate(SubType.GATE));
}
- public OpalLakeGatekeepers (UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
+ private static final Condition gatesCondition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
+
+ public OpalLakeGatekeepers(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.VEDALKEN);
this.subtype.add(SubType.SOLDIER);
@@ -40,11 +43,12 @@ public final class OpalLakeGatekeepers extends CardImpl {
// When Opal Lake Gatekeepers enters the battlefield, if you control two or more Gates, you may draw a card.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)),
- new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
- "When Opal Lake Gatekeepers enters the battlefield, if you control two or more Gates, you may draw a card."));
+ gatesCondition,
+ "When Opal Lake Gatekeepers enters the battlefield, if you control two or more Gates, you may draw a card.")
+ .addHint(new ConditionHint(gatesCondition, "You control two or more Gates")));
}
- public OpalLakeGatekeepers (final OpalLakeGatekeepers card) {
+ public OpalLakeGatekeepers(final OpalLakeGatekeepers card) {
super(card);
}
diff --git a/Mage.Sets/src/mage/cards/o/OrazcaRelic.java b/Mage.Sets/src/mage/cards/o/OrazcaRelic.java
index 51bc961bfc..0d80cf5df3 100644
--- a/Mage.Sets/src/mage/cards/o/OrazcaRelic.java
+++ b/Mage.Sets/src/mage/cards/o/OrazcaRelic.java
@@ -1,7 +1,5 @@
-
package mage.cards.o;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
@@ -9,6 +7,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
@@ -16,8 +15,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class OrazcaRelic extends CardImpl {
@@ -37,7 +37,8 @@ public final class OrazcaRelic extends CardImpl {
new TapSourceCost(),
CitysBlessingCondition.instance);
ability.addCost(new SacrificeSourceCost());
- ability.addEffect(new DrawCardSourceControllerEffect(1).setText("and draw a card"));
+ ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and"));
+ ability.addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/o/Outnumber.java b/Mage.Sets/src/mage/cards/o/Outnumber.java
index 0fe1e20ed0..dd6d2d3d42 100644
--- a/Mage.Sets/src/mage/cards/o/Outnumber.java
+++ b/Mage.Sets/src/mage/cards/o/Outnumber.java
@@ -1,30 +1,31 @@
-
package mage.cards.o;
-import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class Outnumber extends CardImpl {
public Outnumber(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
// Outnumber deals damage to target creature equal to the number of creatures you control.
Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control")));
effect.setText("{this} deals damage to target creature equal to the number of creatures you control");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
}
diff --git a/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java b/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java
index 323c43f20a..a0714ac140 100644
--- a/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java
+++ b/Mage.Sets/src/mage/cards/o/OviyaPashiriSageLifecrafter.java
@@ -1,7 +1,5 @@
-
package mage.cards.o;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@@ -9,21 +7,19 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-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.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.OviyaPashiriSageLifecrafterToken;
import mage.game.permanent.token.ServoToken;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class OviyaPashiriSageLifecrafter extends CardImpl {
@@ -43,6 +39,7 @@ public final class OviyaPashiriSageLifecrafter extends CardImpl {
// {4}{G}, {T}: Create an X/X colorless Construct artifact creature token, where X is the number of creatures you control.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new OviyaPashiriSageLifecrafterEffect(), new ManaCostsImpl("{4}{G}"));
ability.addCost(new TapSourceCost());
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java b/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java
index 6b549cd5c3..642055e2e5 100644
--- a/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java
+++ b/Mage.Sets/src/mage/cards/p/ParanoidParishBlade.java
@@ -1,7 +1,7 @@
-
package mage.cards.p;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,26 +19,26 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class ParanoidParishBlade extends CardImpl {
public ParanoidParishBlade(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Delirium — Paranoid Parish-Blade gets +1/+0 and has first strike as long as there are four or more card types among cards in your graveyard.
- ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield),
+ ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield),
DeliriumCondition.instance, "Delirium — {this} gets +1/+0 ");
effect.setText("Delirium — {this} gets +1/+0");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
- effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
+ effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "and has first strike as long as there are four or more card types among cards in your graveyard.");
ability.addEffect(effect);
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/p/PennonBlade.java b/Mage.Sets/src/mage/cards/p/PennonBlade.java
index d4ba43508b..7dc4018141 100644
--- a/Mage.Sets/src/mage/cards/p/PennonBlade.java
+++ b/Mage.Sets/src/mage/cards/p/PennonBlade.java
@@ -1,7 +1,5 @@
-
package mage.cards.p;
-import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@@ -10,23 +8,27 @@ import mage.abilities.keyword.EquipAbility;
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.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author North
*/
public final class PennonBlade extends CardImpl {
public PennonBlade(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
+ super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
this.subtype.add(SubType.EQUIPMENT);
- PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
+ // Equipped creature gets +1/+1 for each creature you control.
+ PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)));
+
+ // Equip {4}
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(4)));
}
diff --git a/Mage.Sets/src/mage/cards/p/PickTheBrain.java b/Mage.Sets/src/mage/cards/p/PickTheBrain.java
index 461cbb5277..4edb943d41 100644
--- a/Mage.Sets/src/mage/cards/p/PickTheBrain.java
+++ b/Mage.Sets/src/mage/cards/p/PickTheBrain.java
@@ -1,11 +1,12 @@
-
package mage.cards.p;
import java.util.UUID;
+
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -19,7 +20,6 @@ import mage.target.TargetCard;
import mage.target.common.TargetOpponent;
/**
- *
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public final class PickTheBrain extends CardImpl {
@@ -31,6 +31,7 @@ public final class PickTheBrain extends CardImpl {
// Delirium — If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles their library.
this.getSpellAbility().addEffect(new PickTheBrainEffect());
this.getSpellAbility().addTarget(new TargetOpponent());
+ this.getSpellAbility().addHint(DeliriumHint.instance);
}
public PickTheBrain(final PickTheBrain card) {
diff --git a/Mage.Sets/src/mage/cards/p/PlazaOfHarmony.java b/Mage.Sets/src/mage/cards/p/PlazaOfHarmony.java
index d88d7c0981..4a452918e6 100644
--- a/Mage.Sets/src/mage/cards/p/PlazaOfHarmony.java
+++ b/Mage.Sets/src/mage/cards/p/PlazaOfHarmony.java
@@ -5,6 +5,7 @@ import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.ConditionHint;
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
@@ -42,7 +43,7 @@ public final class PlazaOfHarmony extends CardImpl {
new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)),
condition, "When {this} enters the battlefield, " +
"if you control two or more Gates, you gain 3 life."
- ));
+ ).addHint(new ConditionHint(condition, "You control two or more Gates")));
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
diff --git a/Mage.Sets/src/mage/cards/p/PrideOfConquerors.java b/Mage.Sets/src/mage/cards/p/PrideOfConquerors.java
index ae0e67a2e4..00b7eefb38 100644
--- a/Mage.Sets/src/mage/cards/p/PrideOfConquerors.java
+++ b/Mage.Sets/src/mage/cards/p/PrideOfConquerors.java
@@ -1,18 +1,18 @@
-
package mage.cards.p;
-import java.util.UUID;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.keyword.AscendEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class PrideOfConquerors extends CardImpl {
@@ -27,6 +27,7 @@ public final class PrideOfConquerors extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn),
new BoostControlledEffect(1, 1, Duration.EndOfTurn), CitysBlessingCondition.instance,
"Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead"));
+ this.getSpellAbility().addHint(CitysBlessingHint.instance);
}
public PrideOfConquerors(final PrideOfConquerors card) {
diff --git a/Mage.Sets/src/mage/cards/p/Pteramander.java b/Mage.Sets/src/mage/cards/p/Pteramander.java
index 0c5777a0d4..6a98bcf192 100644
--- a/Mage.Sets/src/mage/cards/p/Pteramander.java
+++ b/Mage.Sets/src/mage/cards/p/Pteramander.java
@@ -5,8 +5,11 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.effects.keyword.AdaptEffect;
+import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -23,6 +26,8 @@ import java.util.UUID;
*/
public final class Pteramander extends CardImpl {
+ static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY);
+
public Pteramander(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
@@ -38,7 +43,8 @@ public final class Pteramander extends CardImpl {
// TODO: Make ability properly copiable
Ability ability = new SimpleActivatedAbility(new AdaptEffect(4).setText("Adapt 4. This ability costs {1} less to activate for each instant and sorcery card in your graveyard."), new ManaCostsImpl("{7}{U}"));
this.addAbility(ability);
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new PteramanderCostIncreasingEffect(ability.getOriginalId())));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new PteramanderCostIncreasingEffect(ability.getOriginalId()))
+ .addHint(new ValueHint("Instant and sorcery card in your graveyard", cardsCount)));
}
private Pteramander(final Pteramander card) {
@@ -69,7 +75,8 @@ class PteramanderCostIncreasingEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
- CardUtil.reduceCost(abilityToModify, controller.getGraveyard().count(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game));
+ int count = Pteramander.cardsCount.calculate(game, source, this);
+ CardUtil.reduceCost(abilityToModify, count);
}
return true;
}
diff --git a/Mage.Sets/src/mage/cards/r/RadiantDestiny.java b/Mage.Sets/src/mage/cards/r/RadiantDestiny.java
index f008dc39c4..acfbcefe7b 100644
--- a/Mage.Sets/src/mage/cards/r/RadiantDestiny.java
+++ b/Mage.Sets/src/mage/cards/r/RadiantDestiny.java
@@ -1,7 +1,5 @@
-
package mage.cards.r;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
@@ -11,21 +9,20 @@ import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllOfChosenSubtypeEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.TargetController;
-import mage.constants.Zone;
-import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED;
+import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
+import java.util.UUID;
+
+import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED;
+
/**
- *
* @author LevelX2
*/
public final class RadiantDestiny extends CardImpl {
@@ -52,6 +49,7 @@ public final class RadiantDestiny extends CardImpl {
CitysBlessingCondition.instance,
"As long as you have the city's blessing, they also have vigilance.");
ability.addEffect(effect);
+ ability.addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java b/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java
index 7ada8448d2..37f5452921 100644
--- a/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java
+++ b/Mage.Sets/src/mage/cards/r/RakdosLordOfRiots.java
@@ -1,7 +1,5 @@
-
package mage.cards.r;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
@@ -20,8 +18,9 @@ import mage.game.events.GameEvent.EventType;
import mage.game.stack.Spell;
import mage.util.CardUtil;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class RakdosLordOfRiots extends CardImpl {
@@ -84,9 +83,7 @@ class RakdosLordOfRiotsCantCastEffect extends ContinuousRuleModifyingEffectImpl
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getSourceId().equals(source.getSourceId())) {
- if (new OpponentsLostLifeCount().calculate(game, source, this) == 0) {
- return true;
- }
+ return OpponentsLostLifeCount.instance.calculate(game, source, this) == 0;
}
return false;
}
@@ -107,8 +104,7 @@ class RakdosLordOfRiotsCostReductionEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
Ability spellAbility = abilityToModify;
if (spellAbility != null) {
- OpponentsLostLifeCount dynamicValue = new OpponentsLostLifeCount();
- int amount = dynamicValue.calculate(game, source, this);
+ int amount = OpponentsLostLifeCount.instance.calculate(game, source, this);
if (amount > 0) {
CardUtil.reduceCost(spellAbility, amount);
return true;
diff --git a/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java b/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java
index 9815106ec7..3f1cc81b4e 100644
--- a/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java
+++ b/Mage.Sets/src/mage/cards/r/ReaperOfFlightMoonsilver.java
@@ -1,12 +1,13 @@
-
package mage.cards.r;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -14,11 +15,12 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
+
import mage.target.common.TargetControlledCreaturePermanent;
/**
- *
* @author fireshoes
*/
public final class ReaperOfFlightMoonsilver extends CardImpl {
@@ -39,7 +41,8 @@ public final class ReaperOfFlightMoonsilver extends CardImpl {
new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)),
DeliriumCondition.instance,
"Delirium — Sacrifice another creature: Reaper of Flight Moonsilver gets +2/+1 until end of turn. "
- + "Activate this ability only if there are four or more card types among cards in your graveyard"));
+ + "Activate this ability only if there are four or more card types among cards in your graveyard")
+ .addHint(DeliriumHint.instance));
}
public ReaperOfFlightMoonsilver(final ReaperOfFlightMoonsilver card) {
diff --git a/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java b/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java
index eb2ca73672..5bdb527c89 100644
--- a/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java
+++ b/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java
@@ -1,12 +1,11 @@
-
package mage.cards.r;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@@ -15,8 +14,9 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class ResplendentGriffin extends CardImpl {
@@ -37,7 +37,8 @@ public final class ResplendentGriffin extends CardImpl {
// Whenever Resplendent Griffin attacks, if you have the city's blessing, put a +1/+1 counter on it.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), CitysBlessingCondition.instance,
- "Whenever {this} attacks, if you have the city's blessing, put a +1/+1 counter on it."));
+ "Whenever {this} attacks, if you have the city's blessing, put a +1/+1 counter on it.")
+ .addHint(CitysBlessingHint.instance));
}
public ResplendentGriffin(final ResplendentGriffin card) {
diff --git a/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java b/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java
index cdd12e6bea..56e5849d63 100644
--- a/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java
+++ b/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java
@@ -1,27 +1,30 @@
-
package mage.cards.r;
-import java.util.UUID;
+import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterInstantOrSorceryCard;
+import mage.filter.StaticFilters;
import mage.game.permanent.token.ZombieToken;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class RiseFromTheTides extends CardImpl {
+ private static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY);
+
public RiseFromTheTides(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}");
// Create a tapped 2/2 black Zombie creature token for each instant and sorcery card in your graveyard.
- CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard());
- this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), value, true, false));
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), cardsCount, true, false));
+ this.getSpellAbility().addHint(new ValueHint("Instant and sorcery card in your graveyard", cardsCount));
}
public RiseFromTheTides(final RiseFromTheTides card) {
diff --git a/Mage.Sets/src/mage/cards/r/RoarOfChallenge.java b/Mage.Sets/src/mage/cards/r/RoarOfChallenge.java
index 9ba4eaa3d6..3c7461f8da 100644
--- a/Mage.Sets/src/mage/cards/r/RoarOfChallenge.java
+++ b/Mage.Sets/src/mage/cards/r/RoarOfChallenge.java
@@ -1,12 +1,11 @@
-
package mage.cards.r;
-import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -14,14 +13,15 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class RoarOfChallenge extends CardImpl {
public RoarOfChallenge(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
// All creatures able to block target creature this turn do so.
@@ -32,6 +32,7 @@ public final class RoarOfChallenge extends CardImpl {
new LockedInCondition(FerociousCondition.instance),
" Ferocious — That creature gains indestructible until end of turn if you control a creature with power 4 or greater."));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public RoarOfChallenge(final RoarOfChallenge card) {
diff --git a/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java b/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java
index 865ef2088c..f13de832cd 100644
--- a/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java
+++ b/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@@ -11,25 +9,27 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.StaticFilters;
import mage.game.permanent.token.SaprolingToken;
+import java.util.UUID;
+
/**
- *
* @author LoneFox
- *
*/
public final class SaprolingSymbiosis extends CardImpl {
public SaprolingSymbiosis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
- Effect effect = new CreateTokenEffect(new SaprolingToken(), new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()));
- // You may cast Saproling Symbiosis as though it had flash if you pay {2} more to cast it.
+ Effect effect = new CreateTokenEffect(new SaprolingToken(), new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE));
+
+ // You may cast Saproling Symbiosis as though it had flash if you pay {2} more to cast it. (You may cast it any time you could cast an instant.)
Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}"));
ability.addEffect(effect);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
+
// Create a 1/1 green Saproling creature token for each creature you control.
this.getSpellAbility().addEffect(effect);
}
diff --git a/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java
index 0d7f4450b6..2105f70749 100644
--- a/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java
+++ b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java
@@ -1,13 +1,12 @@
-
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.hint.ConditionHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -16,8 +15,9 @@ import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
@@ -25,12 +25,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
public final class SaruliGatekeepers extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
+
static {
filter.add(new SubtypePredicate(SubType.GATE));
}
- public SaruliGatekeepers (UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
+ private static final Condition gatesCondition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
+
+ public SaruliGatekeepers(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
@@ -40,11 +43,12 @@ public final class SaruliGatekeepers extends CardImpl {
// When Saruli Gatekeepers enters the battlefield, if you control two or more Gates, gain 7 life.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new GainLifeEffect(7)),
- new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
- "When {this} enters the battlefield, if you control two or more Gates, gain 7 life."));
+ gatesCondition,
+ "When {this} enters the battlefield, if you control two or more Gates, gain 7 life.")
+ .addHint(new ConditionHint(gatesCondition, "You control two or more Gates")));
}
- public SaruliGatekeepers (final SaruliGatekeepers card) {
+ public SaruliGatekeepers(final SaruliGatekeepers card) {
super(card);
}
diff --git a/Mage.Sets/src/mage/cards/s/SavagePunch.java b/Mage.Sets/src/mage/cards/s/SavagePunch.java
index a2132158fe..44ecf46579 100644
--- a/Mage.Sets/src/mage/cards/s/SavagePunch.java
+++ b/Mage.Sets/src/mage/cards/s/SavagePunch.java
@@ -1,13 +1,12 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -19,8 +18,9 @@ import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SavagePunch extends CardImpl {
@@ -40,6 +40,7 @@ public final class SavagePunch extends CardImpl {
new LockedInCondition(FerociousCondition.instance),
"Ferocious — The creature you control gets +2/+2 until end of turn before it fights if you control a creature with power 4 or greater");
this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addHint(FerociousHint.instance);
// Target creature you control fights target creature you don't control.
effect = new FightTargetsEffect();
diff --git a/Mage.Sets/src/mage/cards/s/ScourTheLaboratory.java b/Mage.Sets/src/mage/cards/s/ScourTheLaboratory.java
index 184a09f0ae..4b52a814ce 100644
--- a/Mage.Sets/src/mage/cards/s/ScourTheLaboratory.java
+++ b/Mage.Sets/src/mage/cards/s/ScourTheLaboratory.java
@@ -1,12 +1,13 @@
-
package mage.cards.s;
import java.util.UUID;
+
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
@@ -14,18 +15,18 @@ import mage.constants.CardType;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class ScourTheLaboratory extends CardImpl {
public ScourTheLaboratory(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{U}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{U}{U}");
// Delirium — Scour the Laboratory costs {2} less to cast if there are four or more card types among cards in your graveyard.
Ability ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(2, DeliriumCondition.instance));
ability.setRuleAtTheTop(true);
ability.setAbilityWord(AbilityWord.DELIRIUM);
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
// Draw three cards.
diff --git a/Mage.Sets/src/mage/cards/s/ScourgeWolf.java b/Mage.Sets/src/mage/cards/s/ScourgeWolf.java
index bb9df75099..be99ccbd46 100644
--- a/Mage.Sets/src/mage/cards/s/ScourgeWolf.java
+++ b/Mage.Sets/src/mage/cards/s/ScourgeWolf.java
@@ -1,12 +1,13 @@
-
package mage.cards.s;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
@@ -17,13 +18,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class ScourgeWolf extends CardImpl {
public ScourgeWolf(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{R}");
this.subtype.add(SubType.WOLF);
this.subtype.add(SubType.HORROR);
this.power = new MageInt(2);
@@ -35,7 +35,7 @@ public final class ScourgeWolf extends CardImpl {
// Delirium — Scourge Wolf has double strike as long as there are four or more card types among cards in your graveyard.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "Delirium — {this} has double strike as long as there are four or more card types among cards in your graveyard.");
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DeliriumHint.instance));
}
public ScourgeWolf(final ScourgeWolf card) {
diff --git a/Mage.Sets/src/mage/cards/s/SecretsOfTheGoldenCity.java b/Mage.Sets/src/mage/cards/s/SecretsOfTheGoldenCity.java
index 03e1500255..705800cd94 100644
--- a/Mage.Sets/src/mage/cards/s/SecretsOfTheGoldenCity.java
+++ b/Mage.Sets/src/mage/cards/s/SecretsOfTheGoldenCity.java
@@ -1,17 +1,17 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.keyword.AscendEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SecretsOfTheGoldenCity extends CardImpl {
@@ -28,6 +28,7 @@ public final class SecretsOfTheGoldenCity extends CardImpl {
new DrawCardSourceControllerEffect(2),
CitysBlessingCondition.instance,
"Draw two cards. If you have the city's blessing, draw three cards instead"));
+ this.getSpellAbility().addHint(CitysBlessingHint.instance);
}
public SecretsOfTheGoldenCity(final SecretsOfTheGoldenCity card) {
diff --git a/Mage.Sets/src/mage/cards/s/SeeTheUnwritten.java b/Mage.Sets/src/mage/cards/s/SeeTheUnwritten.java
index a56e262ad4..5b993df82d 100644
--- a/Mage.Sets/src/mage/cards/s/SeeTheUnwritten.java
+++ b/Mage.Sets/src/mage/cards/s/SeeTheUnwritten.java
@@ -1,12 +1,11 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.OneShotEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
@@ -19,8 +18,9 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SeeTheUnwritten extends CardImpl {
@@ -35,7 +35,8 @@ public final class SeeTheUnwritten extends CardImpl {
new SeeTheUnwrittenEffect(2),
new InvertCondition(FerociousCondition.instance),
"Reveal the top eight cards of your library. You may put a creature card from among them onto the battlefield. Put the rest into your graveyard."
- + " Ferocious — If you control a creature with power 4 or greater, you may put two creature cards onto the battlefield instead of one"));
+ + " Ferocious — If you control a creature with power 4 or greater, you may put two creature cards onto the battlefield instead of one"));
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public SeeTheUnwritten(final SeeTheUnwritten card) {
diff --git a/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java b/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java
index ba526a9688..1aaa733038 100644
--- a/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java
+++ b/Mage.Sets/src/mage/cards/s/SeraphOfTheMasses.java
@@ -1,31 +1,28 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.ConvokeAbility;
import mage.abilities.keyword.FlyingAbility;
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.common.FilterControlledCreaturePermanent;
+
+import java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class SeraphOfTheMasses extends CardImpl {
- private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
-
public SeraphOfTheMasses(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}");
this.subtype.add(SubType.ANGEL);
this.power = new MageInt(0);
@@ -36,9 +33,8 @@ public final class SeraphOfTheMasses extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Seraph of the Masses's power and toughness are each equal to the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame)));
-
-
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame))
+ .addHint(CreaturesYouControlHint.instance));
}
public SeraphOfTheMasses(final SeraphOfTheMasses card) {
diff --git a/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java b/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java
index 2b3916e3f6..2acd43e060 100644
--- a/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java
+++ b/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect;
@@ -11,11 +9,13 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
+import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class ShamanicRevelation extends CardImpl {
@@ -27,17 +27,16 @@ public final class ShamanicRevelation extends CardImpl {
}
public ShamanicRevelation(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// Draw a card for each creature you control.
- this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())));
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)));
// Ferocious — You gain 4 life for each creature you control with power 4 or greater.
DynamicValue amount = new PermanentsOnBattlefieldCount(filter, 4);
Effect effect = new GainLifeEffect(amount);
effect.setText(" Ferocious — You gain 4 life for each creature you control with power 4 or greater.");
this.getSpellAbility().addEffect(effect);
-
}
public ShamanicRevelation(final ShamanicRevelation card) {
diff --git a/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java b/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java
index fc8c6cfb44..7439718122 100644
--- a/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java
+++ b/Mage.Sets/src/mage/cards/s/ShieldOfTheAvatar.java
@@ -1,39 +1,35 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.PreventionEffectImpl;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
public final class ShieldOfTheAvatar extends CardImpl {
public ShieldOfTheAvatar(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
+ super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
this.subtype.add(SubType.EQUIPMENT);
// If a source would deal damage to equipped creature, prevent X of that damage, where X is the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ShieldOfTheAvatarPreventionEffect()));
-
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ShieldOfTheAvatarPreventionEffect())
+ .addHint(CreaturesYouControlHint.instance));
+
// Equip {2}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
}
@@ -49,9 +45,7 @@ public final class ShieldOfTheAvatar extends CardImpl {
}
class ShieldOfTheAvatarPreventionEffect extends PreventionEffectImpl {
-
- private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
-
+
ShieldOfTheAvatarPreventionEffect() {
super(Duration.WhileOnBattlefield);
this.staticText = "If a source would deal damage to equipped creature, prevent X of that damage, where X is the number of creatures you control.";
@@ -76,14 +70,13 @@ class ShieldOfTheAvatarPreventionEffect extends PreventionEffectImpl {
boolean result = false;
Permanent equipment = game.getPermanent(source.getSourceId());
if (equipment != null && equipment.getAttachedTo() != null) {
- int numberOfCreaturesControlled = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
+ int numberOfCreaturesControlled = CreaturesYouControlCount.instance.calculate(game, source, this);
int toPrevent = Math.min(numberOfCreaturesControlled, event.getAmount());
GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, equipment.getAttachedTo(), source.getSourceId(), source.getControllerId(), toPrevent, false);
if (!game.replaceEvent(preventEvent)) {
if (event.getAmount() >= toPrevent) {
event.setAmount(event.getAmount() - toPrevent);
- }
- else {
+ } else {
event.setAmount(0);
result = true;
}
@@ -101,10 +94,8 @@ class ShieldOfTheAvatarPreventionEffect extends PreventionEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
if (super.applies(event, source, game)) {
Permanent equipment = game.getPermanent(source.getSourceId());
- if (equipment != null && equipment.getAttachedTo() != null
- && event.getTargetId().equals(equipment.getAttachedTo())) {
- return true;
- }
+ return equipment != null && equipment.getAttachedTo() != null
+ && event.getTargetId().equals(equipment.getAttachedTo());
}
return false;
}
diff --git a/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java b/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java
index 7e767a16c2..63853758b8 100644
--- a/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java
+++ b/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -13,19 +11,15 @@ import mage.abilities.keyword.PartnerAbility;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.ComparisonType;
-import mage.constants.Duration;
-import mage.constants.SuperType;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SidarKondoOfJamuraa extends CardImpl {
@@ -92,9 +86,12 @@ class SidarKondoOfJamuraaCantBlockCreaturesSourceEffect extends RestrictionEffec
}
return game.getOpponents(source.getControllerId()).contains(permanent.getControllerId());
}
-
+
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return !filter.match(attacker, source.getSourceId(), source.getControllerId(), game);
}
diff --git a/Mage.Sets/src/mage/cards/s/SithLord.java b/Mage.Sets/src/mage/cards/s/SithLord.java
index 0334ca86df..9b5b76c118 100644
--- a/Mage.Sets/src/mage/cards/s/SithLord.java
+++ b/Mage.Sets/src/mage/cards/s/SithLord.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
@@ -11,14 +9,15 @@ import mage.abilities.keyword.MenaceAbility;
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.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author Styxo
*/
public final class SithLord extends CardImpl {
@@ -26,7 +25,7 @@ public final class SithLord extends CardImpl {
private static final String rule = "with X +1/+1 counters on it, where X is the total life lost by your opponents this turn";
public SithLord(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SITH);
this.power = new MageInt(2);
@@ -62,7 +61,7 @@ public final class SithLord extends CardImpl {
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanentEntering(source.getSourceId());
if (permanent != null) {
- int oll = new OpponentsLostLifeCount().calculate(game, source, this);
+ int oll = OpponentsLostLifeCount.instance.calculate(game, source, this);
if (oll > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(oll), source, game);
}
@@ -76,5 +75,5 @@ public final class SithLord extends CardImpl {
return new SithLordEffect(this);
}
}
-
+
}
diff --git a/Mage.Sets/src/mage/cards/s/SkymarcherAspirant.java b/Mage.Sets/src/mage/cards/s/SkymarcherAspirant.java
index 94095c759b..0293180fb4 100644
--- a/Mage.Sets/src/mage/cards/s/SkymarcherAspirant.java
+++ b/Mage.Sets/src/mage/cards/s/SkymarcherAspirant.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-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.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@@ -18,8 +17,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SkymarcherAspirant extends CardImpl {
@@ -39,7 +39,7 @@ public final class SkymarcherAspirant extends CardImpl {
ContinuousEffect boostSource = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance,
"{this} has flying as long as you have the city's blessing");
- Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java b/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java
index 3476f5f56f..b7a860089c 100644
--- a/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java
+++ b/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -13,6 +11,7 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
@@ -22,8 +21,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SlipperyScoundrel extends CardImpl {
@@ -48,6 +48,7 @@ public final class SlipperyScoundrel extends CardImpl {
Effect effect2 = new ConditionalRestrictionEffect(restrictionEffect, CitysBlessingCondition.instance)
.setText("and can't be blocked");
ability.addEffect(effect2);
+ ability.addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java b/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java
index e607e3faf6..dcf97b4eb7 100644
--- a/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java
+++ b/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java
@@ -1,16 +1,15 @@
-
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
+import mage.abilities.hint.ConditionHint;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -22,8 +21,9 @@ import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
@@ -32,13 +32,16 @@ public final class SmeltWardGatekeepers extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
private static final FilterCreaturePermanent targetFilter = new FilterCreaturePermanent("creature an opponent controls");
+
static {
filter.add(new SubtypePredicate(SubType.GATE));
targetFilter.add(new ControllerPredicate(TargetController.OPPONENT));
}
- public SmeltWardGatekeepers (UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
+ private static final Condition gatesCondition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
+
+ public SmeltWardGatekeepers(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
@@ -48,16 +51,17 @@ public final class SmeltWardGatekeepers extends CardImpl {
// When Smelt-Ward Gatekeepers enters the battlefield, if you control two or more Gates, gain control of target creature an opponent controls until end of turn. Untap that creature. That creature gains haste until end of turn.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn)),
- new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
+ gatesCondition,
"When {this} enters the battlefield, if you control two or more Gates, gain control of target creature an opponent controls until end of turn. Untap that creature. That creature gains haste until end of turn.");
ability.addEffect(new UntapTargetEffect());
ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
Target target = new TargetCreaturePermanent(targetFilter);
ability.addTarget(target);
+ ability.addHint(new ConditionHint(gatesCondition, "You control two or more Gates"));
this.addAbility(ability);
}
- public SmeltWardGatekeepers (final SmeltWardGatekeepers card) {
+ public SmeltWardGatekeepers(final SmeltWardGatekeepers card) {
super(card);
}
diff --git a/Mage.Sets/src/mage/cards/s/SnubhornSentry.java b/Mage.Sets/src/mage/cards/s/SnubhornSentry.java
index c573af3009..07dbb91cd0 100644
--- a/Mage.Sets/src/mage/cards/s/SnubhornSentry.java
+++ b/Mage.Sets/src/mage/cards/s/SnubhornSentry.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-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.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -17,8 +16,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SnubhornSentry extends CardImpl {
@@ -37,7 +37,7 @@ public final class SnubhornSentry extends CardImpl {
ContinuousEffect boostSource = new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance,
"{this} gets +3/+0 as long as you have the city's blessing");
- Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/SoulSwallower.java b/Mage.Sets/src/mage/cards/s/SoulSwallower.java
index db981fbebb..d6ea2417b5 100644
--- a/Mage.Sets/src/mage/cards/s/SoulSwallower.java
+++ b/Mage.Sets/src/mage/cards/s/SoulSwallower.java
@@ -1,12 +1,13 @@
-
package mage.cards.s;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -17,13 +18,12 @@ import mage.constants.Zone;
import mage.counters.CounterType;
/**
- *
* @author fireshoes
*/
public final class SoulSwallower extends CardImpl {
public SoulSwallower(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.subtype.add(SubType.WURM);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
@@ -36,7 +36,8 @@ public final class SoulSwallower extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), TargetController.YOU, false),
DeliriumCondition.instance,
"Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, "
- + "put three +1/+1 counters on Soul Swallower."));
+ + "put three +1/+1 counters on Soul Swallower.")
+ .addHint(DeliriumHint.instance));
}
public SoulSwallower(final SoulSwallower card) {
diff --git a/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java b/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java
index 6265728549..30c73c3ec6 100644
--- a/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java
+++ b/Mage.Sets/src/mage/cards/s/SoulsurgeElemental.java
@@ -1,29 +1,28 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
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 mage.filter.common.FilterControlledCreaturePermanent;
+
+import java.util.UUID;
/**
- *
* @author Loki
*/
public final class SoulsurgeElemental extends CardImpl {
public SoulsurgeElemental(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(0);
@@ -33,8 +32,9 @@ public final class SoulsurgeElemental extends CardImpl {
this.addAbility(FirstStrikeAbility.getInstance());
// Soulsurge Elemental's power is equal to the number of creatures you control.
- Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creatures you control")), Duration.EndOfGame);
- this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
+ Effect effect = new SetPowerSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame);
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, effect)
+ .addHint(CreaturesYouControlHint.instance));
}
public SoulsurgeElemental(final SoulsurgeElemental card) {
diff --git a/Mage.Sets/src/mage/cards/s/SpireWinder.java b/Mage.Sets/src/mage/cards/s/SpireWinder.java
index bf4965e077..e885d58acd 100644
--- a/Mage.Sets/src/mage/cards/s/SpireWinder.java
+++ b/Mage.Sets/src/mage/cards/s/SpireWinder.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-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.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@@ -18,8 +17,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class SpireWinder extends CardImpl {
@@ -41,7 +41,7 @@ public final class SpireWinder extends CardImpl {
ContinuousEffect boostSource = new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance,
"{this} gets +1/+1 as long as you have the city's blessing");
- Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/SpitfireHandler.java b/Mage.Sets/src/mage/cards/s/SpitfireHandler.java
index 6d4872d74f..b4190b637f 100644
--- a/Mage.Sets/src/mage/cards/s/SpitfireHandler.java
+++ b/Mage.Sets/src/mage/cards/s/SpitfireHandler.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@@ -9,18 +7,15 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
-import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.ColoredManaSymbol;
-import mage.constants.Duration;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author TheElk801
*/
public final class SpitfireHandler extends CardImpl {
@@ -67,6 +62,9 @@ class SpitfireHandlerCantBlockEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return (blocker.getPower().getValue() >= attacker.getPower().getValue());
}
diff --git a/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java b/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java
index fa8c460e58..cfc569df6f 100644
--- a/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java
+++ b/Mage.Sets/src/mage/cards/s/StallionOfAshmouth.java
@@ -1,12 +1,13 @@
-
package mage.cards.s;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -15,13 +16,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author fireshoes
*/
public final class StallionOfAshmouth extends CardImpl {
public StallionOfAshmouth(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.NIGHTMARE);
this.subtype.add(SubType.HORSE);
this.power = new MageInt(3);
@@ -29,7 +29,12 @@ public final class StallionOfAshmouth extends CardImpl {
// Delirium — {1}{B}: Stallion of Ashmouth gets +1/+1 until end of turn. Activate this ability only if there are
// four or more card types among cards in your graveyard.
- this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"), DeliriumCondition.instance));
+ this.addAbility(new ConditionalActivatedAbility(
+ Zone.BATTLEFIELD,
+ new BoostSourceEffect(1, 1, Duration.EndOfTurn),
+ new ManaCostsImpl("{1}{B}"),
+ DeliriumCondition.instance)
+ .addHint(DeliriumHint.instance));
}
public StallionOfAshmouth(final StallionOfAshmouth card) {
diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java
index bfcb93d8e4..fae7b70ebb 100644
--- a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java
+++ b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java
@@ -1,7 +1,5 @@
-
package mage.cards.s;
-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.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
@@ -18,8 +17,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class StormFleetSwashbuckler extends CardImpl {
@@ -39,7 +39,7 @@ public final class StormFleetSwashbuckler extends CardImpl {
ContinuousEffect boostSource = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance,
"{this} has double strike as long as you have the city's blessing");
- Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java b/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java
index e635930915..d348784e50 100644
--- a/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java
+++ b/Mage.Sets/src/mage/cards/s/StrangeAugmentation.java
@@ -1,13 +1,14 @@
-
package mage.cards.s;
import java.util.UUID;
+
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -19,13 +20,12 @@ import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
- *
* @author LevelX2
*/
public final class StrangeAugmentation extends CardImpl {
public StrangeAugmentation(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}");
this.subtype.add(SubType.AURA);
// Enchant creature
@@ -40,7 +40,8 @@ public final class StrangeAugmentation extends CardImpl {
// Delirium &mdash Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(2, 2), DeliriumCondition.instance,
- "Delirium — Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard.")));
+ "Delirium — Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard."))
+ .addHint(DeliriumHint.instance));
}
public StrangeAugmentation(final StrangeAugmentation card) {
diff --git a/Mage.Sets/src/mage/cards/s/StubbornDenial.java b/Mage.Sets/src/mage/cards/s/StubbornDenial.java
index 7b4d2c1f40..8ae807c321 100644
--- a/Mage.Sets/src/mage/cards/s/StubbornDenial.java
+++ b/Mage.Sets/src/mage/cards/s/StubbornDenial.java
@@ -1,13 +1,12 @@
-
package mage.cards.s;
-import java.util.UUID;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -16,31 +15,35 @@ import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.TargetSpell;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
public final class StubbornDenial extends CardImpl {
-
+
private static final FilterSpell filter = new FilterSpell("noncreature spell");
+
static {
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
}
-
+
public StubbornDenial(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Counter target noncreature spell unless its controller pays {1}.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new CounterUnlessPaysEffect(new GenericManaCost(1)),
new InvertCondition(FerociousCondition.instance),
"Counter target noncreature spell unless its controller pays {1}."));
+
// Ferocious — If you control a creature with power 4 or greater, counter that spell instead.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new CounterTargetEffect(),
FerociousCondition.instance,
" Ferocious &mdash If you control a creature with power 4 or greater, counter that spell instead"));
this.getSpellAbility().addTarget(new TargetSpell(filter));
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public StubbornDenial(final StubbornDenial card) {
diff --git a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java
index 2817418444..08eb558a54 100644
--- a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java
+++ b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java
@@ -1,12 +1,12 @@
-
-
package mage.cards.s;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.ConditionHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -19,7 +19,6 @@ import mage.game.permanent.token.KnightToken;
import java.util.UUID;
/**
- *
* @author LevelX2
*/
@@ -27,12 +26,15 @@ import java.util.UUID;
public final class SunspireGatekeepers extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
+
static {
filter.add(new SubtypePredicate(SubType.GATE));
}
- public SunspireGatekeepers (UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
+ private static final Condition gatesCondition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
+
+ public SunspireGatekeepers(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
@@ -42,11 +44,12 @@ public final class SunspireGatekeepers extends CardImpl {
// When Sunspire Gatekeepers enter the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())),
- new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
- "When {this} enters the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance."));
+ gatesCondition,
+ "When {this} enters the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.")
+ .addHint(new ConditionHint(gatesCondition, "you control two or more Gates")));
}
- public SunspireGatekeepers (final SunspireGatekeepers card) {
+ public SunspireGatekeepers(final SunspireGatekeepers card) {
super(card);
}
diff --git a/Mage.Sets/src/mage/cards/t/TeferisMoat.java b/Mage.Sets/src/mage/cards/t/TeferisMoat.java
index 0b80baa251..c163287dc1 100644
--- a/Mage.Sets/src/mage/cards/t/TeferisMoat.java
+++ b/Mage.Sets/src/mage/cards/t/TeferisMoat.java
@@ -1,7 +1,5 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
@@ -18,16 +16,17 @@ import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author Markedagain
*/
public final class TeferisMoat extends CardImpl {
public TeferisMoat(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{U}");
-
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{U}");
+
// As Teferi's Moat enters the battlefield, choose a color.
this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral)));
// Creatures of the chosen color without flying can't attack you.
@@ -46,15 +45,15 @@ public final class TeferisMoat extends CardImpl {
class TeferisMoatRestrictionEffect extends RestrictionEffect {
- TeferisMoatRestrictionEffect(){
+ TeferisMoatRestrictionEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "Creatures of the chosen color without flying can't attack you";
}
-
+
TeferisMoatRestrictionEffect(final TeferisMoatRestrictionEffect effect) {
super(effect);
}
-
+
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
ObjectColor chosenColor = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color");
@@ -63,12 +62,15 @@ class TeferisMoatRestrictionEffect extends RestrictionEffect {
permanent.getColor(game).shares(chosenColor) &&
permanent.isCreature();
}
-
+
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
return !defenderId.equals(source.getControllerId());
}
-
+
@Override
public TeferisMoatRestrictionEffect copy() {
return new TeferisMoatRestrictionEffect(this);
diff --git a/Mage.Sets/src/mage/cards/t/TemurBattleRage.java b/Mage.Sets/src/mage/cards/t/TemurBattleRage.java
index cd51ad863e..1ec9a35e8a 100644
--- a/Mage.Sets/src/mage/cards/t/TemurBattleRage.java
+++ b/Mage.Sets/src/mage/cards/t/TemurBattleRage.java
@@ -1,11 +1,10 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@@ -14,27 +13,28 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author jeffwadsworth
*/
public final class TemurBattleRage extends CardImpl {
-
+
private final static String rule = " Ferocious — That creature also gains trample until end of turn if you control a creature with power 4 or greater";
public TemurBattleRage(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Target creature gains double strike until end of turn.
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
-
+
// Ferocious That creature also gains trample until end of turn if you control a creature with power 4 or greater.
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(
new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn),
new LockedInCondition(FerociousCondition.instance),
rule));
-
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public TemurBattleRage(final TemurBattleRage card) {
diff --git a/Mage.Sets/src/mage/cards/t/TendershootDryad.java b/Mage.Sets/src/mage/cards/t/TendershootDryad.java
index 44e27ae9d1..455bd92a12 100644
--- a/Mage.Sets/src/mage/cards/t/TendershootDryad.java
+++ b/Mage.Sets/src/mage/cards/t/TendershootDryad.java
@@ -1,7 +1,5 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,21 +7,19 @@ import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.SubType;
-import mage.constants.TargetController;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.permanent.token.SaprolingToken;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class TendershootDryad extends CardImpl {
@@ -55,8 +51,8 @@ public final class TendershootDryad extends CardImpl {
new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, filter),
CitysBlessingCondition.instance,
"Saprolings you control get +2/+2 as long as you have the city's blessing."
- )
- ));
+ ))
+ .addHint(CitysBlessingHint.instance));
}
public TendershootDryad(final TendershootDryad card) {
diff --git a/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java b/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java
index d5d2c42ad5..e7a0d49026 100644
--- a/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java
+++ b/Mage.Sets/src/mage/cards/t/ThrabenFoulbloods.java
@@ -1,7 +1,7 @@
-
package mage.cards.t;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone;
/**
- *
* @author LevelX2
*/
public final class ThrabenFoulbloods extends CardImpl {
public ThrabenFoulbloods(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.ZOMBIE);
this.subtype.add(SubType.HOUND);
this.power = new MageInt(3);
@@ -35,6 +35,7 @@ public final class ThrabenFoulbloods extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility()), DeliriumCondition.instance,
"and has menace as long as there are four or more card types among cards in your graveyard. (A creature with menace can't be blocked except by two or more creatures.)"));
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java b/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java
index a9082d7749..4da45717a2 100644
--- a/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java
+++ b/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java
@@ -1,7 +1,5 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
@@ -15,22 +13,20 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ExileTargetEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
-import mage.constants.CardType;
-import mage.constants.Outcome;
-import mage.constants.SubType;
-import mage.constants.TargetController;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.token.TilonallisSummonerElementalToken;
import mage.players.Player;
import mage.target.targetpointer.FixedTargets;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class TilonallisSummoner extends CardImpl {
@@ -47,7 +43,7 @@ public final class TilonallisSummoner extends CardImpl {
this.addAbility(new AscendAbility());
// Whenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 red Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.
- this.addAbility(new AttacksTriggeredAbility(new TilonallisSummonerEffect(), false));
+ this.addAbility(new AttacksTriggeredAbility(new TilonallisSummonerEffect(), false).addHint(CitysBlessingHint.instance));
}
public TilonallisSummoner(final TilonallisSummoner card) {
diff --git a/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java b/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java
index dcc7ad3574..19281b2448 100644
--- a/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java
+++ b/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java
@@ -1,7 +1,5 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.condition.common.CitysBlessingCondition;
@@ -10,6 +8,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -17,8 +16,9 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class TimestreamNavigator extends CardImpl {
@@ -42,6 +42,7 @@ public final class TimestreamNavigator extends CardImpl {
CitysBlessingCondition.instance);
ability.addCost(new TapSourceCost());
ability.addCost(new PutSourceOnBottomOwnerLibraryCost());
+ ability.addHint(CitysBlessingHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java b/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java
index 2a83a5105e..dc58159593 100644
--- a/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java
+++ b/Mage.Sets/src/mage/cards/t/TishanaVoiceOfThunder.java
@@ -1,7 +1,5 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
@@ -14,15 +12,12 @@ import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Duration;
-import mage.constants.SuperType;
-import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.constants.*;
+import mage.filter.StaticFilters;
+
+import java.util.UUID;
/**
- *
* @author spjspj
*/
public final class TishanaVoiceOfThunder extends CardImpl {
@@ -45,7 +40,7 @@ public final class TishanaVoiceOfThunder extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// When Tishana enters the battlefield, draw a card for each creature you control.
- this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))));
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE))));
}
public TishanaVoiceOfThunder(final TishanaVoiceOfThunder card) {
diff --git a/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java b/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java
index 05004a8cfa..8365b17b83 100644
--- a/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java
+++ b/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java
@@ -1,11 +1,12 @@
-
package mage.cards.t;
import java.util.UUID;
+
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.SacrificeEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -14,7 +15,6 @@ import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
import mage.target.TargetPlayer;
/**
- *
* @author fireshoes
*/
public final class ToTheSlaughter extends CardImpl {
@@ -37,6 +37,7 @@ public final class ToTheSlaughter extends CardImpl {
new SacrificeEffect(StaticFilters.FILTER_PERMANENT_PLANESWALKER, 1, "Target player"),
DeliriumCondition.instance, "and a planeswalker."));
this.getSpellAbility().addTarget(new TargetPlayer());
+ this.getSpellAbility().addHint(DeliriumHint.instance);
}
public ToTheSlaughter(final ToTheSlaughter card) {
diff --git a/Mage.Sets/src/mage/cards/t/ToothCollector.java b/Mage.Sets/src/mage/cards/t/ToothCollector.java
index ff87e8bff2..f96313eabb 100644
--- a/Mage.Sets/src/mage/cards/t/ToothCollector.java
+++ b/Mage.Sets/src/mage/cards/t/ToothCollector.java
@@ -1,7 +1,7 @@
-
package mage.cards.t;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@@ -9,6 +9,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -26,7 +27,6 @@ import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
/**
- *
* @author fireshoes
*/
public final class ToothCollector extends CardImpl {
@@ -38,7 +38,7 @@ public final class ToothCollector extends CardImpl {
}
public ToothCollector(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.ROGUE);
this.power = new MageInt(3);
@@ -56,6 +56,7 @@ public final class ToothCollector extends CardImpl {
DeliriumCondition.instance,
"Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "target creature that player controls gets -1/-1 until end of turn.");
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/t/Topplegeist.java b/Mage.Sets/src/mage/cards/t/Topplegeist.java
index daf722048d..4cbff55fb4 100644
--- a/Mage.Sets/src/mage/cards/t/Topplegeist.java
+++ b/Mage.Sets/src/mage/cards/t/Topplegeist.java
@@ -1,7 +1,7 @@
-
package mage.cards.t;
import java.util.UUID;
+
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@@ -9,6 +9,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.TapTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -26,7 +27,6 @@ import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
/**
- *
* @author fireshoes
*/
public final class Topplegeist extends CardImpl {
@@ -38,7 +38,7 @@ public final class Topplegeist extends CardImpl {
}
public Topplegeist(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
@@ -58,6 +58,7 @@ public final class Topplegeist extends CardImpl {
DeliriumCondition.instance,
"Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "tap target creature that player controls.");
+ ability.addHint(DeliriumHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java b/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java
index 06864b369a..33285349e6 100644
--- a/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java
+++ b/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java
@@ -1,10 +1,10 @@
-
package mage.cards.t;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -17,7 +17,6 @@ import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
- *
* @author fireshoes
*/
public final class TraverseTheUlvenwald extends CardImpl {
@@ -29,7 +28,7 @@ public final class TraverseTheUlvenwald extends CardImpl {
}
public TraverseTheUlvenwald(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
// Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
@@ -44,6 +43,7 @@ public final class TraverseTheUlvenwald extends CardImpl {
DeliriumCondition.instance,
" Delirium — If there are four or more card types among cards in your graveyard, instead search your library for a creature or land card, "
+ "reveal it, put it into your hand, then shuffle your library."));
+ this.getSpellAbility().addHint(DeliriumHint.instance);
}
public TraverseTheUlvenwald(final TraverseTheUlvenwald card) {
diff --git a/Mage.Sets/src/mage/cards/t/TwilightProphet.java b/Mage.Sets/src/mage/cards/t/TwilightProphet.java
index cced90fe5d..1d09e42beb 100644
--- a/Mage.Sets/src/mage/cards/t/TwilightProphet.java
+++ b/Mage.Sets/src/mage/cards/t/TwilightProphet.java
@@ -1,7 +1,5 @@
-
package mage.cards.t;
-import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -10,22 +8,20 @@ import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
-import mage.constants.CardType;
-import mage.constants.Outcome;
-import mage.constants.SubType;
-import mage.constants.TargetController;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.game.Game;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class TwilightProphet extends CardImpl {
@@ -49,7 +45,8 @@ public final class TwilightProphet extends CardImpl {
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(
new TwilightProphetEffect(), TargetController.YOU, false), CitysBlessingCondition.instance,
"At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand."
- + "Each opponent loses X life and you gain X life, where X is that card's converted mana cost."));
+ + "Each opponent loses X life and you gain X life, where X is that card's converted mana cost.")
+ .addHint(CitysBlessingHint.instance));
}
diff --git a/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java b/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java
index 7dcfd6782f..fe7e7d09ab 100644
--- a/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java
+++ b/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java
@@ -1,13 +1,13 @@
-
package mage.cards.u;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.hint.ConditionHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
@@ -18,8 +18,9 @@ import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class UbulSarGatekeepers extends CardImpl {
@@ -32,8 +33,10 @@ public final class UbulSarGatekeepers extends CardImpl {
targetFilter.add(new ControllerPredicate(TargetController.OPPONENT));
}
+ private static final Condition gatesCondition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
+
public UbulSarGatekeepers(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.SOLDIER);
@@ -43,10 +46,11 @@ public final class UbulSarGatekeepers extends CardImpl {
// Whenever Ubul Sar Gatekeepers enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)),
- new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
+ gatesCondition,
"Whenever {this} enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn.");
Target target = new TargetCreaturePermanent(targetFilter);
ability.addTarget(target);
+ ability.addHint(new ConditionHint(gatesCondition, "You control two or more Gates"));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/u/UndercitysEmbrace.java b/Mage.Sets/src/mage/cards/u/UndercitysEmbrace.java
index f1b575cbd9..9e74e52157 100644
--- a/Mage.Sets/src/mage/cards/u/UndercitysEmbrace.java
+++ b/Mage.Sets/src/mage/cards/u/UndercitysEmbrace.java
@@ -4,6 +4,7 @@ import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.SacrificeEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -29,6 +30,7 @@ public final class UndercitysEmbrace extends CardImpl {
new GainLifeEffect(4), FerociousCondition.instance,
"If you control a creature with power 4 or greater, you gain 4 life."
));
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
private UndercitysEmbrace(final UndercitysEmbrace card) {
diff --git a/Mage.Sets/src/mage/cards/v/VeteranWarleader.java b/Mage.Sets/src/mage/cards/v/VeteranWarleader.java
index 829f2ff652..84944b2fa0 100644
--- a/Mage.Sets/src/mage/cards/v/VeteranWarleader.java
+++ b/Mage.Sets/src/mage/cards/v/VeteranWarleader.java
@@ -1,20 +1,17 @@
-
package mage.cards.v;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapTargetCost;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
@@ -23,7 +20,6 @@ import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.*;
-import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
@@ -33,8 +29,11 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class VeteranWarleader extends CardImpl {
@@ -57,7 +56,8 @@ public final class VeteranWarleader extends CardImpl {
// Veteran Warleader's power and toughness are each equal to the number of creatures you control.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(
- new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
+ CreaturesYouControlCount.instance, Duration.EndOfGame))
+ .addHint(CreaturesYouControlHint.instance));
// Tap another untapped Ally you control: Veteran Warleader gains your choice of first strike, vigilance, or trample until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java
index 08b9cd0334..a3ec477ec0 100644
--- a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java
+++ b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java
@@ -1,4 +1,3 @@
-
package mage.cards.v;
import mage.MageInt;
@@ -7,6 +6,7 @@ import mage.abilities.common.SpellCastOpponentTriggeredAbility;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.meta.OrTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -19,7 +19,6 @@ import mage.game.permanent.token.VoiceOfResurgenceToken;
import java.util.UUID;
/**
- *
* @author jeffwadsworth
*/
public final class VoiceOfResurgence extends CardImpl {
@@ -39,6 +38,7 @@ public final class VoiceOfResurgence extends CardImpl {
"Whenever an opponent casts a spell during your turn, "),
new DiesTriggeredAbility(null, false));
ability.setLeavesTheBattlefieldTrigger(true);
+ ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/v/VonasHunger.java b/Mage.Sets/src/mage/cards/v/VonasHunger.java
index 07e06bb034..3d4c435349 100644
--- a/Mage.Sets/src/mage/cards/v/VonasHunger.java
+++ b/Mage.Sets/src/mage/cards/v/VonasHunger.java
@@ -1,9 +1,5 @@
-
package mage.cards.v;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.CitysBlessingCondition;
@@ -11,6 +7,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.SacrificeOpponentsEffect;
import mage.abilities.effects.keyword.AscendEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -21,8 +18,11 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class VonasHunger extends CardImpl {
@@ -43,6 +43,7 @@ public final class VonasHunger extends CardImpl {
new VonasHungerEffect(),
CitysBlessingCondition.instance,
"If you have the city's blessing, instead each opponent sacrifices half the creatures he or she controls rounded up"));
+ this.getSpellAbility().addHint(CitysBlessingHint.instance);
}
public VonasHunger(final VonasHunger card) {
diff --git a/Mage.Sets/src/mage/cards/w/WayfaringTemple.java b/Mage.Sets/src/mage/cards/w/WayfaringTemple.java
index 77fc984065..ea77f210e9 100644
--- a/Mage.Sets/src/mage/cards/w/WayfaringTemple.java
+++ b/Mage.Sets/src/mage/cards/w/WayfaringTemple.java
@@ -1,37 +1,36 @@
-
-
package mage.cards.w;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.PopulateEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
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.common.FilterControlledCreaturePermanent;
+
+import java.util.UUID;
/**
- *
* @author LevelX2
*/
public final class WayfaringTemple extends CardImpl {
public WayfaringTemple(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Wayfaring Temple's power and toughness are each equal to the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame))
+ .addHint(CreaturesYouControlHint.instance));
// Whenever Wayfaring Temple deals combat damage to a player, populate. (Create a token that's a copy of a creature token you control.)
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new PopulateEffect(), false));
diff --git a/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java b/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java
index f26adf2969..d73baa3b7c 100644
--- a/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java
+++ b/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java
@@ -1,12 +1,11 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.effects.common.combat.CantAttackBlockUnlessConditionSourceEffect;
import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect;
+import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -15,8 +14,9 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class WaywardSwordtooth extends CardImpl {
@@ -36,8 +36,9 @@ public final class WaywardSwordtooth extends CardImpl {
new PlayAdditionalLandsControllerEffect(1, Duration.WhileOnBattlefield)));
// Wayward Sawtooth can't attack or block unless you have the city's blessing.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessConditionSourceEffect(CitysBlessingCondition.instance)));
-
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessConditionSourceEffect(CitysBlessingCondition.instance))
+ .addHint(CitysBlessingHint.instance)
+ );
}
public WaywardSwordtooth(final WaywardSwordtooth card) {
diff --git a/Mage.Sets/src/mage/cards/w/WebOfInertia.java b/Mage.Sets/src/mage/cards/w/WebOfInertia.java
index 6739e5cf82..47a384bf8f 100644
--- a/Mage.Sets/src/mage/cards/w/WebOfInertia.java
+++ b/Mage.Sets/src/mage/cards/w/WebOfInertia.java
@@ -1,7 +1,5 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
@@ -12,18 +10,15 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.RestrictionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.TargetController;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
+import java.util.UUID;
+
/**
- *
* @author Styxo
*/
public final class WebOfInertia extends CardImpl {
@@ -110,6 +105,9 @@ class WebOfInertiaRestrictionEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
return !defenderId.equals(source.getControllerId());
}
diff --git a/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java b/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java
index 183b957665..64d5b69701 100644
--- a/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java
+++ b/Mage.Sets/src/mage/cards/w/WestvaleCultLeader.java
@@ -1,31 +1,24 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.SubType;
-import mage.constants.Duration;
-import mage.constants.TargetController;
-import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.constants.*;
import mage.game.permanent.token.HumanClericToken;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public final class WestvaleCultLeader extends CardImpl {
- final private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
-
public WestvaleCultLeader(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.HUMAN);
@@ -38,7 +31,8 @@ public final class WestvaleCultLeader extends CardImpl {
this.nightCard = true;
// Westvale Cult Leader's power and toughness are each equal to the number of creatures you control.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield)));
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.WhileOnBattlefield))
+ .addHint(CreaturesYouControlHint.instance));
// At the beginning of your end step, create a 1/1 white and black Human Cleric creature token.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new CreateTokenEffect(new HumanClericToken()), TargetController.YOU, false));
diff --git a/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java b/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java
index b0191ab4b1..e461dc01ec 100644
--- a/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java
+++ b/Mage.Sets/src/mage/cards/w/WhispererOfTheWilds.java
@@ -1,13 +1,12 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.mana.BasicManaEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.abilities.mana.ActivateIfConditionManaAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
@@ -17,14 +16,15 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class WhispererOfTheWilds extends CardImpl {
public WhispererOfTheWilds(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(0);
@@ -36,6 +36,7 @@ public final class WhispererOfTheWilds extends CardImpl {
// Ferocious - {T}: Add {G}{G}. Activate this ability only if you control a creature with power 4 or greater.
Ability ability = new ActivateIfConditionManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(2)), new TapSourceCost(), FerociousCondition.instance);
ability.setAbilityWord(AbilityWord.FEROCIOUS);
+ ability.addHint(FerociousHint.instance);
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/w/WhispersOfEmrakul.java b/Mage.Sets/src/mage/cards/w/WhispersOfEmrakul.java
index b59ced4419..235e325f95 100644
--- a/Mage.Sets/src/mage/cards/w/WhispersOfEmrakul.java
+++ b/Mage.Sets/src/mage/cards/w/WhispersOfEmrakul.java
@@ -1,24 +1,24 @@
-
package mage.cards.w;
import java.util.UUID;
+
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
+import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetOpponent;
/**
- *
* @author fireshoes
*/
public final class WhispersOfEmrakul extends CardImpl {
public WhispersOfEmrakul(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Target opponent discards a card at random.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
@@ -32,6 +32,7 @@ public final class WhispersOfEmrakul extends CardImpl {
DeliriumCondition.instance,
" Delirium — If there are four or more card types among cards in your graveyard, that player discards two cards at random instead"));
this.getSpellAbility().addTarget(new TargetOpponent());
+ this.getSpellAbility().addHint(DeliriumHint.instance);
}
public WhispersOfEmrakul(final WhispersOfEmrakul card) {
diff --git a/Mage.Sets/src/mage/cards/w/WildSlash.java b/Mage.Sets/src/mage/cards/w/WildSlash.java
index 6917455ff6..f02f96a0bf 100644
--- a/Mage.Sets/src/mage/cards/w/WildSlash.java
+++ b/Mage.Sets/src/mage/cards/w/WildSlash.java
@@ -1,33 +1,34 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
import mage.abilities.effects.ContinuousRuleModifyingEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.DamageCantBePreventedEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetAnyTarget;
+import java.util.UUID;
+
/**
- *
* @author jeffwadsworth
*/
public final class WildSlash extends CardImpl {
public WildSlash(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
// Ferocious If you control a creature with power 4 or greater, damage can't be prevented this turn.
ContinuousRuleModifyingEffect effect = new DamageCantBePreventedEffect(Duration.EndOfTurn, "damage can't be prevented this turn", false, false);
effect.setText("Ferocious — If you control a creature with power 4 or greater, damage can't be prevented this turn. ");
this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect(effect,
new LockedInCondition(FerociousCondition.instance)));
+ this.getSpellAbility().addHint(FerociousHint.instance);
// Wild Slash deals 2 damage to any target.
this.getSpellAbility().addEffect(new DamageTargetEffect(2));
diff --git a/Mage.Sets/src/mage/cards/w/WindsOfQalSisma.java b/Mage.Sets/src/mage/cards/w/WindsOfQalSisma.java
index 324891ba4f..715c7de787 100644
--- a/Mage.Sets/src/mage/cards/w/WindsOfQalSisma.java
+++ b/Mage.Sets/src/mage/cards/w/WindsOfQalSisma.java
@@ -1,12 +1,11 @@
-
package mage.cards.w;
-import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalReplacementEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
+import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -15,8 +14,9 @@ import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class WindsOfQalSisma extends CardImpl {
@@ -28,7 +28,7 @@ public final class WindsOfQalSisma extends CardImpl {
}
public WindsOfQalSisma(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Prevent all combat damage that would be dealt this turn.
// Ferocious - If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control.
@@ -37,8 +37,9 @@ public final class WindsOfQalSisma extends CardImpl {
new LockedInCondition(FerociousCondition.instance),
new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
effect.setText("Prevent all combat damage that would be dealt this turn. " +
- "Ferocious — If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control");
+ "Ferocious — If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control");
this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addHint(FerociousHint.instance);
}
public WindsOfQalSisma(final WindsOfQalSisma card) {
diff --git a/Mage.Sets/src/mage/cards/x/XantchaSleeperAgent.java b/Mage.Sets/src/mage/cards/x/XantchaSleeperAgent.java
index 560d3acf92..f10a1339a4 100644
--- a/Mage.Sets/src/mage/cards/x/XantchaSleeperAgent.java
+++ b/Mage.Sets/src/mage/cards/x/XantchaSleeperAgent.java
@@ -138,6 +138,10 @@ class XantchaSleeperAgentAttackRestrictionEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
boolean allowAttack = true;
UUID ownerPlayerId = source.getSourcePermanentIfItStillExists(game).getOwnerId();
diff --git a/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java b/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java
index e09453a139..a19ee5c37e 100644
--- a/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java
+++ b/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java
@@ -1,26 +1,19 @@
-
package mage.cards.x;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
+import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
-import mage.constants.CardType;
-import mage.constants.Outcome;
-import mage.constants.SubType;
-import mage.constants.SuperType;
-import mage.constants.Zone;
+import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates;
@@ -30,8 +23,11 @@ import mage.game.permanent.token.XenagosSatyrToken;
import mage.players.Player;
import mage.target.TargetCard;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
public final class XenagosTheReveler extends CardImpl {
@@ -44,7 +40,8 @@ public final class XenagosTheReveler extends CardImpl {
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));
// +1: Add X mana in any combination of {R} and/or {G}, where X is the number of creatures you control.
- this.addAbility(new LoyaltyAbility(new XenagosManaEffect(), +1));
+ this.addAbility(new LoyaltyAbility(new XenagosManaEffect(), +1)
+ .addHint(CreaturesYouControlHint.instance));
// 0: Create a 2/2 red and green Satyr creature token with haste.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new XenagosSatyrToken()), 0));
diff --git a/Mage/src/main/java/mage/abilities/Ability.java b/Mage/src/main/java/mage/abilities/Ability.java
index e28354a1ba..386f8d56c7 100644
--- a/Mage/src/main/java/mage/abilities/Ability.java
+++ b/Mage/src/main/java/mage/abilities/Ability.java
@@ -8,6 +8,7 @@ import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects;
+import mage.abilities.hint.Hint;
import mage.constants.AbilityType;
import mage.constants.AbilityWord;
import mage.constants.EffectType;
@@ -525,4 +526,8 @@ public interface Ability extends Controllable, Serializable {
CostAdjuster getCostAdjuster();
void adjustCosts(Game game);
+
+ List getHints();
+
+ Ability addHint(Hint hint);
}
diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java
index 7a3053a126..b652c76fe7 100644
--- a/Mage/src/main/java/mage/abilities/AbilityImpl.java
+++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java
@@ -12,6 +12,7 @@ import mage.abilities.effects.Effects;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ManaEffect;
import mage.abilities.effects.mana.DynamicManaEffect;
+import mage.abilities.hint.Hint;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.Card;
import mage.cards.SplitCard;
@@ -73,6 +74,7 @@ public abstract class AbilityImpl implements Ability {
protected boolean canFizzle = true;
protected TargetAdjuster targetAdjuster = null;
protected CostAdjuster costAdjuster = null;
+ protected List hints = new ArrayList<>();
public AbilityImpl(AbilityType abilityType, Zone zone) {
this.id = UUID.randomUUID();
@@ -120,6 +122,9 @@ public abstract class AbilityImpl implements Ability {
this.canFizzle = ability.canFizzle;
this.targetAdjuster = ability.targetAdjuster;
this.costAdjuster = ability.costAdjuster;
+ for (Hint hint : ability.getHints()) {
+ this.hints.add(hint.copy());
+ }
}
@Override
@@ -256,7 +261,7 @@ public abstract class AbilityImpl implements Ability {
}
}
if (modes.getAdditionalCost() != null) {
- ((OptionalAdditionalModeSourceCosts) modes.getAdditionalCost()).addOptionalAdditionalModeCosts(this, game);
+ modes.getAdditionalCost().addOptionalAdditionalModeCosts(this, game);
}
// 20130201 - 601.2b
// If the spell has alternative or additional costs that will be paid as it's being cast such
@@ -952,9 +957,7 @@ public abstract class AbilityImpl implements Ability {
} else if (!object.getAbilities().contains(this)) {
// check if it's an ability that is temporary gained to a card
Abilities otherAbilities = game.getState().getAllOtherAbilities(this.getSourceId());
- if (otherAbilities == null || !otherAbilities.contains(this)) {
- return false;
- }
+ return otherAbilities != null && otherAbilities.contains(this);
}
}
return true;
@@ -1243,4 +1246,15 @@ public abstract class AbilityImpl implements Ability {
costAdjuster.adjustCosts(this, game);
}
}
+
+ @Override
+ public List getHints() {
+ return this.hints;
+ }
+
+ @Override
+ public Ability addHint(Hint hint) {
+ this.hints.add(hint);
+ return this;
+ }
}
diff --git a/Mage/src/main/java/mage/abilities/condition/common/DeliriumCondition.java b/Mage/src/main/java/mage/abilities/condition/common/DeliriumCondition.java
index 3d05017d79..370a2a3020 100644
--- a/Mage/src/main/java/mage/abilities/condition/common/DeliriumCondition.java
+++ b/Mage/src/main/java/mage/abilities/condition/common/DeliriumCondition.java
@@ -1,17 +1,11 @@
-
package mage.abilities.condition.common;
-import java.util.EnumSet;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
-import mage.cards.Card;
-import mage.constants.CardType;
+import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
import mage.game.Game;
-import mage.players.Player;
/**
- *
- *
* @author fireshoes
*/
public enum DeliriumCondition implements Condition {
@@ -20,15 +14,7 @@ public enum DeliriumCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
- Player controller = game.getPlayer(source.getControllerId());
- if (controller != null) {
- EnumSet foundCardTypes = EnumSet.noneOf(CardType.class);
- for (Card card : controller.getGraveyard().getCards(game)) {
- foundCardTypes.addAll(card.getCardType());
- }
- return foundCardTypes.size() >= 4;
- }
- return false;
+ return CardTypesInGraveyardCount.instance.calculate(game, source, null) >= 4;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/condition/common/OpponentsLostLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/OpponentsLostLifeCondition.java
new file mode 100644
index 0000000000..84ae6a0376
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/condition/common/OpponentsLostLifeCondition.java
@@ -0,0 +1,24 @@
+package mage.abilities.condition.common;
+
+import mage.abilities.Ability;
+import mage.abilities.condition.Condition;
+import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum OpponentsLostLifeCondition implements Condition {
+
+ instance;
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return OpponentsLostLifeCount.instance.calculate(game, source.getControllerId()) > 0;
+ }
+
+ @Override
+ public String toString() {
+ return "opponents lost life";
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardTypesInGraveyardCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardTypesInGraveyardCount.java
new file mode 100644
index 0000000000..32b2d55318
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardTypesInGraveyardCount.java
@@ -0,0 +1,47 @@
+package mage.abilities.dynamicvalue.common;
+
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.effects.Effect;
+import mage.cards.Card;
+import mage.constants.CardType;
+import mage.game.Game;
+import mage.players.Player;
+
+import java.util.EnumSet;
+
+/**
+ * @author JayDi85
+ */
+public enum CardTypesInGraveyardCount implements DynamicValue {
+
+ instance;
+
+ @Override
+ public int calculate(Game game, Ability sourceAbility, Effect effect) {
+ Player controller = game.getPlayer(sourceAbility.getControllerId());
+ if (controller != null) {
+ EnumSet foundCardTypes = EnumSet.noneOf(CardType.class);
+ for (Card card : controller.getGraveyard().getCards(game)) {
+ foundCardTypes.addAll(card.getCardType());
+ }
+ return foundCardTypes.size();
+ }
+ return 0;
+ }
+
+ @Override
+ public CardTypesInGraveyardCount copy() {
+ return instance;
+ }
+
+ @Override
+ public String toString() {
+ return "1";
+ }
+
+ @Override
+ public String getMessage() {
+ return "the number of opponents you attacked this turn";
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesYouControlCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesYouControlCount.java
new file mode 100644
index 0000000000..16ae508e8f
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CreaturesYouControlCount.java
@@ -0,0 +1,35 @@
+package mage.abilities.dynamicvalue.common;
+
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.effects.Effect;
+import mage.filter.StaticFilters;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum CreaturesYouControlCount implements DynamicValue {
+
+ instance;
+
+ @Override
+ public int calculate(Game game, Ability sourceAbility, Effect effect) {
+ return game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURES, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
+ }
+
+ @Override
+ public CreaturesYouControlCount copy() {
+ return instance;
+ }
+
+ @Override
+ public String toString() {
+ return "X";
+ }
+
+ @Override
+ public String getMessage() {
+ return "creatures you control";
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/GateYouControlCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GateYouControlCount.java
new file mode 100644
index 0000000000..11fe8edcb2
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/GateYouControlCount.java
@@ -0,0 +1,43 @@
+package mage.abilities.dynamicvalue.common;
+
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.effects.Effect;
+import mage.constants.SubType;
+import mage.filter.FilterPermanent;
+import mage.filter.common.FilterControlledPermanent;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum GateYouControlCount implements DynamicValue {
+
+ instance;
+ private static final FilterPermanent filter = new FilterControlledPermanent("Gate you control");
+
+ static {
+ filter.add(new SubtypePredicate(SubType.GATE));
+ }
+
+ @Override
+ public int calculate(Game game, Ability sourceAbility, Effect effect) {
+ return game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
+ }
+
+ @Override
+ public GateYouControlCount copy() {
+ return instance;
+ }
+
+ @Override
+ public String toString() {
+ return "X";
+ }
+
+ @Override
+ public String getMessage() {
+ return "gate you control";
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java
index 0be9fa437a..5a566ef04f 100644
--- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java
+++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/OpponentsLostLifeCount.java
@@ -1,18 +1,19 @@
-
package mage.abilities.dynamicvalue.common;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.game.Game;
import mage.watchers.common.PlayerLostLifeWatcher;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
-public class OpponentsLostLifeCount implements DynamicValue {
+public enum OpponentsLostLifeCount implements DynamicValue {
+
+ instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
@@ -29,7 +30,7 @@ public class OpponentsLostLifeCount implements DynamicValue {
@Override
public OpponentsLostLifeCount copy() {
- return new OpponentsLostLifeCount();
+ return instance;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/effects/RestrictionEffect.java b/Mage/src/main/java/mage/abilities/effects/RestrictionEffect.java
index b1dc7e3a9e..aa8d55f841 100644
--- a/Mage/src/main/java/mage/abilities/effects/RestrictionEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/RestrictionEffect.java
@@ -1,7 +1,5 @@
-
package mage.abilities.effects;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.constants.Duration;
import mage.constants.EffectType;
@@ -9,8 +7,9 @@ import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author BetaSteward_at_googlemail.com
*/
public abstract class RestrictionEffect extends ContinuousEffectImpl {
@@ -39,6 +38,13 @@ public abstract class RestrictionEffect extends ContinuousEffectImpl {
return true;
}
+ /**
+ * @param attacker
+ * @param defenderId id of planeswalker or player to attack, can be empty for general checks
+ * @param source
+ * @param game
+ * @return
+ */
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
return true;
}
@@ -47,6 +53,13 @@ public abstract class RestrictionEffect extends ContinuousEffectImpl {
return true;
}
+ /**
+ * @param attacker can be empty for general checks
+ * @param blocker
+ * @param source
+ * @param game
+ * @return
+ */
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
return true;
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java
index 2e01519ec2..885ac1063c 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java
@@ -1,5 +1,3 @@
-
-
package mage.abilities.effects.common.combat;
import mage.abilities.Ability;
@@ -32,6 +30,9 @@ public class CanBlockOnlyFlyingAttachedEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.getAbilities().contains(FlyingAbility.getInstance());
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java
index b703fc64c5..d843a3f6b7 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CanBlockOnlyFlyingEffect.java
@@ -1,5 +1,3 @@
-
-
package mage.abilities.effects.common.combat;
import mage.abilities.Ability;
@@ -10,7 +8,6 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
/**
- *
* @author LevelX2
*/
@@ -33,6 +30,9 @@ public class CanBlockOnlyFlyingEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.getAbilities().contains(FlyingAbility.getInstance());
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java
index 09e122ede9..3d7bceb932 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackControllerAttachedEffect.java
@@ -1,8 +1,5 @@
-
-
package mage.abilities.effects.common.combat;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.AttachmentType;
@@ -10,9 +7,10 @@ import mage.constants.Duration;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
@@ -34,6 +32,10 @@ public class CantAttackControllerAttachedEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
if (defenderId.equals(source.getControllerId())) {
return false;
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.java
index e813b23e8b..9c1fdd30cc 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackIfDefenderControlsPermanent.java
@@ -1,8 +1,5 @@
-
-
package mage.abilities.effects.common.combat;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
@@ -11,8 +8,9 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author BursegSardaukar
*/
@@ -38,6 +36,10 @@ public class CantAttackIfDefenderControlsPermanent extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
UUID defendingPlayerId;
Player player = game.getPlayer(defenderId);
if (player == null) {
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java
index 91a597aaa2..5f46360b09 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackUnlessDefenderControllsPermanent.java
@@ -1,8 +1,5 @@
-
-
package mage.abilities.effects.common.combat;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
@@ -11,8 +8,9 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import java.util.UUID;
+
/**
- *
* @author LevelX2
*/
@@ -38,6 +36,10 @@ public class CantAttackUnlessDefenderControllsPermanent extends RestrictionEffec
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
UUID defendingPlayerId;
Player player = game.getPlayer(defenderId);
if (player == null) {
@@ -50,10 +52,7 @@ public class CantAttackUnlessDefenderControllsPermanent extends RestrictionEffec
} else {
defendingPlayerId = defenderId;
}
- if (defendingPlayerId != null && game.getBattlefield().countAll(filter, defendingPlayerId, game) == 0) {
- return false;
- }
- return true;
+ return defendingPlayerId == null || game.getBattlefield().countAll(filter, defendingPlayerId, game) != 0;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java
index 1fc2dd1d2a..d5da3b814a 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouAllEffect.java
@@ -1,4 +1,3 @@
-
package mage.abilities.effects.common.combat;
import mage.abilities.Ability;
@@ -13,7 +12,6 @@ import mage.game.permanent.Permanent;
import java.util.UUID;
/**
- *
* @author LevelX2
*/
public class CantAttackYouAllEffect extends RestrictionEffect {
@@ -51,6 +49,9 @@ public class CantAttackYouAllEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
if (alsoPlaneswalker) {
Permanent planeswalker = game.getPermanent(defenderId);
if (planeswalker != null) {
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java
index 7214238747..aa3f911ed8 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouEffect.java
@@ -1,15 +1,14 @@
-
package mage.abilities.effects.common.combat;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author TheElk801
*/
public class CantAttackYouEffect extends RestrictionEffect {
@@ -34,6 +33,9 @@ public class CantAttackYouEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
return !defenderId.equals(source.getControllerId());
}
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.java
index b603326ddf..67c01bacbb 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouOrPlaneswalkerAllEffect.java
@@ -1,7 +1,5 @@
-
package mage.abilities.effects.common.combat;
-import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
@@ -10,8 +8,9 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.util.UUID;
+
/**
- *
* @author fireshoes
*/
public class CantAttackYouOrPlaneswalkerAllEffect extends RestrictionEffect {
@@ -40,6 +39,10 @@ public class CantAttackYouOrPlaneswalkerAllEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
if (defenderId.equals(source.getControllerId())) {
return false;
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java
index d4e7176eeb..63ef028cfe 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java
@@ -1,18 +1,17 @@
-
package mage.abilities.effects.common.combat;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.AttachmentType;
import mage.constants.Duration;
-import static mage.constants.Duration.EndOfTurn;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
+import static mage.constants.Duration.EndOfTurn;
+
/**
- *
* @author North
*/
public class CantBlockAttachedEffect extends RestrictionEffect {
@@ -70,6 +69,9 @@ public class CantBlockAttachedEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return !filter.match(attacker, source.getSourceId(), source.getControllerId(), game);
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java
index 9667983168..10a9518451 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockCreaturesSourceEffect.java
@@ -37,6 +37,9 @@ public class CantBlockCreaturesSourceEffect extends RestrictionEffect {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return !filter.match(attacker, source.getSourceId(), source.getControllerId(), game);
}
diff --git a/Mage/src/main/java/mage/abilities/hint/ConditionHint.java b/Mage/src/main/java/mage/abilities/hint/ConditionHint.java
new file mode 100644
index 0000000000..4df8b1cf59
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/ConditionHint.java
@@ -0,0 +1,59 @@
+package mage.abilities.hint;
+
+import mage.abilities.Ability;
+import mage.abilities.condition.Condition;
+import mage.game.Game;
+
+import java.awt.*;
+
+/**
+ * @author JayDi85
+ */
+public class ConditionHint implements Hint {
+
+ private Condition condition;
+ private String trueText;
+ private Color trueColor;
+ private String falseText;
+ private Color falseColor;
+ private Boolean useIcons;
+
+ public ConditionHint(Condition condition, String textWithIcons) {
+ this(condition, textWithIcons, null, textWithIcons, null, true);
+ }
+
+ public ConditionHint(Condition condition, String trueText, Color trueColor, String falseText, Color falseColor, Boolean useIcons) {
+ this.condition = condition;
+ this.trueText = trueText;
+ this.trueColor = trueColor;
+ this.falseText = falseText;
+ this.falseColor = falseColor;
+ this.useIcons = useIcons;
+ }
+
+ private ConditionHint(final ConditionHint hint) {
+ this.condition = hint.condition;
+ this.trueText = hint.trueText;
+ this.trueColor = hint.trueColor;
+ this.falseText = hint.falseText;
+ this.falseColor = hint.falseColor;
+ this.useIcons = hint.useIcons;
+ }
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ String icon;
+ if (condition.apply(game, ability)) {
+ icon = this.useIcons ? HintUtils.HINT_ICON_GOOD : null;
+ return HintUtils.prepareText(this.trueText, this.trueColor, icon);
+ } else {
+ icon = this.useIcons ? HintUtils.HINT_ICON_BAD : null;
+ return HintUtils.prepareText(this.falseText, this.falseColor, icon);
+ }
+ }
+
+ @Override
+ public Hint copy() {
+ return new ConditionHint(this);
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/Hint.java b/Mage/src/main/java/mage/abilities/hint/Hint.java
new file mode 100644
index 0000000000..71a0ef8cbc
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/Hint.java
@@ -0,0 +1,16 @@
+package mage.abilities.hint;
+
+import mage.abilities.Ability;
+import mage.game.Game;
+
+import java.io.Serializable;
+
+/**
+ * @author JayDi85
+ */
+public interface Hint extends Serializable {
+
+ String getText(Game game, Ability ability);
+
+ Hint copy();
+}
\ No newline at end of file
diff --git a/Mage/src/main/java/mage/abilities/hint/HintUtils.java b/Mage/src/main/java/mage/abilities/hint/HintUtils.java
new file mode 100644
index 0000000000..52ea5f505f
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/HintUtils.java
@@ -0,0 +1,56 @@
+package mage.abilities.hint;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.List;
+
+/**
+ * @author JayDi85
+ */
+public class HintUtils {
+
+ public static final boolean ABILITY_HINTS_ENABLE = true;
+ public static final boolean RESTRICT_HINTS_ENABLE = true;
+
+ // icons changes to real files on client side (see mana icons replacement)
+ public static final String HINT_ICON_GOOD = "ICON_GOOD";
+ public static final String HINT_ICON_BAD = "ICON_BAD";
+ public static final String HINT_ICON_RESTRICT = "ICON_RESTRICT";
+
+ //
+ public static final String HINT_START_MARK = " "; // workaround to find hint text in rules list and shows it in html
+
+ public static String prepareText(String text, Color color) {
+ return prepareText(text, color, null);
+ }
+
+ public static String prepareText(String text, Color color, String icon) {
+ String res;
+
+ // text
+ if (text != null && color != null) {
+ String hex = String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getGreen());
+ res = String.format("%s", hex, text);
+ } else {
+ res = text;
+ }
+
+ // icon
+ if (res != null && icon != null) {
+ res = icon + res;
+ }
+
+ return res;
+ }
+
+ public static void appendHints(List destList, List newHints) {
+ // append only unique hints
+ HashSet used = new HashSet<>();
+ for (String s : newHints) {
+ if (!used.contains(s)) {
+ destList.add(s);
+ used.add(s);
+ }
+ }
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/StaticHint.java b/Mage/src/main/java/mage/abilities/hint/StaticHint.java
new file mode 100644
index 0000000000..848b09ac56
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/StaticHint.java
@@ -0,0 +1,36 @@
+package mage.abilities.hint;
+
+import mage.abilities.Ability;
+import mage.game.Game;
+
+import java.awt.*;
+
+/**
+ * @author JayDi85
+ */
+public class StaticHint implements Hint {
+
+ private String text;
+
+ public StaticHint(String text) {
+ this(text, null);
+ }
+
+ public StaticHint(String text, Color color) {
+ this.text = HintUtils.prepareText(text, color);
+ }
+
+ private StaticHint(final StaticHint hint) {
+ this.text = hint.text;
+ }
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return text;
+ }
+
+ @Override
+ public Hint copy() {
+ return new StaticHint(this);
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/ValueHint.java b/Mage/src/main/java/mage/abilities/hint/ValueHint.java
new file mode 100644
index 0000000000..49c03d7c91
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/ValueHint.java
@@ -0,0 +1,34 @@
+package mage.abilities.hint;
+
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public class ValueHint implements Hint {
+
+ private String name;
+ private DynamicValue value;
+
+ public ValueHint(String name, DynamicValue value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ private ValueHint(final ValueHint hint) {
+ this.name = hint.name;
+ this.value = hint.value.copy();
+ }
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return name + ": " + value.calculate(game, ability, null);
+ }
+
+ @Override
+ public Hint copy() {
+ return new ValueHint(this);
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/common/CitysBlessingHint.java b/Mage/src/main/java/mage/abilities/hint/common/CitysBlessingHint.java
new file mode 100644
index 0000000000..80708eaa51
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/common/CitysBlessingHint.java
@@ -0,0 +1,26 @@
+package mage.abilities.hint.common;
+
+import mage.abilities.Ability;
+import mage.abilities.condition.common.CitysBlessingCondition;
+import mage.abilities.hint.ConditionHint;
+import mage.abilities.hint.Hint;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum CitysBlessingHint implements Hint {
+
+ instance;
+ private static final ConditionHint hint = new ConditionHint(CitysBlessingCondition.instance, "You have city's blessing");
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return hint.getText(game, ability);
+ }
+
+ @Override
+ public Hint copy() {
+ return instance;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/common/CreaturesYouControlHint.java b/Mage/src/main/java/mage/abilities/hint/common/CreaturesYouControlHint.java
new file mode 100644
index 0000000000..f596d3c590
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/common/CreaturesYouControlHint.java
@@ -0,0 +1,26 @@
+package mage.abilities.hint.common;
+
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
+import mage.abilities.hint.Hint;
+import mage.abilities.hint.ValueHint;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum CreaturesYouControlHint implements Hint {
+
+ instance;
+ private static final Hint hint = new ValueHint("Creatures you control", CreaturesYouControlCount.instance);
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return hint.getText(game, ability);
+ }
+
+ @Override
+ public Hint copy() {
+ return instance;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/common/DeliriumHint.java b/Mage/src/main/java/mage/abilities/hint/common/DeliriumHint.java
new file mode 100644
index 0000000000..824f4e4597
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/common/DeliriumHint.java
@@ -0,0 +1,27 @@
+package mage.abilities.hint.common;
+
+import mage.abilities.Ability;
+import mage.abilities.condition.common.DeliriumCondition;
+import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
+import mage.abilities.hint.ConditionHint;
+import mage.abilities.hint.Hint;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum DeliriumHint implements Hint {
+
+ instance;
+ private static final ConditionHint hint = new ConditionHint(DeliriumCondition.instance, "4+ card types in your graveyard");
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return hint.getText(game, ability) + " (current: " + CardTypesInGraveyardCount.instance.calculate(game, ability, null) + ")";
+ }
+
+ @Override
+ public Hint copy() {
+ return instance;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/common/FerociousHint.java b/Mage/src/main/java/mage/abilities/hint/common/FerociousHint.java
new file mode 100644
index 0000000000..a934da23e7
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/common/FerociousHint.java
@@ -0,0 +1,26 @@
+package mage.abilities.hint.common;
+
+import mage.abilities.Ability;
+import mage.abilities.condition.common.FerociousCondition;
+import mage.abilities.hint.ConditionHint;
+import mage.abilities.hint.Hint;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum FerociousHint implements Hint {
+
+ instance;
+ private static final ConditionHint hint = new ConditionHint(FerociousCondition.instance, "You control a creature with power 4+");
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return hint.getText(game, ability);
+ }
+
+ @Override
+ public Hint copy() {
+ return instance;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/common/GateYouControlHint.java b/Mage/src/main/java/mage/abilities/hint/common/GateYouControlHint.java
new file mode 100644
index 0000000000..5a2498624a
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/common/GateYouControlHint.java
@@ -0,0 +1,27 @@
+package mage.abilities.hint.common;
+
+import mage.abilities.Ability;
+import mage.abilities.dynamicvalue.common.GateYouControlCount;
+import mage.abilities.hint.Hint;
+import mage.abilities.hint.ValueHint;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum GateYouControlHint implements Hint {
+
+ instance;
+
+ private static final Hint hint = new ValueHint("Gate you control", GateYouControlCount.instance);
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return hint.getText(game, ability);
+ }
+
+ @Override
+ public Hint copy() {
+ return instance;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/hint/common/SpectacleHint.java b/Mage/src/main/java/mage/abilities/hint/common/SpectacleHint.java
new file mode 100644
index 0000000000..81d7d3afa6
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/hint/common/SpectacleHint.java
@@ -0,0 +1,26 @@
+package mage.abilities.hint.common;
+
+import mage.abilities.Ability;
+import mage.abilities.condition.common.OpponentsLostLifeCondition;
+import mage.abilities.hint.ConditionHint;
+import mage.abilities.hint.Hint;
+import mage.game.Game;
+
+/**
+ * @author JayDi85
+ */
+public enum SpectacleHint implements Hint {
+
+ instance;
+ private static final ConditionHint hint = new ConditionHint(OpponentsLostLifeCondition.instance, "Opponents lost life this turn");
+
+ @Override
+ public String getText(Game game, Ability ability) {
+ return hint.getText(game, ability);
+ }
+
+ @Override
+ public Hint copy() {
+ return instance;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java
index 6188b91b59..2f55a16b72 100644
--- a/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java
@@ -1,6 +1,5 @@
package mage.abilities.keyword;
-import java.io.ObjectStreamException;
import mage.abilities.Ability;
import mage.abilities.EvasionAbility;
import mage.abilities.MageSingleton;
@@ -10,6 +9,8 @@ import mage.constants.Duration;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.io.ObjectStreamException;
+
/**
* "Shadow" keyword
*
@@ -60,6 +61,9 @@ class ShadowEffect extends RestrictionEffect implements MageSingleton {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.getAbilities().containsKey(ShadowAbility.getInstance().getId());
}
diff --git a/Mage/src/main/java/mage/abilities/keyword/SpaceflightAbility.java b/Mage/src/main/java/mage/abilities/keyword/SpaceflightAbility.java
index 9a15056e04..d125487fd1 100644
--- a/Mage/src/main/java/mage/abilities/keyword/SpaceflightAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/SpaceflightAbility.java
@@ -1,7 +1,5 @@
-
package mage.abilities.keyword;
-import java.io.ObjectStreamException;
import mage.abilities.Ability;
import mage.abilities.EvasionAbility;
import mage.abilities.MageSingleton;
@@ -10,8 +8,9 @@ import mage.constants.Duration;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import java.io.ObjectStreamException;
+
/**
- *
* @author Styxo
*/
public class SpaceflightAbility extends EvasionAbility implements MageSingleton {
@@ -59,6 +58,9 @@ class SpaceFlightEffect extends RestrictionEffect implements MageSingleton {
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (attacker == null) {
+ return true;
+ }
return attacker.getAbilities().containsKey(SpaceflightAbility.getInstance().getId());
}
diff --git a/Mage/src/main/java/mage/abilities/keyword/SpectacleAbility.java b/Mage/src/main/java/mage/abilities/keyword/SpectacleAbility.java
index 8f3d172b23..5845fdeeb6 100644
--- a/Mage/src/main/java/mage/abilities/keyword/SpectacleAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/SpectacleAbility.java
@@ -1,13 +1,13 @@
-
package mage.abilities.keyword;
import mage.abilities.SpellAbility;
import mage.abilities.costs.mana.ManaCost;
+import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
+import mage.abilities.hint.common.SpectacleHint;
import mage.cards.Card;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.game.Game;
-import mage.watchers.common.PlayerLostLifeWatcher;
import java.util.ArrayList;
import java.util.UUID;
@@ -31,6 +31,7 @@ public class SpectacleAbility extends SpellAbility {
this.setRuleAtTheTop(true);
this.rule = "Spectacle " + spectacleCosts.getText()
+ " (You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn.)";
+ this.addHint(SpectacleHint.instance);
}
public SpectacleAbility(final SpectacleAbility ability) {
@@ -40,8 +41,7 @@ public class SpectacleAbility extends SpellAbility {
@Override
public ActivationStatus canActivate(UUID playerId, Game game) {
- PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
- if (watcher != null && watcher.getAllOppLifeLost(playerId, game) > 0) {
+ if (OpponentsLostLifeCount.instance.calculate(game, playerId) > 0) {
return super.canActivate(playerId, game);
}
return ActivationStatus.getFalse();
diff --git a/Mage/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java
index 9a473048df..23a18ffb6b 100644
--- a/Mage/src/main/java/mage/cards/CardImpl.java
+++ b/Mage/src/main/java/mage/cards/CardImpl.java
@@ -5,6 +5,8 @@ import mage.MageObjectImpl;
import mage.Mana;
import mage.ObjectColor;
import mage.abilities.*;
+import mage.abilities.hint.Hint;
+import mage.abilities.hint.HintUtils;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.repository.PluginClassloaderRegistery;
import mage.constants.*;
@@ -243,6 +245,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
try {
List rules = getRules();
if (game != null) {
+ // debug state
CardState cardState = game.getState().getCardState(objectId);
if (cardState != null) {
for (String data : cardState.getInfo().values()) {
@@ -252,6 +255,27 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
rules.add(ability.getRule());
}
}
+
+ // ability hints
+ List abilityHints = new ArrayList<>();
+ if (HintUtils.ABILITY_HINTS_ENABLE) {
+ for (Ability ability : abilities) {
+ for (Hint hint : ability.getHints()) {
+ String s = hint.getText(game, ability);
+ if (s != null && !s.isEmpty()) {
+ abilityHints.add(s);
+ }
+ }
+ }
+ }
+
+ // restrict hints only for permanents, not cards
+
+ // total hints
+ if (!abilityHints.isEmpty()) {
+ rules.add(HintUtils.HINT_START_MARK);
+ HintUtils.appendHints(rules, abilityHints);
+ }
}
return rules;
} catch (Exception e) {
@@ -486,7 +510,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
}
}
if (lkiObject != null) {
- removed = game.getState().getCommand().remove((CommandObject) lkiObject);
+ removed = game.getState().getCommand().remove(lkiObject);
}
break;
case OUTSIDE:
diff --git a/Mage/src/main/java/mage/game/command/planes/AgyremPlane.java b/Mage/src/main/java/mage/game/command/planes/AgyremPlane.java
index df6166cc6e..69b767cf39 100644
--- a/Mage/src/main/java/mage/game/command/planes/AgyremPlane.java
+++ b/Mage/src/main/java/mage/game/command/planes/AgyremPlane.java
@@ -1,9 +1,5 @@
-
package mage.game.command.planes;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
@@ -33,8 +29,11 @@ import mage.target.Target;
import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.PlanarRollWatcher;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
/**
- *
* @author spjspj
*/
public class AgyremPlane extends Plane {
@@ -152,6 +151,10 @@ class AgyremRestrictionEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
+ if (defenderId == null) {
+ return true;
+ }
+
Plane cPlane = game.getState().getCurrentPlane();
if (cPlane != null && cPlane.getName().equalsIgnoreCase("Plane - Agyrem")) {
return !defenderId.equals(source.getControllerId());
diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java
index 0b646f11dc..5f0fd78e50 100644
--- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java
+++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java
@@ -8,6 +8,8 @@ import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.RestrictionEffect;
+import mage.abilities.hint.Hint;
+import mage.abilities.hint.HintUtils;
import mage.abilities.keyword.*;
import mage.abilities.text.TextPart;
import mage.cards.Card;
@@ -236,17 +238,83 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
public List getRules(Game game) {
try {
List rules = getRules();
+
+ // info
if (info != null) {
for (String data : info.values()) {
rules.add(data);
}
}
+
+ // ability hints
+ List abilityHints = new ArrayList<>();
+ if (HintUtils.ABILITY_HINTS_ENABLE) {
+ for (Ability ability : abilities) {
+ for (Hint hint : ability.getHints()) {
+ String s = hint.getText(game, ability);
+ if (s != null && !s.isEmpty()) {
+ abilityHints.add(s);
+ }
+ }
+ }
+ }
+
+ // restrict hints
+ List restrictHints = new ArrayList<>();
+ if (HintUtils.RESTRICT_HINTS_ENABLE) {
+ for (Map.Entry> entry : game.getContinuousEffects().getApplicableRestrictionEffects(this, game).entrySet()) {
+ for (Ability ability : entry.getValue()) {
+ if (!entry.getKey().applies(this, ability, game)) {
+ continue;
+ }
+
+ if (!entry.getKey().canAttack(game) || !entry.getKey().canAttack(this, null, ability, game)) {
+ restrictHints.add(HintUtils.prepareText("Can't attack" + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_RESTRICT));
+ }
+
+ if (!entry.getKey().canBlock(null, this, ability, game)) {
+ restrictHints.add(HintUtils.prepareText("Can't block" + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_RESTRICT));
+ }
+
+ if (!entry.getKey().canBeUntapped(this, ability, game)) {
+ restrictHints.add(HintUtils.prepareText("Can't untapped" + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_RESTRICT));
+ }
+
+ if (!entry.getKey().canUseActivatedAbilities(this, ability, game)) {
+ restrictHints.add(HintUtils.prepareText("Can't use activated abilities" + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_RESTRICT));
+ }
+
+ if (!entry.getKey().canTransform(this, ability, game)) {
+ restrictHints.add(HintUtils.prepareText("Can't transform" + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_RESTRICT));
+ }
+ }
+ }
+ restrictHints.sort(String::compareTo);
+ }
+
+ // total hints
+ if (!abilityHints.isEmpty() || !restrictHints.isEmpty()) {
+ rules.add(HintUtils.HINT_START_MARK);
+ HintUtils.appendHints(rules, abilityHints);
+ HintUtils.appendHints(rules, restrictHints);
+ }
+
return rules;
} catch (Exception e) {
return rulesError;
}
}
+ private String addSourceObjectName(Game game, Ability ability) {
+ if (ability != null) {
+ MageObject object = game.getObject(ability.getSourceId());
+ if (object != null) {
+ return " (" + object.getIdName() + ")";
+ }
+ }
+ return "";
+ }
+
@Override
public Abilities getAbilities() {
return abilities;
@@ -477,7 +545,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
public boolean phaseIn(Game game, boolean onlyDirect) {
if (!phasedIn) {
if (!replaceEvent(EventType.PHASE_IN, game)
- && ((onlyDirect && !indirectPhase) || (!onlyDirect))) {
+ && (!onlyDirect || !indirectPhase)) {
this.phasedIn = true;
this.indirectPhase = false;
if (!game.isSimulation()) {
@@ -768,7 +836,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
sourceControllerId = ((Card) source).getOwnerId();
} else if (source instanceof CommandObject) {
sourceControllerId = ((CommandObject) source).getControllerId();
- sourceAbilities = ((CommandObject) source).getAbilities();
+ sourceAbilities = source.getAbilities();
} else {
source = null;
}
@@ -969,9 +1037,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
}
// needed to get the correct possible targets if target rule modification effects are active
// e.g. Fiendslayer Paladin tried to target with Ultimate Price
- if (game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(EventType.TARGET, this.getId(), source.getId(), sourceControllerId), null, game, true)) {
- return false;
- }
+ return !game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(EventType.TARGET, this.getId(), source.getId(), sourceControllerId), null, game, true);
}
return true;
diff --git a/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java b/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java
index 94fa0a262b..cf5134219e 100644
--- a/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java
+++ b/Mage/src/main/java/mage/game/permanent/token/VoiceOfResurgenceToken.java
@@ -1,18 +1,15 @@
-
package mage.game.permanent.token;
-import mage.constants.CardType;
-import mage.constants.SubType;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SubType;
import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
/**
- *
* @author spjspj
*/
public final class VoiceOfResurgenceToken extends TokenImpl {
@@ -28,8 +25,9 @@ public final class VoiceOfResurgenceToken extends TokenImpl {
power = new MageInt(0);
toughness = new MageInt(0);
+ // This creature's power and toughness are each equal to the number of creatures you control.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(
- new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
+ CreaturesYouControlCount.instance, Duration.EndOfGame)));
}
public VoiceOfResurgenceToken(final VoiceOfResurgenceToken token) {
diff --git a/Mage/src/main/java/mage/game/stack/StackAbility.java b/Mage/src/main/java/mage/game/stack/StackAbility.java
index 6d1afef06c..909cfb5845 100644
--- a/Mage/src/main/java/mage/game/stack/StackAbility.java
+++ b/Mage/src/main/java/mage/game/stack/StackAbility.java
@@ -13,6 +13,7 @@ import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects;
+import mage.abilities.hint.Hint;
import mage.abilities.text.TextPart;
import mage.cards.Card;
import mage.cards.FrameStyle;
@@ -647,4 +648,15 @@ public class StackAbility extends StackObjImpl implements Ability {
costAdjuster.adjustCosts(this, game);
}
}
+
+ @Override
+ public List getHints() {
+ return this.ability.getHints();
+ }
+
+ @Override
+ public Ability addHint(Hint hint) {
+ // only abilities supports addhint
+ return null;
+ }
}
diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java
index ffd9d3e95c..29a9cac92a 100644
--- a/Mage/src/main/java/mage/players/PlayerImpl.java
+++ b/Mage/src/main/java/mage/players/PlayerImpl.java
@@ -1,9 +1,5 @@
package mage.players;
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.Map.Entry;
import mage.ConditionalMana;
import mage.MageObject;
import mage.MageObjectReference;
@@ -69,6 +65,11 @@ import mage.util.GameLog;
import mage.util.RandomUtil;
import org.apache.log4j.Logger;
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.Map.Entry;
+
public abstract class PlayerImpl implements Player, Serializable {
private static final Logger logger = Logger.getLogger(PlayerImpl.class);
@@ -1422,10 +1423,10 @@ public abstract class PlayerImpl implements Player, Serializable {
!= null
// if anyone sees an issue with this code, please report it. Worked in my testing.
|| game.getContinuousEffects().asThough(object.getId(),
- AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE,
- ability,
- this.getId(),
- game)
+ AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE,
+ ability,
+ this.getId(),
+ game)
!= null) {
if (canUse
|| ability.getAbilityType() == AbilityType.SPECIAL_ACTION) {
@@ -2527,7 +2528,7 @@ public abstract class PlayerImpl implements Player, Serializable {
for (Card card : library.getCards(game)) {
for (Ability ability : card.getAbilities()) {
if (ability.getClass() == WhileSearchingPlayFromLibraryAbility.class) {
- libraryCastableCardTracker.put(card.getId(), card.getName() + " [" + card.getId().toString().substring(0, 3) + "]");
+ libraryCastableCardTracker.put(card.getId(), card.getIdName());
}
}
}
@@ -2636,7 +2637,7 @@ public abstract class PlayerImpl implements Player, Serializable {
/**
* @param game
* @param appliedEffects
- * @param numSides Number of sides the dice has
+ * @param numSides Number of sides the dice has
* @return the number that the player rolled
*/
@Override
@@ -2670,10 +2671,10 @@ public abstract class PlayerImpl implements Player, Serializable {
/**
* @param game
* @param appliedEffects
- * @param numberChaosSides The number of chaos sides the planar die
- * currently has (normally 1 but can be 5)
+ * @param numberChaosSides The number of chaos sides the planar die
+ * currently has (normally 1 but can be 5)
* @param numberPlanarSides The number of chaos sides the planar die
- * currently has (normally 1)
+ * currently has (normally 1)
* @return the outcome that the player rolled. Either ChaosRoll, PlanarRoll
* or NilRoll
*/
@@ -2830,7 +2831,7 @@ public abstract class PlayerImpl implements Player, Serializable {
/**
* @param ability
- * @param available if null, it won't be checked if enough mana is available
+ * @param available if null, it won't be checked if enough mana is available
* @param sourceObject
* @param game
* @return
@@ -3380,7 +3381,7 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean canPaySacrificeCost(Permanent permanent, UUID sourceId,
- UUID controllerId, Game game
+ UUID controllerId, Game game
) {
return sacrificeCostFilter == null || !sacrificeCostFilter.match(permanent, sourceId, controllerId, game);
}
@@ -3528,8 +3529,8 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCards(Card card, Zone toZone,
- Ability source, Game game,
- boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects
+ Ability source, Game game,
+ boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects
) {
Set cardList = new HashSet<>();
if (card != null) {
@@ -3540,22 +3541,22 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCards(Cards cards, Zone toZone,
- Ability source, Game game
+ Ability source, Game game
) {
return moveCards(cards.getCards(game), toZone, source, game);
}
@Override
public boolean moveCards(Set cards, Zone toZone,
- Ability source, Game game
+ Ability source, Game game
) {
return moveCards(cards, toZone, source, game, false, false, false, null);
}
@Override
public boolean moveCards(Set cards, Zone toZone,
- Ability source, Game game,
- boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects
+ Ability source, Game game,
+ boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects
) {
if (cards.isEmpty()) {
return true;
@@ -3641,8 +3642,8 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCardsToExile(Card card, Ability source,
- Game game, boolean withName, UUID exileId,
- String exileZoneName
+ Game game, boolean withName, UUID exileId,
+ String exileZoneName
) {
Set cards = new HashSet<>();
cards.add(card);
@@ -3651,8 +3652,8 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCardsToExile(Set cards, Ability source,
- Game game, boolean withName, UUID exileId,
- String exileZoneName
+ Game game, boolean withName, UUID exileId,
+ String exileZoneName
) {
if (cards.isEmpty()) {
return true;
@@ -3667,14 +3668,14 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCardToHandWithInfo(Card card, UUID sourceId,
- Game game
+ Game game
) {
return this.moveCardToHandWithInfo(card, sourceId, game, true);
}
@Override
public boolean moveCardToHandWithInfo(Card card, UUID sourceId,
- Game game, boolean withName
+ Game game, boolean withName
) {
boolean result = false;
Zone fromZone = game.getState().getZone(card.getId());
@@ -3699,7 +3700,7 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public Set moveCardsToGraveyardWithInfo(Set allCards, Ability source,
- Game game, Zone fromZone
+ Game game, Zone fromZone
) {
UUID sourceId = source == null ? null : source.getSourceId();
Set movedCards = new LinkedHashSet<>();
@@ -3707,7 +3708,7 @@ public abstract class PlayerImpl implements Player, Serializable {
// identify cards from one owner
Cards cards = new CardsImpl();
UUID ownerId = null;
- for (Iterator it = allCards.iterator(); it.hasNext();) {
+ for (Iterator it = allCards.iterator(); it.hasNext(); ) {
Card card = it.next();
if (cards.isEmpty()) {
ownerId = card.getOwnerId();
@@ -3768,7 +3769,7 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCardToGraveyardWithInfo(Card card, UUID sourceId,
- Game game, Zone fromZone
+ Game game, Zone fromZone
) {
if (card == null) {
return false;
@@ -3797,8 +3798,8 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCardToLibraryWithInfo(Card card, UUID sourceId,
- Game game, Zone fromZone,
- boolean toTop, boolean withName
+ Game game, Zone fromZone,
+ boolean toTop, boolean withName
) {
if (card == null) {
return false;
@@ -3832,7 +3833,7 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId,
- Game game, Zone fromZone, boolean withName) {
+ Game game, Zone fromZone, boolean withName) {
if (card == null) {
return false;
}
diff --git a/Mage/src/main/java/mage/util/GameLog.java b/Mage/src/main/java/mage/util/GameLog.java
index a97c1d8988..93c2646088 100644
--- a/Mage/src/main/java/mage/util/GameLog.java
+++ b/Mage/src/main/java/mage/util/GameLog.java
@@ -1,11 +1,9 @@
-
package mage.util;
import mage.MageObject;
import mage.ObjectColor;
/**
- *
* @author LevelX2
*/
public final class GameLog {
@@ -40,11 +38,11 @@ public final class GameLog {
}
public static String getColoredObjectIdName(MageObject mageObject) {
- return "" + mageObject.getName() + " [" + mageObject.getId().toString().substring(0, 3) + "]";
+ return "" + mageObject.getIdName() + "";
}
public static String getColoredObjectIdNameForTooltip(MageObject mageObject) {
- return "" + mageObject.getName() + " [" + mageObject.getId().toString().substring(0, 3) + "]";
+ return "" + mageObject.getIdName() + "";
}
public static String getNeutralColoredText(String text) {
|