forked from External/mage
Implemented Etchings of the Chosen
This commit is contained in:
parent
55bc743a15
commit
79dd09b0dc
12 changed files with 83 additions and 14 deletions
|
|
@ -30,7 +30,7 @@ public final class BelbesPortal extends CardImpl {
|
|||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.PutCreatureInPlay)));
|
||||
// {3}, {tap}: You may put a creature card of the chosen type from your hand onto the battlefield.
|
||||
FilterCreatureCard filter = new FilterCreatureCard("a creature card of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new PutCardFromHandOntoBattlefieldEffect(filter),
|
||||
new ManaCostsImpl("{3}"));
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class BrassHeraldEntersEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterCard filter = new FilterCard("creature cards of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
return new RevealLibraryPutIntoHandEffect(4, filter, Zone.LIBRARY).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ enum CallerOfTheHuntAdjuster implements CostAdjuster {
|
|||
if (mageObject != null
|
||||
&& effect.apply(game, ability)) {
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
ContinuousEffect effectPower = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom);
|
||||
ContinuousEffect effectToughness = new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom);
|
||||
game.addEffect(effectPower, ability);
|
||||
|
|
|
|||
71
Mage.Sets/src/mage/cards/e/EtchingsOfTheChosen.java
Normal file
71
Mage.Sets/src/mage/cards/e/EtchingsOfTheChosen.java
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EtchingsOfTheChosen extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("creatures you control of the chosen type");
|
||||
private static final FilterControlledPermanent filter2
|
||||
= new FilterControlledCreaturePermanent("a creature of the chosen type");
|
||||
|
||||
static {
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter2.add(ChosenSubtypePredicate.instance);
|
||||
}
|
||||
|
||||
public EtchingsOfTheChosen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{B}");
|
||||
|
||||
// As Etchings of the Chosen enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
|
||||
|
||||
// Creatures you control of the chosen type get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostAllEffect(
|
||||
1, 1, Duration.WhileOnBattlefield, filter, false
|
||||
)));
|
||||
|
||||
// {1}, Sacrifice a creature of the chosen type: Target creature you control gains indestructible until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(
|
||||
IndestructibleAbility.getInstance(), Duration.EndOfTurn
|
||||
), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private EtchingsOfTheChosen(final EtchingsOfTheChosen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EtchingsOfTheChosen copy() {
|
||||
return new EtchingsOfTheChosen(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ public final class KindredBoon extends CardImpl {
|
|||
|
||||
// {1}{W}: Put a divinity counter on target creature you control of the chosen type.
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.DIVINITY.createInstance()), new ManaCostsImpl("{1}{W}"));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class KindredDiscovery extends CardImpl {
|
|||
|
||||
// Whenever a creature you control of the chosen type enters the battlefield or attacks, draw a card.
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature you control of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
this.addAbility(new EntersBattlefieldOrAttacksAllTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), filter, false));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class MirrorOfTheForebears extends CardImpl {
|
|||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
}
|
||||
|
||||
public MirrorOfTheForebears(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class MorophonTheBoundless extends CardImpl {
|
|||
= new FilterCreaturePermanent("creatures you control of the chosen type");
|
||||
|
||||
static {
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
filter2.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class PlagueEngineer extends CardImpl {
|
|||
= new FilterOpponentsCreaturePermanent("creatures of the chosen type your opponents control");
|
||||
|
||||
static {
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
}
|
||||
|
||||
public PlagueEngineer(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public final class TravelersCloak extends CardImpl {
|
|||
|
||||
// Enchanted creature has landwalk of the chosen type.
|
||||
FilterLandPermanent filter = new FilterLandPermanent("Landwalk of the chosen type");
|
||||
filter.add(new ChosenSubtypePredicate());
|
||||
filter.add(ChosenSubtypePredicate.instance);
|
||||
Ability landwalkAbility = new LandwalkAbility(filter);
|
||||
Effect effect = new GainAbilityAttachedEffect(landwalkAbility, AttachmentType.AURA);
|
||||
effect.setText("Enchanted creature has landwalk of the chosen type");
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public final class ModernHorizons extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dismantling Blow", 5, Rarity.UNCOMMON, mage.cards.d.DismantlingBlow.class));
|
||||
cards.add(new SetCardInfo("Dregscape Sliver", 88, Rarity.UNCOMMON, mage.cards.d.DregscapeSliver.class));
|
||||
cards.add(new SetCardInfo("Elvish Fury", 162, Rarity.COMMON, mage.cards.e.ElvishFury.class));
|
||||
cards.add(new SetCardInfo("Etchings of the Chosen", 198, Rarity.UNCOMMON, mage.cards.e.EtchingsOfTheChosen.class));
|
||||
cards.add(new SetCardInfo("Exclude", 48, Rarity.UNCOMMON, mage.cards.e.Exclude.class));
|
||||
cards.add(new SetCardInfo("Fact or Fiction", 50, Rarity.UNCOMMON, mage.cards.f.FactOrFiction.class));
|
||||
cards.add(new SetCardInfo("Farmstead Gleaner", 222, Rarity.UNCOMMON, mage.cards.f.FarmsteadGleaner.class));
|
||||
|
|
|
|||
|
|
@ -9,13 +9,10 @@ import mage.filter.predicate.ObjectSourcePlayer;
|
|||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class ChosenSubtypePredicate implements ObjectPlayerPredicate<ObjectSourcePlayer<MageObject>> {
|
||||
|
||||
public ChosenSubtypePredicate() {
|
||||
}
|
||||
public enum ChosenSubtypePredicate implements ObjectPlayerPredicate<ObjectSourcePlayer<MageObject>> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue