mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
eb8519cd78
12 changed files with 282 additions and 53 deletions
|
|
@ -29,12 +29,14 @@ package mage.sets.apocalypse;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.EnvoyEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -42,8 +44,8 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -60,16 +62,12 @@ public class BrassHerald extends CardImpl {
|
|||
|
||||
// As Brass Herald enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
|
||||
|
||||
// When Brass Herald enters the battlefield, reveal the top four cards of your library. Put all creature cards of the chosen type revealed this way into your hand and the rest on the bottom of your library in any order.
|
||||
FilterCard filter = new FilterCard("creature cards of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(this.getId()));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new EnvoyEffect(filter, 4)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BrassHeraldEntersEffect()));
|
||||
|
||||
// Creatures of the chosen type get +1/+1.
|
||||
FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures of the chosen type");
|
||||
filter2.add(new ChosenSubtypePredicate(this.getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield,
|
||||
filter2, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, false)));
|
||||
}
|
||||
|
||||
public BrassHerald(final BrassHerald card) {
|
||||
|
|
@ -81,3 +79,27 @@ public class BrassHerald extends CardImpl {
|
|||
return new BrassHerald(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BrassHeraldEntersEffect extends OneShotEffect {
|
||||
|
||||
public BrassHeraldEntersEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "reveal the top four cards of your library. Put all creature cards of the chosen type revealed this way into your hand and the rest on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
public BrassHeraldEntersEffect(final BrassHeraldEntersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrassHeraldEntersEffect copy() {
|
||||
return new BrassHeraldEntersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterCard filter = new FilterCard("creature cards of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(source.getSourceId()));
|
||||
return new EnvoyEffect(filter, 4).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.AsEntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -45,8 +45,6 @@ import mage.constants.SubLayer;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -56,6 +54,12 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class AdaptiveAutomaton extends CardImpl {
|
||||
|
||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control of the chosen type");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public AdaptiveAutomaton(UUID ownerId) {
|
||||
super(ownerId, 201, "Adaptive Automaton", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||
this.expansionSetCode = "M12";
|
||||
|
|
@ -69,11 +73,7 @@ public class AdaptiveAutomaton extends CardImpl {
|
|||
// Adaptive Automaton is the chosen type in addition to its other types.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AdaptiveAutomatonAddSubtypeEffect()));
|
||||
// Other creatures you control of the chosen type get +1/+1.
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("Other creatures you control of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(this.getId()));
|
||||
filter.add(new AnotherPredicate());
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
||||
}
|
||||
|
||||
public AdaptiveAutomaton(final AdaptiveAutomaton card) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ChooseLandTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllOfChosenSubtypeEffect;
|
||||
import mage.abilities.keyword.PhasingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -40,7 +40,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -54,11 +53,11 @@ public class Shimmer extends CardImpl {
|
|||
|
||||
// As Shimmer enters the battlefield, choose a land type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseLandTypeEffect(Outcome.Detriment)));
|
||||
|
||||
|
||||
// Each land of the chosen type has phasing.
|
||||
FilterLandPermanent filter = new FilterLandPermanent("Each land of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(this.getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(PhasingAbility.getInstance(), Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllOfChosenSubtypeEffect(PhasingAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
new FilterLandPermanent("Each land of the chosen type"))));
|
||||
}
|
||||
|
||||
public Shimmer(final Shimmer card) {
|
||||
|
|
|
|||
|
|
@ -31,15 +31,13 @@ import java.util.UUID;
|
|||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -51,13 +49,10 @@ public class SharedTriumph extends CardImpl {
|
|||
super(ownerId, 53, "Shared Triumph", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
this.expansionSetCode = "ONS";
|
||||
|
||||
|
||||
// As Shared Triumph enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
|
||||
// Creatures of the chosen type get +1/+1.
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(this.getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, false)));
|
||||
}
|
||||
|
||||
public SharedTriumph(final SharedTriumph card) {
|
||||
|
|
|
|||
|
|
@ -31,14 +31,13 @@ import java.util.UUID;
|
|||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.cost.SpellsCostReductionAllEffect;
|
||||
import mage.abilities.effects.common.cost.SpellsCostReductionAllOfChosenSubtypeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -53,9 +52,8 @@ public class UrzasIncubator extends CardImpl {
|
|||
// As Urza's Incubator enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
|
||||
// Creature spells of the chosen type cost {2} less to cast.
|
||||
FilterCreatureCard filter = new FilterCreatureCard("creature spells of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(this.getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionAllEffect(filter, 2)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new SpellsCostReductionAllOfChosenSubtypeEffect(new FilterCreatureCard("creature spells of the chosen type"), 2)));
|
||||
}
|
||||
|
||||
public UrzasIncubator(final UrzasIncubator card) {
|
||||
|
|
|
|||
|
|
@ -31,15 +31,13 @@ import java.util.UUID;
|
|||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -51,13 +49,10 @@ public class EngineeredPlague extends CardImpl {
|
|||
super(ownerId, 51, "Engineered Plague", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
|
||||
this.expansionSetCode = "ULG";
|
||||
|
||||
|
||||
// As Engineered Plague enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.UnboostCreature)));
|
||||
// All creatures of the chosen type get -1/-1.
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("All creatures of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate(this.getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, -1, Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(-1, -1, Duration.WhileOnBattlefield, false)));
|
||||
}
|
||||
|
||||
public EngineeredPlague(final EngineeredPlague card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue