forked from External/mage
refactor all cards with affinity errata
This commit is contained in:
parent
33012783a6
commit
0d10708635
14 changed files with 85 additions and 154 deletions
|
|
@ -2,9 +2,8 @@ package mage.cards.a;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -13,7 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -23,10 +21,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class AngelicObserver extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.CITIZEN, "Citizen you control");
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
private static final Hint hint = new ValueHint("Citizens you control", xValue);
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.CITIZEN, "Citizens");
|
||||
private static final Hint hint = new ValueHint("Citizens you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public AngelicObserver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
|
|
@ -37,10 +33,7 @@ public final class AngelicObserver extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// This spell costs {1} less to cast for each Citizen you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, xValue).setCanWorksOnStackOnly(true)
|
||||
).setRuleAtTheTop(true).addHint(hint));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).setRuleAtTheTop(true).addHint(hint));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ package mage.cards.a;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.hint.common.CreaturesYouControlHint;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -11,6 +10,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -19,6 +20,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ArgivianPhalanx extends CardImpl {
|
||||
|
||||
static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("creatures");
|
||||
|
||||
public ArgivianPhalanx(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
|
||||
|
|
@ -29,11 +32,7 @@ public final class ArgivianPhalanx extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// This spell costs {1} less to cast for each creature you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL,
|
||||
new SpellCostReductionSourceEffect(CreaturesYouControlCount.instance)
|
||||
.setText("This spell costs {1} less to cast for each creature you control.")
|
||||
).addHint(CreaturesYouControlHint.instance));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).addHint(CreaturesYouControlHint.instance));
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
|
|
|||
|
|
@ -2,15 +2,16 @@ package mage.cards.b;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledEnchantmentPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -20,13 +21,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BrineGiant extends CardImpl {
|
||||
|
||||
static final FilterControlledPermanent filter = new FilterControlledPermanent("enchantment you control");
|
||||
|
||||
static {
|
||||
filter.add(CardType.ENCHANTMENT.getPredicate());
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
static final FilterControlledPermanent filter = new FilterControlledEnchantmentPermanent("enchantments");
|
||||
private static final Hint hint = new ValueHint("Enchantments you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public BrineGiant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}");
|
||||
|
|
@ -36,9 +32,7 @@ public final class BrineGiant extends CardImpl {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
// This spell costs {1} less to cast for each enchantment you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||
).addHint(new ValueHint("Enchantments you control", xValue)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).addHint(hint));
|
||||
}
|
||||
|
||||
private BrineGiant(final BrineGiant card) {
|
||||
|
|
@ -49,4 +43,4 @@ public final class BrineGiant extends CardImpl {
|
|||
public BrineGiant copy() {
|
||||
return new BrineGiant(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,10 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.ArtifactYouControlCount;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.common.ArtifactYouControlHint;
|
||||
import mage.abilities.keyword.AffinityForArtifactsAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -35,14 +32,10 @@ public final class EmryLurkerOfTheLoch extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// This spell costs {1} less to cast for each artifact you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, ArtifactYouControlCount.instance)
|
||||
).addHint(ArtifactYouControlHint.instance));
|
||||
this.addAbility(new AffinityForArtifactsAbility());
|
||||
|
||||
// When Emry, Lurker of the Loch enters the battlefield, put the top four cards of your library into your graveyard.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new MillCardsControllerEffect(4)
|
||||
));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new MillCardsControllerEffect(4)));
|
||||
|
||||
// {T}: Choose target artifact card in your graveyard. You may cast that card this turn.
|
||||
Ability ability = new SimpleActivatedAbility(new EmryLurkerOfTheLochPlayEffect(), new TapSourceCost());
|
||||
|
|
@ -84,15 +77,14 @@ class EmryLurkerOfTheLochPlayEffect extends AsThoughEffectImpl {
|
|||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
UUID targetId = getTargetPointer().getFirst(game, source);
|
||||
if (targetId != null) {
|
||||
return targetId.equals(objectId)
|
||||
&& source.isControlledBy(affectedControllerId)
|
||||
&& Zone.GRAVEYARD == game.getState().getZone(objectId)
|
||||
&& !game.getCard(targetId).isLand(game);
|
||||
} else {
|
||||
if (targetId == null) {
|
||||
// the target card has changed zone meanwhile, so the effect is no longer needed
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
return targetId.equals(objectId)
|
||||
&& source.isControlledBy(affectedControllerId)
|
||||
&& Zone.GRAVEYARD == game.getState().getZone(objectId)
|
||||
&& !game.getCard(targetId).isLand(game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.GateYouControlCount;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.common.GateYouControlHint;
|
||||
import mage.abilities.keyword.DauntAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -22,7 +21,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GateColossus extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.GATE, "a Gate");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.GATE, "Gates");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.GATE);
|
||||
|
||||
public GateColossus(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{8}");
|
||||
|
|
@ -32,20 +32,17 @@ public final class GateColossus extends CardImpl {
|
|||
this.toughness = new MageInt(8);
|
||||
|
||||
// This spell costs {1} less to cast for each Gate you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, GateYouControlCount.instance))
|
||||
.addHint(GateYouControlHint.instance)
|
||||
);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).addHint(GateYouControlHint.instance));
|
||||
|
||||
// Gate Colossus can't be blocked by creatures with power 2 or less.
|
||||
this.addAbility(new DauntAbility());
|
||||
|
||||
// Whenever a Gate you control enters, you may put Gate Colossus from your graveyard on top of your library.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new PutOnLibrarySourceEffect(
|
||||
true, "put this card from your graveyard on top of your library"
|
||||
), filter, true
|
||||
), filter2, true
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,22 +7,25 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -30,15 +33,13 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class IcebreakerKraken extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledLandPermanent("snow land you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("snow lands");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.SNOW.getPredicate());
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
private static final Hint hint = new ValueHint("Snow lands you control", xValue);
|
||||
private static final Hint hint = new ValueHint("Snow lands you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public IcebreakerKraken(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{10}{U}{U}");
|
||||
|
|
@ -49,9 +50,7 @@ public final class IcebreakerKraken extends CardImpl {
|
|||
this.toughness = new MageInt(8);
|
||||
|
||||
// This spell costs {1} less to cast for each snow land you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||
).addHint(hint));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).addHint(hint));
|
||||
|
||||
// When Icebreaker Kraken enters the battlefield, artifacts and creatures target opponent controls don't untap during that player's next untap step.
|
||||
Effect effect = new DontUntapInPlayersNextUntapStepAllEffect(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE);
|
||||
|
|
@ -74,4 +73,4 @@ public final class IcebreakerKraken extends CardImpl {
|
|||
public IcebreakerKraken copy() {
|
||||
return new IcebreakerKraken(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@ import mage.MageInt;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -34,9 +33,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class MillicentRestlessRevenant extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SPIRIT);
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
private static final Hint hint = new ValueHint("Spirits you control", xValue);
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.SPIRIT, "Spirits");
|
||||
private static final Hint hint = new ValueHint("Spirits you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public MillicentRestlessRevenant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{U}");
|
||||
|
|
@ -48,9 +46,7 @@ public final class MillicentRestlessRevenant extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// This spell costs {1} less to cast for each Spirit you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||
).addHint(hint));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).addHint(hint));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -24,19 +23,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class Polliwallop extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(
|
||||
new FilterControlledPermanent(SubType.FROG, "Frog you control")
|
||||
);
|
||||
private static final Hint hint = new ValueHint("Frogs you control", xValue);
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FROG, "Frogs");
|
||||
private static final Hint hint = new ValueHint("Frogs you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public Polliwallop(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
|
||||
// This spell costs {1} less to cast for each Frog you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, xValue).setCanWorksOnStackOnly(true)
|
||||
).setRuleAtTheTop(true).addHint(hint));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).setRuleAtTheTop(true).addHint(hint));
|
||||
|
||||
// Target creature you control deals damage equal to twice its power to target creature you don't control.
|
||||
this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect("", 2));
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.ArtifactYouControlCount;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.common.ArtifactYouControlHint;
|
||||
import mage.abilities.keyword.AffinityForArtifactsAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PutCards;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -23,9 +19,7 @@ public final class RealityHeist extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{U}{U}");
|
||||
|
||||
// This spell costs {1} less to cast for each artifact you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, ArtifactYouControlCount.instance)
|
||||
).addHint(ArtifactYouControlHint.instance));
|
||||
this.addAbility(new AffinityForArtifactsAbility());
|
||||
|
||||
// Look at the top seven cards of your library. You may reveal up to two artifact cards from among them and put them into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
|
|
|
|||
|
|
@ -2,23 +2,23 @@ package mage.cards.r;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.AttackedThisTurnSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -31,10 +31,9 @@ import java.util.UUID;
|
|||
* @author Susucr
|
||||
*/
|
||||
public final class RidersOfTheMark extends CardImpl {
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.HUMAN, "Human you control");
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
private static final Hint hint = new ValueHint("Humans you control", xValue);
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.HUMAN, "Humans");
|
||||
private static final Hint hint = new ValueHint("Humans you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public RidersOfTheMark(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}");
|
||||
|
|
@ -45,11 +44,7 @@ public final class RidersOfTheMark extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// This spell costs {1} less to cast for each Human you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||
.setCanWorksOnStackOnly(true)
|
||||
).setRuleAtTheTop(true).addHint(hint));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).setRuleAtTheTop(true).addHint(hint));
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
|
@ -58,16 +53,8 @@ public final class RidersOfTheMark extends CardImpl {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// At the beginning of your end step, if Riders of the Mark attacked this turn, return it to its owner's hand. If you do, create a number of 1/1 white Human Soldier creature tokens equal to its toughness.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(
|
||||
new RidersOfTheMarkEffect()
|
||||
),
|
||||
AttackedThisTurnSourceCondition.instance,
|
||||
"At the beginning of your end step, if {this} attacked this turn, "
|
||||
+ "return it to its owner's hand. If you do, create a number of "
|
||||
+ "1/1 white Human Soldier creature tokens equal to its toughness."
|
||||
));
|
||||
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(new RidersOfTheMarkEffect())
|
||||
.withInterveningIf(AttackedThisTurnSourceCondition.instance));
|
||||
}
|
||||
|
||||
private RidersOfTheMark(final RidersOfTheMark card) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
|
|
@ -26,20 +25,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ScalesOfShale extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(
|
||||
new FilterControlledPermanent(SubType.LIZARD, "Lizard you control")
|
||||
);
|
||||
private static final Hint hint = new ValueHint("Lizards you control", xValue);
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.LIZARD, "Lizards");
|
||||
private static final Hint hint = new ValueHint("Lizards you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public ScalesOfShale(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||
|
||||
// This spell costs {1} less to cast for each Lizard you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, xValue).setCanWorksOnStackOnly(true)
|
||||
).setRuleAtTheTop(true).addHint(hint));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).setRuleAtTheTop(true).addHint(hint));
|
||||
|
||||
// Target creature gets +2/+0 and gains lifelink and indestructible until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@ package mage.cards.s;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -13,7 +12,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledEnchantmentPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -22,10 +22,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class SkyBlessedSamurai extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_ENCHANTMENT
|
||||
);
|
||||
private static final Hint hint = new ValueHint("Enchantments you control", xValue);
|
||||
static final FilterControlledPermanent filter = new FilterControlledEnchantmentPermanent("enchantments");
|
||||
private static final Hint hint = new ValueHint("Enchantments you control", new PermanentsOnBattlefieldCount(filter));
|
||||
|
||||
public SkyBlessedSamurai(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{6}{W}");
|
||||
|
|
@ -36,9 +34,7 @@ public final class SkyBlessedSamurai extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// This spell costs {1} less to cast for each enchantment you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||
new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||
).addHint(hint));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).addHint(hint));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -26,17 +26,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class TheCircleOfLoyalty extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filterKnight = new FilterControlledPermanent(SubType.KNIGHT, "Knights");
|
||||
private static final FilterSpell filterLegendary = new FilterSpell("a legendary spell");
|
||||
|
||||
static {
|
||||
filterLegendary.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
static final FilterControlledPermanent filterKnight = new FilterControlledPermanent("Knight you control");
|
||||
|
||||
static {
|
||||
filterKnight.add(SubType.KNIGHT.getPredicate());
|
||||
}
|
||||
private static final Hint hint = new ValueHint("Knights you control", new PermanentsOnBattlefieldCount(filterKnight));
|
||||
|
||||
public TheCircleOfLoyalty(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}{W}{W}");
|
||||
|
|
@ -44,10 +41,7 @@ public final class TheCircleOfLoyalty extends CardImpl {
|
|||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// This spell costs {1} less to cast for each Knight you control.
|
||||
DynamicValue xValue = new PermanentsOnBattlefieldCount(filterKnight);
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||
).addHint(new ValueHint("Knight you control", xValue)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filterKnight)).addHint(hint));
|
||||
|
||||
// Creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
|
|
@ -75,4 +69,4 @@ public final class TheCircleOfLoyalty extends CardImpl {
|
|||
public TheCircleOfLoyalty copy() {
|
||||
return new TheCircleOfLoyalty(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
|
|
@ -9,7 +8,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum AttackedThisTurnSourceCondition implements Condition {
|
||||
|
|
@ -21,4 +19,9 @@ public enum AttackedThisTurnSourceCondition implements Condition {
|
|||
AttackedThisTurnWatcher watcher = game.getState().getWatcher(AttackedThisTurnWatcher.class);
|
||||
return sourcePermanent != null && watcher.getAttackedThisTurnCreatures().contains(new MageObjectReference(sourcePermanent, game));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{this} attacked this turn";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue