mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Merge pull request #5962 from jmharmon/master
Implement 4 cards for ELD
This commit is contained in:
commit
f7d39ffaa5
6 changed files with 231 additions and 0 deletions
36
Mage.Sets/src/mage/cards/b/BakeIntoAPie.java
Normal file
36
Mage.Sets/src/mage/cards/b/BakeIntoAPie.java
Normal file
|
@ -0,0 +1,36 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.permanent.token.custom.FoodToken;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class BakeIntoAPie extends CardImpl {
|
||||
|
||||
public BakeIntoAPie(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}");
|
||||
|
||||
// Destroy target creature. Create a Food token.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken(), 1));
|
||||
}
|
||||
|
||||
public BakeIntoAPie(final BakeIntoAPie card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BakeIntoAPie copy() {
|
||||
return new BakeIntoAPie(this);
|
||||
}
|
||||
}
|
60
Mage.Sets/src/mage/cards/c/ChitteringWitch.java
Normal file
60
Mage.Sets/src/mage/cards/c/ChitteringWitch.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.OpponentsCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||
import mage.game.permanent.token.RatToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class ChitteringWitch extends CardImpl {
|
||||
|
||||
public ChitteringWitch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARLOCK);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Chittering Witch enters the battlefield, create a number of 1/1 black Rat creature tokens equal to the number of opponents you have.
|
||||
Effect effect = new CreateTokenEffect(new RatToken(), OpponentsCount.instance);
|
||||
effect.setText("create a number of 1/1 black Rat creature tokens equal to the number of opponents you have");
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(effect));
|
||||
|
||||
// {1}{B}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ChitteringWitch(final ChitteringWitch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChitteringWitch copy() {
|
||||
return new ChitteringWitch(this);
|
||||
}
|
||||
}
|
47
Mage.Sets/src/mage/cards/f/FirebornKnight.java
Normal file
47
Mage.Sets/src/mage/cards/f/FirebornKnight.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class FirebornKnight extends CardImpl {
|
||||
|
||||
public FirebornKnight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/W}{R/W}{R/W}{R/W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.KNIGHT);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Double strike
|
||||
this.addAbility(DoubleStrikeAbility.getInstance());
|
||||
|
||||
// {R/W}{R/W}{R/W}{R/W}: Fireborn Knight gets +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{R/W}{R/W}{R/W}{R/W}")));
|
||||
}
|
||||
|
||||
public FirebornKnight(final FirebornKnight card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FirebornKnight copy() {
|
||||
return new FirebornKnight(this);
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/cards/h/HeraldicBanner.java
Normal file
83
Mage.Sets/src/mage/cards/h/HeraldicBanner.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.ChooseColorEffect;
|
||||
import mage.abilities.effects.mana.AddManaChosenColorEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class HeraldicBanner extends CardImpl {
|
||||
|
||||
public HeraldicBanner(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// As Heraldic Banner enters the battlefield, choose a color.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Benefit)));
|
||||
|
||||
// Creatures you control of the chosen color get +1/+0.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HeraldicBannerEffect()));
|
||||
|
||||
// {T}: Add one mana of the chosen color.
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaChosenColorEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public HeraldicBanner(final HeraldicBanner card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeraldicBanner copy() {
|
||||
return new HeraldicBanner(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HeraldicBannerEffect extends ContinuousEffectImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
public HeraldicBannerEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
staticText = "Creatures you control of the chosen color get +1/+0";
|
||||
}
|
||||
|
||||
public HeraldicBannerEffect(final HeraldicBannerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeraldicBannerEffect copy() {
|
||||
return new HeraldicBannerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
ObjectColor color = (ObjectColor) game.getState().getValue(permanent.getId() + "_color");
|
||||
if (color != null) {
|
||||
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
if (perm.getColor(game).contains(color)) {
|
||||
perm.addPower(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -28,10 +28,14 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
this.maxCardNumberInBooster = 269; // unconfirmed for now
|
||||
|
||||
cards.add(new SetCardInfo("Arcane Signet", 331, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));
|
||||
cards.add(new SetCardInfo("Bake into a Pie", 76, Rarity.COMMON, mage.cards.b.BakeIntoAPie.class));
|
||||
cards.add(new SetCardInfo("Chittering Witch", 319, Rarity.RARE, mage.cards.c.ChitteringWitch.class));
|
||||
cards.add(new SetCardInfo("Chulane, Teller of Tales", 326, Rarity.MYTHIC, mage.cards.c.ChulaneTellerOfTales.class));
|
||||
cards.add(new SetCardInfo("Crystal Slipper", 119, Rarity.COMMON, mage.cards.c.CrystalSlipper.class));
|
||||
cards.add(new SetCardInfo("Fireborn Knight", 210, Rarity.UNCOMMON, mage.cards.f.FirebornKnight.class));
|
||||
cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class));
|
||||
cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class));
|
||||
cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class));
|
||||
cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class));
|
||||
cards.add(new SetCardInfo("Rankle, Master of Pranks", 356, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class));
|
||||
cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class));
|
||||
|
|
|
@ -353,6 +353,7 @@ public enum SubType {
|
|||
VOLVER("Volver", SubTypeSet.CreatureType),
|
||||
// W
|
||||
WALL("Wall", SubTypeSet.CreatureType),
|
||||
WARLOCK("Warlock", SubTypeSet.CreatureType),
|
||||
WARRIOR("Warrior", SubTypeSet.CreatureType),
|
||||
WEEQUAY("Weequay", SubTypeSet.CreatureType, true),
|
||||
WEIRD("Weird", SubTypeSet.CreatureType),
|
||||
|
|
Loading…
Reference in a new issue