mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added Izzet Guildmage, Roling Spoil, Commandeer, Razor Golem, Guardian of the Guildpact.
This commit is contained in:
parent
496331995a
commit
0459322857
10 changed files with 529 additions and 4 deletions
|
@ -70,7 +70,10 @@ public class UyoSilentProphet extends CardImpl {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {2}, Return two lands you control to their owner's hand: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, new FilterLandPermanent("lands"), false)));
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
|
|
115
Mage.Sets/src/mage/sets/coldsnap/Commandeer.java
Normal file
115
Mage.Sets/src/mage/sets/coldsnap/Commandeer.java
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* 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.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.AlternativeCostSourceAbility;
|
||||
import mage.abilities.costs.common.ExileFromHandCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Commandeer extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("two blue cards");
|
||||
private static final FilterSpell filterSpell = new FilterSpell("noncreature spell");
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
filterSpell.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
public Commandeer(UUID ownerId) {
|
||||
super(ownerId, 29, "Commandeer", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{5}{U}{U}");
|
||||
this.expansionSetCode = "CSP";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// You may exile two blue cards from your hand rather than pay Commandeer's mana cost.
|
||||
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter))));
|
||||
|
||||
// Gain control of target noncreature spell. You may choose new targets for it.
|
||||
this.getSpellAbility().addEffect(new CommandeerEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(filterSpell));
|
||||
}
|
||||
|
||||
public Commandeer(final Commandeer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Commandeer copy() {
|
||||
return new Commandeer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CommandeerEffect extends OneShotEffect {
|
||||
|
||||
public CommandeerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Gain control of target noncreature spell. You may choose new targets for it";
|
||||
}
|
||||
|
||||
public CommandeerEffect(final CommandeerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandeerEffect copy() {
|
||||
return new CommandeerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
||||
if (controller != null && spell != null) {
|
||||
spell.setControllerId(controller.getId());
|
||||
spell.chooseNewTargets(game, controller.getId(), false, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
67
Mage.Sets/src/mage/sets/darksteel/RazorGolem.java
Normal file
67
Mage.Sets/src/mage/sets/darksteel/RazorGolem.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.AffinityForLandTypeAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class RazorGolem extends CardImpl {
|
||||
|
||||
public RazorGolem(UUID ownerId) {
|
||||
super(ownerId, 137, "Razor Golem", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
||||
this.expansionSetCode = "DST";
|
||||
this.subtype.add("Golem");
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Affinity for Plains
|
||||
this.addAbility(new AffinityForLandTypeAbility("Plains", "Plains"));
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
}
|
||||
|
||||
public RazorGolem(final RazorGolem card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RazorGolem copy() {
|
||||
return new RazorGolem(this);
|
||||
}
|
||||
}
|
|
@ -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.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.MonocoloredPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GuardianOfTheGuildpact extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("monocolored");
|
||||
|
||||
static {
|
||||
filter.add(new MonocoloredPredicate());
|
||||
}
|
||||
|
||||
public GuardianOfTheGuildpact(UUID ownerId) {
|
||||
super(ownerId, 10, "Guardian of the Guildpact", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.expansionSetCode = "DIS";
|
||||
this.subtype.add("Spirit");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Protection from monocolored
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
}
|
||||
|
||||
public GuardianOfTheGuildpact(final GuardianOfTheGuildpact card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuardianOfTheGuildpact copy() {
|
||||
return new GuardianOfTheGuildpact(this);
|
||||
}
|
||||
}
|
98
Mage.Sets/src/mage/sets/guildpact/IzzetGuildmage.java
Normal file
98
Mage.Sets/src/mage/sets/guildpact/IzzetGuildmage.java
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* 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.guildpact;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class IzzetGuildmage extends CardImpl {
|
||||
|
||||
private static final FilterSpell filterInstant = new FilterSpell("instant spell you control with converted mana cost 2 or less");
|
||||
private static final FilterSpell filterSorcery = new FilterSpell("instant spell you control with converted mana cost 2 or less");
|
||||
|
||||
static {
|
||||
filterInstant.add(new CardTypePredicate(CardType.INSTANT));
|
||||
filterInstant.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
filterInstant.add(new ControllerPredicate(TargetController.YOU));
|
||||
filterSorcery.add(new CardTypePredicate(CardType.SORCERY));
|
||||
filterSorcery.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
filterSorcery.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public IzzetGuildmage(UUID ownerId) {
|
||||
super(ownerId, 145, "Izzet Guildmage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U/R}{U/R}");
|
||||
this.expansionSetCode = "GPT";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>({UR} can be paid with either {U} or {R}.)</i>
|
||||
// {2}{U}: Copy target instant spell you control with converted mana cost 2 or less. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{2}{U}"));
|
||||
ability.addTarget(new TargetSpell(filterInstant));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}{R}: Copy target sorcery spell you control with converted mana cost 2 or less. You may choose new targets for the copy.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{2}{R}"));
|
||||
ability.addTarget(new TargetSpell(filterSorcery));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public IzzetGuildmage(final IzzetGuildmage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IzzetGuildmage copy() {
|
||||
return new IzzetGuildmage(this);
|
||||
}
|
||||
}
|
|
@ -29,11 +29,11 @@ package mage.sets.magic2013;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.dynamicvalue.common.ControllerLifeCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
|
@ -67,7 +67,9 @@ public class AjaniCallerOfThePride extends CardImpl {
|
|||
public void build() {
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
||||
// +1: Put a +1/+1 counter on up to one target creature.
|
||||
Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), 1);
|
||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
||||
effect.setText("Put a +1/+1 counter on up to one target creature");
|
||||
Ability ability = new LoyaltyAbility(effect, 1);
|
||||
ability.addTarget(new TargetCreaturePermanent(0,1));
|
||||
this.addAbility(ability);
|
||||
// -3: Target creature gains flying and double strike until end of turn.
|
||||
|
|
72
Mage.Sets/src/mage/sets/ravnika/RollingSpoil.java
Normal file
72
Mage.Sets/src/mage/sets/ravnika/RollingSpoil.java
Normal 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.ravnika;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.condition.common.ManaWasSpentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class RollingSpoil extends CardImpl {
|
||||
|
||||
public RollingSpoil(UUID ownerId) {
|
||||
super(ownerId, 179, "Rolling Spoil", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
|
||||
this.expansionSetCode = "RAV";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Destroy target land.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetLandPermanent());
|
||||
|
||||
// If {B} was spent to cast Rolling Spoil, all creatures get -1/-1 until end of turn.
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(
|
||||
new BoostAllEffect(-1, -1, Duration.EndOfTurn),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.B), "If {B} was spent to cast {this}, all creatures get -1/-1 until end of turn"));
|
||||
}
|
||||
|
||||
public RollingSpoil(final RollingSpoil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RollingSpoil copy() {
|
||||
return new RollingSpoil(this);
|
||||
}
|
||||
}
|
|
@ -11,7 +11,8 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
import mage.game.Game;
|
||||
|
||||
public class AffinityEffect extends CostModificationEffectImpl {
|
||||
private FilterControlledPermanent filter;
|
||||
|
||||
private final FilterControlledPermanent filter;
|
||||
|
||||
public AffinityEffect(FilterControlledPermanent affinityFilter) {
|
||||
super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* 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.abilities.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.AdjustingSourceCosts;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class AffinityForLandTypeAbility extends SimpleStaticAbility implements AdjustingSourceCosts {
|
||||
|
||||
private final FilterControlledPermanent filter;
|
||||
|
||||
String text;
|
||||
|
||||
public AffinityForLandTypeAbility(String landType, String text) {
|
||||
super(Zone.OUTSIDE, new AffinityEffect(getFilter(landType)));
|
||||
this.filter = getFilter(landType);
|
||||
setRuleAtTheTop(true);
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
private static FilterControlledPermanent getFilter(String landType) {
|
||||
FilterControlledPermanent affinityfilter = new FilterControlledPermanent();
|
||||
affinityfilter.add(new SubtypePredicate(landType));
|
||||
return affinityfilter;
|
||||
|
||||
}
|
||||
|
||||
public AffinityForLandTypeAbility(final AffinityForLandTypeAbility ability) {
|
||||
super(ability);
|
||||
this.text = ability.text;
|
||||
this.filter = ability.filter.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleStaticAbility copy() {
|
||||
return new AffinityForLandTypeAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Affinity for " + text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size();
|
||||
if (count > 0) {
|
||||
CardUtil.adjustCost((SpellAbility)ability, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -408,7 +408,9 @@ public class Spell implements StackObject, Card {
|
|||
}
|
||||
|
||||
}
|
||||
game.informPlayers(this.getName() + " is now " + newTargetDescription.toString());
|
||||
if (newTargetDescription.length() > 0) {
|
||||
game.informPlayers(this.getName() + " is now " + newTargetDescription.toString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue