Merge pull request #5580 from magefree/5497-dynamic-hints-for-cards

UI: Add dynamic hints for cards
This commit is contained in:
Oleg Agafonov 2019-02-09 14:44:42 +04:00 committed by GitHub
commit c52a3c8a48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
215 changed files with 1840 additions and 1137 deletions

View file

@ -1,14 +1,9 @@
package mage.client.util.gui; 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.MageFrame;
import mage.client.dialog.PreferencesDialog;
import mage.client.table.PlayersChatPanel;
import mage.client.util.GUISizeHelper; import mage.client.util.GUISizeHelper;
import mage.client.table.*;
import mage.constants.*; import mage.constants.*;
import mage.view.CardView; import mage.view.CardView;
import mage.view.CounterView; import mage.view.CounterView;
@ -17,6 +12,13 @@ import org.jdesktop.swingx.JXPanel;
import org.mage.card.arcane.ManaSymbols; import org.mage.card.arcane.ManaSymbols;
import org.mage.card.arcane.UI; 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 { public final class GuiDisplayUtil {
private static final Font cardNameFont = new Font("Calibri", Font.BOLD, 15); private static final Font cardNameFont = new Font("Calibri", Font.BOLD, 15);
@ -30,7 +32,7 @@ public final class GuiDisplayUtil {
} }
public static void restoreDividerLocations(Rectangle bounds, String lastDividerLocation, JComponent component) { public static void restoreDividerLocations(Rectangle bounds, String lastDividerLocation, JComponent component) {
String currentBounds = Double.toString(bounds.getWidth()) + 'x' + Double.toString(bounds.getHeight()); String currentBounds = Double.toString(bounds.getWidth()) + 'x' + bounds.getHeight();
String savedBounds = PreferencesDialog.getCachedValue(KEY_MAGE_PANEL_LAST_SIZE, null); 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 // 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 (savedBounds != null && savedBounds.equals(currentBounds)) {
@ -50,7 +52,7 @@ public final class GuiDisplayUtil {
public static void saveCurrentBoundsToPrefs() { public static void saveCurrentBoundsToPrefs() {
Rectangle rec = MageFrame.getDesktop().getBounds(); Rectangle rec = MageFrame.getDesktop().getBounds();
String currentBounds = Double.toString(rec.getWidth()) + 'x' + Double.toString(rec.getHeight()); String currentBounds = Double.toString(rec.getWidth()) + 'x' + rec.getHeight();
PreferencesDialog.saveValue(KEY_MAGE_PANEL_LAST_SIZE, currentBounds); PreferencesDialog.saveValue(KEY_MAGE_PANEL_LAST_SIZE, currentBounds);
} }
@ -204,6 +206,10 @@ public final class GuiDisplayUtil {
return textLines; return textLines;
} }
public static String getHintIconHtml(String iconName, int symbolSize) {
return "<img src='" + getResourcePath("hint/" + iconName + ".png") + "' alt='" + iconName + "' width=" + symbolSize + " height=" + symbolSize + ">";
}
public static StringBuilder getRulefromCardView(CardView card, TextLines textLines) { public static StringBuilder getRulefromCardView(CardView card, TextLines textLines) {
String manaCost = ""; String manaCost = "";
for (String m : card.getManaCost()) { for (String m : card.getManaCost()) {
@ -236,7 +242,7 @@ public final class GuiDisplayUtil {
buffer.append("<tr><td valign='top'><b>"); buffer.append("<tr><td valign='top'><b>");
buffer.append(card.getDisplayName()); buffer.append(card.getDisplayName());
if (card.isGameObject()) { if (card.isGameObject()) {
buffer.append(" [").append(card.getId().toString().substring(0, 3)).append(']'); buffer.append(" [").append(card.getId().toString(), 0, 3).append(']');
} }
buffer.append("</b></td><td align='right' valign='top' style='width:"); buffer.append("</b></td><td align='right' valign='top' style='width:");
buffer.append(symbolCount * GUISizeHelper.cardTooltipFontSize); buffer.append(symbolCount * GUISizeHelper.cardTooltipFontSize);

View file

@ -5,6 +5,7 @@
*/ */
package org.mage.card.arcane; package org.mage.card.arcane;
import mage.abilities.hint.HintUtils;
import mage.cards.ArtRect; import mage.cards.ArtRect;
import mage.client.dialog.PreferencesDialog; import mage.client.dialog.PreferencesDialog;
import mage.constants.AbilityType; import mage.constants.AbilityType;
@ -137,12 +138,18 @@ public abstract class CardRenderer {
} }
protected void parseRules(List<String> stringRules, ArrayList<TextboxRule> keywords, ArrayList<TextboxRule> rules) { protected void parseRules(List<String> stringRules, ArrayList<TextboxRule> keywords, ArrayList<TextboxRule> rules) {
// Translate the textbox text // Translate the textbox text and remove card hints
for (String rule : stringRules) { for (String rule : stringRules) {
// remove all card hints
if (rule.equals(HintUtils.HINT_START_MARK)) {
break;
}
// Kill reminder text // Kill reminder text
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_REMINDER_TEXT, "false").equals("false")) { if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_REMINDER_TEXT, "false").equals("false")) {
rule = CardRendererUtils.killReminderText(rule).trim(); rule = CardRendererUtils.killReminderText(rule).trim();
} }
if (!rule.isEmpty()) { if (!rule.isEmpty()) {
TextboxRule tbRule = TextboxRuleParser.parse(cardView, rule); TextboxRule tbRule = TextboxRuleParser.parse(cardView, rule);
if (tbRule.type == TextboxRuleType.SIMPLE_KEYWORD) { if (tbRule.type == TextboxRuleType.SIMPLE_KEYWORD) {

View file

@ -1,43 +1,6 @@
package org.mage.card.arcane; package org.mage.card.arcane;
import java.awt.Color; import mage.abilities.hint.HintUtils;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageProducer;
import java.awt.image.RGBImageFilter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.StandardCopyOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Pattern;
import java.util.stream.IntStream;
import javax.imageio.ImageIO;
import javax.swing.*;
import mage.cards.repository.ExpansionRepository; import mage.cards.repository.ExpansionRepository;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.constants.Constants; import mage.client.constants.Constants;
@ -46,6 +9,7 @@ import mage.client.constants.Constants.ResourceSymbolSize;
import mage.client.util.GUISizeHelper; import mage.client.util.GUISizeHelper;
import mage.client.util.ImageHelper; import mage.client.util.ImageHelper;
import mage.client.util.gui.BufferedImageBuilder; import mage.client.util.gui.BufferedImageBuilder;
import mage.client.util.gui.GuiDisplayUtil;
import mage.utils.StreamUtils; import mage.utils.StreamUtils;
import org.apache.batik.dom.svg.SVGDOMImplementation; import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.apache.batik.transcoder.TranscoderException; import org.apache.batik.transcoder.TranscoderException;
@ -57,6 +21,26 @@ import org.apache.batik.util.SVGConstants;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.mage.plugins.card.utils.CardImageUtils; import org.mage.plugins.card.utils.CardImageUtils;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageProducer;
import java.awt.image.RGBImageFilter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.List;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Pattern;
import java.util.stream.IntStream;
import static org.mage.plugins.card.utils.CardImageUtils.getImagesDir; import static org.mage.plugins.card.utils.CardImageUtils.getImagesDir;
public final class ManaSymbols { public final class ManaSymbols {
@ -786,7 +770,18 @@ public final class ManaSymbols {
"<img src='" + filePathToUrl(htmlImagesPath) + "$1$2" + ".png' alt='$1$2' width=" "<img src='" + filePathToUrl(htmlImagesPath) + "$1$2" + ".png' alt='$1$2' width="
+ symbolSize + " height=" + symbolSize + '>'); + symbolSize + " height=" + symbolSize + '>');
// ignore data restore // replace hint icons
if (replaced.contains(HintUtils.HINT_ICON_GOOD)) {
replaced = replaced.replace(HintUtils.HINT_ICON_GOOD, GuiDisplayUtil.getHintIconHtml("good", symbolSize) + "&nbsp;");
}
if (replaced.contains(HintUtils.HINT_ICON_BAD)) {
replaced = replaced.replace(HintUtils.HINT_ICON_BAD, GuiDisplayUtil.getHintIconHtml("bad", symbolSize) + "&nbsp;");
}
if (replaced.contains(HintUtils.HINT_ICON_RESTRICT)) {
replaced = replaced.replace(HintUtils.HINT_ICON_RESTRICT, GuiDisplayUtil.getHintIconHtml("restrict", symbolSize) + "&nbsp;");
}
// ignored data restore
replaced = replaced replaced = replaced
.replace("|source|", "{source}") .replace("|source|", "{source}")
.replace("|this|", "{this}") .replace("|this|", "{this}")

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -1,25 +1,24 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility; import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.dynamicvalue.common.ControllerLifeCount; import mage.abilities.dynamicvalue.common.ControllerLifeCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class AjaniWiseCounselor extends CardImpl { public final class AjaniWiseCounselor extends CardImpl {
@ -32,9 +31,8 @@ public final class AjaniWiseCounselor extends CardImpl {
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
// +2: You gain 1 life for each creature you control. // +2: You gain 1 life for each creature you control.
this.addAbility(new LoyaltyAbility(new GainLifeEffect( this.addAbility(new LoyaltyAbility(new GainLifeEffect(CreaturesYouControlCount.instance)
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE) .setText("you gain 1 life for each creature you control"), 2));
).setText("you gain 1 life for each creature you control"), 2));
// 3: Creatures you control get +2/+2 until end of turn. // 3: Creatures you control get +2/+2 until end of turn.
this.addAbility(new LoyaltyAbility( this.addAbility(new LoyaltyAbility(

View file

@ -1,7 +1,7 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -24,7 +25,6 @@ import mage.game.events.GameEvent.EventType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class AngelOfDeliverance extends CardImpl { public final class AngelOfDeliverance extends CardImpl {
@ -36,7 +36,7 @@ public final class AngelOfDeliverance extends CardImpl {
} }
public AngelOfDeliverance(UUID ownerId, CardSetInfo setInfo) { public AngelOfDeliverance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}{W}");
this.subtype.add(SubType.ANGEL); this.subtype.add(SubType.ANGEL);
this.power = new MageInt(6); this.power = new MageInt(6);
this.toughness = new MageInt(6); this.toughness = new MageInt(6);
@ -52,6 +52,7 @@ public final class AngelOfDeliverance extends CardImpl {
"<i>Delirium</i> &mdash; Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls" "<i>Delirium</i> &mdash; 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.addTarget(new TargetCreaturePermanent(filter));
ability.addHint(DeliriumHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,20 +1,18 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; 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.effects.common.GainLifeEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AngelOfRenewal extends CardImpl { public final class AngelOfRenewal extends CardImpl {
@ -29,9 +27,7 @@ public final class AngelOfRenewal extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Angel of Renewal enters the battlefield, you gain 1 life for each creature you control. // When Angel of Renewal enters the battlefield, you gain 1 life for each creature you control.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect( this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(CreaturesYouControlCount.instance)));
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)
)));
} }
public AngelOfRenewal(final AngelOfRenewal card) { public AngelOfRenewal(final AngelOfRenewal card) {

View file

@ -1,16 +1,15 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
@ -26,7 +25,7 @@ public final class AngelicExaltation extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); 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. // 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) { private AngelicExaltation(final AngelicExaltation card) {
@ -41,10 +40,8 @@ public final class AngelicExaltation extends CardImpl {
class AngelicExaltationAbility extends TriggeredAbilityImpl { class AngelicExaltationAbility extends TriggeredAbilityImpl {
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
public AngelicExaltationAbility() { 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) { public AngelicExaltationAbility(final AngelicExaltationAbility ability) {

View file

@ -1,17 +1,14 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.AftermathAbility; import mage.abilities.keyword.AftermathAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.SplitCard; import mage.cards.SplitCard;
import mage.constants.CardType; import mage.constants.CardType;
@ -23,8 +20,9 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AppealAuthority extends SplitCard { 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. // 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) getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
.setText("Until end of turn, target creature gains trample")); .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(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, true)
getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, true)
.setText("and gets +X/+X, where X is the number of creatures you control")); .setText("and gets +X/+X, where X is the number of creatures you control"));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
getLeftHalfCard().getSpellAbility().addHint(CreaturesYouControlHint.instance);
// Authority // Authority
// Aftermath // Aftermath

View file

@ -1,7 +1,5 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.RestrictionEffect;
@ -17,8 +15,9 @@ import mage.game.permanent.PermanentToken;
import mage.watchers.common.CastSpellYourLastTurnWatcher; import mage.watchers.common.CastSpellYourLastTurnWatcher;
import mage.watchers.common.PermanentsEnteredBattlefieldYourLastTurnWatcher; import mage.watchers.common.PermanentsEnteredBattlefieldYourLastTurnWatcher;
import java.util.UUID;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class Arboria extends CardImpl { public final class Arboria extends CardImpl {
@ -60,6 +59,10 @@ class ArboriaEffect extends RestrictionEffect {
@Override @Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
if (defenderId == null) {
return true;
}
CastSpellYourLastTurnWatcher watcher = game.getState().getWatcher(CastSpellYourLastTurnWatcher.class); CastSpellYourLastTurnWatcher watcher = game.getState().getWatcher(CastSpellYourLastTurnWatcher.class);
if (watcher != null && watcher.getAmountOfSpellsCastOnPlayersTurn(defenderId) > 0) { if (watcher != null && watcher.getAmountOfSpellsCastOnPlayersTurn(defenderId) > 0) {
return true; return true;

View file

@ -1,13 +1,12 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.condition.common.CitysBlessingCondition; import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.AscendAbility;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -15,8 +14,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ArchOfOrazca extends CardImpl { public final class ArchOfOrazca extends CardImpl {
@ -36,6 +36,7 @@ public final class ArchOfOrazca extends CardImpl {
new GenericManaCost(5), new GenericManaCost(5),
CitysBlessingCondition.instance); CitysBlessingCondition.instance);
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addHint(CitysBlessingHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -5,6 +5,7 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; 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. // 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 ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter, 2)));
ability.addHint(GateYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,7 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -18,13 +19,12 @@ import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AutumnalGloom extends CardImpl { public final class AutumnalGloom extends CardImpl {
public AutumnalGloom(UUID ownerId, CardSetInfo setInfo) { 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.transformable = true;
this.secondSideCardClazz = AncientOfTheEquinox.class; this.secondSideCardClazz = AncientOfTheEquinox.class;
@ -35,6 +35,7 @@ public final class AutumnalGloom extends CardImpl {
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, DeliriumCondition.instance, false); Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, DeliriumCondition.instance, false);
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(DeliriumHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,7 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -18,13 +19,12 @@ import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class BackwoodsSurvivalists extends CardImpl { public final class BackwoodsSurvivalists extends CardImpl {
public BackwoodsSurvivalists(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.HUMAN, SubType.WARRIOR);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(3); 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, "<i>Delirium</i> &mdash; {this} gets +1/+1"); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} gets +1/+1");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); 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.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); this.addAbility(ability);
} }

View file

@ -1,24 +1,25 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.condition.LockedInCondition; import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalRestrictionEffect; import mage.abilities.decorator.ConditionalRestrictionEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageAllEffect; import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.abilities.effects.common.combat.CantBlockAllEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class BarrageOfBoulders extends CardImpl { public final class BarrageOfBoulders extends CardImpl {
@ -41,6 +42,7 @@ public final class BarrageOfBoulders extends CardImpl {
new LockedInCondition(FerociousCondition.instance), null); new LockedInCondition(FerociousCondition.instance), null);
effect.setText("<br/><i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, creatures can't block this turn"); effect.setText("<br/><i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, creatures can't block this turn");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addHint(FerociousHint.instance);
} }
public BarrageOfBoulders(final BarrageOfBoulders card) { public BarrageOfBoulders(final BarrageOfBoulders card) {

View file

@ -1,17 +1,15 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.Mana; import mage.Mana;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.effects.mana.DynamicManaEffect; import mage.abilities.effects.mana.DynamicManaEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class BattleHymn extends CardImpl { 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}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Add {R} for each creature you control. // 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) { public BattleHymn(final BattleHymn card) {

View file

@ -1,11 +1,10 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; 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.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -13,16 +12,16 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class BattleSquadron extends CardImpl { public final class BattleSquadron extends CardImpl {
public BattleSquadron(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.GOBLIN);
this.power = new MageInt(0); this.power = new MageInt(0);
this.toughness = new MageInt(0); this.toughness = new MageInt(0);
@ -31,8 +30,8 @@ public final class BattleSquadron extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Battle Squadron's power and toughness are each equal to the number of creatures you control. // Battle Squadron's power and toughness are each equal to the number of creatures you control.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect( this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame))
new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame))); .addHint(CreaturesYouControlHint.instance));
} }
public BattleSquadron(final BattleSquadron card) { public BattleSquadron(final BattleSquadron card) {

View file

@ -1,12 +1,11 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -18,14 +17,15 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class BeguilerOfWills extends CardImpl { public final class BeguilerOfWills extends CardImpl {
public BeguilerOfWills(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.HUMAN, SubType.WIZARD);
this.power = new MageInt(1); this.power = new MageInt(1);
@ -36,6 +36,7 @@ public final class BeguilerOfWills extends CardImpl {
new GainControlTargetEffect(Duration.Custom), new GainControlTargetEffect(Duration.Custom),
new TapSourceCost()); new TapSourceCost());
ability.addTarget(new BeguilerOfWillsTarget()); ability.addTarget(new BeguilerOfWillsTarget());
ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,9 +1,9 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -13,8 +13,9 @@ import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class Camaraderie extends CardImpl { 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. // 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().addEffect(new CamaraderieEffect());
this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
} }
public Camaraderie(final Camaraderie card) { public Camaraderie(final Camaraderie card) {

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
@ -10,11 +8,7 @@ import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -22,6 +16,8 @@ import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
* @author noxx * @author noxx
*/ */
@ -79,7 +75,7 @@ class ChampionOfLambholtEffect extends RestrictionEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId()); 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 blocker.getPower().getValue() >= sourcePermanent.getPower().getValue();
} }
return true; return true;

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.DelayedTriggeredAbility; import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.ChancellorAbility; import mage.abilities.common.ChancellorAbility;
@ -9,6 +7,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -21,8 +20,9 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
import mage.game.permanent.token.GoblinToken; import mage.game.permanent.token.GoblinToken;
import java.util.UUID;
/** /**
*
* @author BetaSteward * @author BetaSteward
*/ */
public final class ChancellorOfTheForge extends CardImpl { 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. // 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); 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) { public ChancellorOfTheForge(final ChancellorOfTheForge card) {

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.RestrictionEffect;
@ -20,8 +18,9 @@ import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class Chaosphere extends CardImpl { public final class Chaosphere extends CardImpl {
@ -80,6 +79,9 @@ class ChaosphereEffect extends RestrictionEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker == null) {
return true;
}
return attacker.hasAbility(FlyingAbility.getInstance().getId(), game); return attacker.hasAbility(FlyingAbility.getInstance().getId(), game);
} }

View file

@ -8,6 +8,7 @@ import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -27,6 +28,7 @@ public final class ChargingWarBoar extends CardImpl {
private static final Condition condition private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(new FilterControlledPlaneswalkerPermanent(SubType.DOMRI)); = new PermanentsOnTheBattlefieldCondition(new FilterControlledPlaneswalkerPermanent(SubType.DOMRI));
private static final ConditionHint hint = new ConditionHint(condition, "You control Domri planeswalker");
public ChargingWarBoar(UUID ownerId, CardSetInfo setInfo) { public ChargingWarBoar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}");
@ -51,6 +53,7 @@ public final class ChargingWarBoar extends CardImpl {
TrampleAbility.getInstance(), Duration.WhileOnBattlefield TrampleAbility.getInstance(), Duration.WhileOnBattlefield
), condition, "and has trample" ), condition, "and has trample"
)); ));
ability.addHint(hint);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,8 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@ -11,21 +8,22 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ChorusOfMight extends CardImpl { public final class ChorusOfMight extends CardImpl {
public ChorusOfMight(UUID ownerId, CardSetInfo setInfo) { 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. // 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().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn, true)); this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn, true));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));

View file

@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -33,6 +34,7 @@ public final class ClearTheStage extends CardImpl {
this.getSpellAbility().addEffect(new ClearTheStageEffect()); this.getSpellAbility().addEffect(new ClearTheStageEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, filter)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, filter));
this.getSpellAbility().addHint(FerociousHint.instance);
} }
private ClearTheStage(final ClearTheStage card) { private ClearTheStage(final ClearTheStage card) {

View file

@ -1,26 +1,25 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author Plopman * @author Plopman
*/ */
public final class CollectiveUnconscious extends CardImpl { public final class CollectiveUnconscious extends CardImpl {
public CollectiveUnconscious(UUID ownerId, CardSetInfo setInfo) { 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. // 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) { public CollectiveUnconscious(final CollectiveUnconscious card) {

View file

@ -1,17 +1,18 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.TargetController;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class ColossalMajesty extends CardImpl { public final class ColossalMajesty extends CardImpl {
@ -29,7 +30,7 @@ public final class ColossalMajesty extends CardImpl {
"At the beginning of your upkeep, " "At the beginning of your upkeep, "
+ "if you control a creature with power 4 or greater, " + "if you control a creature with power 4 or greater, "
+ "draw a card." + "draw a card."
)); ).addHint(FerociousHint.instance));
} }
public ColossalMajesty(final ColossalMajesty card) { public ColossalMajesty(final ColossalMajesty card) {

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@ -11,16 +9,17 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author jonubuu * @author jonubuu
*/ */
public final class ConclavePhalanx extends CardImpl { public final class ConclavePhalanx extends CardImpl {
public ConclavePhalanx(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
@ -31,7 +30,7 @@ public final class ConclavePhalanx extends CardImpl {
this.addAbility(new ConvokeAbility()); this.addAbility(new ConvokeAbility());
// When Conclave Phalanx enters the battlefield, you gain 1 life for each creature you control. // When Conclave Phalanx enters the battlefield, you gain 1 life for each creature you control.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect( this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(
new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())))); new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE))));
} }
public ConclavePhalanx(final ConclavePhalanx card) { public ConclavePhalanx(final ConclavePhalanx card) {

View file

@ -1,27 +1,26 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; 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.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class CraterhoofBehemoth extends CardImpl { public final class CraterhoofBehemoth extends CardImpl {
@ -33,7 +32,7 @@ public final class CraterhoofBehemoth extends CardImpl {
} }
public CraterhoofBehemoth(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.BEAST);
this.power = new MageInt(5); 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. // 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)); 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(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, filter, false, true));
ability.addEffect(new BoostControlledEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, filter, false, true)); ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,19 +1,19 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.IntPlusDynamicValue; import mage.abilities.dynamicvalue.IntPlusDynamicValue;
import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author emerald000 * @author emerald000
*/ */
public final class CratersClaws extends CardImpl { public final class CratersClaws extends CardImpl {
@ -30,6 +30,7 @@ public final class CratersClaws extends CardImpl {
"{this} deals X damage to any target." "{this} deals X damage to any target."
+ "<br><i>Ferocious</i> &mdash; {this} deals X plus 2 damage to that permanent or player instead if you control a creature with power 4 or greater")); + "<br><i>Ferocious</i> &mdash; {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().addTarget(new TargetAnyTarget());
this.getSpellAbility().addHint(FerociousHint.instance);
} }
public CratersClaws(final CratersClaws card) { public CratersClaws(final CratersClaws card) {

View file

@ -1,7 +1,7 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
@ -10,6 +10,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -20,7 +21,6 @@ import mage.game.events.GameEvent;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class CropSigil extends CardImpl { public final class CropSigil extends CardImpl {
@ -34,7 +34,7 @@ public final class CropSigil extends CardImpl {
} }
public CropSigil(UUID ownerId, CardSetInfo setInfo) { 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. // 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)); this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PutTopCardOfLibraryIntoGraveControllerEffect(1), true));
@ -48,6 +48,7 @@ public final class CropSigil extends CardImpl {
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterCreature)); ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterCreature));
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterLand)); ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterLand));
ability.addHint(DeliriumHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -11,14 +9,15 @@ import mage.abilities.effects.common.BecomesMonarchSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class CrownHunterHireling extends CardImpl { public final class CrownHunterHireling extends CardImpl {
@ -66,6 +65,9 @@ class CrownHunterHirelingCantAttackEffect extends RestrictionEffect {
@Override @Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
if (defenderId == null) {
return true;
}
return defenderId.equals(game.getMonarchId()); return defenderId.equals(game.getMonarchId());
} }

View file

@ -1,27 +1,26 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; 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.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class CrusaderOfOdric extends CardImpl { public final class CrusaderOfOdric extends CardImpl {
public CrusaderOfOdric(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
@ -29,7 +28,8 @@ public final class CrusaderOfOdric extends CardImpl {
this.toughness = new MageInt(0); this.toughness = new MageInt(0);
// Crusader of Odric's power and toughness are each equal to the number of creatures you control. // 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) { public CrusaderOfOdric(final CrusaderOfOdric card) {

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -11,14 +9,15 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class CryptbornHorror extends CardImpl { 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"; 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) { 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.subtype.add(SubType.HORROR);
this.color.setBlack(true); this.color.setBlack(true);
this.color.setRed(true); this.color.setRed(true);
@ -64,7 +63,7 @@ class CryptbornHorrorEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanentEntering(source.getSourceId()); Permanent permanent = game.getPermanentEntering(source.getSourceId());
if (permanent != null) { if (permanent != null) {
int oll = new OpponentsLostLifeCount().calculate(game, source, this); int oll = OpponentsLostLifeCount.instance.calculate(game, source, this);
if (oll > 0) { if (oll > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(oll), source, game); permanent.addCounters(CounterType.P1P1.createInstance(oll), source, game);
} }

View file

@ -1,23 +1,28 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; 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.effects.common.cost.SourceCostReductionForEachCardInGraveyardEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.common.FilterInstantOrSorceryCard;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class CrypticSerpent extends CardImpl { 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) { public CrypticSerpent(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); 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); this.toughness = new MageInt(5);
// Cryptic Serpent costs {1} less to cast for each instant and sorcery card in your graveyard. // 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) { public CrypticSerpent(final CrypticSerpent card) {

View file

@ -1,21 +1,21 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition; import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.constants.SubType; import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class DeadeyeBrawler extends CardImpl { 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. // 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( this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new DrawCardSourceControllerEffect(1), false, false), CitysBlessingCondition.instance, 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));
} }

View file

@ -1,12 +1,13 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.GreenManaAbility;
@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class DeathcapCultivator extends CardImpl { public final class DeathcapCultivator extends CardImpl {
public DeathcapCultivator(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.DRUID); this.subtype.add(SubType.DRUID);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -37,7 +37,8 @@ public final class DeathcapCultivator extends CardImpl {
// <i>Delirium</i> &mdash; Deathcap Cultivator has deathtouch as long as there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; 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, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield), new ConditionalContinuousEffect(new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has deathtouch as long as there are four or more card types among cards in your graveyard"))); DeliriumCondition.instance, "<i>Delirium</i> &mdash; {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) { public DeathcapCultivator(final DeathcapCultivator card) {

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.RestrictionEffect;
@ -16,14 +14,15 @@ import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class DenseCanopy extends CardImpl { public final class DenseCanopy extends CardImpl {
public DenseCanopy(UUID ownerId, CardSetInfo setInfo) { 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. // Creatures with flying can block only creatures with flying.
@ -64,6 +63,9 @@ class DenseCanopyCantBlockEffect extends RestrictionEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker == null) {
return true;
}
return attacker.hasAbility(FlyingAbility.getInstance().getId(), game); return attacker.hasAbility(FlyingAbility.getInstance().getId(), game);
} }

View file

@ -1,12 +1,13 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID; import java.util.UUID;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ExileAllEffect; import mage.abilities.effects.common.ExileAllEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -14,13 +15,12 @@ import mage.filter.StaticFilters;
import mage.game.permanent.token.AngelToken; import mage.game.permanent.token.AngelToken;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class DescendUponTheSinful extends CardImpl { public final class DescendUponTheSinful extends CardImpl {
public DescendUponTheSinful(UUID ownerId, CardSetInfo setInfo) { 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 // Exile all creatures
this.getSpellAbility().addEffect(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_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 effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance);
effect.setText("<br/><i>Delirium</i> &mdash; Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard"); effect.setText("<br/><i>Delirium</i> &mdash; 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().addEffect(effect);
this.getSpellAbility().addHint(DeliriumHint.instance);
} }
public DescendUponTheSinful(final DescendUponTheSinful card) { public DescendUponTheSinful(final DescendUponTheSinful card) {

View file

@ -1,7 +1,7 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility;
@ -10,6 +10,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -19,13 +20,12 @@ import mage.constants.Zone;
import mage.game.permanent.token.EldraziHorrorToken; import mage.game.permanent.token.EldraziHorrorToken;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class DesperateSentry extends CardImpl { public final class DesperateSentry extends CardImpl {
public DesperateSentry(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(1); this.power = new MageInt(1);
@ -39,6 +39,7 @@ public final class DesperateSentry extends CardImpl {
new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard."); "<i>Delirium</i> &mdash; {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 ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addHint(DeliriumHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.FerociousCondition; 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.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect; import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -20,21 +19,23 @@ import mage.constants.*;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class DragonGrip extends CardImpl { public final class DragonGrip extends CardImpl {
public DragonGrip(UUID ownerId, CardSetInfo setInfo) { 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); 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. // 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); AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame);
effect.setText("<i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash"); effect.setText("<i>Ferocious</i> &mdash; 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, this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalAsThoughEffect(effect,
FerociousCondition.instance))); FerociousCondition.instance))
.addHint(FerociousHint.instance));
// Enchant creature // Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent(); TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -9,6 +7,7 @@ import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -17,8 +16,9 @@ import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class DuskCharger extends CardImpl { public final class DuskCharger extends CardImpl {
@ -37,7 +37,7 @@ public final class DuskCharger extends CardImpl {
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield); ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance,
"{this} gets +2/+2 as long as you have the city's blessing"); "{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); this.addAbility(ability);
} }

View file

@ -1,19 +1,17 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; 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.effects.common.GainLifeEffect;
import mage.constants.SubType;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.StaticFilters; import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class DwarvenPriest extends CardImpl { public final class DwarvenPriest extends CardImpl {
@ -27,9 +25,7 @@ public final class DwarvenPriest extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// When Dwarven Priest enters the battlefield, you gain 1 life for each creature you control. // When Dwarven Priest enters the battlefield, you gain 1 life for each creature you control.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect( this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(CreaturesYouControlCount.instance)));
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)
)));
} }
public DwarvenPriest(final DwarvenPriest card) { public DwarvenPriest(final DwarvenPriest card) {

View file

@ -1,29 +1,28 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class ElderOfLaurels extends CardImpl { public final class ElderOfLaurels extends CardImpl {
public ElderOfLaurels(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.ADVISOR); this.subtype.add(SubType.ADVISOR);
@ -31,11 +30,11 @@ public final class ElderOfLaurels extends CardImpl {
this.toughness = new MageInt(3); 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. // {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, 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}")); new ManaCostsImpl("{3}{G}"));
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -12,14 +10,15 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.UUID;
/** /**
*
* @author Styxo * @author Styxo
*/ */
public final class Exogorth extends CardImpl { public final class Exogorth extends CardImpl {
@ -84,6 +83,9 @@ class CanBlockOnlySpaceflightEffect extends RestrictionEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker == null) {
return true;
}
return attacker.getAbilities().contains(SpaceflightAbility.getInstance()); return attacker.getAbilities().contains(SpaceflightAbility.getInstance());
} }

View file

@ -1,7 +1,7 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; 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.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -24,7 +25,6 @@ import mage.game.permanent.token.EldraziHorrorToken;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ExtricatorOfSin extends CardImpl { public final class ExtricatorOfSin extends CardImpl {
@ -36,7 +36,7 @@ public final class ExtricatorOfSin extends CardImpl {
} }
public ExtricatorOfSin(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.CLERIC);
this.power = new MageInt(0); 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), new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, false),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; 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) { public ExtricatorOfSin(final ExtricatorOfSin card) {

View file

@ -1,22 +1,22 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class FeedTheClan extends CardImpl { public final class FeedTheClan extends CardImpl {
public FeedTheClan(UUID ownerId, CardSetInfo setInfo) { 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. // You gain 5 life.
// Ferocious - You gain 10 life instead if you control a creature with power 4 or greater // 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), new GainLifeEffect(5),
FerociousCondition.instance, FerociousCondition.instance,
"You gain 5 life. <br><i>Ferocious</i> &mdash; You gain 10 life instead if you control a creature with power 4 or greater")); "You gain 5 life. <br><i>Ferocious</i> &mdash; 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) { public FeedTheClan(final FeedTheClan card) {

View file

@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageAllEffect; import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; 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. // 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().addEffect(new FlamesOfTheRazeBoarEffect());
this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent());
this.getSpellAbility().addHint(FerociousHint.instance);
} }
private FlamesOfTheRazeBoar(final FlamesOfTheRazeBoar card) { private FlamesOfTheRazeBoar(final FlamesOfTheRazeBoar card) {

View file

@ -1,7 +1,5 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.AttacksEachCombatStaticAbility;
import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility;
@ -10,6 +8,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect; import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -19,8 +18,9 @@ import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class FlamewakePhoenix extends CardImpl { public final class FlamewakePhoenix extends CardImpl {
@ -46,7 +46,7 @@ public final class FlamewakePhoenix extends CardImpl {
TargetController.YOU, false, false), TargetController.YOU, false, false),
FerociousCondition.instance, FerociousCondition.instance,
"<i>Ferocious</i> &mdash; 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." "<i>Ferocious</i> &mdash; 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) { public FlamewakePhoenix(final FlamewakePhoenix card) {

View file

@ -1,7 +1,5 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
@ -11,19 +9,20 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class FolkMedicine extends CardImpl { public final class FolkMedicine extends CardImpl {
public FolkMedicine(UUID ownerId, CardSetInfo setInfo) { 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. // 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)); this.getSpellAbility().addEffect(new GainLifeEffect(amount));
// Flashback {1}{W} // Flashback {1}{W}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT)); this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT));

View file

@ -1,34 +1,35 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ForceAway extends CardImpl { public final class ForceAway extends CardImpl {
public ForceAway(UUID ownerId, CardSetInfo setInfo) { 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. // Return target creature to its owner's hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// <i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card. // <i>Ferocious</i> &mdash; 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), Effect effect = new ConditionalOneShotEffect(new DrawDiscardControllerEffect(1, 1, true),
FerociousCondition.instance , "<br><i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card"); FerociousCondition.instance, "<br><i>Ferocious</i> &mdash; 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().addEffect(effect);
this.getSpellAbility().addHint(FerociousHint.instance);
} }
public ForceAway(final ForceAway card) { public ForceAway(final ForceAway card) {

View file

@ -1,25 +1,25 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.DamageTargetEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author Plopman * @author Plopman
*/ */
public final class FoundryChampion extends CardImpl { public final class FoundryChampion extends CardImpl {
@ -33,8 +33,9 @@ public final class FoundryChampion extends CardImpl {
this.toughness = new MageInt(4); 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. //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.addTarget(new TargetAnyTarget());
ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
//{R}: Foundry Champion gets +1/+0 until end of turn. //{R}: Foundry Champion gets +1/+0 until end of turn.

View file

@ -1,25 +1,25 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class FrontierMastodon extends CardImpl { public final class FrontierMastodon extends CardImpl {
public FrontierMastodon(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.ELEPHANT);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
@ -28,8 +28,8 @@ public final class FrontierMastodon extends CardImpl {
this.addAbility(new EntersBattlefieldAbility( this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
FerociousCondition.instance, FerociousCondition.instance,
"<i>Ferocious</i> &mdash; {this} enters the battlefield with a +1/+1 counter on it if you control a creature with power 4 or greater.","" "<i>Ferocious</i> &mdash; {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) { public FrontierMastodon(final FrontierMastodon card) {

View file

@ -8,6 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.PutOnLibrarySourceEffect; import mage.abilities.effects.common.PutOnLibrarySourceEffect;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.hint.common.GateYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
@ -39,7 +40,8 @@ public final class GateColossus extends CardImpl {
this.toughness = new MageInt(8); this.toughness = new MageInt(8);
// This spell costs {1} less to cast for each Gate you control. // 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. // Gate Colossus can't be blocked by creatures with power 2 or less.
this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));

View file

@ -10,6 +10,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -51,7 +52,7 @@ public final class GatebreakerRam extends CardImpl {
this.addAbility(new SimpleStaticAbility( this.addAbility(new SimpleStaticAbility(
new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield) new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield)
.setText("{this} gets +1/+1 for each Gate you control.") .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. // As long as you control two or more Gates, Gatebreaker Ram has vigilance and trample.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect( Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(

View file

@ -1,32 +1,24 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility; 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.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.constants.SubType; import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent; import java.util.UUID;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class GatekeeperGargoyle extends CardImpl { 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) { public GatekeeperGargoyle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
@ -41,9 +33,9 @@ public final class GatekeeperGargoyle extends CardImpl {
this.addAbility(new EntersBattlefieldAbility( this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect( new AddCountersSourceEffect(
CounterType.P1P1.createInstance(), CounterType.P1P1.createInstance(),
new PermanentsOnBattlefieldCount(filter), true GateYouControlCount.instance, true
), "with a +1/+1 counter on it for each Gate you control" ), "with a +1/+1 counter on it for each Gate you control"
)); ).addHint(GateYouControlHint.instance));
} }
public GatekeeperGargoyle(final GatekeeperGargoyle card) { public GatekeeperGargoyle(final GatekeeperGargoyle card) {

View file

@ -1,30 +1,30 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; 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.CreateTokenEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.permanent.token.SpiritWhiteToken; import mage.game.permanent.token.SpiritWhiteToken;
import java.util.UUID;
/** /**
* @author nantuko * @author nantuko
*/ */
public final class GeistHonoredMonk extends CardImpl { public final class GeistHonoredMonk extends CardImpl {
public GeistHonoredMonk(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.MONK); this.subtype.add(SubType.MONK);
@ -34,7 +34,8 @@ public final class GeistHonoredMonk extends CardImpl {
this.addAbility(VigilanceAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance());
// Geist-Honored Monk's power and toughness are each equal to the number of creatures you control. // 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. // 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))); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("ISD"), 2)));

View file

@ -1,13 +1,14 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect; import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class GeistOfTheLonelyVigil extends CardImpl { public final class GeistOfTheLonelyVigil extends CardImpl {
public GeistOfTheLonelyVigil(UUID ownerId, CardSetInfo setInfo) { 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.SPIRIT);
this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -40,7 +40,7 @@ public final class GeistOfTheLonelyVigil extends CardImpl {
new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
DeliriumCondition.instance); DeliriumCondition.instance);
effect.setText("<i>Delirium</i> &mdash; {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"); effect.setText("<i>Delirium</i> &mdash; {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) { public GeistOfTheLonelyVigil(final GeistOfTheLonelyVigil card) {

View file

@ -1,7 +1,7 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -17,13 +18,12 @@ import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class GibberingFiend extends CardImpl { public final class GibberingFiend extends CardImpl {
public GibberingFiend(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.DEVIL);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); 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), new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.OPPONENT, false, true),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; 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) { public GibberingFiend(final GibberingFiend card) {

View file

@ -1,12 +1,12 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; 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.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
@ -16,23 +16,14 @@ import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent; import java.util.UUID;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class GlaiveOfTheGuildpact extends CardImpl { 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) { public GlaiveOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
@ -42,7 +33,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl {
Ability ability = new SimpleStaticAbility( Ability ability = new SimpleStaticAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new BoostEquippedEffect( new BoostEquippedEffect(
new PermanentsOnBattlefieldCount(filter), GateYouControlCount.instance,
new StaticValue(0) new StaticValue(0)
) )
); );
@ -52,6 +43,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl {
ability.addEffect(new GainAbilityAttachedEffect( ability.addEffect(new GainAbilityAttachedEffect(
new MenaceAbility(), AttachmentType.EQUIPMENT new MenaceAbility(), AttachmentType.EQUIPMENT
).setText("and menace")); ).setText("and menace"));
ability.addHint(GateYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
// Equip {3} // Equip {3}

View file

@ -1,13 +1,14 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -17,13 +18,12 @@ import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class GnarlwoodDryad extends CardImpl { public final class GnarlwoodDryad extends CardImpl {
public GnarlwoodDryad(UUID ownerId, CardSetInfo setInfo) { 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.DRYAD);
this.subtype.add(SubType.HORROR); this.subtype.add(SubType.HORROR);
this.power = new MageInt(1); this.power = new MageInt(1);
@ -37,6 +37,7 @@ public final class GnarlwoodDryad extends CardImpl {
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), DeliriumCondition.instance, new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard."); "<i>Delirium</i> &mdash; {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 ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addHint(DeliriumHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -27,6 +28,7 @@ public final class GoblinGathering extends CardImpl {
this.getSpellAbility().addEffect(new CreateTokenEffect( this.getSpellAbility().addEffect(new CreateTokenEffect(
new GoblinToken(), GoblinGatheringDynamicValue.instance new GoblinToken(), GoblinGatheringDynamicValue.instance
)); ));
this.getSpellAbility().addHint(new ValueHint("You can create tokens", GoblinGatheringDynamicValue.instance));
} }
private GoblinGathering(final GoblinGathering card) { private GoblinGathering(final GoblinGathering card) {

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -9,22 +7,23 @@ import mage.abilities.effects.RestrictionEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author emerald000 * @author emerald000
*/ */
public final class GoblinGoon extends CardImpl { public final class GoblinGoon extends CardImpl {
public GoblinGoon(UUID ownerId, CardSetInfo setInfo) { 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.GOBLIN);
this.subtype.add(SubType.MUTANT); this.subtype.add(SubType.MUTANT);
this.power = new MageInt(6); this.power = new MageInt(6);
@ -65,24 +64,25 @@ class GoblinGoonCantAttackEffect extends RestrictionEffect {
@Override @Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
if (defenderId == null) {
return true;
}
UUID defendingPlayerId; UUID defendingPlayerId;
Player defender = game.getPlayer(defenderId); Player defender = game.getPlayer(defenderId);
if (defender == null) { if (defender == null) {
Permanent permanent = game.getPermanent(defenderId); Permanent permanent = game.getPermanent(defenderId);
if (permanent != null) { if (permanent != null) {
defendingPlayerId = permanent.getControllerId(); defendingPlayerId = permanent.getControllerId();
} } else {
else {
return false; return false;
} }
} } else {
else {
defendingPlayerId = defenderId; defendingPlayerId = defenderId;
} }
if (defendingPlayerId != null) { if (defendingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), defendingPlayerId, game); return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), defendingPlayerId, game);
} } else {
else {
return true; return true;
} }
} }
@ -111,6 +111,9 @@ class GoblinGoonCantBlockEffect extends RestrictionEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker == null) {
return true;
}
UUID attackingPlayerId = attacker.getControllerId(); UUID attackingPlayerId = attacker.getControllerId();
if (attackingPlayerId != null) { if (attackingPlayerId != null) {
return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), attackingPlayerId, game); return game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), source.getControllerId(), game) > game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), attackingPlayerId, game);

View file

@ -1,25 +1,23 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; 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.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetOpponentOrPlaneswalker; import mage.target.common.TargetOpponentOrPlaneswalker;
import java.util.UUID;
/** /**
*
* @author L_J * @author L_J
*/ */
public final class GoblinLyre extends CardImpl { public final class GoblinLyre extends CardImpl {
@ -66,7 +64,7 @@ class GoblinLyreEffect extends OneShotEffect {
Player opponent = game.getPlayerOrPlaneswalkerController(getTargetPointer().getFirst(game, source)); Player opponent = game.getPlayerOrPlaneswalkerController(getTargetPointer().getFirst(game, source));
if (controller != null) { if (controller != null) {
if (controller.flipCoin(source, game, true)) { 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) { if (opponent != null) {
return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true) > 0; return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true) > 0;
} }

View file

@ -1,11 +1,10 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.condition.common.CitysBlessingCondition; import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.keyword.AscendEffect; import mage.abilities.effects.keyword.AscendEffect;
import mage.abilities.hint.common.CitysBlessingHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -14,8 +13,9 @@ import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class GoldenDemise extends CardImpl { public final class GoldenDemise extends CardImpl {
@ -35,6 +35,7 @@ public final class GoldenDemise extends CardImpl {
CitysBlessingCondition.instance, 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" "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) { public GoldenDemise(final GoldenDemise card) {

View file

@ -1,7 +1,7 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -11,6 +11,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -21,13 +22,12 @@ import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class GrimFlayer extends CardImpl { public final class GrimFlayer extends CardImpl {
public GrimFlayer(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -47,7 +47,8 @@ public final class GrimFlayer extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard"))); "<i>Delirium</i> &mdash; {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) { public GrimFlayer(final GrimFlayer card) {

View file

@ -1,36 +1,34 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class HarshSustenance extends CardImpl { public final class HarshSustenance extends CardImpl {
public HarshSustenance(UUID ownerId, CardSetInfo setInfo) { 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. // 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(CreaturesYouControlCount.instance);
Effect effect = new DamageTargetEffect(xValue);
effect.setText("{this} deals X damage to any target"); effect.setText("{this} deals X damage to any target");
getSpellAbility().addEffect(effect); getSpellAbility().addEffect(effect);
getSpellAbility().addTarget(new TargetAnyTarget()); 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"); effect.setText("and you gain X life, where X is the number of creatures you control");
getSpellAbility().addEffect(effect); getSpellAbility().addEffect(effect);
getSpellAbility().addHint(CreaturesYouControlHint.instance);
} }
public HarshSustenance(final HarshSustenance card) { public HarshSustenance(final HarshSustenance card) {

View file

@ -1,28 +1,28 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.common.FerociousCondition; import mage.abilities.condition.common.FerociousCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class HeirOfTheWilds extends CardImpl { public final class HeirOfTheWilds extends CardImpl {
public HeirOfTheWilds(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
@ -33,10 +33,11 @@ public final class HeirOfTheWilds extends CardImpl {
this.addAbility(DeathtouchAbility.getInstance()); this.addAbility(DeathtouchAbility.getInstance());
// <em>Ferocious</em> - 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. // <em>Ferocious</em> - 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( Ability ability = new ConditionalInterveningIfTriggeredAbility(
new AttacksTriggeredAbility(new BoostSourceEffect(1,1,Duration.EndOfTurn), false), new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false),
FerociousCondition.instance, FerociousCondition.instance,
"<i>Ferocious</i> &mdash; Whenever {this} attacks, if you control a creature with power 4 or greater, {this} gets +1/+1 until end of turn." "<i>Ferocious</i> &mdash; 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); this.addAbility(ability);
} }

View file

@ -1,46 +1,37 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; 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.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.hint.common.GateYouControlHint;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class HoldTheGates extends CardImpl { 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) { 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. // Creatures you control get +0/+1 for each Gate you control and have vigilance.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, 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")) 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")); .setText("Creatures you control get +0/+1 for each Gate you control and have vigilance"));
ability.addHint(GateYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,13 +1,14 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -18,7 +19,6 @@ import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class HoundOfTheFarbogs extends CardImpl { 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"; 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) { 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.ZOMBIE);
this.subtype.add(SubType.HOUND); this.subtype.add(SubType.HOUND);
this.power = new MageInt(5); this.power = new MageInt(5);
@ -36,6 +36,7 @@ public final class HoundOfTheFarbogs extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE)); new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE));
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(DeliriumHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,13 +1,12 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility; import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GetEmblemEffect; import mage.abilities.effects.common.GetEmblemEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -19,8 +18,9 @@ import mage.filter.StaticFilters;
import mage.game.command.emblems.HuatliRadiantChampionEmblem; import mage.game.command.emblems.HuatliRadiantChampionEmblem;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class HuatliRadiantChampion extends CardImpl { 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) 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); .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.addTarget(new TargetCreaturePermanent());
ability2.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability2); this.addAbility(ability2);
// -8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may draw a card." // -8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may draw a card."

View file

@ -1,4 +1,3 @@
package mage.cards.i; package mage.cards.i;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -8,6 +7,7 @@ import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.hint.common.FerociousHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -35,6 +35,7 @@ public final class IcyBlast extends CardImpl {
effect.setText("<br/><i>Ferocious</i> &mdash; If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps"); effect.setText("<br/><i>Ferocious</i> &mdash; 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().addEffect(effect);
this.getSpellAbility().setTargetAdjuster(IcyBlastAdjuster.instance); this.getSpellAbility().setTargetAdjuster(IcyBlastAdjuster.instance);
this.getSpellAbility().addHint(FerociousHint.instance);
} }
public IcyBlast(final IcyBlast card) { public IcyBlast(final IcyBlast card) {

View file

@ -1,9 +1,5 @@
package mage.cards.i; package mage.cards.i;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
import mage.abilities.condition.common.OnOpponentsTurnCondition; import mage.abilities.condition.common.OnOpponentsTurnCondition;
@ -13,24 +9,23 @@ import mage.abilities.effects.RequirementEffect;
import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.RestrictionEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.constants.TurnPhase;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.turn.Phase; import mage.game.turn.Phase;
import mage.game.turn.TurnMod; import mage.game.turn.TurnMod;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class IllusionistsGambit extends CardImpl { public final class IllusionistsGambit extends CardImpl {
public IllusionistsGambit(UUID ownerId, CardSetInfo setInfo) { 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. // Cast Illusionist's Gambit only during the declare blockers step on an opponent's turn.
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(PhaseStep.DECLARE_BLOCKERS, OnOpponentsTurnCondition.instance)); this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(PhaseStep.DECLARE_BLOCKERS, OnOpponentsTurnCondition.instance));
@ -122,9 +117,7 @@ class IllusionistsGambitRequirementEffect extends RequirementEffect {
@Override @Override
public boolean isInactive(Ability source, Game game) { public boolean isInactive(Ability source, Game game) {
if (game.getTurn().getStepType() == PhaseStep.END_COMBAT) { if (game.getTurn().getStepType() == PhaseStep.END_COMBAT) {
if (!Objects.equals(game.getTurn().getPhase(), phase)) { return !Objects.equals(game.getTurn().getPhase(), phase);
return true;
}
} }
return false; return false;
} }
@ -166,25 +159,23 @@ class IllusionistsGambitRestrictionEffect extends RestrictionEffect {
@Override @Override
public boolean isInactive(Ability source, Game game) { public boolean isInactive(Ability source, Game game) {
if (game.getTurn().getStepType() == PhaseStep.END_COMBAT) { if (game.getTurn().getStepType() == PhaseStep.END_COMBAT) {
if (!Objects.equals(game.getTurn().getPhase(), phase)) { return !Objects.equals(game.getTurn().getPhase(), phase);
return true;
}
} }
return false; return false;
} }
@Override @Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
if (defenderId == null) {
return true;
}
if (defenderId.equals(source.getControllerId())) { if (defenderId.equals(source.getControllerId())) {
return false; return false;
} }
// planeswalker // planeswalker
Permanent permanent = game.getPermanent(defenderId); Permanent permanent = game.getPermanent(defenderId);
if (permanent != null && permanent.isControlledBy(source.getControllerId()) return permanent == null || !permanent.isControlledBy(source.getControllerId())
&& permanent.isPlaneswalker()) { || !permanent.isPlaneswalker();
return false;
}
return true;
} }
@Override @Override

View file

@ -1,12 +1,13 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -14,7 +15,6 @@ import mage.constants.SubType;
import mage.game.permanent.token.InexorableBlobOozeToken; import mage.game.permanent.token.InexorableBlobOozeToken;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class InexorableBlob extends CardImpl { 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), this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new InexorableBlobOozeToken(), 1, true, true), false),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; Whenever {this} attacks and there are at least four card types among cards in your graveyard, " "<i>Delirium</i> &mdash; 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) { public InexorableBlob(final InexorableBlob card) {

View file

@ -1,7 +1,7 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -18,13 +19,12 @@ import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/ */
public final class InquisitorsOx extends CardImpl { public final class InquisitorsOx extends CardImpl {
public InquisitorsOx(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.OX);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(5); 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, "<i>Delirium</i> &mdash; {this} gets +1/+0"); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} gets +1/+0");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); 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.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); this.addAbility(ability);
} }

View file

@ -1,12 +1,13 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID; import java.util.UUID;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -19,7 +20,6 @@ import mage.players.Player;
import mage.target.TargetSpell; import mage.target.TargetSpell;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class InvasiveSurgery extends CardImpl { public final class InvasiveSurgery extends CardImpl {
@ -31,13 +31,13 @@ public final class InvasiveSurgery extends CardImpl {
} }
public InvasiveSurgery(UUID ownerId, CardSetInfo setInfo) { 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. // Counter target sorcery spell.
// <i>Delirium</i> &mdash; 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. // <i>Delirium</i> &mdash; 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().addEffect(new InvasiveSurgeryEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter)); this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addHint(DeliriumHint.instance);
} }
public InvasiveSurgery(final InvasiveSurgery card) { public InvasiveSurgery(final InvasiveSurgery card) {

View file

@ -1,7 +1,5 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
@ -10,19 +8,15 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author L_J * @author L_J
*/ */
public final class IronclawCurse extends CardImpl { public final class IronclawCurse extends CardImpl {
@ -73,6 +67,9 @@ class IronclawCurseEffect extends CantBlockAttachedEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker == null) {
return true;
}
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId()); Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (enchantment == null) { if (enchantment == null) {
return false; return false;

View file

@ -1,7 +1,5 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -12,6 +10,8 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.ReachAbility; import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -24,8 +24,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.SpiderToken; import mage.game.permanent.token.SpiderToken;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class IshkanahGrafwidow extends CardImpl { public final class IshkanahGrafwidow extends CardImpl {
@ -37,7 +38,7 @@ public final class IshkanahGrafwidow extends CardImpl {
} }
public IshkanahGrafwidow(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIDER); this.subtype.add(SubType.SPIDER);
this.power = new MageInt(3); this.power = new MageInt(3);
@ -53,12 +54,14 @@ public final class IshkanahGrafwidow extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; 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); this.addAbility(ability);
// {5}{B}: Target opponent loses 1 life for each Spider you control. // {5}{B}: Target opponent loses 1 life for each Spider you control.
PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter); PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter);
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(count), new ManaCostsImpl("{6}{B}")); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(count), new ManaCostsImpl("{6}{B}"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
ability.addHint(new ValueHint("Spiders you control", count));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,27 +1,27 @@
package mage.cards.j; package mage.cards.j;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility; import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; 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.OneShotEffect;
import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.effects.common.SacrificeTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
* @author LevelX * @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, // 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. // 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(
Ability ability = new BeginningOfUpkeepTriggeredAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true), TargetController.YOU, true); new BoostTargetEffect(CreaturesYouControlCount.instance, CreaturesYouControlCount.instance, Duration.EndOfTurn, true),
TargetController.YOU,
true);
ability.addTarget(new TargetControlledCreaturePermanent()); ability.addTarget(new TargetControlledCreaturePermanent());
ability.addEffect(new JunkyoBellSacrificeEffect()); ability.addEffect(new JunkyoBellSacrificeEffect());
ability.addHint(CreaturesYouControlHint.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -3,6 +3,7 @@ package mage.cards.k;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; 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. // 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().addEffect(new KayasWrathEffect());
this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
} }
private KayasWrath(final KayasWrath card) { private KayasWrath(final KayasWrath card) {

View file

@ -1,12 +1,13 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -16,13 +17,12 @@ import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KessigDireSwine extends CardImpl { public final class KessigDireSwine extends CardImpl {
public KessigDireSwine(UUID ownerId, CardSetInfo setInfo) { 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.BOAR);
this.subtype.add(SubType.HORROR); this.subtype.add(SubType.HORROR);
this.power = new MageInt(6); this.power = new MageInt(6);
@ -31,7 +31,8 @@ public final class KessigDireSwine extends CardImpl {
// <i>Delirium</i> &mdash; Kessig Dire Swine has trample as long as there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; 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, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has trample as long as there are four or more card types among cards in your graveyard"))); DeliriumCondition.instance, "<i>Delirium</i> &mdash; {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) { public KessigDireSwine(final KessigDireSwine card) {

View file

@ -1,4 +1,3 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID; import java.util.UUID;
@ -8,6 +7,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -32,7 +32,8 @@ public final class KindlyStranger extends CardImpl {
// <i>Delirium</i> &mdash; {2}{B}: Transform Kindly Stranger. Activate this ability only if there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; {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 TransformAbility());
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, 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) { public KindlyStranger(final KindlyStranger card) {

View file

@ -1,30 +1,30 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect; import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.abilities.keyword.DashAbility; import mage.abilities.keyword.DashAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KolaghanForerunners extends CardImpl { public final class KolaghanForerunners extends CardImpl {
public KolaghanForerunners(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.BERSERKER); this.subtype.add(SubType.BERSERKER);
this.power = new MageInt(0); 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. // 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); 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} <i.(You may cast this spell for its dash cost. If you do it gains haste and it's returned to its owner's hand at the beginning of the next end step.)</i> // Dash {2}{R} <i.(You may cast this spell for its dash cost. If you do it gains haste and it's returned to its owner's hand at the beginning of the next end step.)</i>
this.addAbility(new DashAbility(this, "{2}{R}")); this.addAbility(new DashAbility(this, "{2}{R}"));

View file

@ -1,20 +1,20 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition; import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardAllEffect; import mage.abilities.effects.common.DrawCardAllEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.AscendAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.TargetController;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KumenasAwakening extends CardImpl { public final class KumenasAwakening extends CardImpl {
@ -29,7 +29,8 @@ public final class KumenasAwakening extends CardImpl {
this.addAbility(new BeginningOfUpkeepTriggeredAbility( this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), new DrawCardAllEffect(1), CitysBlessingCondition.instance, 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"), "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) { public KumenasAwakening(final KumenasAwakening card) {

View file

@ -1,7 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility;
@ -13,32 +11,17 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.*;
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.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game; import mage.game.Game;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class MajesticMyriarch extends CardImpl { public final class MajesticMyriarch extends CardImpl {
@ -51,7 +34,7 @@ public final class MajesticMyriarch extends CardImpl {
this.toughness = new MageInt(0); this.toughness = new MageInt(0);
// Majestic Myriarch's power and toughness are each equal to twice the number of creatures you control. // 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 effect = new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame);
effect.setText("{this}'s power and toughness are each equal to twice the number of creatures you control"); 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)); this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));

View file

@ -1,7 +1,7 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -9,6 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffect;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -17,13 +18,12 @@ import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class ManicScribe extends CardImpl { public final class ManicScribe extends CardImpl {
public ManicScribe(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
this.power = new MageInt(0); 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), new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(3), TargetController.OPPONENT, false, true),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; 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) { public ManicScribe(final ManicScribe card) {

View file

@ -1,28 +1,27 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class MassiveRaid extends CardImpl { public final class MassiveRaid extends CardImpl {
public MassiveRaid(UUID ownerId, CardSetInfo setInfo) { 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. // 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().addTarget(new TargetAnyTarget());
this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
} }
public MassiveRaid(final MassiveRaid card) { public MassiveRaid(final MassiveRaid card) {

View file

@ -1,7 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; import mage.abilities.common.TurnedFaceUpAllTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -12,21 +10,22 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MasteryOfTheUnseen extends CardImpl { public final class MasteryOfTheUnseen extends CardImpl {
public MasteryOfTheUnseen(UUID ownerId, CardSetInfo setInfo) { 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. // Whenever a permanent you control is turned face up, you gain 1 life for each creature you control.
this.addAbility(new TurnedFaceUpAllTriggeredAbility( this.addAbility(new TurnedFaceUpAllTriggeredAbility(
new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())), new GainLifeEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE)),
new FilterControlledPermanent("a permanent you control"))); new FilterControlledPermanent("a permanent you control")));
// {3}{W}: Manifest the top card of your library. // {3}{W}: Manifest the top card of your library.

View file

@ -1,12 +1,11 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.condition.common.CitysBlessingCondition; import mage.abilities.condition.common.CitysBlessingCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.hint.common.CitysBlessingHint;
import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.AscendAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -19,8 +18,9 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MausoleumHarpy extends CardImpl { public final class MausoleumHarpy extends CardImpl {
@ -49,7 +49,8 @@ public final class MausoleumHarpy extends CardImpl {
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter), new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter),
CitysBlessingCondition.instance, 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));
} }

View file

@ -1,18 +1,16 @@
package mage.cards.m; package mage.cards.m;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; 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.OneShotEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -27,20 +25,24 @@ import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MazesEnd extends CardImpl { public final class MazesEnd extends CardImpl {
private static final FilterCard filterCard = new FilterCard("Gate card"); private static final FilterCard filterCard = new FilterCard("Gate card");
static { static {
filterCard.add(new SubtypePredicate(SubType.GATE)); filterCard.add(new SubtypePredicate(SubType.GATE));
} }
public MazesEnd(UUID ownerId, CardSetInfo setInfo) { 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. // Maze's End enters the battlefield tapped.
@ -54,8 +56,8 @@ public final class MazesEnd extends CardImpl {
ability.addEffect(new MazesEndEffect()); ability.addEffect(new MazesEndEffect());
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new ReturnToHandFromBattlefieldSourceCost()); ability.addCost(new ReturnToHandFromBattlefieldSourceCost());
ability.addHint(new ValueHint("Gates with different names you control", GatesWithDifferentNamesYouControlCount.instance));
this.addAbility(ability); this.addAbility(ability);
} }
public MazesEnd(final MazesEnd card) { 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<String> 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 { class MazesEndEffect extends OneShotEffect {
public MazesEndEffect() { public MazesEndEffect() {
@ -86,15 +122,8 @@ class MazesEndEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
List<String> names = new ArrayList<>(); int count = GatesWithDifferentNamesYouControlCount.instance.calculate(game, source, this);
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) { if (count >= 10) {
if (permanent.hasSubtype(SubType.GATE, game)) {
if (!names.contains(permanent.getName())) {
names.add(permanent.getName());
}
}
}
if (names.size() >= 10) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
controller.won(game); controller.won(game);
@ -102,5 +131,4 @@ class MazesEndEffect extends OneShotEffect {
} }
return false; return false;
} }
} }

View file

@ -1,10 +1,11 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID; import java.util.UUID;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -12,13 +13,12 @@ import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MightBeyondReason extends CardImpl { public final class MightBeyondReason extends CardImpl {
public MightBeyondReason(UUID ownerId, CardSetInfo setInfo) { 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. // Put two +1/+1 counter on target creature.
// <i>Delirium</i> &mdash; Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard.
@ -30,6 +30,7 @@ public final class MightBeyondReason extends CardImpl {
+ "<i>Delirium</i> &mdash; Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard" + "<i>Delirium</i> &mdash; 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().addTarget(new TargetCreaturePermanent());
getSpellAbility().addHint(DeliriumHint.instance);
} }
public MightBeyondReason(final MightBeyondReason card) { public MightBeyondReason(final MightBeyondReason card) {

View file

@ -1,27 +1,26 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class MightOfTheMasses extends CardImpl { public final class MightOfTheMasses extends CardImpl {
public MightOfTheMasses(UUID ownerId, CardSetInfo setInfo) { public MightOfTheMasses(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
// Target creature gets +1/+1 until end of turn for each creature you control.
PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()); PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn, true)); this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn, true));
} }

View file

@ -1,7 +1,7 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -11,6 +11,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
import mage.abilities.hint.common.DeliriumHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -20,13 +21,12 @@ import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class MindwrackDemon extends CardImpl { public final class MindwrackDemon extends CardImpl {
public MindwrackDemon(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.DEMON);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
@ -45,6 +45,7 @@ public final class MindwrackDemon extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(4), TargetController.YOU, false), new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(4), TargetController.YOU, false),
new InvertCondition(DeliriumCondition.instance), new InvertCondition(DeliriumCondition.instance),
"<i>Delirium</i> &mdash; At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard."); "<i>Delirium</i> &mdash; 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); this.addAbility(ability);
} }

View file

@ -1,9 +1,8 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -12,8 +11,9 @@ import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author Derpthemeus * @author Derpthemeus
*/ */
public final class MinionsMurmurs extends CardImpl { 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. // 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().addEffect(new MinionsMurmursEffect());
this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
} }
public MinionsMurmurs(final MinionsMurmurs card) { public MinionsMurmurs(final MinionsMurmurs card) {

View file

@ -1,7 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility;
@ -14,20 +12,14 @@ import mage.abilities.effects.common.AddContinuousEffectToGame;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
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.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class MirriWeatherlightDuelist extends CardImpl { public final class MirriWeatherlightDuelist extends CardImpl {
@ -87,6 +79,9 @@ class MirriWeatherlightDuelistBlockRestrictionEffect extends RestrictionEffect {
@Override @Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker == null) {
return true;
}
for (UUID creature : game.getCombat().getBlockers()) { for (UUID creature : game.getCombat().getBlockers()) {
if (game.getPlayer(game.getPermanent(creature).getOwnerId()).hasOpponent(attacker.getControllerId(), game)) { if (game.getPlayer(game.getPermanent(creature).getOwnerId()).hasOpponent(attacker.getControllerId(), game)) {
return false; return false;

View file

@ -1,18 +1,17 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.CreaturesYouControlHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.common.TargetPlayerOrPlaneswalker;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class MobJustice extends CardImpl { 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}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}");
// Mob Justice deals damage to target player equal to the number of creatures you control. // 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"); effect.setText("{this} deals damage to target player or planeswalker equal to the number of creatures you control");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addHint(CreaturesYouControlHint.instance);
} }
public MobJustice(final MobJustice card) { public MobJustice(final MobJustice card) {

Some files were not shown because too many files have changed in this diff Show more