Added cards. Updated mtg-cards-data.txt.

This commit is contained in:
North 2011-06-07 23:23:04 +03:00
parent b7c7290e6f
commit 79583a6ec2
12 changed files with 19690 additions and 19471 deletions

View file

@ -0,0 +1,68 @@
/*
* 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.sets.magic2010;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
/**
*
* @author North
*/
public class EssenceScatter extends CardImpl<EssenceScatter> {
private static final FilterSpell filter = new FilterSpell("creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
}
public EssenceScatter(UUID ownerId) {
super(ownerId, 51, "Essence Scatter", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
this.expansionSetCode = "M10";
this.color.setBlue(true);
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addEffect(new CounterTargetEffect());
}
public EssenceScatter(final EssenceScatter card) {
super(card);
}
@Override
public EssenceScatter copy() {
return new EssenceScatter(this);
}
}

View file

@ -0,0 +1,99 @@
/*
* 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.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.BeastToken;
import mage.target.TargetPermanent;
/**
*
* @author North
*/
public class BeastWithin extends CardImpl<BeastWithin> {
public BeastWithin(UUID ownerId) {
super(ownerId, 103, "Beast Within", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
this.expansionSetCode = "NPH";
this.color.setGreen(true);
this.getSpellAbility().addTarget(new TargetPermanent());
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new BeastWithinEffect());
}
public BeastWithin(final BeastWithin card) {
super(card);
}
@Override
public BeastWithin copy() {
return new BeastWithin(this);
}
}
class BeastWithinEffect extends OneShotEffect<BeastWithinEffect> {
public BeastWithinEffect() {
super(Outcome.PutCreatureInPlay);
}
public BeastWithinEffect(final BeastWithinEffect effect) {
super(effect);
}
@Override
public BeastWithinEffect copy() {
return new BeastWithinEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
BeastToken token = new BeastToken();
token.putOntoBattlefield(game, source.getId(), permanent.getControllerId());
}
return true;
}
@Override
public String getDynamicText(Ability source) {
return "Its controller puts a 3/3 green Beast creature token onto the battlefield";
}
}

View file

@ -0,0 +1,68 @@
/*
* 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.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author North
*/
public class CorrosiveGale extends CardImpl<CorrosiveGale> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
static {
filter.getAbilities().add(FlyingAbility.getInstance());
}
public CorrosiveGale(UUID ownerId) {
super(ownerId, 107, "Corrosive Gale", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{GP}");
this.expansionSetCode = "NPH";
this.color.setGreen(true);
this.getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filter));
}
public CorrosiveGale(final CorrosiveGale card) {
super(card);
}
@Override
public CorrosiveGale copy() {
return new CorrosiveGale(this);
}
}

View file

@ -0,0 +1,63 @@
/*
* 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.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseLifeControllerEffect;
import mage.cards.CardImpl;
import mage.target.common.TargetArtifactPermanent;
/**
*
* @author North
*/
public class GlissasScorn extends CardImpl<GlissasScorn> {
public GlissasScorn(UUID ownerId) {
super(ownerId, 110, "Glissa's Scorn", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
this.expansionSetCode = "NPH";
this.color.setGreen(true);
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new LoseLifeControllerEffect(1));
}
public GlissasScorn(final GlissasScorn card) {
super(card);
}
@Override
public GlissasScorn copy() {
return new GlissasScorn(this);
}
}

View file

@ -0,0 +1,70 @@
/*
* 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.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.LoseLifeControllerEffect;
import mage.cards.CardImpl;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
/**
*
* @author North
*/
public class PsychicBarrier extends CardImpl<PsychicBarrier> {
private static final FilterSpell filter = new FilterSpell("creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
}
public PsychicBarrier(UUID ownerId) {
super(ownerId, 43, "Psychic Barrier", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{U}");
this.expansionSetCode = "NPH";
this.color.setBlue(true);
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addEffect(new LoseLifeControllerEffect(1));
}
public PsychicBarrier(final PsychicBarrier card) {
super(card);
}
@Override
public PsychicBarrier copy() {
return new PsychicBarrier(this);
}
}

View file

@ -0,0 +1,72 @@
/*
* 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.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseLifeControllerEffect;
import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterArtifactPermanent;
import mage.target.TargetPermanent;
/**
*
* @author North
*/
public class VictoriousDestruction extends CardImpl<VictoriousDestruction> {
private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact or land");
static {
filter.getCardType().add(CardType.LAND);
filter.setScopeCardType(ComparisonScope.Any);
}
public VictoriousDestruction(UUID ownerId) {
super(ownerId, 99, "Victorious Destruction", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}");
this.expansionSetCode = "NPH";
this.color.setRed(true);
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new LoseLifeControllerEffect(1));
}
public VictoriousDestruction(final VictoriousDestruction card) {
super(card);
}
@Override
public VictoriousDestruction copy() {
return new VictoriousDestruction(this);
}
}

View file

@ -0,0 +1,97 @@
/*
* 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.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author North
*/
public class WarReport extends CardImpl<WarReport> {
public WarReport(UUID ownerId) {
super(ownerId, 26, "War Report", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{W}");
this.expansionSetCode = "NPH";
this.color.setWhite(true);
this.getSpellAbility().addEffect(new WarReportEffect());
}
public WarReport(final WarReport card) {
super(card);
}
@Override
public WarReport copy() {
return new WarReport(this);
}
}
class WarReportEffect extends OneShotEffect<WarReportEffect> {
public WarReportEffect() {
super(Outcome.GainLife);
}
public WarReportEffect(final WarReportEffect effect) {
super(effect);
}
@Override
public WarReportEffect copy() {
return new WarReportEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
int lifeToGain = game.getBattlefield().countAll(new FilterCreaturePermanent());
lifeToGain += game.getBattlefield().countAll(new FilterArtifactPermanent());
player.gainLife(lifeToGain, game);
}
return true;
}
@Override
public String getDynamicText(Ability source) {
return "You gain life equal to the number of creatures on the battlefield plus the number of artifacts on the battlefield";
}
}

View file

@ -0,0 +1,68 @@
/*
* 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.sets.tenth;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
/**
*
* @author North
*/
public class RemoveSoul extends CardImpl<RemoveSoul> {
private static final FilterSpell filter = new FilterSpell("creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
}
public RemoveSoul(UUID ownerId) {
super(ownerId, 100, "Remove Soul", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
this.expansionSetCode = "10E";
this.color.setBlue(true);
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addEffect(new CounterTargetEffect());
}
public RemoveSoul(final RemoveSoul card) {
super(card);
}
@Override
public RemoveSoul copy() {
return new RemoveSoul(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* 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.sets.zendikar;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.filter.FilterSpell;
import mage.game.permanent.token.Token;
import mage.target.TargetSpell;
/**
*
* @author North
*/
public class SummonersBane extends CardImpl<SummonersBane> {
private static final FilterSpell filter = new FilterSpell("creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
}
public SummonersBane(UUID ownerId) {
super(ownerId, 71, "Summoner's Bane", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
this.expansionSetCode = "ZEN";
this.color.setBlue(true);
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addEffect(new CreateTokenEffect(new IllusionToken()));
}
public SummonersBane(final SummonersBane card) {
super(card);
}
@Override
public SummonersBane copy() {
return new SummonersBane(this);
}
}
class IllusionToken extends Token {
public IllusionToken() {
super("Illusion", "2/2 blue Illusion creature token");
cardType.add(CardType.CREATURE);
color = ObjectColor.BLUE;
subtype.add("Illusion");
power = new MageInt(2);
toughness = new MageInt(2);
}
}

View file

@ -30,6 +30,8 @@ package mage.abilities.effects.common;
import mage.Constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.OneShotEffect;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
@ -42,9 +44,12 @@ import mage.game.permanent.Permanent;
public class DamageAllEffect extends OneShotEffect<DamageAllEffect> {
private FilterCreaturePermanent filter;
private int amount;
private DynamicValue amount;
public DamageAllEffect(int amount, FilterCreaturePermanent filter) {
this(new StaticValue(amount), filter);
}
public DamageAllEffect(DynamicValue amount, FilterCreaturePermanent filter) {
super(Outcome.Damage);
this.amount = amount;
this.filter = filter;
@ -64,14 +69,14 @@ public class DamageAllEffect extends OneShotEffect<DamageAllEffect> {
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
permanent.damage(amount, source.getId(), game, true, false);
permanent.damage(amount.calculate(game, source), source.getId(), game, true, false);
}
return true;
}
@Override
public String getText(Ability source) {
return "{source} deals " + Integer.toString(amount) + " damage to each " + filter.getMessage();
return "{source} deals " + amount.toString() + " damage to each " + filter.getMessage() + amount.getMessage();
}
}

View file

@ -0,0 +1,53 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package mage.abilities.effects.common;
import mage.Constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author North
*/
public class LoseLifeControllerEffect extends OneShotEffect<LoseLifeControllerEffect> {
protected int amount;
public LoseLifeControllerEffect(int amount) {
super(Outcome.Damage);
this.amount = amount;
}
public LoseLifeControllerEffect(final LoseLifeControllerEffect effect) {
super(effect);
}
@Override
public LoseLifeControllerEffect copy() {
return new LoseLifeControllerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
if (targetPermanent != null) {
Player player = game.getPlayer(targetPermanent.getControllerId());
if (player != null) {
player.loseLife(amount, game);
return true;
}
}
return false;
}
@Override
public String getText(Ability source) {
return "Its controller loses " + amount + " life";
}
}

File diff suppressed because it is too large Load diff