Merge remote-tracking branch 'upstream/master'

This commit is contained in:
GitHubMage 2018-04-28 19:06:10 +02:00
commit af2c3dbb33
51 changed files with 1045 additions and 645 deletions

View file

@ -1332,7 +1332,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
repaint();
}
private static final Pattern pattern = Pattern.compile(".*Add(.*)(\\{[WUBRGXC]\\})(.*)to your mana pool");
private static final Pattern pattern = Pattern.compile(".*Add(.*)(\\{[WUBRGXC]\\})");
public void analyseDeck() {
HashMap<String, Integer> qtys = new HashMap<>();
@ -1408,10 +1408,9 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
// Adding mana
for (String str : card.getRules()) {
Matcher m = pattern.matcher(str);
// ".*Add(.*)(\\{[WUBRGXC]\\})(.*)to your mana pool"
// ".*Add(.*)(\\{[WUBRGXC]\\})(.*)"
while (m.find()) {
System.out.println("0=" + m.group(0) + ",,,1=" + m.group(1) + ",,,2=" + m.group(2) + ",,,3=" + m.group(3));
str = "Add" + m.group(1) + m.group(3) + "to your mana pool";
str = "Add" + m.group(1);
int num = 1;
if (manaCounts.get(m.group(2)) != null) {
num = manaCounts.get(m.group(2));

View file

@ -11,7 +11,6 @@ import mage.cards.repository.ExpansionRepository;
import mage.constants.SetType;
import mage.deck.Standard;
/**
* Utility class for constructed formats (expansions and other editions).
*
@ -82,14 +81,16 @@ public final class ConstructedFormats {
if (STANDARD_CARDS.getSetCodes().contains(set.getCode())) {
underlyingSetCodesPerFormat.get(STANDARD).add(set.getCode());
}
if (set.getReleaseDate().after(extendedDate)) {
underlyingSetCodesPerFormat.get(EXTENDED).add(set.getCode());
}
if (set.getReleaseDate().after(frontierDate)) {
underlyingSetCodesPerFormat.get(FRONTIER).add(set.getCode());
}
if (set.getReleaseDate().after(modernDate)) {
underlyingSetCodesPerFormat.get(MODERN).add(set.getCode());
if (set.getType() != SetType.SUPPLEMENTAL_STANDARD_LEGAL) {
if (set.getReleaseDate().after(extendedDate) && (set.getType() == SetType.EXPANSION || set.getType() == SetType.CORE)) {
underlyingSetCodesPerFormat.get(EXTENDED).add(set.getCode());
}
if (set.getReleaseDate().after(frontierDate) && (set.getType() == SetType.EXPANSION || set.getType() == SetType.CORE)) {
underlyingSetCodesPerFormat.get(FRONTIER).add(set.getCode());
}
if (set.getReleaseDate().after(modernDate) && (set.getType() == SetType.EXPANSION || set.getType() == SetType.CORE)) {
underlyingSetCodesPerFormat.get(MODERN).add(set.getCode());
}
}
}

View file

@ -74,13 +74,13 @@ public class AtarkaMonument extends CardImpl {
private static class AtarkaMonumentToken extends TokenImpl {
AtarkaMonumentToken() {
super("", "4/4 red and green Dragon artifact creature with flying");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
color.setRed(true);
color.setGreen(true);
this.cardType.add(CardType.ARTIFACT);
this.cardType.add(CardType.CREATURE);
this.color.setRed(true);
this.color.setGreen(true);
this.subtype.add(SubType.DRAGON);
power = new MageInt(4);
toughness = new MageInt(4);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
}
public AtarkaMonumentToken(final AtarkaMonumentToken token) {
@ -91,4 +91,4 @@ public class AtarkaMonument extends CardImpl {
return new AtarkaMonumentToken(this);
}
}
}
}

View file

@ -37,20 +37,19 @@ import mage.abilities.effects.RedirectionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.TargetSource;
/**
*
*
* @author L_J
*/
public class BeaconOfDestiny extends CardImpl {
@ -81,7 +80,7 @@ class BeaconOfDestinyEffect extends RedirectionEffect {
private final TargetSource damageSource;
public BeaconOfDestinyEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, true);
super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next time a source of your choice would deal damage to you this turn, that damage is dealt to {this} instead";
this.damageSource = new TargetSource();
}

View file

@ -49,22 +49,22 @@ import mage.target.common.TargetCreaturePermanent;
public class Carom extends CardImpl {
public Carom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// The next 1 damage that would be dealt to target creature this turn is dealt to another target creature instead.
// Draw a card.
this.getSpellAbility().addEffect(new CaromEffect(Duration.EndOfTurn, 1));
TargetCreaturePermanent target = new TargetCreaturePermanent();
target.setTargetTag(1);
this.getSpellAbility().addTarget(target);
FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature (damage is redirected to)");
filter.add(new AnotherTargetPredicate(2));
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter);
target2.setTargetTag(2);
this.getSpellAbility().addTarget(target2);
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
@ -79,29 +79,29 @@ public class Carom extends CardImpl {
}
class CaromEffect extends RedirectionEffect {
protected MageObjectReference redirectToObject;
public CaromEffect(Duration duration, int amount) {
super(duration, amount, true);
super(duration, amount, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next " + amount + " damage that would be dealt to target creature this turn is dealt to another target creature instead";
}
public CaromEffect(final CaromEffect effect) {
super(effect);
}
@Override
public CaromEffect copy() {
return new CaromEffect(this);
}
@Override
public void init(Ability source, Game game) {
super.init(source, game);
redirectToObject = new MageObjectReference(source.getTargets().get(1).getFirstTarget(), game);
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {

View file

@ -37,10 +37,8 @@ import mage.abilities.effects.common.PutOnLibraryTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.other.OwnerPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -48,22 +46,16 @@ import mage.target.common.TargetCardInYourGraveyard;
* @author jeffwadsworth
*/
public class ConjurersBauble extends CardImpl {
private static final FilterCard filter = new FilterCard("card from your graveyard");
static {
filter.add(new OwnerPredicate(TargetController.YOU));
}
static final String rule = "Put up to one target card from your graveyard on the bottom of your library";
public ConjurersBauble(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
// {tap}, Sacrifice Conjurer's Bauble: Put up to one target card from your graveyard on the bottom of your library. Draw a card.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(false, rule), new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filter));
ability.addTarget(new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD));
ability.addEffect(new DrawCardSourceControllerEffect(1));
this.addAbility(ability);
}

View file

@ -37,8 +37,8 @@ import mage.abilities.effects.RedirectionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
@ -90,7 +90,7 @@ class DaughterOfAutumnPreventDamageTargetEffect extends RedirectionEffect {
private static FilterCreaturePermanent filter = new FilterCreaturePermanent();
public DaughterOfAutumnPreventDamageTargetEffect(Duration duration, int amount) {
super(duration, amount, true);
super(duration, amount, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next " + amount + " damage that would be dealt to target white creature this turn is dealt to {this} instead";
}

View file

@ -41,20 +41,19 @@ import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.TargetSource;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
*
* @author L_J
*/
public class GeneralsRegalia extends CardImpl {
public GeneralsRegalia(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// {3}: The next time a source of your choice would deal damage to you this turn, that damage is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GeneralsRegaliaEffect(), new GenericManaCost(3));
@ -77,7 +76,7 @@ class GeneralsRegaliaEffect extends RedirectionEffect {
private final TargetSource damageSource;
public GeneralsRegaliaEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, true);
super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next time a source of your choice would deal damage to you this turn, that damage is dealt to target creature you control instead";
this.damageSource = new TargetSource();
}

View file

@ -0,0 +1,137 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.RedirectionEffect;
import mage.abilities.keyword.FlyingAbility;
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 mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.target.common.TargetAnyTarget;
/**
*
* @author LevelX2
*/
public class Glarecaster extends CardImpl {
public Glarecaster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// {5}{W}: The next time damage would be dealt to Glarecaster and/or you this turn, that damage is dealt to any target instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GlarecasterEffect(), new ManaCostsImpl("{5}{W}"));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}
public Glarecaster(final Glarecaster card) {
super(card);
}
@Override
public Glarecaster copy() {
return new Glarecaster(this);
}
}
/**
* 10/4/2004 If both you and this card would be dealt damage at the same time,
* or if either you or this card would be dealt damage from multiple sources at
* the same time, the redirection will apply to both chunks of damage.
*
* @author LevelX2
*/
class GlarecasterEffect extends RedirectionEffect {
protected MageObjectReference redirectToObject;
public GlarecasterEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_AT_THE_SAME_TIME);
staticText = "The next time damage would be dealt to {this} and/or you this turn, that damage is dealt to any target instead";
}
public GlarecasterEffect(final GlarecasterEffect effect) {
super(effect);
this.redirectToObject = effect.redirectToObject;
}
@Override
public GlarecasterEffect copy() {
return new GlarecasterEffect(this);
}
@Override
public void init(Ability source, Game game) {
super.init(source, game);
redirectToObject = new MageObjectReference(source.getTargets().get(0).getFirstTarget(), game);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == EventType.DAMAGE_CREATURE || event.getType() == EventType.DAMAGE_PLAYER;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getSourceId())
|| event.getTargetId().equals(source.getControllerId())) {
if (redirectToObject.equals(new MageObjectReference(source.getTargets().get(0).getFirstTarget(), game))) {
redirectTarget = source.getTargets().get(0);
return true;
}
}
return false;
}
@Override
public boolean apply(Game game, Ability source
) {
return true;
}
}

View file

@ -29,25 +29,17 @@ package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileSourceEffect;
import mage.abilities.costs.common.ExileSourceFromGraveCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.targetpointer.FixedTarget;
/**
*
@ -56,7 +48,7 @@ import mage.target.targetpointer.FixedTarget;
public class GreenwardenOfMurasa extends CardImpl {
public GreenwardenOfMurasa(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.ELEMENTAL);
this.power = new MageInt(5);
this.toughness = new MageInt(4);
@ -67,7 +59,8 @@ public class GreenwardenOfMurasa extends CardImpl {
this.addAbility(ability);
// When Greenwarden of Murasa dies, you may exile it. If you do, return target card from your graveyard to your hand.
ability = new DiesTriggeredAbility(new GreenwardenOfMurasaEffect(), false);
ability = new DiesTriggeredAbility(new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ExileSourceFromGraveCost(),
"Exile {this} and return target card from your graveyard to your hand?", true), false);
ability.addTarget(new TargetCardInYourGraveyard());
this.addAbility(ability);
}
@ -82,38 +75,38 @@ public class GreenwardenOfMurasa extends CardImpl {
}
}
class GreenwardenOfMurasaEffect extends OneShotEffect {
public GreenwardenOfMurasaEffect() {
super(Outcome.Benefit);
this.staticText = "you may exile it. If you do, return target card from your graveyard to your hand";
}
public GreenwardenOfMurasaEffect(final GreenwardenOfMurasaEffect effect) {
super(effect);
}
@Override
public GreenwardenOfMurasaEffect copy() {
return new GreenwardenOfMurasaEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
Card targetCard = game.getCard(getTargetPointer().getFirst(game, source));
if (controller != null && sourceObject != null && targetCard != null) {
if (controller.chooseUse(outcome, "Exile " + sourceObject.getLogName() + " to return card from your graveyard to your hand?", source, game)) {
// Setting the fixed target prevents to return Greenwarden of Murasa itself (becuase it's exiled meanwhile),
// but of course you can target it as the ability triggers I guess
Effect effect = new ReturnToHandTargetEffect();
effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game)));
new ExileSourceEffect().apply(game, source);
return effect.apply(game, source);
}
return true;
}
return false;
}
}
//class GreenwardenOfMurasaEffect extends OneShotEffect {
//
// public GreenwardenOfMurasaEffect() {
// super(Outcome.Benefit);
// this.staticText = "you may exile it. If you do, return target card from your graveyard to your hand";
// }
//
// public GreenwardenOfMurasaEffect(final GreenwardenOfMurasaEffect effect) {
// super(effect);
// }
//
// @Override
// public GreenwardenOfMurasaEffect copy() {
// return new GreenwardenOfMurasaEffect(this);
// }
//
// @Override
// public boolean apply(Game game, Ability source) {
// Player controller = game.getPlayer(source.getControllerId());
// MageObject sourceObject = game.getObject(source.getSourceId());
// Card targetCard = game.getCard(getTargetPointer().getFirst(game, source));
// if (controller != null && sourceObject != null && targetCard != null) {
// if (controller.chooseUse(outcome, "Exile " + sourceObject.getLogName() + " to return card from your graveyard to your hand?", source, game)) {
// // Setting the fixed target prevents to return Greenwarden of Murasa itself (becuase it's exiled meanwhile),
// // but of course you can target it as the ability triggers I guess
// Effect effect = new ReturnToHandTargetEffect();
// effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game)));
// new ExileSourceEffect().apply(game, source);
// return effect.apply(game, source);
// }
// return true;
// }
// return false;
// }
//}

View file

@ -119,24 +119,29 @@ class HallOfGemstoneEffect extends ReplacementEffectImpl {
if (colorChosen != null) {
ManaEvent manaEvent = (ManaEvent) event;
Mana mana = manaEvent.getMana();
int amount = mana.count();
// 8/23/2016 Colorless mana added to a players mana pool isnt affected.
int genericAmount = mana.getGeneric();
int colorlessAmount = mana.getColorless();
int coloredAmount = mana.countColored();
switch (colorChosen.getColoredManaSymbol()) {
case W:
mana.setToMana(Mana.WhiteMana(amount));
mana.setToMana(Mana.WhiteMana(coloredAmount));
break;
case U:
mana.setToMana(Mana.BlueMana(amount));
mana.setToMana(Mana.BlueMana(coloredAmount));
break;
case B:
mana.setToMana(Mana.BlackMana(amount));
mana.setToMana(Mana.BlackMana(coloredAmount));
break;
case R:
mana.setToMana(Mana.RedMana(amount));
mana.setToMana(Mana.RedMana(coloredAmount));
break;
case G:
mana.setToMana(Mana.GreenMana(amount));
mana.setToMana(Mana.GreenMana(coloredAmount));
break;
}
mana.setGeneric(genericAmount);
mana.setColorless(colorlessAmount);
}
return false;
}

View file

@ -50,7 +50,7 @@ import mage.target.common.TargetAnyTarget;
public class HarmsWay extends CardImpl {
public HarmsWay(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to any target instead.
this.getSpellAbility().addEffect(new HarmsWayPreventDamageTargetEffect());
@ -72,7 +72,7 @@ class HarmsWayPreventDamageTargetEffect extends RedirectionEffect {
private final TargetSource damageSource;
public HarmsWayPreventDamageTargetEffect() {
super(Duration.EndOfTurn, 2, true);
super(Duration.EndOfTurn, 2, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to any target instead";
this.damageSource = new TargetSource();
}

View file

@ -38,8 +38,8 @@ import mage.abilities.effects.RedirectionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
@ -92,14 +92,14 @@ class HazduhrTheAbbotRedirectDamageEffect extends RedirectionEffect {
private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
public HazduhrTheAbbotRedirectDamageEffect(Duration duration) {
super(duration, 0, true);
super(duration, 0, UsageType.ONE_USAGE_ABSOLUTE);
this.staticText = "The next X damage that would be dealt this turn to target white creature you control is dealt to {this} instead";
}
public HazduhrTheAbbotRedirectDamageEffect(final HazduhrTheAbbotRedirectDamageEffect effect) {
super(effect);
}
@Override
public void init(Ability source, Game game) {
amountToRedirect = source.getManaCostsToPay().getX();

View file

@ -32,13 +32,14 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import static mage.abilities.effects.RedirectionEffect.UsageType.ACCORDING_DURATION;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
/**
@ -58,7 +59,7 @@ public class KaronasZealot extends CardImpl {
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{W}{W}")));
// When Karona's Zealot is turned face up, all damage that would be dealt to it this turn is dealt to target creature instead.
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, false)
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, ACCORDING_DURATION)
.setText("all damage that would be dealt to it this turn is dealt to target creature instead"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);

View file

@ -32,13 +32,14 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@ -49,7 +50,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class LancersEnKor extends CardImpl {
public LancersEnKor(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.KOR);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3);
@ -57,9 +58,9 @@ public class LancersEnKor extends CardImpl {
// Trample
this.addAbility(TrampleAbility.getInstance());
// {0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new GenericManaCost(0));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}

View file

@ -48,8 +48,8 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
@ -154,7 +154,7 @@ class MartyrdomRedirectDamageTargetEffect extends RedirectionEffect {
private static FilterCreaturePermanent filter = new FilterCreaturePermanent();
public MartyrdomRedirectDamageTargetEffect(Duration duration, int amount) {
super(duration, amount, true);
super(duration, amount, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next " + amount + " damage that would be dealt to target creature, planeswalker, or player this turn is dealt to {this} instead";
}

View file

@ -32,12 +32,13 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@ -48,7 +49,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class NomadsEnKor extends CardImpl {
public NomadsEnKor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
this.subtype.add(SubType.KOR);
this.subtype.add(SubType.NOMAD);
this.subtype.add(SubType.SOLDIER);
@ -57,7 +58,7 @@ public class NomadsEnKor extends CardImpl {
this.toughness = new MageInt(1);
// {0}: The next 1 damage that would be dealt to Nomads en-Kor this turn is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new GenericManaCost(0));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}

View file

@ -29,6 +29,7 @@ package mage.cards.n;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.costs.common.DiscardXTargetCost;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.effects.Effect;
@ -38,6 +39,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard;
@ -49,16 +51,15 @@ import mage.target.common.TargetCardInYourGraveyard;
public class NostalgicDreams extends CardImpl {
public NostalgicDreams(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{G}");
// As an additional cost to cast Nostalgic Dreams, discard X cards.
this.getSpellAbility().addCost(new DiscardXTargetCost(new FilterCard("cards"), true));
// Return X target cards from your graveyard to your hand. Exile Nostalgic Dreams.
// Return X target cards from your graveyard to your hand.
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
effect.setText("Return X target cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(effect);
// Exile Nostalgic Dreams.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
}
@ -69,11 +70,12 @@ public class NostalgicDreams extends CardImpl {
@Override
public void adjustTargets(Ability ability, Game game) {
int xValue = new GetXValue().calculate(game, ability, null);
// if (xValue > 0) {
Target target = new TargetCardInYourGraveyard(xValue, new FilterCard("card from your graveyard"));
if (ability instanceof SpellAbility) {
int xValue = new GetXValue().calculate(game, ability, null);
Target target = new TargetCardInYourGraveyard(xValue, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD);
ability.addTarget(target);
// }
}
}
@Override

View file

@ -43,20 +43,19 @@ import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.TargetSource;
import mage.target.common.TargetOpponentsChoicePermanent;
/**
*
*
* @author L_J
*/
public class NovaPentacle extends CardImpl {
public NovaPentacle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// {3}, {tap}: The next time a source of your choice would deal damage to you this turn, that damage is dealt to target creature of an opponent's choice instead
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NovaPentacleEffect(), new GenericManaCost(3));
@ -80,7 +79,7 @@ class NovaPentacleEffect extends RedirectionEffect {
private final TargetSource damageSource;
public NovaPentacleEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, true);
super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next time a source of your choice would deal damage to you this turn, that damage is dealt to target creature of an opponent's choice instead";
this.damageSource = new TargetSource();
}

View file

@ -32,13 +32,14 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.abilities.keyword.FlankingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@ -49,7 +50,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class OutriderEnKor extends CardImpl {
public OutriderEnKor(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.KOR);
this.subtype.add(SubType.REBEL);
this.subtype.add(SubType.KNIGHT);
@ -58,9 +59,9 @@ public class OutriderEnKor extends CardImpl {
// Flanking
this.addAbility(new FlankingAbility());
// {0}: The next 1 damage that would be dealt to Outrider en-Kor this turn is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new GenericManaCost(0));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}

View file

@ -31,7 +31,6 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -55,7 +54,7 @@ public class Overload extends CardImpl {
this.addAbility(new KickerAbility("{2}"));
// Destroy target artifact if its converted mana cost is 2 or less. If Overload was kicked, destroy that artifact if its converted mana cost is 5 or less instead.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new OverloadEffect());
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
}

View file

@ -27,14 +27,16 @@
*/
package mage.cards.p;
import java.util.Iterator;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.mana.CommanderColorIdentityManaAbility;
import mage.abilities.keyword.ChangelingAbility;
import mage.abilities.mana.CommanderColorIdentityManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -43,12 +45,10 @@ import mage.constants.SubTypeSet;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.players.Player;
import java.util.Iterator;
import java.util.UUID;
/**
*
* @author TheElk801
@ -66,8 +66,7 @@ public class PathOfAncestry extends CardImpl {
this.addAbility(ability);
// When that mana is spent to cast a creature spell that shares a creature type with your commander, scry 1.
Effect effect = new ScryEffect(1);
this.addAbility(new PathOfAncestryTriggeredAbility(ability.getOriginalId(), effect));
this.addAbility(new PathOfAncestryTriggeredAbility(new ScryEffect(1)));
}
public PathOfAncestry(final PathOfAncestry card) {
@ -82,16 +81,12 @@ public class PathOfAncestry extends CardImpl {
class PathOfAncestryTriggeredAbility extends TriggeredAbilityImpl {
String abilityOriginalId;
public PathOfAncestryTriggeredAbility(UUID abilityOriginalId, Effect effect) {
public PathOfAncestryTriggeredAbility(Effect effect) {
super(Zone.ALL, effect, true);
this.abilityOriginalId = abilityOriginalId.toString();
}
public PathOfAncestryTriggeredAbility(final PathOfAncestryTriggeredAbility ability) {
super(ability);
this.abilityOriginalId = ability.abilityOriginalId;
}
@Override
@ -106,36 +101,48 @@ class PathOfAncestryTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getData().equals(abilityOriginalId)) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null && spell.isCreature()) {
Player controller = game.getPlayer(getControllerId());
if (controller != null && controller.getCommandersIds() != null && !controller.getCommandersIds().isEmpty()) {
if (spell.getAbilities().contains(ChangelingAbility.getInstance())) {
for (UUID cmdr : controller.getCommandersIds()) {
MageObject commander = game.getObject(cmdr);
if (commander != null) {
if (commander.getAbilities().contains(ChangelingAbility.getInstance())) {
return true;
}
Iterator<SubType> cmdrSubs = commander.getSubtype(game).iterator();
while (cmdrSubs.hasNext()) {
SubType sType = cmdrSubs.next();
if (sType.getSubTypeSet() == SubTypeSet.CreatureType) {
return true;
if (event.getSourceId().equals(getSourceId())) {
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(getSourceId());
if (sourcePermanent != null) {
boolean found = false;
for (Ability ability : sourcePermanent.getAbilities()) {
if (ability instanceof CommanderColorIdentityManaAbility && ability.getOriginalId().toString().equals(event.getData())) {
found = true;
break;
}
}
if (found) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null && spell.isCreature()) {
Player controller = game.getPlayer(getControllerId());
if (controller != null && controller.getCommandersIds() != null && !controller.getCommandersIds().isEmpty()) {
if (spell.getAbilities().contains(ChangelingAbility.getInstance())) {
for (UUID cmdr : controller.getCommandersIds()) {
MageObject commander = game.getObject(cmdr);
if (commander != null) {
if (commander.getAbilities().contains(ChangelingAbility.getInstance())) {
return true;
}
Iterator<SubType> cmdrSubs = commander.getSubtype(game).iterator();
while (cmdrSubs.hasNext()) {
SubType sType = cmdrSubs.next();
if (sType.getSubTypeSet() == SubTypeSet.CreatureType) {
return true;
}
}
}
}
}
}
}
Iterator<SubType> spellSubs = spell.getSubtype(game).iterator();
while (spellSubs.hasNext()) {
SubType sType = spellSubs.next();
if (sType.getSubTypeSet() == SubTypeSet.CreatureType) {
for (UUID cmdr : controller.getCommandersIds()) {
MageObject commander = game.getObject(cmdr);
if (commander != null && (commander.hasSubtype(sType, game) || commander.getAbilities().contains(ChangelingAbility.getInstance()))) {
return true;
Iterator<SubType> spellSubs = spell.getSubtype(game).iterator();
while (spellSubs.hasNext()) {
SubType sType = spellSubs.next();
if (sType.getSubTypeSet() == SubTypeSet.CreatureType) {
for (UUID cmdr : controller.getCommandersIds()) {
MageObject commander = game.getObject(cmdr);
if (commander != null && (commander.hasSubtype(sType, game) || commander.getAbilities().contains(ChangelingAbility.getInstance()))) {
return true;
}
}
}
}
}

View file

@ -38,9 +38,9 @@ import mage.abilities.effects.RedirectionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
@ -56,7 +56,7 @@ public class PersonalIncarnation extends CardImpl {
public PersonalIncarnation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{W}");
this.subtype.add(SubType.AVATAR);
this.subtype.add(SubType.INCARNATION);
this.power = new MageInt(6);
@ -83,7 +83,7 @@ public class PersonalIncarnation extends CardImpl {
class PersonalIncarnationRedirectEffect extends RedirectionEffect {
public PersonalIncarnationRedirectEffect() {
super(Duration.EndOfTurn, 1, true);
super(Duration.EndOfTurn, 1, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next 1 damage that would be dealt to {this} this turn is dealt to its owner instead.";
}

View file

@ -0,0 +1,178 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.p;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardsImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.StackObject;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author L_J
*/
public class PsychicBattle extends CardImpl {
public PsychicBattle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}");
// Whenever a player chooses one or more targets, each player reveals the top card of his or her library. The player who reveals the card with the highest converted mana cost may change the target or targets. If two or more cards are tied for highest cost, the target or targets remain unchanged. Changing targets this way doesn't trigger abilities of permanents named Psychic Battle.
this.addAbility(new PsychicBattleTriggeredAbility());
}
public PsychicBattle(final PsychicBattle card) {
super(card);
}
@Override
public PsychicBattle copy() {
return new PsychicBattle(this);
}
}
class PsychicBattleTriggeredAbility extends TriggeredAbilityImpl {
private static final FilterPermanent filter = new FilterPermanent();
static {
filter.add(new NamePredicate("Psychic Battle"));
}
public PsychicBattleTriggeredAbility() {
super(Zone.BATTLEFIELD, new PsychicBattleEffect(), false);
}
public PsychicBattleTriggeredAbility(PsychicBattleTriggeredAbility ability) {
super(ability);
}
@Override
public PsychicBattleTriggeredAbility copy() {
return new PsychicBattleTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.TARGETED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
if (stackObject != null) {
Permanent psychicBattle = game.getPermanentOrLKIBattlefield(getSourceId());
if (psychicBattle != null && !(stackObject.isTargetChanged() && filter.match(psychicBattle, game))) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getSourceId()));
stackObject.setTargetChanged(false); // resets the targetChanged flag
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever a player chooses one or more targets, " + super.getRule() + " Changing targets this way doesn't trigger abilities of permanents named Psychic Battle.";
}
}
class PsychicBattleEffect extends OneShotEffect {
public PsychicBattleEffect() {
super(Outcome.Neutral);
this.staticText = "each player reveals the top card of his or her library. The player who reveals the card with the highest converted mana cost may change the target or targets. If two or more cards are tied for highest cost, the target or targets remain unchanged";
}
public PsychicBattleEffect(final PsychicBattleEffect effect) {
super(effect);
}
@Override
public PsychicBattleEffect copy() {
return new PsychicBattleEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject != null) {
Map<Player, Integer> manacostMap = new HashMap<>();
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null && player.getLibrary().hasCards()) {
Card card = player.getLibrary().getFromTop(game);
player.revealCards(sourceObject.getIdName() + " (" + player.getName() + ')', new CardsImpl(card), game);
manacostMap.put(player, card.getConvertedManaCost());
}
}
Player highestCostPlayer = null;
int maxValue = Collections.max(manacostMap.values());
boolean tie = false;
for (Map.Entry<Player, Integer> entry : manacostMap.entrySet()) {
if (entry.getValue() == maxValue) {
if (highestCostPlayer != null) { // the result is tied, so nobody changes the targets
tie = true;
break;
} else {
highestCostPlayer = entry.getKey();
}
}
}
if (highestCostPlayer != null && !tie) {
StackObject stackObject = game.getStack().getStackObject(this.getTargetPointer().getFirst(game, source));
if (stackObject != null) {
stackObject.setTargetChanged(true); // this makes the new target "invisible" for the Psychic Battle ability
stackObject.chooseNewTargets(game, highestCostPlayer.getId(), false, false, null);
}
return true;
}
return tie;
}
return false;
}
}

View file

@ -41,8 +41,8 @@ import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
@ -60,7 +60,7 @@ import mage.target.common.TargetCreaturePermanent;
public class RaziaBorosArchangel extends CardImpl {
public RaziaBorosArchangel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}{W}{W}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ANGEL);
@ -107,7 +107,7 @@ class RaziaBorosArchangelEffect extends RedirectionEffect {
protected MageObjectReference redirectToObject;
public RaziaBorosArchangelEffect(Duration duration, int amount) {
super(duration, 3, true);
super(duration, 3, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next " + amount + " damage that would be dealt to target creature you control this turn is dealt to another target creature instead";
}

View file

@ -51,19 +51,19 @@ import mage.target.common.TargetCardInGraveyard;
/**
*
* @author jonubuu
* @author jonubuu
*/
public class RelicOfProgenitus extends CardImpl {
public RelicOfProgenitus(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
// {tap}: Target player exiles a card from their graveyard.
Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RelicOfProgenitusEffect(), new TapSourceCost());
firstAbility.addTarget(new TargetPlayer());
this.addAbility(firstAbility);
// {1}, Exile Relic of Progenitus: Exile all cards from all graveyards. Draw a card.
Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileGraveyardAllPlayersEffect(),new GenericManaCost(1));
Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileGraveyardAllPlayersEffect(), new GenericManaCost(1));
secondAbility.addCost(new ExileSourceCost());
secondAbility.addEffect(new DrawCardSourceControllerEffect(1));
this.addAbility(secondAbility);

View file

@ -34,7 +34,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -44,14 +44,13 @@ import mage.target.common.TargetCardInYourGraveyard;
public class Restock extends CardImpl {
public Restock(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// Return two target cards from your graveyard to your hand. Exile Restock.
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
effect.setText("Return two target cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(2, new FilterCard("card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(2, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
}

View file

@ -35,7 +35,7 @@ import mage.abilities.keyword.UndauntedAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -53,7 +53,7 @@ public class SeedsOfRenewal extends CardImpl {
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
effect.setText("Return up to two target cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCard("card from your graveyard")));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
}

View file

@ -35,13 +35,14 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.RedirectionEffect;
import mage.abilities.effects.RedirectionEffect.UsageType;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
@ -61,7 +62,7 @@ import mage.target.common.TargetCreaturePermanent;
public class ShamanEnKor extends CardImpl {
public ShamanEnKor(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.KOR);
this.subtype.add(SubType.CLERIC);
this.subtype.add(SubType.SHAMAN);
@ -71,7 +72,7 @@ public class ShamanEnKor extends CardImpl {
// {0}: The next 1 damage that would be dealt to Shaman en-Kor this turn is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0));
new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, UsageType.ONE_USAGE_ABSOLUTE), new GenericManaCost(0));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
@ -97,7 +98,7 @@ class ShamanEnKorRedirectFromTargetEffect extends RedirectionEffect {
protected MageObjectReference sourceObject;
ShamanEnKorRedirectFromTargetEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, true);
super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next time a source of your choice would deal damage to target creature this turn, that damage is dealt to {this} instead";
}

View file

@ -37,8 +37,8 @@ import mage.abilities.effects.RedirectionEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AttackingPredicate;
@ -88,7 +88,7 @@ class ShimianNightStalkerRedirectDamageEffect extends RedirectionEffect {
private static FilterCreaturePermanent filter = new FilterCreaturePermanent();
public ShimianNightStalkerRedirectDamageEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, true);
super(Duration.EndOfTurn, Integer.MAX_VALUE, UsageType.ONE_USAGE_ABSOLUTE);
this.staticText = "All damage that would be dealt to you this turn by target attacking creature is dealt to {this} instead";
}
@ -107,7 +107,7 @@ class ShimianNightStalkerRedirectDamageEffect extends RedirectionEffect {
if (permanent != null) {
if (filter.match(permanent, permanent.getId(), permanent.getControllerId(), game)) {
if (event.getSourceId() != null && event.getTargetId() != null) {
if (event.getSourceId().equals(getTargetPointer().getFirst(game, source))
if (event.getSourceId().equals(getTargetPointer().getFirst(game, source))
&& event.getTargetId().equals(source.getControllerId())) {
TargetPermanent target = new TargetPermanent();
target.add(source.getSourceId(), game);

View file

@ -50,8 +50,8 @@ import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetSource;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCardInHand;
/**
*
@ -90,7 +90,7 @@ class ShiningShoalRedirectDamageTargetEffect extends RedirectDamageFromSourceToT
private final DynamicValue dynamicAmount;
public ShiningShoalRedirectDamageTargetEffect(Duration duration, DynamicValue dynamicAmount) {
super(duration, 0, true);
super(duration, 0, UsageType.ONE_USAGE_AT_THE_SAME_TIME);
this.dynamicAmount = dynamicAmount;
staticText = "The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to any target instead";
}

View file

@ -32,13 +32,14 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@ -49,7 +50,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class SpiritEnKor extends CardImpl {
public SpiritEnKor(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.KOR);
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(2);
@ -60,7 +61,7 @@ public class SpiritEnKor extends CardImpl {
// {0}: The next 1 damage that would be dealt to Spirit en-Kor this turn is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0));
new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new GenericManaCost(0));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}

View file

@ -30,10 +30,8 @@ package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.common.RaidCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -56,11 +54,11 @@ public class SwaggeringCorsair extends CardImpl {
this.toughness = new MageInt(2);
// <i>Raid</i> - Swaggering Corsair enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.
Ability ability = new ConditionalTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false),
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
RaidCondition.instance,
"<i>Raid</i> &mdash; Swaggering Corsair enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.");
this.addAbility(ability, new PlayerAttackedWatcher());
"<i>Raid</i> &mdash; {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.", ""
), new PlayerAttackedWatcher());
}
public SwaggeringCorsair(final SwaggeringCorsair card) {
@ -71,4 +69,4 @@ public class SwaggeringCorsair extends CardImpl {
public SwaggeringCorsair copy() {
return new SwaggeringCorsair(this);
}
}
}

View file

@ -58,7 +58,7 @@ public class VassalsDuty extends CardImpl {
}
public VassalsDuty(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
// {1}: The next 1 damage that would be dealt to target legendary creature you control this turn is dealt to you instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new VassalsDutyPreventDamageTargetEffect(Duration.EndOfTurn, 1), new GenericManaCost(1));
@ -79,7 +79,7 @@ public class VassalsDuty extends CardImpl {
class VassalsDutyPreventDamageTargetEffect extends RedirectionEffect {
public VassalsDutyPreventDamageTargetEffect(Duration duration, int amount) {
super(duration, amount, true);
super(duration, amount, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next " + amount + " damage that would be dealt to target legendary creature you control this turn is dealt to you instead";
}

View file

@ -38,9 +38,9 @@ import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
@ -56,7 +56,7 @@ import mage.target.common.TargetCreaturePermanent;
public class WardOfPiety extends CardImpl {
public WardOfPiety(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
this.subtype.add(SubType.AURA);
// Enchant creature
@ -87,12 +87,13 @@ class WardOfPietyPreventDamageTargetEffect extends RedirectionEffect {
protected MageObjectReference redirectToObject;
public WardOfPietyPreventDamageTargetEffect() {
super(Duration.EndOfTurn, 1, true);
super(Duration.EndOfTurn, 1, UsageType.ONE_USAGE_ABSOLUTE);
staticText = "The next 1 damage that would be dealt to enchanted creature this turn is dealt to any target instead";
}
public WardOfPietyPreventDamageTargetEffect(final WardOfPietyPreventDamageTargetEffect effect) {
super(effect);
this.redirectToObject = effect.redirectToObject;
}
@Override

View file

@ -40,8 +40,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate;
import mage.target.common.TargetCreaturePermanent;
/**
@ -50,7 +49,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class WarkiteMarauder extends CardImpl {
private final UUID originalId;
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
static {
filter.add(new DefendingPlayerControlsPredicate());
}
public WarkiteMarauder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
@ -68,27 +71,13 @@ public class WarkiteMarauder extends CardImpl {
.setText("target creature defending player controls loses all abilities"), false);
ability.addEffect(new SetPowerToughnessTargetEffect(0, 1, Duration.EndOfTurn)
.setText("and has base power and toughness 0/1 until end of turn"));
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls")));
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
this.originalId = ability.getOriginalId();
}
public WarkiteMarauder(final WarkiteMarauder card) {
super(card);
this.originalId = card.originalId;
}
@Override
public void adjustTargets(Ability ability, Game game) {
if (ability.getOriginalId().equals(originalId)) {
ability.getTargets().clear();
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId());
filter.add(new ControllerIdPredicate(defenderId));
TargetCreaturePermanent target = new TargetCreaturePermanent(1, 1, filter, false);
ability.addTarget(target);
}
}
@Override

View file

@ -32,12 +32,13 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@ -48,7 +49,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
public class WarriorEnKor extends CardImpl {
public WarriorEnKor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}");
this.subtype.add(SubType.KOR);
this.subtype.add(SubType.WARRIOR);
this.subtype.add(SubType.KNIGHT);
@ -57,7 +58,7 @@ public class WarriorEnKor extends CardImpl {
// {0}: The next 1 damage that would be dealt to Warrior en-Kor this turn is dealt to target creature you control instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new GenericManaCost(0));
new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new GenericManaCost(0));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}

View file

@ -36,7 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard;
@ -47,7 +47,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class WildestDreams extends CardImpl {
public WildestDreams(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{G}");
// Return X target cards from your graveyard to your hand.
// Exile Wildest Dreams.
@ -63,7 +63,7 @@ public class WildestDreams extends CardImpl {
if (ability instanceof SpellAbility) {
int xValue = ability.getManaCostsToPay().getX();
ability.getTargets().clear();
ability.addTarget(new TargetCardInYourGraveyard(xValue, new FilterCard("card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(xValue, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD));
}
}

View file

@ -32,6 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -48,13 +49,13 @@ import mage.target.common.TargetCreaturePermanent;
public class ZealousInquisitor extends CardImpl {
public ZealousInquisitor(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, SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {1}{W}: The next 1 damage that would be dealt to Zealous Inquisitor this turn is dealt to target creature instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new ManaCostsImpl("{1}{W}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new ManaCostsImpl("{1}{W}"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -32,6 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import static mage.abilities.effects.RedirectionEffect.UsageType.ONE_USAGE_ABSOLUTE;
import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect;
import mage.abilities.keyword.FlankingAbility;
import mage.cards.CardImpl;
@ -49,16 +50,16 @@ import mage.target.common.TargetAnyTarget;
public class ZhalfirinCrusader extends CardImpl {
public ZhalfirinCrusader(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
this.subtype.add(SubType.HUMAN, SubType.KNIGHT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flanking
this.addAbility(new FlankingAbility());
// {1}{W}: The next 1 damage that would be dealt to Zhalfirin Crusader this turn is dealt to any target instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new ManaCostsImpl("{1}{W}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, ONE_USAGE_ABSOLUTE), new ManaCostsImpl("{1}{W}"));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

View file

@ -236,6 +236,7 @@ public class Invasion extends ExpansionSet {
cards.add(new SetCardInfo("Probe", 66, Rarity.COMMON, mage.cards.p.Probe.class));
cards.add(new SetCardInfo("Prohibit", 67, Rarity.COMMON, mage.cards.p.Prohibit.class));
cards.add(new SetCardInfo("Protective Sphere", 26, Rarity.COMMON, mage.cards.p.ProtectiveSphere.class));
cards.add(new SetCardInfo("Psychic Battle", 68, Rarity.RARE, mage.cards.p.PsychicBattle.class));
cards.add(new SetCardInfo("Pure Reflection", 27, Rarity.RARE, mage.cards.p.PureReflection.class));
cards.add(new SetCardInfo("Pyre Zombie", 261, Rarity.RARE, mage.cards.p.PyreZombie.class));
cards.add(new SetCardInfo("Quirion Elves", 203, Rarity.COMMON, mage.cards.q.QuirionElves.class));

View file

@ -1,359 +1,360 @@
package mage.sets;
import mage.ObjectColor;
import mage.cards.CardGraphicInfo;
import mage.cards.ExpansionSet;
import mage.constants.Rarity;
import mage.constants.SetType;
public class Onslaught extends ExpansionSet {
private static final Onslaught instance = new Onslaught();
public static Onslaught getInstance() {
return instance;
}
private Onslaught() {
super("Onslaught", "ONS", ExpansionSet.buildDate(2002, 10, 7), SetType.EXPANSION);
this.blockName = "Onslaught";
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 0;
cards.add(new SetCardInfo("Accursed Centaur", 123, Rarity.COMMON, mage.cards.a.AccursedCentaur.class));
cards.add(new SetCardInfo("Aether Charge", 184, Rarity.UNCOMMON, mage.cards.a.AetherCharge.class));
cards.add(new SetCardInfo("Aggravated Assault", 185, Rarity.RARE, mage.cards.a.AggravatedAssault.class));
cards.add(new SetCardInfo("Airborne Aid", 62, Rarity.COMMON, mage.cards.a.AirborneAid.class));
cards.add(new SetCardInfo("Airdrop Condor", 186, Rarity.UNCOMMON, mage.cards.a.AirdropCondor.class));
cards.add(new SetCardInfo("Akroma's Blessing", 1, Rarity.UNCOMMON, mage.cards.a.AkromasBlessing.class));
cards.add(new SetCardInfo("Akroma's Vengeance", 2, Rarity.RARE, mage.cards.a.AkromasVengeance.class));
cards.add(new SetCardInfo("Ancestor's Prophet", 3, Rarity.RARE, mage.cards.a.AncestorsProphet.class));
cards.add(new SetCardInfo("Animal Magnetism", 245, Rarity.RARE, mage.cards.a.AnimalMagnetism.class));
cards.add(new SetCardInfo("Annex", 63, Rarity.UNCOMMON, mage.cards.a.Annex.class));
cards.add(new SetCardInfo("Anurid Murkdiver", 124, Rarity.COMMON, mage.cards.a.AnuridMurkdiver.class));
cards.add(new SetCardInfo("Aphetto Alchemist", 64, Rarity.UNCOMMON, mage.cards.a.AphettoAlchemist.class));
cards.add(new SetCardInfo("Aphetto Dredging", 125, Rarity.COMMON, mage.cards.a.AphettoDredging.class));
cards.add(new SetCardInfo("Aphetto Grifter", 65, Rarity.UNCOMMON, mage.cards.a.AphettoGrifter.class));
cards.add(new SetCardInfo("Aphetto Vulture", 126, Rarity.UNCOMMON, mage.cards.a.AphettoVulture.class));
cards.add(new SetCardInfo("Arcanis the Omnipotent", 66, Rarity.RARE, mage.cards.a.ArcanisTheOmnipotent.class));
cards.add(new SetCardInfo("Ascending Aven", 68, Rarity.COMMON, mage.cards.a.AscendingAven.class));
cards.add(new SetCardInfo("Astral Slide", 4, Rarity.UNCOMMON, mage.cards.a.AstralSlide.class));
cards.add(new SetCardInfo("Aura Extraction", 5, Rarity.UNCOMMON, mage.cards.a.AuraExtraction.class));
cards.add(new SetCardInfo("Aurification", 6, Rarity.RARE, mage.cards.a.Aurification.class));
cards.add(new SetCardInfo("Avarax", 187, Rarity.UNCOMMON, mage.cards.a.Avarax.class));
cards.add(new SetCardInfo("Aven Brigadier", 7, Rarity.RARE, mage.cards.a.AvenBrigadier.class));
cards.add(new SetCardInfo("Aven Fateshaper", 69, Rarity.UNCOMMON, mage.cards.a.AvenFateshaper.class));
cards.add(new SetCardInfo("Aven Soulgazer", 8, Rarity.UNCOMMON, mage.cards.a.AvenSoulgazer.class));
cards.add(new SetCardInfo("Backslide", 70, Rarity.COMMON, mage.cards.b.Backslide.class));
cards.add(new SetCardInfo("Barkhide Mauler", 246, Rarity.COMMON, mage.cards.b.BarkhideMauler.class));
cards.add(new SetCardInfo("Barren Moor", 312, Rarity.COMMON, mage.cards.b.BarrenMoor.class));
cards.add(new SetCardInfo("Battering Craghorn", 188, Rarity.COMMON, mage.cards.b.BatteringCraghorn.class));
cards.add(new SetCardInfo("Biorhythm", 247, Rarity.RARE, mage.cards.b.Biorhythm.class));
cards.add(new SetCardInfo("Birchlore Rangers", 248, Rarity.COMMON, mage.cards.b.BirchloreRangers.class));
cards.add(new SetCardInfo("Blackmail", 127, Rarity.UNCOMMON, mage.cards.b.Blackmail.class));
cards.add(new SetCardInfo("Blatant Thievery", 71, Rarity.RARE, mage.cards.b.BlatantThievery.class));
cards.add(new SetCardInfo("Blistering Firecat", 189, Rarity.RARE, mage.cards.b.BlisteringFirecat.class));
cards.add(new SetCardInfo("Bloodline Shaman", 249, Rarity.UNCOMMON, mage.cards.b.BloodlineShaman.class));
cards.add(new SetCardInfo("Bloodstained Mire", 313, Rarity.RARE, mage.cards.b.BloodstainedMire.class, new CardGraphicInfo(new ObjectColor("RB"), null, false)));
cards.add(new SetCardInfo("Boneknitter", 128, Rarity.UNCOMMON, mage.cards.b.Boneknitter.class));
cards.add(new SetCardInfo("Break Open", 190, Rarity.COMMON, mage.cards.b.BreakOpen.class));
cards.add(new SetCardInfo("Brightstone Ritual", 191, Rarity.COMMON, mage.cards.b.BrightstoneRitual.class));
cards.add(new SetCardInfo("Broodhatch Nantuko", 250, Rarity.UNCOMMON, mage.cards.b.BroodhatchNantuko.class));
cards.add(new SetCardInfo("Butcher Orgg", 192, Rarity.RARE, mage.cards.b.ButcherOrgg.class));
cards.add(new SetCardInfo("Cabal Archon", 129, Rarity.UNCOMMON, mage.cards.c.CabalArchon.class));
cards.add(new SetCardInfo("Cabal Executioner", 130, Rarity.UNCOMMON, mage.cards.c.CabalExecutioner.class));
cards.add(new SetCardInfo("Cabal Slaver", 131, Rarity.UNCOMMON, mage.cards.c.CabalSlaver.class));
cards.add(new SetCardInfo("Callous Oppressor", 72, Rarity.RARE, mage.cards.c.CallousOppressor.class));
cards.add(new SetCardInfo("Catapult Master", 10, Rarity.RARE, mage.cards.c.CatapultMaster.class));
cards.add(new SetCardInfo("Catapult Squad", 11, Rarity.UNCOMMON, mage.cards.c.CatapultSquad.class));
cards.add(new SetCardInfo("Centaur Glade", 251, Rarity.UNCOMMON, mage.cards.c.CentaurGlade.class));
cards.add(new SetCardInfo("Chain of Acid", 252, Rarity.UNCOMMON, mage.cards.c.ChainOfAcid.class));
cards.add(new SetCardInfo("Chain of Plasma", 193, Rarity.UNCOMMON, mage.cards.c.ChainOfPlasma.class));
cards.add(new SetCardInfo("Chain of Silence", 12, Rarity.UNCOMMON, mage.cards.c.ChainOfSilence.class));
cards.add(new SetCardInfo("Chain of Smog", 132, Rarity.UNCOMMON, mage.cards.c.ChainOfSmog.class));
cards.add(new SetCardInfo("Chain of Vapor", 73, Rarity.UNCOMMON, mage.cards.c.ChainOfVapor.class));
cards.add(new SetCardInfo("Charging Slateback", 194, Rarity.COMMON, mage.cards.c.ChargingSlateback.class));
cards.add(new SetCardInfo("Choking Tethers", 74, Rarity.COMMON, mage.cards.c.ChokingTethers.class));
cards.add(new SetCardInfo("Clone", 75, Rarity.RARE, mage.cards.c.Clone.class));
cards.add(new SetCardInfo("Complicate", 76, Rarity.UNCOMMON, mage.cards.c.Complicate.class));
cards.add(new SetCardInfo("Contested Cliffs", 314, Rarity.RARE, mage.cards.c.ContestedCliffs.class));
cards.add(new SetCardInfo("Convalescent Care", 14, Rarity.RARE, mage.cards.c.ConvalescentCare.class));
cards.add(new SetCardInfo("Cover of Darkness", 133, Rarity.RARE, mage.cards.c.CoverOfDarkness.class));
cards.add(new SetCardInfo("Crafty Pathmage", 77, Rarity.COMMON, mage.cards.c.CraftyPathmage.class));
cards.add(new SetCardInfo("Crowd Favorites", 15, Rarity.UNCOMMON, mage.cards.c.CrowdFavorites.class));
cards.add(new SetCardInfo("Crude Rampart", 17, Rarity.UNCOMMON, mage.cards.c.CrudeRampart.class));
cards.add(new SetCardInfo("Cruel Revival", 135, Rarity.COMMON, mage.cards.c.CruelRevival.class));
cards.add(new SetCardInfo("Cryptic Gateway", 306, Rarity.RARE, mage.cards.c.CrypticGateway.class));
cards.add(new SetCardInfo("Custody Battle", 197, Rarity.UNCOMMON, mage.cards.c.CustodyBattle.class));
cards.add(new SetCardInfo("Daru Cavalier", 18, Rarity.COMMON, mage.cards.d.DaruCavalier.class));
cards.add(new SetCardInfo("Daru Encampment", 315, Rarity.UNCOMMON, mage.cards.d.DaruEncampment.class));
cards.add(new SetCardInfo("Daru Healer", 19, Rarity.COMMON, mage.cards.d.DaruHealer.class));
cards.add(new SetCardInfo("Daru Lancer", 20, Rarity.COMMON, mage.cards.d.DaruLancer.class));
cards.add(new SetCardInfo("Daunting Defender", 21, Rarity.COMMON, mage.cards.d.DauntingDefender.class));
cards.add(new SetCardInfo("Dawning Purist", 22, Rarity.UNCOMMON, mage.cards.d.DawningPurist.class));
cards.add(new SetCardInfo("Death Match", 136, Rarity.RARE, mage.cards.d.DeathMatch.class));
cards.add(new SetCardInfo("Death Pulse", 137, Rarity.UNCOMMON, mage.cards.d.DeathPulse.class));
cards.add(new SetCardInfo("Demystify", 24, Rarity.COMMON, mage.cards.d.Demystify.class));
cards.add(new SetCardInfo("Dirge of Dread", 138, Rarity.COMMON, mage.cards.d.DirgeOfDread.class));
cards.add(new SetCardInfo("Disciple of Grace", 25, Rarity.COMMON, mage.cards.d.DiscipleOfGrace.class));
cards.add(new SetCardInfo("Disciple of Malice", 139, Rarity.COMMON, mage.cards.d.DiscipleOfMalice.class));
cards.add(new SetCardInfo("Discombobulate", 79, Rarity.UNCOMMON, mage.cards.d.Discombobulate.class));
cards.add(new SetCardInfo("Dispersing Orb", 80, Rarity.UNCOMMON, mage.cards.d.DispersingOrb.class));
cards.add(new SetCardInfo("Disruptive Pitmage", 81, Rarity.COMMON, mage.cards.d.DisruptivePitmage.class));
cards.add(new SetCardInfo("Dive Bomber", 26, Rarity.COMMON, mage.cards.d.DiveBomber.class));
cards.add(new SetCardInfo("Doom Cannon", 307, Rarity.RARE, mage.cards.d.DoomCannon.class));
cards.add(new SetCardInfo("Doomed Necromancer", 140, Rarity.RARE, mage.cards.d.DoomedNecromancer.class));
cards.add(new SetCardInfo("Doubtless One", 27, Rarity.UNCOMMON, mage.cards.d.DoubtlessOne.class));
cards.add(new SetCardInfo("Dragon Roost", 198, Rarity.RARE, mage.cards.d.DragonRoost.class));
cards.add(new SetCardInfo("Dream Chisel", 308, Rarity.RARE, mage.cards.d.DreamChisel.class));
cards.add(new SetCardInfo("Dwarven Blastminer", 199, Rarity.UNCOMMON, mage.cards.d.DwarvenBlastminer.class));
cards.add(new SetCardInfo("Ebonblade Reaper", 141, Rarity.RARE, mage.cards.e.EbonbladeReaper.class));
cards.add(new SetCardInfo("Elven Riders", 254, Rarity.UNCOMMON, mage.cards.e.ElvenRiders.class));
cards.add(new SetCardInfo("Elvish Guidance", 255, Rarity.COMMON, mage.cards.e.ElvishGuidance.class));
cards.add(new SetCardInfo("Elvish Pathcutter", 256, Rarity.COMMON, mage.cards.e.ElvishPathcutter.class));
cards.add(new SetCardInfo("Elvish Pioneer", 257, Rarity.COMMON, mage.cards.e.ElvishPioneer.class));
cards.add(new SetCardInfo("Elvish Scrapper", 258, Rarity.UNCOMMON, mage.cards.e.ElvishScrapper.class));
cards.add(new SetCardInfo("Elvish Vanguard", 259, Rarity.RARE, mage.cards.e.ElvishVanguard.class));
cards.add(new SetCardInfo("Elvish Warrior", 260, Rarity.COMMON, mage.cards.e.ElvishWarrior.class));
cards.add(new SetCardInfo("Embermage Goblin", 200, Rarity.UNCOMMON, mage.cards.e.EmbermageGoblin.class));
cards.add(new SetCardInfo("Enchantress's Presence", 261, Rarity.RARE, mage.cards.e.EnchantresssPresence.class));
cards.add(new SetCardInfo("Entrails Feaster", 143, Rarity.RARE, mage.cards.e.EntrailsFeaster.class));
cards.add(new SetCardInfo("Erratic Explosion", 201, Rarity.COMMON, mage.cards.e.ErraticExplosion.class));
cards.add(new SetCardInfo("Essence Fracture", 82, Rarity.UNCOMMON, mage.cards.e.EssenceFracture.class));
cards.add(new SetCardInfo("Everglove Courier", 262, Rarity.UNCOMMON, mage.cards.e.EvergloveCourier.class));
cards.add(new SetCardInfo("Exalted Angel", 28, Rarity.RARE, mage.cards.e.ExaltedAngel.class));
cards.add(new SetCardInfo("Explosive Vegetation", 263, Rarity.UNCOMMON, mage.cards.e.ExplosiveVegetation.class));
cards.add(new SetCardInfo("Fade from Memory", 144, Rarity.UNCOMMON, mage.cards.f.FadeFromMemory.class));
cards.add(new SetCardInfo("Fallen Cleric", 145, Rarity.COMMON, mage.cards.f.FallenCleric.class));
cards.add(new SetCardInfo("False Cure", 146, Rarity.RARE, mage.cards.f.FalseCure.class));
cards.add(new SetCardInfo("Feeding Frenzy", 147, Rarity.UNCOMMON, mage.cards.f.FeedingFrenzy.class));
cards.add(new SetCardInfo("Festering Goblin", 148, Rarity.COMMON, mage.cards.f.FesteringGoblin.class));
cards.add(new SetCardInfo("Fever Charm", 202, Rarity.COMMON, mage.cards.f.FeverCharm.class));
cards.add(new SetCardInfo("Flamestick Courier", 203, Rarity.UNCOMMON, mage.cards.f.FlamestickCourier.class));
cards.add(new SetCardInfo("Fleeting Aven", 83, Rarity.UNCOMMON, mage.cards.f.FleetingAven.class));
cards.add(new SetCardInfo("Flooded Strand", 316, Rarity.RARE, mage.cards.f.FloodedStrand.class, new CardGraphicInfo(new ObjectColor("UW"), null, false)));
cards.add(new SetCardInfo("Foothill Guide", 29, Rarity.COMMON, mage.cards.f.FoothillGuide.class));
cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 348, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 349, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 350, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forgotten Cave", 317, Rarity.COMMON, mage.cards.f.ForgottenCave.class));
cards.add(new SetCardInfo("Frightshroud Courier", 149, Rarity.UNCOMMON, mage.cards.f.FrightshroudCourier.class));
cards.add(new SetCardInfo("Future Sight", 84, Rarity.RARE, mage.cards.f.FutureSight.class));
cards.add(new SetCardInfo("Gangrenous Goliath", 150, Rarity.RARE, mage.cards.g.GangrenousGoliath.class));
cards.add(new SetCardInfo("Ghosthelm Courier", 85, Rarity.UNCOMMON, mage.cards.g.GhosthelmCourier.class));
cards.add(new SetCardInfo("Gigapede", 264, Rarity.RARE, mage.cards.g.Gigapede.class));
cards.add(new SetCardInfo("Glory Seeker", 31, Rarity.COMMON, mage.cards.g.GlorySeeker.class));
cards.add(new SetCardInfo("Gluttonous Zombie", 151, Rarity.UNCOMMON, mage.cards.g.GluttonousZombie.class));
cards.add(new SetCardInfo("Goblin Burrows", 318, Rarity.UNCOMMON, mage.cards.g.GoblinBurrows.class));
cards.add(new SetCardInfo("Goblin Machinist", 204, Rarity.UNCOMMON, mage.cards.g.GoblinMachinist.class));
cards.add(new SetCardInfo("Goblin Piledriver", 205, Rarity.RARE, mage.cards.g.GoblinPiledriver.class));
cards.add(new SetCardInfo("Goblin Pyromancer", 206, Rarity.RARE, mage.cards.g.GoblinPyromancer.class));
cards.add(new SetCardInfo("Goblin Sharpshooter", 207, Rarity.RARE, mage.cards.g.GoblinSharpshooter.class));
cards.add(new SetCardInfo("Goblin Sky Raider", 208, Rarity.COMMON, mage.cards.g.GoblinSkyRaider.class));
cards.add(new SetCardInfo("Goblin Sledder", 209, Rarity.COMMON, mage.cards.g.GoblinSledder.class));
cards.add(new SetCardInfo("Goblin Taskmaster", 210, Rarity.COMMON, mage.cards.g.GoblinTaskmaster.class));
cards.add(new SetCardInfo("Grand Coliseum", 319, Rarity.RARE, mage.cards.g.GrandColiseum.class));
cards.add(new SetCardInfo("Grand Melee", 211, Rarity.RARE, mage.cards.g.GrandMelee.class));
cards.add(new SetCardInfo("Grassland Crusader", 32, Rarity.COMMON, mage.cards.g.GrasslandCrusader.class));
cards.add(new SetCardInfo("Gratuitous Violence", 212, Rarity.RARE, mage.cards.g.GratuitousViolence.class));
cards.add(new SetCardInfo("Gravel Slinger", 33, Rarity.COMMON, mage.cards.g.GravelSlinger.class));
cards.add(new SetCardInfo("Gravespawn Sovereign", 152, Rarity.RARE, mage.cards.g.GravespawnSovereign.class));
cards.add(new SetCardInfo("Grinning Demon", 153, Rarity.RARE, mage.cards.g.GrinningDemon.class));
cards.add(new SetCardInfo("Gustcloak Harrier", 34, Rarity.COMMON, mage.cards.g.GustcloakHarrier.class));
cards.add(new SetCardInfo("Gustcloak Runner", 35, Rarity.COMMON, mage.cards.g.GustcloakRunner.class));
cards.add(new SetCardInfo("Gustcloak Savior", 36, Rarity.RARE, mage.cards.g.GustcloakSavior.class));
cards.add(new SetCardInfo("Gustcloak Sentinel", 37, Rarity.UNCOMMON, mage.cards.g.GustcloakSentinel.class));
cards.add(new SetCardInfo("Gustcloak Skirmisher", 38, Rarity.UNCOMMON, mage.cards.g.GustcloakSkirmisher.class));
cards.add(new SetCardInfo("Harsh Mercy", 39, Rarity.RARE, mage.cards.h.HarshMercy.class));
cards.add(new SetCardInfo("Haunted Cadaver", 154, Rarity.COMMON, mage.cards.h.HauntedCadaver.class));
cards.add(new SetCardInfo("Head Games", 155, Rarity.RARE, mage.cards.h.HeadGames.class));
cards.add(new SetCardInfo("Headhunter", 156, Rarity.UNCOMMON, mage.cards.h.Headhunter.class));
cards.add(new SetCardInfo("Heedless One", 265, Rarity.UNCOMMON, mage.cards.h.HeedlessOne.class));
cards.add(new SetCardInfo("Hystrodon", 266, Rarity.RARE, mage.cards.h.Hystrodon.class));
cards.add(new SetCardInfo("Imagecrafter", 87, Rarity.COMMON, mage.cards.i.Imagecrafter.class));
cards.add(new SetCardInfo("Improvised Armor", 40, Rarity.UNCOMMON, mage.cards.i.ImprovisedArmor.class));
cards.add(new SetCardInfo("Infest", 157, Rarity.UNCOMMON, mage.cards.i.Infest.class));
cards.add(new SetCardInfo("Information Dealer", 88, Rarity.COMMON, mage.cards.i.InformationDealer.class));
cards.add(new SetCardInfo("Inspirit", 41, Rarity.UNCOMMON, mage.cards.i.Inspirit.class));
cards.add(new SetCardInfo("Insurrection", 213, Rarity.RARE, mage.cards.i.Insurrection.class));
cards.add(new SetCardInfo("Invigorating Boon", 267, Rarity.UNCOMMON, mage.cards.i.InvigoratingBoon.class));
cards.add(new SetCardInfo("Ironfist Crusher", 42, Rarity.UNCOMMON, mage.cards.i.IronfistCrusher.class));
cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 336, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 337, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 338, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Ixidor's Will", 90, Rarity.COMMON, mage.cards.i.IxidorsWill.class));
cards.add(new SetCardInfo("Ixidor, Reality Sculptor", 89, Rarity.RARE, mage.cards.i.IxidorRealitySculptor.class));
cards.add(new SetCardInfo("Jareth, Leonine Titan", 43, Rarity.RARE, mage.cards.j.JarethLeonineTitan.class));
cards.add(new SetCardInfo("Kamahl, Fist of Krosa", 268, Rarity.RARE, mage.cards.k.KamahlFistOfKrosa.class));
cards.add(new SetCardInfo("Kamahl's Summons", 269, Rarity.UNCOMMON, mage.cards.k.KamahlsSummons.class));
cards.add(new SetCardInfo("Krosan Colossus", 270, Rarity.RARE, mage.cards.k.KrosanColossus.class));
cards.add(new SetCardInfo("Krosan Groundshaker", 271, Rarity.UNCOMMON, mage.cards.k.KrosanGroundshaker.class));
cards.add(new SetCardInfo("Krosan Tusker", 272, Rarity.COMMON, mage.cards.k.KrosanTusker.class));
cards.add(new SetCardInfo("Lavamancer's Skill", 215, Rarity.COMMON, mage.cards.l.LavamancersSkill.class));
cards.add(new SetCardInfo("Lay Waste", 216, Rarity.COMMON, mage.cards.l.LayWaste.class));
cards.add(new SetCardInfo("Leery Fogbeast", 273, Rarity.COMMON, mage.cards.l.LeeryFogbeast.class));
cards.add(new SetCardInfo("Lightning Rift", 217, Rarity.UNCOMMON, mage.cards.l.LightningRift.class));
cards.add(new SetCardInfo("Lonely Sandbar", 320, Rarity.COMMON, mage.cards.l.LonelySandbar.class));
cards.add(new SetCardInfo("Mage's Guile", 91, Rarity.COMMON, mage.cards.m.MagesGuile.class));
cards.add(new SetCardInfo("Mana Echoes", 218, Rarity.RARE, mage.cards.m.ManaEchoes.class));
cards.add(new SetCardInfo("Menacing Ogre", 219, Rarity.RARE, mage.cards.m.MenacingOgre.class));
cards.add(new SetCardInfo("Misery Charm", 158, Rarity.COMMON, mage.cards.m.MiseryCharm.class));
cards.add(new SetCardInfo("Mistform Dreamer", 93, Rarity.COMMON, mage.cards.m.MistformDreamer.class));
cards.add(new SetCardInfo("Mistform Mask", 94, Rarity.COMMON, mage.cards.m.MistformMask.class));
cards.add(new SetCardInfo("Mistform Mutant", 95, Rarity.UNCOMMON, mage.cards.m.MistformMutant.class));
cards.add(new SetCardInfo("Mistform Shrieker", 96, Rarity.UNCOMMON, mage.cards.m.MistformShrieker.class));
cards.add(new SetCardInfo("Mistform Skyreaver", 97, Rarity.RARE, mage.cards.m.MistformSkyreaver.class));
cards.add(new SetCardInfo("Mistform Stalker", 98, Rarity.UNCOMMON, mage.cards.m.MistformStalker.class));
cards.add(new SetCardInfo("Mistform Wall", 99, Rarity.COMMON, mage.cards.m.MistformWall.class));
cards.add(new SetCardInfo("Mobilization", 44, Rarity.RARE, mage.cards.m.Mobilization.class));
cards.add(new SetCardInfo("Mountain", 343, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 344, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 345, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 346, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mythic Proportions", 274, Rarity.RARE, mage.cards.m.MythicProportions.class));
cards.add(new SetCardInfo("Nameless One", 100, Rarity.UNCOMMON, mage.cards.n.NamelessOne.class));
cards.add(new SetCardInfo("Nantuko Husk", 159, Rarity.COMMON, mage.cards.n.NantukoHusk.class));
cards.add(new SetCardInfo("Naturalize", 275, Rarity.COMMON, mage.cards.n.Naturalize.class));
cards.add(new SetCardInfo("Nosy Goblin", 220, Rarity.COMMON, mage.cards.n.NosyGoblin.class));
cards.add(new SetCardInfo("Nova Cleric", 45, Rarity.UNCOMMON, mage.cards.n.NovaCleric.class));
cards.add(new SetCardInfo("Oblation", 46, Rarity.RARE, mage.cards.o.Oblation.class));
cards.add(new SetCardInfo("Oversold Cemetery", 160, Rarity.RARE, mage.cards.o.OversoldCemetery.class));
cards.add(new SetCardInfo("Overwhelming Instinct", 276, Rarity.UNCOMMON, mage.cards.o.OverwhelmingInstinct.class));
cards.add(new SetCardInfo("Pacifism", 47, Rarity.COMMON, mage.cards.p.Pacifism.class));
cards.add(new SetCardInfo("Patriarch's Bidding", 161, Rarity.RARE, mage.cards.p.PatriarchsBidding.class));
cards.add(new SetCardInfo("Pearlspear Courier", 48, Rarity.UNCOMMON, mage.cards.p.PearlspearCourier.class));
cards.add(new SetCardInfo("Peer Pressure", 101, Rarity.RARE, mage.cards.p.PeerPressure.class));
cards.add(new SetCardInfo("Piety Charm", 49, Rarity.COMMON, mage.cards.p.PietyCharm.class));
cards.add(new SetCardInfo("Pinpoint Avalanche", 221, Rarity.COMMON, mage.cards.p.PinpointAvalanche.class));
cards.add(new SetCardInfo("Plains", 331, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 332, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 333, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 334, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Polluted Delta", 321, Rarity.RARE, mage.cards.p.PollutedDelta.class, new CardGraphicInfo(new ObjectColor("UB"), null, false)));
cards.add(new SetCardInfo("Primal Boost", 277, Rarity.UNCOMMON, mage.cards.p.PrimalBoost.class));
cards.add(new SetCardInfo("Profane Prayers", 162, Rarity.COMMON, mage.cards.p.ProfanePrayers.class));
cards.add(new SetCardInfo("Prowling Pangolin", 163, Rarity.UNCOMMON, mage.cards.p.ProwlingPangolin.class));
cards.add(new SetCardInfo("Psychic Trance", 102, Rarity.RARE, mage.cards.p.PsychicTrance.class));
cards.add(new SetCardInfo("Quicksilver Dragon", 103, Rarity.RARE, mage.cards.q.QuicksilverDragon.class));
cards.add(new SetCardInfo("Ravenous Baloth", 278, Rarity.RARE, mage.cards.r.RavenousBaloth.class));
cards.add(new SetCardInfo("Read the Runes", 104, Rarity.RARE, mage.cards.r.ReadTheRunes.class));
cards.add(new SetCardInfo("Reckless One", 222, Rarity.UNCOMMON, mage.cards.r.RecklessOne.class));
cards.add(new SetCardInfo("Reminisce", 105, Rarity.UNCOMMON, mage.cards.r.Reminisce.class));
cards.add(new SetCardInfo("Renewed Faith", 50, Rarity.COMMON, mage.cards.r.RenewedFaith.class));
cards.add(new SetCardInfo("Righteous Cause", 51, Rarity.UNCOMMON, mage.cards.r.RighteousCause.class));
cards.add(new SetCardInfo("Riptide Biologist", 106, Rarity.COMMON, mage.cards.r.RiptideBiologist.class));
cards.add(new SetCardInfo("Riptide Chronologist", 107, Rarity.UNCOMMON, mage.cards.r.RiptideChronologist.class));
cards.add(new SetCardInfo("Riptide Entrancer", 108, Rarity.RARE, mage.cards.r.RiptideEntrancer.class));
cards.add(new SetCardInfo("Riptide Laboratory", 322, Rarity.RARE, mage.cards.r.RiptideLaboratory.class));
cards.add(new SetCardInfo("Riptide Replicator", 309, Rarity.RARE, mage.cards.r.RiptideReplicator.class));
cards.add(new SetCardInfo("Riptide Shapeshifter", 109, Rarity.UNCOMMON, mage.cards.r.RiptideShapeshifter.class));
cards.add(new SetCardInfo("Risky Move", 223, Rarity.RARE, mage.cards.r.RiskyMove.class));
cards.add(new SetCardInfo("Rorix Bladewing", 224, Rarity.RARE, mage.cards.r.RorixBladewing.class));
cards.add(new SetCardInfo("Rotlung Reanimator", 164, Rarity.RARE, mage.cards.r.RotlungReanimator.class));
cards.add(new SetCardInfo("Rummaging Wizard", 110, Rarity.UNCOMMON, mage.cards.r.RummagingWizard.class));
cards.add(new SetCardInfo("Run Wild", 279, Rarity.UNCOMMON, mage.cards.r.RunWild.class));
cards.add(new SetCardInfo("Sage Aven", 111, Rarity.COMMON, mage.cards.s.SageAven.class));
cards.add(new SetCardInfo("Sandskin", 52, Rarity.COMMON, mage.cards.s.Sandskin.class));
cards.add(new SetCardInfo("Screaming Seahawk", 112, Rarity.COMMON, mage.cards.s.ScreamingSeahawk.class));
cards.add(new SetCardInfo("Screeching Buzzard", 165, Rarity.COMMON, mage.cards.s.ScreechingBuzzard.class));
cards.add(new SetCardInfo("Searing Flesh", 225, Rarity.UNCOMMON, mage.cards.s.SearingFlesh.class));
cards.add(new SetCardInfo("Sea's Claim", 113, Rarity.COMMON, mage.cards.s.SeasClaim.class));
cards.add(new SetCardInfo("Seaside Haven", 323, Rarity.UNCOMMON, mage.cards.s.SeasideHaven.class));
cards.add(new SetCardInfo("Secluded Steppe", 324, Rarity.COMMON, mage.cards.s.SecludedSteppe.class));
cards.add(new SetCardInfo("Serpentine Basilisk", 280, Rarity.UNCOMMON, mage.cards.s.SerpentineBasilisk.class));
cards.add(new SetCardInfo("Severed Legion", 166, Rarity.COMMON, mage.cards.s.SeveredLegion.class));
cards.add(new SetCardInfo("Shade's Breath", 167, Rarity.UNCOMMON, mage.cards.s.ShadesBreath.class));
cards.add(new SetCardInfo("Shaleskin Bruiser", 226, Rarity.UNCOMMON, mage.cards.s.ShaleskinBruiser.class));
cards.add(new SetCardInfo("Shared Triumph", 53, Rarity.RARE, mage.cards.s.SharedTriumph.class));
cards.add(new SetCardInfo("Shepherd of Rot", 168, Rarity.COMMON, mage.cards.s.ShepherdOfRot.class));
cards.add(new SetCardInfo("Shieldmage Elder", 54, Rarity.UNCOMMON, mage.cards.s.ShieldmageElder.class));
cards.add(new SetCardInfo("Shock", 227, Rarity.COMMON, mage.cards.s.Shock.class));
cards.add(new SetCardInfo("Sigil of the New Dawn", 55, Rarity.RARE, mage.cards.s.SigilOfTheNewDawn.class));
cards.add(new SetCardInfo("Silent Specter", 169, Rarity.RARE, mage.cards.s.SilentSpecter.class));
cards.add(new SetCardInfo("Silklash Spider", 281, Rarity.RARE, mage.cards.s.SilklashSpider.class));
cards.add(new SetCardInfo("Silvos, Rogue Elemental", 282, Rarity.RARE, mage.cards.s.SilvosRogueElemental.class));
cards.add(new SetCardInfo("Skirk Fire Marshal", 229, Rarity.RARE, mage.cards.s.SkirkFireMarshal.class));
cards.add(new SetCardInfo("Skirk Prospector", 230, Rarity.COMMON, mage.cards.s.SkirkProspector.class));
cards.add(new SetCardInfo("Skittish Valesk", 231, Rarity.UNCOMMON, mage.cards.s.SkittishValesk.class));
cards.add(new SetCardInfo("Slate of Ancestry", 310, Rarity.RARE, mage.cards.s.SlateOfAncestry.class));
cards.add(new SetCardInfo("Slice and Dice", 232, Rarity.UNCOMMON, mage.cards.s.SliceAndDice.class));
cards.add(new SetCardInfo("Slipstream Eel", 114, Rarity.COMMON, mage.cards.s.SlipstreamEel.class));
cards.add(new SetCardInfo("Smother", 170, Rarity.UNCOMMON, mage.cards.s.Smother.class));
cards.add(new SetCardInfo("Snarling Undorak", 283, Rarity.COMMON, mage.cards.s.SnarlingUndorak.class));
cards.add(new SetCardInfo("Solar Blast", 234, Rarity.COMMON, mage.cards.s.SolarBlast.class));
cards.add(new SetCardInfo("Soulless One", 171, Rarity.UNCOMMON, mage.cards.s.SoullessOne.class));
cards.add(new SetCardInfo("Sparksmith", 235, Rarity.COMMON, mage.cards.s.Sparksmith.class));
cards.add(new SetCardInfo("Spined Basher", 172, Rarity.COMMON, mage.cards.s.SpinedBasher.class));
cards.add(new SetCardInfo("Spitfire Handler", 236, Rarity.UNCOMMON, mage.cards.s.SpitfireHandler.class));
cards.add(new SetCardInfo("Spitting Gourna", 284, Rarity.COMMON, mage.cards.s.SpittingGourna.class));
cards.add(new SetCardInfo("Spurred Wolverine", 237, Rarity.COMMON, mage.cards.s.SpurredWolverine.class));
cards.add(new SetCardInfo("Spy Network", 115, Rarity.COMMON, mage.cards.s.SpyNetwork.class));
cards.add(new SetCardInfo("Stag Beetle", 285, Rarity.RARE, mage.cards.s.StagBeetle.class));
cards.add(new SetCardInfo("Standardize", 116, Rarity.RARE, mage.cards.s.Standardize.class));
cards.add(new SetCardInfo("Starlit Sanctum", 325, Rarity.UNCOMMON, mage.cards.s.StarlitSanctum.class));
cards.add(new SetCardInfo("Starstorm", 238, Rarity.RARE, mage.cards.s.Starstorm.class));
cards.add(new SetCardInfo("Steely Resolve", 286, Rarity.RARE, mage.cards.s.SteelyResolve.class));
cards.add(new SetCardInfo("Strongarm Tactics", 173, Rarity.RARE, mage.cards.s.StrongarmTactics.class));
cards.add(new SetCardInfo("Sunfire Balm", 56, Rarity.UNCOMMON, mage.cards.s.SunfireBalm.class));
cards.add(new SetCardInfo("Supreme Inquisitor", 117, Rarity.RARE, mage.cards.s.SupremeInquisitor.class));
cards.add(new SetCardInfo("Swamp", 339, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 340, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 341, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 342, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swat", 174, Rarity.COMMON, mage.cards.s.Swat.class));
cards.add(new SetCardInfo("Symbiotic Beast", 287, Rarity.UNCOMMON, mage.cards.s.SymbioticBeast.class));
cards.add(new SetCardInfo("Symbiotic Elf", 288, Rarity.COMMON, mage.cards.s.SymbioticElf.class));
cards.add(new SetCardInfo("Symbiotic Wurm", 289, Rarity.RARE, mage.cards.s.SymbioticWurm.class));
cards.add(new SetCardInfo("Syphon Mind", 175, Rarity.COMMON, mage.cards.s.SyphonMind.class));
cards.add(new SetCardInfo("Syphon Soul", 176, Rarity.COMMON, mage.cards.s.SyphonSoul.class));
cards.add(new SetCardInfo("Taunting Elf", 290, Rarity.COMMON, mage.cards.t.TauntingElf.class));
cards.add(new SetCardInfo("Tempting Wurm", 291, Rarity.RARE, mage.cards.t.TemptingWurm.class));
cards.add(new SetCardInfo("Tephraderm", 239, Rarity.RARE, mage.cards.t.Tephraderm.class));
cards.add(new SetCardInfo("Thrashing Mudspawn", 177, Rarity.UNCOMMON, mage.cards.t.ThrashingMudspawn.class));
cards.add(new SetCardInfo("Threaten", 241, Rarity.UNCOMMON, mage.cards.t.Threaten.class));
cards.add(new SetCardInfo("Thunder of Hooves", 242, Rarity.UNCOMMON, mage.cards.t.ThunderOfHooves.class));
cards.add(new SetCardInfo("Towering Baloth", 292, Rarity.UNCOMMON, mage.cards.t.ToweringBaloth.class));
cards.add(new SetCardInfo("Trade Secrets", 118, Rarity.RARE, mage.cards.t.TradeSecrets.class));
cards.add(new SetCardInfo("Tranquil Thicket", 326, Rarity.COMMON, mage.cards.t.TranquilThicket.class));
cards.add(new SetCardInfo("Treespring Lorian", 293, Rarity.COMMON, mage.cards.t.TreespringLorian.class));
cards.add(new SetCardInfo("Tribal Golem", 311, Rarity.RARE, mage.cards.t.TribalGolem.class));
cards.add(new SetCardInfo("Tribal Unity", 294, Rarity.UNCOMMON, mage.cards.t.TribalUnity.class));
cards.add(new SetCardInfo("Trickery Charm", 119, Rarity.COMMON, mage.cards.t.TrickeryCharm.class));
cards.add(new SetCardInfo("True Believer", 57, Rarity.RARE, mage.cards.t.TrueBeliever.class));
cards.add(new SetCardInfo("Undead Gladiator", 178, Rarity.RARE, mage.cards.u.UndeadGladiator.class));
cards.add(new SetCardInfo("Unholy Grotto", 327, Rarity.RARE, mage.cards.u.UnholyGrotto.class));
cards.add(new SetCardInfo("Unified Strike", 58, Rarity.COMMON, mage.cards.u.UnifiedStrike.class));
cards.add(new SetCardInfo("Venomspout Brackus", 295, Rarity.UNCOMMON, mage.cards.v.VenomspoutBrackus.class));
cards.add(new SetCardInfo("Visara the Dreadful", 179, Rarity.RARE, mage.cards.v.VisaraTheDreadful.class));
cards.add(new SetCardInfo("Vitality Charm", 296, Rarity.COMMON, mage.cards.v.VitalityCharm.class));
cards.add(new SetCardInfo("Voice of the Woods", 297, Rarity.RARE, mage.cards.v.VoiceOfTheWoods.class));
cards.add(new SetCardInfo("Voidmage Prodigy", 120, Rarity.RARE, mage.cards.v.VoidmageProdigy.class));
cards.add(new SetCardInfo("Walking Desecration", 180, Rarity.UNCOMMON, mage.cards.w.WalkingDesecration.class));
cards.add(new SetCardInfo("Wall of Mulch", 298, Rarity.UNCOMMON, mage.cards.w.WallOfMulch.class));
cards.add(new SetCardInfo("Wave of Indifference", 243, Rarity.COMMON, mage.cards.w.WaveOfIndifference.class));
cards.add(new SetCardInfo("Weathered Wayfarer", 59, Rarity.RARE, mage.cards.w.WeatheredWayfarer.class));
cards.add(new SetCardInfo("Weird Harvest", 299, Rarity.RARE, mage.cards.w.WeirdHarvest.class));
cards.add(new SetCardInfo("Wellwisher", 300, Rarity.COMMON, mage.cards.w.Wellwisher.class));
cards.add(new SetCardInfo("Wheel and Deal", 121, Rarity.RARE, mage.cards.w.WheelAndDeal.class));
cards.add(new SetCardInfo("Whipcorder", 60, Rarity.UNCOMMON, mage.cards.w.Whipcorder.class));
cards.add(new SetCardInfo("Windswept Heath", 328, Rarity.RARE, mage.cards.w.WindsweptHeath.class, new CardGraphicInfo(new ObjectColor("GW"), null, false)));
cards.add(new SetCardInfo("Wirewood Elf", 301, Rarity.COMMON, mage.cards.w.WirewoodElf.class));
cards.add(new SetCardInfo("Wirewood Herald", 302, Rarity.COMMON, mage.cards.w.WirewoodHerald.class));
cards.add(new SetCardInfo("Wirewood Lodge", 329, Rarity.RARE, mage.cards.w.WirewoodLodge.class));
cards.add(new SetCardInfo("Wirewood Pride", 303, Rarity.COMMON, mage.cards.w.WirewoodPride.class));
cards.add(new SetCardInfo("Wirewood Savage", 304, Rarity.COMMON, mage.cards.w.WirewoodSavage.class));
cards.add(new SetCardInfo("Withering Hex", 181, Rarity.UNCOMMON, mage.cards.w.WitheringHex.class));
cards.add(new SetCardInfo("Wooded Foothills", 330, Rarity.RARE, mage.cards.w.WoodedFoothills.class, new CardGraphicInfo(new ObjectColor("RG"), null, false)));
cards.add(new SetCardInfo("Words of War", 244, Rarity.RARE, mage.cards.w.WordsOfWar.class));
cards.add(new SetCardInfo("Words of Waste", 182, Rarity.RARE, mage.cards.w.WordsOfWaste.class));
cards.add(new SetCardInfo("Words of Wilding", 305, Rarity.RARE, mage.cards.w.WordsOfWilding.class));
cards.add(new SetCardInfo("Words of Wind", 122, Rarity.RARE, mage.cards.w.WordsOfWind.class));
cards.add(new SetCardInfo("Words of Worship", 61, Rarity.RARE, mage.cards.w.WordsOfWorship.class));
cards.add(new SetCardInfo("Wretched Anurid", 183, Rarity.COMMON, mage.cards.w.WretchedAnurid.class));
}
}
package mage.sets;
import mage.ObjectColor;
import mage.cards.CardGraphicInfo;
import mage.cards.ExpansionSet;
import mage.constants.Rarity;
import mage.constants.SetType;
public class Onslaught extends ExpansionSet {
private static final Onslaught instance = new Onslaught();
public static Onslaught getInstance() {
return instance;
}
private Onslaught() {
super("Onslaught", "ONS", ExpansionSet.buildDate(2002, 10, 7), SetType.EXPANSION);
this.blockName = "Onslaught";
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 0;
cards.add(new SetCardInfo("Accursed Centaur", 123, Rarity.COMMON, mage.cards.a.AccursedCentaur.class));
cards.add(new SetCardInfo("Aether Charge", 184, Rarity.UNCOMMON, mage.cards.a.AetherCharge.class));
cards.add(new SetCardInfo("Aggravated Assault", 185, Rarity.RARE, mage.cards.a.AggravatedAssault.class));
cards.add(new SetCardInfo("Airborne Aid", 62, Rarity.COMMON, mage.cards.a.AirborneAid.class));
cards.add(new SetCardInfo("Airdrop Condor", 186, Rarity.UNCOMMON, mage.cards.a.AirdropCondor.class));
cards.add(new SetCardInfo("Akroma's Blessing", 1, Rarity.UNCOMMON, mage.cards.a.AkromasBlessing.class));
cards.add(new SetCardInfo("Akroma's Vengeance", 2, Rarity.RARE, mage.cards.a.AkromasVengeance.class));
cards.add(new SetCardInfo("Ancestor's Prophet", 3, Rarity.RARE, mage.cards.a.AncestorsProphet.class));
cards.add(new SetCardInfo("Animal Magnetism", 245, Rarity.RARE, mage.cards.a.AnimalMagnetism.class));
cards.add(new SetCardInfo("Annex", 63, Rarity.UNCOMMON, mage.cards.a.Annex.class));
cards.add(new SetCardInfo("Anurid Murkdiver", 124, Rarity.COMMON, mage.cards.a.AnuridMurkdiver.class));
cards.add(new SetCardInfo("Aphetto Alchemist", 64, Rarity.UNCOMMON, mage.cards.a.AphettoAlchemist.class));
cards.add(new SetCardInfo("Aphetto Dredging", 125, Rarity.COMMON, mage.cards.a.AphettoDredging.class));
cards.add(new SetCardInfo("Aphetto Grifter", 65, Rarity.UNCOMMON, mage.cards.a.AphettoGrifter.class));
cards.add(new SetCardInfo("Aphetto Vulture", 126, Rarity.UNCOMMON, mage.cards.a.AphettoVulture.class));
cards.add(new SetCardInfo("Arcanis the Omnipotent", 66, Rarity.RARE, mage.cards.a.ArcanisTheOmnipotent.class));
cards.add(new SetCardInfo("Ascending Aven", 68, Rarity.COMMON, mage.cards.a.AscendingAven.class));
cards.add(new SetCardInfo("Astral Slide", 4, Rarity.UNCOMMON, mage.cards.a.AstralSlide.class));
cards.add(new SetCardInfo("Aura Extraction", 5, Rarity.UNCOMMON, mage.cards.a.AuraExtraction.class));
cards.add(new SetCardInfo("Aurification", 6, Rarity.RARE, mage.cards.a.Aurification.class));
cards.add(new SetCardInfo("Avarax", 187, Rarity.UNCOMMON, mage.cards.a.Avarax.class));
cards.add(new SetCardInfo("Aven Brigadier", 7, Rarity.RARE, mage.cards.a.AvenBrigadier.class));
cards.add(new SetCardInfo("Aven Fateshaper", 69, Rarity.UNCOMMON, mage.cards.a.AvenFateshaper.class));
cards.add(new SetCardInfo("Aven Soulgazer", 8, Rarity.UNCOMMON, mage.cards.a.AvenSoulgazer.class));
cards.add(new SetCardInfo("Backslide", 70, Rarity.COMMON, mage.cards.b.Backslide.class));
cards.add(new SetCardInfo("Barkhide Mauler", 246, Rarity.COMMON, mage.cards.b.BarkhideMauler.class));
cards.add(new SetCardInfo("Barren Moor", 312, Rarity.COMMON, mage.cards.b.BarrenMoor.class));
cards.add(new SetCardInfo("Battering Craghorn", 188, Rarity.COMMON, mage.cards.b.BatteringCraghorn.class));
cards.add(new SetCardInfo("Biorhythm", 247, Rarity.RARE, mage.cards.b.Biorhythm.class));
cards.add(new SetCardInfo("Birchlore Rangers", 248, Rarity.COMMON, mage.cards.b.BirchloreRangers.class));
cards.add(new SetCardInfo("Blackmail", 127, Rarity.UNCOMMON, mage.cards.b.Blackmail.class));
cards.add(new SetCardInfo("Blatant Thievery", 71, Rarity.RARE, mage.cards.b.BlatantThievery.class));
cards.add(new SetCardInfo("Blistering Firecat", 189, Rarity.RARE, mage.cards.b.BlisteringFirecat.class));
cards.add(new SetCardInfo("Bloodline Shaman", 249, Rarity.UNCOMMON, mage.cards.b.BloodlineShaman.class));
cards.add(new SetCardInfo("Bloodstained Mire", 313, Rarity.RARE, mage.cards.b.BloodstainedMire.class, new CardGraphicInfo(new ObjectColor("RB"), null, false)));
cards.add(new SetCardInfo("Boneknitter", 128, Rarity.UNCOMMON, mage.cards.b.Boneknitter.class));
cards.add(new SetCardInfo("Break Open", 190, Rarity.COMMON, mage.cards.b.BreakOpen.class));
cards.add(new SetCardInfo("Brightstone Ritual", 191, Rarity.COMMON, mage.cards.b.BrightstoneRitual.class));
cards.add(new SetCardInfo("Broodhatch Nantuko", 250, Rarity.UNCOMMON, mage.cards.b.BroodhatchNantuko.class));
cards.add(new SetCardInfo("Butcher Orgg", 192, Rarity.RARE, mage.cards.b.ButcherOrgg.class));
cards.add(new SetCardInfo("Cabal Archon", 129, Rarity.UNCOMMON, mage.cards.c.CabalArchon.class));
cards.add(new SetCardInfo("Cabal Executioner", 130, Rarity.UNCOMMON, mage.cards.c.CabalExecutioner.class));
cards.add(new SetCardInfo("Cabal Slaver", 131, Rarity.UNCOMMON, mage.cards.c.CabalSlaver.class));
cards.add(new SetCardInfo("Callous Oppressor", 72, Rarity.RARE, mage.cards.c.CallousOppressor.class));
cards.add(new SetCardInfo("Catapult Master", 10, Rarity.RARE, mage.cards.c.CatapultMaster.class));
cards.add(new SetCardInfo("Catapult Squad", 11, Rarity.UNCOMMON, mage.cards.c.CatapultSquad.class));
cards.add(new SetCardInfo("Centaur Glade", 251, Rarity.UNCOMMON, mage.cards.c.CentaurGlade.class));
cards.add(new SetCardInfo("Chain of Acid", 252, Rarity.UNCOMMON, mage.cards.c.ChainOfAcid.class));
cards.add(new SetCardInfo("Chain of Plasma", 193, Rarity.UNCOMMON, mage.cards.c.ChainOfPlasma.class));
cards.add(new SetCardInfo("Chain of Silence", 12, Rarity.UNCOMMON, mage.cards.c.ChainOfSilence.class));
cards.add(new SetCardInfo("Chain of Smog", 132, Rarity.UNCOMMON, mage.cards.c.ChainOfSmog.class));
cards.add(new SetCardInfo("Chain of Vapor", 73, Rarity.UNCOMMON, mage.cards.c.ChainOfVapor.class));
cards.add(new SetCardInfo("Charging Slateback", 194, Rarity.COMMON, mage.cards.c.ChargingSlateback.class));
cards.add(new SetCardInfo("Choking Tethers", 74, Rarity.COMMON, mage.cards.c.ChokingTethers.class));
cards.add(new SetCardInfo("Clone", 75, Rarity.RARE, mage.cards.c.Clone.class));
cards.add(new SetCardInfo("Complicate", 76, Rarity.UNCOMMON, mage.cards.c.Complicate.class));
cards.add(new SetCardInfo("Contested Cliffs", 314, Rarity.RARE, mage.cards.c.ContestedCliffs.class));
cards.add(new SetCardInfo("Convalescent Care", 14, Rarity.RARE, mage.cards.c.ConvalescentCare.class));
cards.add(new SetCardInfo("Cover of Darkness", 133, Rarity.RARE, mage.cards.c.CoverOfDarkness.class));
cards.add(new SetCardInfo("Crafty Pathmage", 77, Rarity.COMMON, mage.cards.c.CraftyPathmage.class));
cards.add(new SetCardInfo("Crowd Favorites", 15, Rarity.UNCOMMON, mage.cards.c.CrowdFavorites.class));
cards.add(new SetCardInfo("Crude Rampart", 17, Rarity.UNCOMMON, mage.cards.c.CrudeRampart.class));
cards.add(new SetCardInfo("Cruel Revival", 135, Rarity.COMMON, mage.cards.c.CruelRevival.class));
cards.add(new SetCardInfo("Cryptic Gateway", 306, Rarity.RARE, mage.cards.c.CrypticGateway.class));
cards.add(new SetCardInfo("Custody Battle", 197, Rarity.UNCOMMON, mage.cards.c.CustodyBattle.class));
cards.add(new SetCardInfo("Daru Cavalier", 18, Rarity.COMMON, mage.cards.d.DaruCavalier.class));
cards.add(new SetCardInfo("Daru Encampment", 315, Rarity.UNCOMMON, mage.cards.d.DaruEncampment.class));
cards.add(new SetCardInfo("Daru Healer", 19, Rarity.COMMON, mage.cards.d.DaruHealer.class));
cards.add(new SetCardInfo("Daru Lancer", 20, Rarity.COMMON, mage.cards.d.DaruLancer.class));
cards.add(new SetCardInfo("Daunting Defender", 21, Rarity.COMMON, mage.cards.d.DauntingDefender.class));
cards.add(new SetCardInfo("Dawning Purist", 22, Rarity.UNCOMMON, mage.cards.d.DawningPurist.class));
cards.add(new SetCardInfo("Death Match", 136, Rarity.RARE, mage.cards.d.DeathMatch.class));
cards.add(new SetCardInfo("Death Pulse", 137, Rarity.UNCOMMON, mage.cards.d.DeathPulse.class));
cards.add(new SetCardInfo("Demystify", 24, Rarity.COMMON, mage.cards.d.Demystify.class));
cards.add(new SetCardInfo("Dirge of Dread", 138, Rarity.COMMON, mage.cards.d.DirgeOfDread.class));
cards.add(new SetCardInfo("Disciple of Grace", 25, Rarity.COMMON, mage.cards.d.DiscipleOfGrace.class));
cards.add(new SetCardInfo("Disciple of Malice", 139, Rarity.COMMON, mage.cards.d.DiscipleOfMalice.class));
cards.add(new SetCardInfo("Discombobulate", 79, Rarity.UNCOMMON, mage.cards.d.Discombobulate.class));
cards.add(new SetCardInfo("Dispersing Orb", 80, Rarity.UNCOMMON, mage.cards.d.DispersingOrb.class));
cards.add(new SetCardInfo("Disruptive Pitmage", 81, Rarity.COMMON, mage.cards.d.DisruptivePitmage.class));
cards.add(new SetCardInfo("Dive Bomber", 26, Rarity.COMMON, mage.cards.d.DiveBomber.class));
cards.add(new SetCardInfo("Doom Cannon", 307, Rarity.RARE, mage.cards.d.DoomCannon.class));
cards.add(new SetCardInfo("Doomed Necromancer", 140, Rarity.RARE, mage.cards.d.DoomedNecromancer.class));
cards.add(new SetCardInfo("Doubtless One", 27, Rarity.UNCOMMON, mage.cards.d.DoubtlessOne.class));
cards.add(new SetCardInfo("Dragon Roost", 198, Rarity.RARE, mage.cards.d.DragonRoost.class));
cards.add(new SetCardInfo("Dream Chisel", 308, Rarity.RARE, mage.cards.d.DreamChisel.class));
cards.add(new SetCardInfo("Dwarven Blastminer", 199, Rarity.UNCOMMON, mage.cards.d.DwarvenBlastminer.class));
cards.add(new SetCardInfo("Ebonblade Reaper", 141, Rarity.RARE, mage.cards.e.EbonbladeReaper.class));
cards.add(new SetCardInfo("Elven Riders", 254, Rarity.UNCOMMON, mage.cards.e.ElvenRiders.class));
cards.add(new SetCardInfo("Elvish Guidance", 255, Rarity.COMMON, mage.cards.e.ElvishGuidance.class));
cards.add(new SetCardInfo("Elvish Pathcutter", 256, Rarity.COMMON, mage.cards.e.ElvishPathcutter.class));
cards.add(new SetCardInfo("Elvish Pioneer", 257, Rarity.COMMON, mage.cards.e.ElvishPioneer.class));
cards.add(new SetCardInfo("Elvish Scrapper", 258, Rarity.UNCOMMON, mage.cards.e.ElvishScrapper.class));
cards.add(new SetCardInfo("Elvish Vanguard", 259, Rarity.RARE, mage.cards.e.ElvishVanguard.class));
cards.add(new SetCardInfo("Elvish Warrior", 260, Rarity.COMMON, mage.cards.e.ElvishWarrior.class));
cards.add(new SetCardInfo("Embermage Goblin", 200, Rarity.UNCOMMON, mage.cards.e.EmbermageGoblin.class));
cards.add(new SetCardInfo("Enchantress's Presence", 261, Rarity.RARE, mage.cards.e.EnchantresssPresence.class));
cards.add(new SetCardInfo("Entrails Feaster", 143, Rarity.RARE, mage.cards.e.EntrailsFeaster.class));
cards.add(new SetCardInfo("Erratic Explosion", 201, Rarity.COMMON, mage.cards.e.ErraticExplosion.class));
cards.add(new SetCardInfo("Essence Fracture", 82, Rarity.UNCOMMON, mage.cards.e.EssenceFracture.class));
cards.add(new SetCardInfo("Everglove Courier", 262, Rarity.UNCOMMON, mage.cards.e.EvergloveCourier.class));
cards.add(new SetCardInfo("Exalted Angel", 28, Rarity.RARE, mage.cards.e.ExaltedAngel.class));
cards.add(new SetCardInfo("Explosive Vegetation", 263, Rarity.UNCOMMON, mage.cards.e.ExplosiveVegetation.class));
cards.add(new SetCardInfo("Fade from Memory", 144, Rarity.UNCOMMON, mage.cards.f.FadeFromMemory.class));
cards.add(new SetCardInfo("Fallen Cleric", 145, Rarity.COMMON, mage.cards.f.FallenCleric.class));
cards.add(new SetCardInfo("False Cure", 146, Rarity.RARE, mage.cards.f.FalseCure.class));
cards.add(new SetCardInfo("Feeding Frenzy", 147, Rarity.UNCOMMON, mage.cards.f.FeedingFrenzy.class));
cards.add(new SetCardInfo("Festering Goblin", 148, Rarity.COMMON, mage.cards.f.FesteringGoblin.class));
cards.add(new SetCardInfo("Fever Charm", 202, Rarity.COMMON, mage.cards.f.FeverCharm.class));
cards.add(new SetCardInfo("Flamestick Courier", 203, Rarity.UNCOMMON, mage.cards.f.FlamestickCourier.class));
cards.add(new SetCardInfo("Fleeting Aven", 83, Rarity.UNCOMMON, mage.cards.f.FleetingAven.class));
cards.add(new SetCardInfo("Flooded Strand", 316, Rarity.RARE, mage.cards.f.FloodedStrand.class, new CardGraphicInfo(new ObjectColor("UW"), null, false)));
cards.add(new SetCardInfo("Foothill Guide", 29, Rarity.COMMON, mage.cards.f.FoothillGuide.class));
cards.add(new SetCardInfo("Forest", 347, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 348, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 349, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 350, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forgotten Cave", 317, Rarity.COMMON, mage.cards.f.ForgottenCave.class));
cards.add(new SetCardInfo("Frightshroud Courier", 149, Rarity.UNCOMMON, mage.cards.f.FrightshroudCourier.class));
cards.add(new SetCardInfo("Future Sight", 84, Rarity.RARE, mage.cards.f.FutureSight.class));
cards.add(new SetCardInfo("Gangrenous Goliath", 150, Rarity.RARE, mage.cards.g.GangrenousGoliath.class));
cards.add(new SetCardInfo("Ghosthelm Courier", 85, Rarity.UNCOMMON, mage.cards.g.GhosthelmCourier.class));
cards.add(new SetCardInfo("Gigapede", 264, Rarity.RARE, mage.cards.g.Gigapede.class));
cards.add(new SetCardInfo("Glarecaster", 30, Rarity.RARE, mage.cards.g.Glarecaster.class));
cards.add(new SetCardInfo("Glory Seeker", 31, Rarity.COMMON, mage.cards.g.GlorySeeker.class));
cards.add(new SetCardInfo("Gluttonous Zombie", 151, Rarity.UNCOMMON, mage.cards.g.GluttonousZombie.class));
cards.add(new SetCardInfo("Goblin Burrows", 318, Rarity.UNCOMMON, mage.cards.g.GoblinBurrows.class));
cards.add(new SetCardInfo("Goblin Machinist", 204, Rarity.UNCOMMON, mage.cards.g.GoblinMachinist.class));
cards.add(new SetCardInfo("Goblin Piledriver", 205, Rarity.RARE, mage.cards.g.GoblinPiledriver.class));
cards.add(new SetCardInfo("Goblin Pyromancer", 206, Rarity.RARE, mage.cards.g.GoblinPyromancer.class));
cards.add(new SetCardInfo("Goblin Sharpshooter", 207, Rarity.RARE, mage.cards.g.GoblinSharpshooter.class));
cards.add(new SetCardInfo("Goblin Sky Raider", 208, Rarity.COMMON, mage.cards.g.GoblinSkyRaider.class));
cards.add(new SetCardInfo("Goblin Sledder", 209, Rarity.COMMON, mage.cards.g.GoblinSledder.class));
cards.add(new SetCardInfo("Goblin Taskmaster", 210, Rarity.COMMON, mage.cards.g.GoblinTaskmaster.class));
cards.add(new SetCardInfo("Grand Coliseum", 319, Rarity.RARE, mage.cards.g.GrandColiseum.class));
cards.add(new SetCardInfo("Grand Melee", 211, Rarity.RARE, mage.cards.g.GrandMelee.class));
cards.add(new SetCardInfo("Grassland Crusader", 32, Rarity.COMMON, mage.cards.g.GrasslandCrusader.class));
cards.add(new SetCardInfo("Gratuitous Violence", 212, Rarity.RARE, mage.cards.g.GratuitousViolence.class));
cards.add(new SetCardInfo("Gravel Slinger", 33, Rarity.COMMON, mage.cards.g.GravelSlinger.class));
cards.add(new SetCardInfo("Gravespawn Sovereign", 152, Rarity.RARE, mage.cards.g.GravespawnSovereign.class));
cards.add(new SetCardInfo("Grinning Demon", 153, Rarity.RARE, mage.cards.g.GrinningDemon.class));
cards.add(new SetCardInfo("Gustcloak Harrier", 34, Rarity.COMMON, mage.cards.g.GustcloakHarrier.class));
cards.add(new SetCardInfo("Gustcloak Runner", 35, Rarity.COMMON, mage.cards.g.GustcloakRunner.class));
cards.add(new SetCardInfo("Gustcloak Savior", 36, Rarity.RARE, mage.cards.g.GustcloakSavior.class));
cards.add(new SetCardInfo("Gustcloak Sentinel", 37, Rarity.UNCOMMON, mage.cards.g.GustcloakSentinel.class));
cards.add(new SetCardInfo("Gustcloak Skirmisher", 38, Rarity.UNCOMMON, mage.cards.g.GustcloakSkirmisher.class));
cards.add(new SetCardInfo("Harsh Mercy", 39, Rarity.RARE, mage.cards.h.HarshMercy.class));
cards.add(new SetCardInfo("Haunted Cadaver", 154, Rarity.COMMON, mage.cards.h.HauntedCadaver.class));
cards.add(new SetCardInfo("Head Games", 155, Rarity.RARE, mage.cards.h.HeadGames.class));
cards.add(new SetCardInfo("Headhunter", 156, Rarity.UNCOMMON, mage.cards.h.Headhunter.class));
cards.add(new SetCardInfo("Heedless One", 265, Rarity.UNCOMMON, mage.cards.h.HeedlessOne.class));
cards.add(new SetCardInfo("Hystrodon", 266, Rarity.RARE, mage.cards.h.Hystrodon.class));
cards.add(new SetCardInfo("Imagecrafter", 87, Rarity.COMMON, mage.cards.i.Imagecrafter.class));
cards.add(new SetCardInfo("Improvised Armor", 40, Rarity.UNCOMMON, mage.cards.i.ImprovisedArmor.class));
cards.add(new SetCardInfo("Infest", 157, Rarity.UNCOMMON, mage.cards.i.Infest.class));
cards.add(new SetCardInfo("Information Dealer", 88, Rarity.COMMON, mage.cards.i.InformationDealer.class));
cards.add(new SetCardInfo("Inspirit", 41, Rarity.UNCOMMON, mage.cards.i.Inspirit.class));
cards.add(new SetCardInfo("Insurrection", 213, Rarity.RARE, mage.cards.i.Insurrection.class));
cards.add(new SetCardInfo("Invigorating Boon", 267, Rarity.UNCOMMON, mage.cards.i.InvigoratingBoon.class));
cards.add(new SetCardInfo("Ironfist Crusher", 42, Rarity.UNCOMMON, mage.cards.i.IronfistCrusher.class));
cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 336, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 337, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Island", 338, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Ixidor's Will", 90, Rarity.COMMON, mage.cards.i.IxidorsWill.class));
cards.add(new SetCardInfo("Ixidor, Reality Sculptor", 89, Rarity.RARE, mage.cards.i.IxidorRealitySculptor.class));
cards.add(new SetCardInfo("Jareth, Leonine Titan", 43, Rarity.RARE, mage.cards.j.JarethLeonineTitan.class));
cards.add(new SetCardInfo("Kamahl, Fist of Krosa", 268, Rarity.RARE, mage.cards.k.KamahlFistOfKrosa.class));
cards.add(new SetCardInfo("Kamahl's Summons", 269, Rarity.UNCOMMON, mage.cards.k.KamahlsSummons.class));
cards.add(new SetCardInfo("Krosan Colossus", 270, Rarity.RARE, mage.cards.k.KrosanColossus.class));
cards.add(new SetCardInfo("Krosan Groundshaker", 271, Rarity.UNCOMMON, mage.cards.k.KrosanGroundshaker.class));
cards.add(new SetCardInfo("Krosan Tusker", 272, Rarity.COMMON, mage.cards.k.KrosanTusker.class));
cards.add(new SetCardInfo("Lavamancer's Skill", 215, Rarity.COMMON, mage.cards.l.LavamancersSkill.class));
cards.add(new SetCardInfo("Lay Waste", 216, Rarity.COMMON, mage.cards.l.LayWaste.class));
cards.add(new SetCardInfo("Leery Fogbeast", 273, Rarity.COMMON, mage.cards.l.LeeryFogbeast.class));
cards.add(new SetCardInfo("Lightning Rift", 217, Rarity.UNCOMMON, mage.cards.l.LightningRift.class));
cards.add(new SetCardInfo("Lonely Sandbar", 320, Rarity.COMMON, mage.cards.l.LonelySandbar.class));
cards.add(new SetCardInfo("Mage's Guile", 91, Rarity.COMMON, mage.cards.m.MagesGuile.class));
cards.add(new SetCardInfo("Mana Echoes", 218, Rarity.RARE, mage.cards.m.ManaEchoes.class));
cards.add(new SetCardInfo("Menacing Ogre", 219, Rarity.RARE, mage.cards.m.MenacingOgre.class));
cards.add(new SetCardInfo("Misery Charm", 158, Rarity.COMMON, mage.cards.m.MiseryCharm.class));
cards.add(new SetCardInfo("Mistform Dreamer", 93, Rarity.COMMON, mage.cards.m.MistformDreamer.class));
cards.add(new SetCardInfo("Mistform Mask", 94, Rarity.COMMON, mage.cards.m.MistformMask.class));
cards.add(new SetCardInfo("Mistform Mutant", 95, Rarity.UNCOMMON, mage.cards.m.MistformMutant.class));
cards.add(new SetCardInfo("Mistform Shrieker", 96, Rarity.UNCOMMON, mage.cards.m.MistformShrieker.class));
cards.add(new SetCardInfo("Mistform Skyreaver", 97, Rarity.RARE, mage.cards.m.MistformSkyreaver.class));
cards.add(new SetCardInfo("Mistform Stalker", 98, Rarity.UNCOMMON, mage.cards.m.MistformStalker.class));
cards.add(new SetCardInfo("Mistform Wall", 99, Rarity.COMMON, mage.cards.m.MistformWall.class));
cards.add(new SetCardInfo("Mobilization", 44, Rarity.RARE, mage.cards.m.Mobilization.class));
cards.add(new SetCardInfo("Mountain", 343, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 344, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 345, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 346, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mythic Proportions", 274, Rarity.RARE, mage.cards.m.MythicProportions.class));
cards.add(new SetCardInfo("Nameless One", 100, Rarity.UNCOMMON, mage.cards.n.NamelessOne.class));
cards.add(new SetCardInfo("Nantuko Husk", 159, Rarity.COMMON, mage.cards.n.NantukoHusk.class));
cards.add(new SetCardInfo("Naturalize", 275, Rarity.COMMON, mage.cards.n.Naturalize.class));
cards.add(new SetCardInfo("Nosy Goblin", 220, Rarity.COMMON, mage.cards.n.NosyGoblin.class));
cards.add(new SetCardInfo("Nova Cleric", 45, Rarity.UNCOMMON, mage.cards.n.NovaCleric.class));
cards.add(new SetCardInfo("Oblation", 46, Rarity.RARE, mage.cards.o.Oblation.class));
cards.add(new SetCardInfo("Oversold Cemetery", 160, Rarity.RARE, mage.cards.o.OversoldCemetery.class));
cards.add(new SetCardInfo("Overwhelming Instinct", 276, Rarity.UNCOMMON, mage.cards.o.OverwhelmingInstinct.class));
cards.add(new SetCardInfo("Pacifism", 47, Rarity.COMMON, mage.cards.p.Pacifism.class));
cards.add(new SetCardInfo("Patriarch's Bidding", 161, Rarity.RARE, mage.cards.p.PatriarchsBidding.class));
cards.add(new SetCardInfo("Pearlspear Courier", 48, Rarity.UNCOMMON, mage.cards.p.PearlspearCourier.class));
cards.add(new SetCardInfo("Peer Pressure", 101, Rarity.RARE, mage.cards.p.PeerPressure.class));
cards.add(new SetCardInfo("Piety Charm", 49, Rarity.COMMON, mage.cards.p.PietyCharm.class));
cards.add(new SetCardInfo("Pinpoint Avalanche", 221, Rarity.COMMON, mage.cards.p.PinpointAvalanche.class));
cards.add(new SetCardInfo("Plains", 331, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 332, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 333, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 334, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Polluted Delta", 321, Rarity.RARE, mage.cards.p.PollutedDelta.class, new CardGraphicInfo(new ObjectColor("UB"), null, false)));
cards.add(new SetCardInfo("Primal Boost", 277, Rarity.UNCOMMON, mage.cards.p.PrimalBoost.class));
cards.add(new SetCardInfo("Profane Prayers", 162, Rarity.COMMON, mage.cards.p.ProfanePrayers.class));
cards.add(new SetCardInfo("Prowling Pangolin", 163, Rarity.UNCOMMON, mage.cards.p.ProwlingPangolin.class));
cards.add(new SetCardInfo("Psychic Trance", 102, Rarity.RARE, mage.cards.p.PsychicTrance.class));
cards.add(new SetCardInfo("Quicksilver Dragon", 103, Rarity.RARE, mage.cards.q.QuicksilverDragon.class));
cards.add(new SetCardInfo("Ravenous Baloth", 278, Rarity.RARE, mage.cards.r.RavenousBaloth.class));
cards.add(new SetCardInfo("Read the Runes", 104, Rarity.RARE, mage.cards.r.ReadTheRunes.class));
cards.add(new SetCardInfo("Reckless One", 222, Rarity.UNCOMMON, mage.cards.r.RecklessOne.class));
cards.add(new SetCardInfo("Reminisce", 105, Rarity.UNCOMMON, mage.cards.r.Reminisce.class));
cards.add(new SetCardInfo("Renewed Faith", 50, Rarity.COMMON, mage.cards.r.RenewedFaith.class));
cards.add(new SetCardInfo("Righteous Cause", 51, Rarity.UNCOMMON, mage.cards.r.RighteousCause.class));
cards.add(new SetCardInfo("Riptide Biologist", 106, Rarity.COMMON, mage.cards.r.RiptideBiologist.class));
cards.add(new SetCardInfo("Riptide Chronologist", 107, Rarity.UNCOMMON, mage.cards.r.RiptideChronologist.class));
cards.add(new SetCardInfo("Riptide Entrancer", 108, Rarity.RARE, mage.cards.r.RiptideEntrancer.class));
cards.add(new SetCardInfo("Riptide Laboratory", 322, Rarity.RARE, mage.cards.r.RiptideLaboratory.class));
cards.add(new SetCardInfo("Riptide Replicator", 309, Rarity.RARE, mage.cards.r.RiptideReplicator.class));
cards.add(new SetCardInfo("Riptide Shapeshifter", 109, Rarity.UNCOMMON, mage.cards.r.RiptideShapeshifter.class));
cards.add(new SetCardInfo("Risky Move", 223, Rarity.RARE, mage.cards.r.RiskyMove.class));
cards.add(new SetCardInfo("Rorix Bladewing", 224, Rarity.RARE, mage.cards.r.RorixBladewing.class));
cards.add(new SetCardInfo("Rotlung Reanimator", 164, Rarity.RARE, mage.cards.r.RotlungReanimator.class));
cards.add(new SetCardInfo("Rummaging Wizard", 110, Rarity.UNCOMMON, mage.cards.r.RummagingWizard.class));
cards.add(new SetCardInfo("Run Wild", 279, Rarity.UNCOMMON, mage.cards.r.RunWild.class));
cards.add(new SetCardInfo("Sage Aven", 111, Rarity.COMMON, mage.cards.s.SageAven.class));
cards.add(new SetCardInfo("Sandskin", 52, Rarity.COMMON, mage.cards.s.Sandskin.class));
cards.add(new SetCardInfo("Screaming Seahawk", 112, Rarity.COMMON, mage.cards.s.ScreamingSeahawk.class));
cards.add(new SetCardInfo("Screeching Buzzard", 165, Rarity.COMMON, mage.cards.s.ScreechingBuzzard.class));
cards.add(new SetCardInfo("Searing Flesh", 225, Rarity.UNCOMMON, mage.cards.s.SearingFlesh.class));
cards.add(new SetCardInfo("Sea's Claim", 113, Rarity.COMMON, mage.cards.s.SeasClaim.class));
cards.add(new SetCardInfo("Seaside Haven", 323, Rarity.UNCOMMON, mage.cards.s.SeasideHaven.class));
cards.add(new SetCardInfo("Secluded Steppe", 324, Rarity.COMMON, mage.cards.s.SecludedSteppe.class));
cards.add(new SetCardInfo("Serpentine Basilisk", 280, Rarity.UNCOMMON, mage.cards.s.SerpentineBasilisk.class));
cards.add(new SetCardInfo("Severed Legion", 166, Rarity.COMMON, mage.cards.s.SeveredLegion.class));
cards.add(new SetCardInfo("Shade's Breath", 167, Rarity.UNCOMMON, mage.cards.s.ShadesBreath.class));
cards.add(new SetCardInfo("Shaleskin Bruiser", 226, Rarity.UNCOMMON, mage.cards.s.ShaleskinBruiser.class));
cards.add(new SetCardInfo("Shared Triumph", 53, Rarity.RARE, mage.cards.s.SharedTriumph.class));
cards.add(new SetCardInfo("Shepherd of Rot", 168, Rarity.COMMON, mage.cards.s.ShepherdOfRot.class));
cards.add(new SetCardInfo("Shieldmage Elder", 54, Rarity.UNCOMMON, mage.cards.s.ShieldmageElder.class));
cards.add(new SetCardInfo("Shock", 227, Rarity.COMMON, mage.cards.s.Shock.class));
cards.add(new SetCardInfo("Sigil of the New Dawn", 55, Rarity.RARE, mage.cards.s.SigilOfTheNewDawn.class));
cards.add(new SetCardInfo("Silent Specter", 169, Rarity.RARE, mage.cards.s.SilentSpecter.class));
cards.add(new SetCardInfo("Silklash Spider", 281, Rarity.RARE, mage.cards.s.SilklashSpider.class));
cards.add(new SetCardInfo("Silvos, Rogue Elemental", 282, Rarity.RARE, mage.cards.s.SilvosRogueElemental.class));
cards.add(new SetCardInfo("Skirk Fire Marshal", 229, Rarity.RARE, mage.cards.s.SkirkFireMarshal.class));
cards.add(new SetCardInfo("Skirk Prospector", 230, Rarity.COMMON, mage.cards.s.SkirkProspector.class));
cards.add(new SetCardInfo("Skittish Valesk", 231, Rarity.UNCOMMON, mage.cards.s.SkittishValesk.class));
cards.add(new SetCardInfo("Slate of Ancestry", 310, Rarity.RARE, mage.cards.s.SlateOfAncestry.class));
cards.add(new SetCardInfo("Slice and Dice", 232, Rarity.UNCOMMON, mage.cards.s.SliceAndDice.class));
cards.add(new SetCardInfo("Slipstream Eel", 114, Rarity.COMMON, mage.cards.s.SlipstreamEel.class));
cards.add(new SetCardInfo("Smother", 170, Rarity.UNCOMMON, mage.cards.s.Smother.class));
cards.add(new SetCardInfo("Snarling Undorak", 283, Rarity.COMMON, mage.cards.s.SnarlingUndorak.class));
cards.add(new SetCardInfo("Solar Blast", 234, Rarity.COMMON, mage.cards.s.SolarBlast.class));
cards.add(new SetCardInfo("Soulless One", 171, Rarity.UNCOMMON, mage.cards.s.SoullessOne.class));
cards.add(new SetCardInfo("Sparksmith", 235, Rarity.COMMON, mage.cards.s.Sparksmith.class));
cards.add(new SetCardInfo("Spined Basher", 172, Rarity.COMMON, mage.cards.s.SpinedBasher.class));
cards.add(new SetCardInfo("Spitfire Handler", 236, Rarity.UNCOMMON, mage.cards.s.SpitfireHandler.class));
cards.add(new SetCardInfo("Spitting Gourna", 284, Rarity.COMMON, mage.cards.s.SpittingGourna.class));
cards.add(new SetCardInfo("Spurred Wolverine", 237, Rarity.COMMON, mage.cards.s.SpurredWolverine.class));
cards.add(new SetCardInfo("Spy Network", 115, Rarity.COMMON, mage.cards.s.SpyNetwork.class));
cards.add(new SetCardInfo("Stag Beetle", 285, Rarity.RARE, mage.cards.s.StagBeetle.class));
cards.add(new SetCardInfo("Standardize", 116, Rarity.RARE, mage.cards.s.Standardize.class));
cards.add(new SetCardInfo("Starlit Sanctum", 325, Rarity.UNCOMMON, mage.cards.s.StarlitSanctum.class));
cards.add(new SetCardInfo("Starstorm", 238, Rarity.RARE, mage.cards.s.Starstorm.class));
cards.add(new SetCardInfo("Steely Resolve", 286, Rarity.RARE, mage.cards.s.SteelyResolve.class));
cards.add(new SetCardInfo("Strongarm Tactics", 173, Rarity.RARE, mage.cards.s.StrongarmTactics.class));
cards.add(new SetCardInfo("Sunfire Balm", 56, Rarity.UNCOMMON, mage.cards.s.SunfireBalm.class));
cards.add(new SetCardInfo("Supreme Inquisitor", 117, Rarity.RARE, mage.cards.s.SupremeInquisitor.class));
cards.add(new SetCardInfo("Swamp", 339, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 340, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 341, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 342, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swat", 174, Rarity.COMMON, mage.cards.s.Swat.class));
cards.add(new SetCardInfo("Symbiotic Beast", 287, Rarity.UNCOMMON, mage.cards.s.SymbioticBeast.class));
cards.add(new SetCardInfo("Symbiotic Elf", 288, Rarity.COMMON, mage.cards.s.SymbioticElf.class));
cards.add(new SetCardInfo("Symbiotic Wurm", 289, Rarity.RARE, mage.cards.s.SymbioticWurm.class));
cards.add(new SetCardInfo("Syphon Mind", 175, Rarity.COMMON, mage.cards.s.SyphonMind.class));
cards.add(new SetCardInfo("Syphon Soul", 176, Rarity.COMMON, mage.cards.s.SyphonSoul.class));
cards.add(new SetCardInfo("Taunting Elf", 290, Rarity.COMMON, mage.cards.t.TauntingElf.class));
cards.add(new SetCardInfo("Tempting Wurm", 291, Rarity.RARE, mage.cards.t.TemptingWurm.class));
cards.add(new SetCardInfo("Tephraderm", 239, Rarity.RARE, mage.cards.t.Tephraderm.class));
cards.add(new SetCardInfo("Thrashing Mudspawn", 177, Rarity.UNCOMMON, mage.cards.t.ThrashingMudspawn.class));
cards.add(new SetCardInfo("Threaten", 241, Rarity.UNCOMMON, mage.cards.t.Threaten.class));
cards.add(new SetCardInfo("Thunder of Hooves", 242, Rarity.UNCOMMON, mage.cards.t.ThunderOfHooves.class));
cards.add(new SetCardInfo("Towering Baloth", 292, Rarity.UNCOMMON, mage.cards.t.ToweringBaloth.class));
cards.add(new SetCardInfo("Trade Secrets", 118, Rarity.RARE, mage.cards.t.TradeSecrets.class));
cards.add(new SetCardInfo("Tranquil Thicket", 326, Rarity.COMMON, mage.cards.t.TranquilThicket.class));
cards.add(new SetCardInfo("Treespring Lorian", 293, Rarity.COMMON, mage.cards.t.TreespringLorian.class));
cards.add(new SetCardInfo("Tribal Golem", 311, Rarity.RARE, mage.cards.t.TribalGolem.class));
cards.add(new SetCardInfo("Tribal Unity", 294, Rarity.UNCOMMON, mage.cards.t.TribalUnity.class));
cards.add(new SetCardInfo("Trickery Charm", 119, Rarity.COMMON, mage.cards.t.TrickeryCharm.class));
cards.add(new SetCardInfo("True Believer", 57, Rarity.RARE, mage.cards.t.TrueBeliever.class));
cards.add(new SetCardInfo("Undead Gladiator", 178, Rarity.RARE, mage.cards.u.UndeadGladiator.class));
cards.add(new SetCardInfo("Unholy Grotto", 327, Rarity.RARE, mage.cards.u.UnholyGrotto.class));
cards.add(new SetCardInfo("Unified Strike", 58, Rarity.COMMON, mage.cards.u.UnifiedStrike.class));
cards.add(new SetCardInfo("Venomspout Brackus", 295, Rarity.UNCOMMON, mage.cards.v.VenomspoutBrackus.class));
cards.add(new SetCardInfo("Visara the Dreadful", 179, Rarity.RARE, mage.cards.v.VisaraTheDreadful.class));
cards.add(new SetCardInfo("Vitality Charm", 296, Rarity.COMMON, mage.cards.v.VitalityCharm.class));
cards.add(new SetCardInfo("Voice of the Woods", 297, Rarity.RARE, mage.cards.v.VoiceOfTheWoods.class));
cards.add(new SetCardInfo("Voidmage Prodigy", 120, Rarity.RARE, mage.cards.v.VoidmageProdigy.class));
cards.add(new SetCardInfo("Walking Desecration", 180, Rarity.UNCOMMON, mage.cards.w.WalkingDesecration.class));
cards.add(new SetCardInfo("Wall of Mulch", 298, Rarity.UNCOMMON, mage.cards.w.WallOfMulch.class));
cards.add(new SetCardInfo("Wave of Indifference", 243, Rarity.COMMON, mage.cards.w.WaveOfIndifference.class));
cards.add(new SetCardInfo("Weathered Wayfarer", 59, Rarity.RARE, mage.cards.w.WeatheredWayfarer.class));
cards.add(new SetCardInfo("Weird Harvest", 299, Rarity.RARE, mage.cards.w.WeirdHarvest.class));
cards.add(new SetCardInfo("Wellwisher", 300, Rarity.COMMON, mage.cards.w.Wellwisher.class));
cards.add(new SetCardInfo("Wheel and Deal", 121, Rarity.RARE, mage.cards.w.WheelAndDeal.class));
cards.add(new SetCardInfo("Whipcorder", 60, Rarity.UNCOMMON, mage.cards.w.Whipcorder.class));
cards.add(new SetCardInfo("Windswept Heath", 328, Rarity.RARE, mage.cards.w.WindsweptHeath.class, new CardGraphicInfo(new ObjectColor("GW"), null, false)));
cards.add(new SetCardInfo("Wirewood Elf", 301, Rarity.COMMON, mage.cards.w.WirewoodElf.class));
cards.add(new SetCardInfo("Wirewood Herald", 302, Rarity.COMMON, mage.cards.w.WirewoodHerald.class));
cards.add(new SetCardInfo("Wirewood Lodge", 329, Rarity.RARE, mage.cards.w.WirewoodLodge.class));
cards.add(new SetCardInfo("Wirewood Pride", 303, Rarity.COMMON, mage.cards.w.WirewoodPride.class));
cards.add(new SetCardInfo("Wirewood Savage", 304, Rarity.COMMON, mage.cards.w.WirewoodSavage.class));
cards.add(new SetCardInfo("Withering Hex", 181, Rarity.UNCOMMON, mage.cards.w.WitheringHex.class));
cards.add(new SetCardInfo("Wooded Foothills", 330, Rarity.RARE, mage.cards.w.WoodedFoothills.class, new CardGraphicInfo(new ObjectColor("RG"), null, false)));
cards.add(new SetCardInfo("Words of War", 244, Rarity.RARE, mage.cards.w.WordsOfWar.class));
cards.add(new SetCardInfo("Words of Waste", 182, Rarity.RARE, mage.cards.w.WordsOfWaste.class));
cards.add(new SetCardInfo("Words of Wilding", 305, Rarity.RARE, mage.cards.w.WordsOfWilding.class));
cards.add(new SetCardInfo("Words of Wind", 122, Rarity.RARE, mage.cards.w.WordsOfWind.class));
cards.add(new SetCardInfo("Words of Worship", 61, Rarity.RARE, mage.cards.w.WordsOfWorship.class));
cards.add(new SetCardInfo("Wretched Anurid", 183, Rarity.COMMON, mage.cards.w.WretchedAnurid.class));
}
}

View file

@ -27,6 +27,7 @@
*/
package mage.abilities.effects;
import mage.MageObject;
import mage.abilities.Ability;
import mage.constants.Duration;
import mage.constants.EffectType;
@ -44,26 +45,34 @@ import mage.target.Target;
*/
public abstract class RedirectionEffect extends ReplacementEffectImpl {
protected Target redirectTarget;
protected int amountToRedirect;
protected boolean oneUsage;
public RedirectionEffect(Duration duration) {
this(duration, Integer.MAX_VALUE, false);
public enum UsageType {
ACCORDING_DURATION,
ONE_USAGE_ABSOLUTE,
ONE_USAGE_AT_THE_SAME_TIME; // all damage dealt at the same time
}
public RedirectionEffect(Duration duration, int amountToRedirect, boolean oneUsage) {
protected Target redirectTarget;
protected int amountToRedirect;
protected UsageType usageType;
protected int applyEffectsCounter;
public RedirectionEffect(Duration duration) {
this(duration, Integer.MAX_VALUE, UsageType.ACCORDING_DURATION);
applyEffectsCounter = -1;
}
public RedirectionEffect(Duration duration, int amountToRedirect, UsageType usageType) {
super(duration, Outcome.RedirectDamage);
this.effectType = EffectType.REDIRECTION;
this.amountToRedirect = amountToRedirect;
this.oneUsage = oneUsage;
this.usageType = usageType;
}
public RedirectionEffect(final RedirectionEffect effect) {
super(effect);
this.redirectTarget = effect.redirectTarget;
this.amountToRedirect = effect.amountToRedirect;
this.oneUsage = effect.oneUsage;
this.usageType = effect.usageType;
}
@Override
@ -79,26 +88,38 @@ public abstract class RedirectionEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
int damageToRedirect = event.getAmount();
if (damageToRedirect < 1) { // if multiple replacement effect apply, the rest damage can be 0, so the effect is not applied/replaced
return false;
}
String sourceLogName = source != null ? game.getObject(source.getSourceId()).getLogName() + ": " : "";
DamageEvent damageEvent = (DamageEvent) event;
int restDamage = 0;
int damageToRedirect = event.getAmount();
if (damageEvent.getAmount() > amountToRedirect) {
restDamage = damageEvent.getAmount() - amountToRedirect;
damageToRedirect = amountToRedirect;
}
if (damageToRedirect > 0 && oneUsage) {
this.discard();
if (damageToRedirect > 0 && usageType != UsageType.ACCORDING_DURATION) {
if (UsageType.ONE_USAGE_ABSOLUTE == usageType) {
this.discard();
}
if (applyEffectsCounter > 0) {
if (applyEffectsCounter < game.getState().getApplyEffectsCounter()) {
this.discard();
}
} else {
applyEffectsCounter = game.getState().getApplyEffectsCounter();
}
}
Permanent permanent = game.getPermanent(redirectTarget.getFirstTarget());
if (permanent != null) {
permanent.damage(damageToRedirect, event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
game.informPlayers(sourceLogName + "Redirected " + damageToRedirect + " damage to " + permanent.getLogName());
game.informPlayers(sourceLogName + "Redirected " + damageToRedirect + " damage" + getRedirectedFromText(event, game) + " to " + permanent.getLogName());
} else {
Player player = game.getPlayer(redirectTarget.getFirstTarget());
if (player != null) {
player.damage(damageToRedirect, event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
game.informPlayers(sourceLogName + "Redirected " + damageToRedirect + " damage to " + player.getLogName());
game.informPlayers(sourceLogName + "Redirected " + damageToRedirect + " damage" + getRedirectedFromText(event, game) + " to " + player.getLogName());
}
}
if (restDamage > 0) {
@ -108,4 +129,16 @@ public abstract class RedirectionEffect extends ReplacementEffectImpl {
return true;
}
private String getRedirectedFromText(GameEvent event, Game game) {
Player player = game.getPlayer(event.getTargetId());
if (player != null) {
return " from " + player.getLogName();
}
MageObject mageObject = game.getObject(event.getTargetId());
if (mageObject != null) {
return " from " + mageObject.getLogName();
}
return "";
}
}

View file

@ -71,6 +71,7 @@ public class DoIfCostPaid extends OneShotEffect {
}
message = getCostText() + " and " + effectText + '?';
message = Character.toUpperCase(message.charAt(0)) + message.substring(1);
CardUtil.replaceSourceName(message, mageObject.getName());
} else {
message = chooseUseText;
}
@ -79,6 +80,7 @@ public class DoIfCostPaid extends OneShotEffect {
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
&& executingEffects.size() > 0 && (!optional || player.chooseUse(executingEffects.get(0).getOutcome(), message, source, game))) {
cost.clearPaid();
int bookmark = game.bookmarkState();
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
for (Effect effect : executingEffects) {
effect.setTargetPointer(this.targetPointer);
@ -89,13 +91,17 @@ public class DoIfCostPaid extends OneShotEffect {
}
}
player.resetStoredBookmark(game); // otherwise you can e.g. undo card drawn with Mentor of the Meek
} else if (!otherwiseEffects.isEmpty()) {
for (Effect effect : otherwiseEffects) {
effect.setTargetPointer(this.targetPointer);
if (effect instanceof OneShotEffect) {
result &= effect.apply(game, source);
} else {
game.addEffect((ContinuousEffect) effect, source);
} else {
// Paying cost was cancels so try to undo payment so far
game.restoreState(bookmark, DoIfCostPaid.class.getName());
if (!otherwiseEffects.isEmpty()) {
for (Effect effect : otherwiseEffects) {
effect.setTargetPointer(this.targetPointer);
if (effect instanceof OneShotEffect) {
result &= effect.apply(game, source);
} else {
game.addEffect((ContinuousEffect) effect, source);
}
}
}
}

View file

@ -18,8 +18,8 @@ import mage.game.permanent.Permanent;
*/
public class RedirectDamageFromSourceToTargetEffect extends RedirectionEffect {
public RedirectDamageFromSourceToTargetEffect(Duration duration, int amountToRedirect, boolean oneUsage) {
super(duration, amountToRedirect, oneUsage);
public RedirectDamageFromSourceToTargetEffect(Duration duration, int amountToRedirect, UsageType usageType) {
super(duration, amountToRedirect, usageType);
staticText = "The next " + amountToRedirect + " damage that would be dealt to {this} this turn is dealt to target creature you control instead.";
}

View file

@ -75,6 +75,13 @@ public final class StaticFilters {
static {
FILTER_CARD_CREATURE_YOUR_GRAVEYARD.setLockedFilter(true);
}
public static final FilterCard FILTER_CARD_FROM_YOUR_GRAVEYARD = new FilterCard("card from your graveyard");
static {
FILTER_CARD_FROM_YOUR_GRAVEYARD.setLockedFilter(true);
}
public static final FilterLandCard FILTER_CARD_LAND = new FilterLandCard();
static {

View file

@ -2565,14 +2565,34 @@ public abstract class GameImpl implements Game, Serializable {
}
}
//Remove all emblems the player controls
//Remove all emblems/plane the player controls
boolean addPlaneAgain = false;
for (Iterator<CommandObject> it = this.getState().getCommand().iterator(); it.hasNext();) {
CommandObject obj = it.next();
if ((obj instanceof Emblem || obj instanceof Plane) && obj.getControllerId().equals(playerId)) {
((Emblem) obj).discardEffects();// This may not be the best fix but it works
if (obj instanceof Emblem) {
((Emblem) obj).discardEffects();// This may not be the best fix but it works
}
if (obj instanceof Plane) {
((Plane) obj).discardEffects();
// Readd a new one
addPlaneAgain = true;
}
it.remove();
}
}
if (addPlaneAgain) {
boolean addedAgain = false;
for (Player aplayer : state.getPlayers().values()) {
if (!aplayer.hasLeft() && !addedAgain) {
addedAgain = true;
Plane plane = Plane.getRandomPlane();
plane.setControllerId(aplayer.getId());
addPlane(plane, null, aplayer.getId());
}
}
}
Iterator<Entry<UUID, Card>> it = gameCards.entrySet().iterator();

View file

@ -30,7 +30,6 @@ package mage.game;
import java.io.Serializable;
import java.util.*;
import java.util.stream.Collectors;
import mage.MageObject;
import mage.abilities.*;
import mage.abilities.effects.ContinuousEffect;
@ -121,6 +120,8 @@ public class GameState implements Serializable, Copyable<GameState> {
private Map<UUID, Card> copiedCards = new HashMap<>();
private int permanentOrderNumber;
private int applyEffectsCounter; // Upcounting number of each applyEffects execution
public GameState() {
players = new Players();
playerList = new PlayerList();
@ -137,6 +138,7 @@ public class GameState implements Serializable, Copyable<GameState> {
combat = new Combat();
turnMods = new TurnMods();
watchers = new Watchers();
applyEffectsCounter = 0;
}
public GameState(final GameState state) {
@ -193,6 +195,7 @@ public class GameState implements Serializable, Copyable<GameState> {
this.zoneChangeCounter.putAll(state.zoneChangeCounter);
this.copiedCards.putAll(state.copiedCards);
this.permanentOrderNumber = state.permanentOrderNumber;
this.applyEffectsCounter = state.applyEffectsCounter;
}
public void restoreForRollBack(GameState state) {
@ -210,7 +213,7 @@ public class GameState implements Serializable, Copyable<GameState> {
this.command = state.command;
this.isPlaneChase = state.isPlaneChase;
this.seenPlanes = state.seenPlanes;
this.designations = state.designations;
this.designations = state.designations;
this.exile = state.exile;
this.battlefield = state.battlefield;
this.turnNum = state.turnNum;
@ -237,6 +240,7 @@ public class GameState implements Serializable, Copyable<GameState> {
this.zoneChangeCounter = state.zoneChangeCounter;
this.copiedCards = state.copiedCards;
this.permanentOrderNumber = state.permanentOrderNumber;
this.applyEffectsCounter = state.applyEffectsCounter;
}
@Override
@ -466,12 +470,12 @@ public class GameState implements Serializable, Copyable<GameState> {
}
}
return null;
}
}
public List<String> getSeenPlanes() {
return seenPlanes;
}
public boolean isPlaneChase() {
return isPlaneChase;
}
@ -574,6 +578,7 @@ public class GameState implements Serializable, Copyable<GameState> {
}
public void applyEffects(Game game) {
applyEffectsCounter++;
for (Player player : players.values()) {
player.reset();
}
@ -881,13 +886,13 @@ public class GameState implements Serializable, Copyable<GameState> {
addAbility(ability, designation.getId(), null);
}
}
public void addSeenPlane(Plane plane, Game game, UUID controllerId) {
if (plane != null) {
getSeenPlanes().add(plane.getName());
}
}
public void resetSeenPlanes() {
getSeenPlanes().clear();
}
@ -1169,4 +1174,9 @@ public class GameState implements Serializable, Copyable<GameState> {
public int getNextPermanentOrderNumber() {
return permanentOrderNumber++;
}
public int getApplyEffectsCounter() {
return applyEffectsCounter;
}
}

View file

@ -27,6 +27,8 @@ import java.util.UUID;
* @author LevelX2
*/
public abstract class StackObjImpl implements StackObject {
private boolean targetChanged; // for Psychic Battle
/**
* Choose new targets for a stack Object
@ -271,4 +273,14 @@ public abstract class StackObjImpl implements StackObject {
@Override
public void removePTCDA() {
}
@Override
public boolean isTargetChanged() {
return targetChanged;
}
@Override
public void setTargetChanged(boolean targetChanged) {
this.targetChanged = targetChanged;
}
}

View file

@ -52,6 +52,10 @@ public interface StackObject extends MageObject, Controllable {
boolean chooseNewTargets(Game game, UUID playerId, boolean forceChange, boolean onlyOneTarget, FilterPermanent filterNewTarget);
StackObject createCopyOnStack(Game game, Ability source, UUID newControllerId, boolean chooseNewTargets);
boolean isTargetChanged();
void setTargetChanged(boolean targetChanged);
@Override
StackObject copy();

View file

@ -27,20 +27,20 @@
*/
package mage.target.common;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.cards.Card;
import mage.cards.Cards;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
@ -48,7 +48,7 @@ import java.util.UUID;
public class TargetCardInYourGraveyard extends TargetCard {
public TargetCardInYourGraveyard() {
this(1, 1, new FilterCard("card from your graveyard"));
this(1, 1, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD);
}
public TargetCardInYourGraveyard(FilterCard filter) {