mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Merge branch 'master' into adjustTargets
This commit is contained in:
commit
e6225e3ad3
138 changed files with 3990 additions and 343 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -132,4 +132,3 @@ Mage.Client/serverlist.txt
|
||||||
client_secrets.json
|
client_secrets.json
|
||||||
|
|
||||||
dependency-reduced-pom.xml
|
dependency-reduced-pom.xml
|
||||||
/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/
|
|
||||||
|
|
@ -257,16 +257,16 @@ public enum WizardCardsImageSource implements CardImageSource {
|
||||||
supportedSets.add("E01");
|
supportedSets.add("E01");
|
||||||
supportedSets.add("HOU");
|
supportedSets.add("HOU");
|
||||||
supportedSets.add("C17");
|
supportedSets.add("C17");
|
||||||
// supportedSets.add("XLN");
|
supportedSets.add("XLN");
|
||||||
// supportedSets.add("DDT");
|
// supportedSets.add("DDT"); // Duel Decks: Merfolk vs. Goblins
|
||||||
// supportedSets.add("IMA");
|
// supportedSets.add("IMA"); // Iconic Msters
|
||||||
// supportedSets.add("E02");
|
// supportedSets.add("E02"); // Explorers of Ixalan
|
||||||
// supportedSets.add("V17");
|
// supportedSets.add("V17"); // From the Vault: Transform
|
||||||
// supportedSets.add("UST");
|
// supportedSets.add("UST"); // Unstable
|
||||||
// supportedSets.add("RIX");
|
// supportedSets.add("RIX"); // Rivals of Ixalan
|
||||||
// supportedSets.add("A25");
|
// supportedSets.add("A25"); // Masters 25
|
||||||
// supportedSets.add("DOM");
|
// supportedSets.add("DOM"); // Dominaria
|
||||||
// supportedSets.add("M19");
|
// supportedSets.add("M19"); // Core 2019
|
||||||
|
|
||||||
sets = new HashMap<>();
|
sets = new HashMap<>();
|
||||||
setsAliases = new HashMap<>();
|
setsAliases = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ public class AcrobaticManeuver extends CardImpl {
|
||||||
Effect effect = new ExileTargetForSourceEffect();
|
Effect effect = new ExileTargetForSourceEffect();
|
||||||
effect.setApplyEffectsAfter();
|
effect.setApplyEffectsAfter();
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true));
|
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect());
|
||||||
|
|
||||||
// Draw a card.
|
// Draw a card.
|
||||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||||
|
|
|
||||||
|
|
@ -65,12 +65,13 @@ import mage.watchers.Watcher;
|
||||||
*/
|
*/
|
||||||
public class AdmiralBeckettBrass extends CardImpl {
|
public class AdmiralBeckettBrass extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other Pirates you control");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other Pirates you control");
|
||||||
|
private static final FilterNonlandPermanent filter2 = new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.PIRATE));
|
filter.add(new SubtypePredicate(SubType.PIRATE));
|
||||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||||
|
filter2.add(new ControllerDealtDamageByPiratesPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public AdmiralBeckettBrass(UUID ownerId, CardSetInfo setInfo) {
|
public AdmiralBeckettBrass(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -87,25 +88,12 @@ public class AdmiralBeckettBrass extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of your end step, gain control of target nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn.
|
// At the beginning of your end step, gain control of target nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn.
|
||||||
Ability ability = new BeginningOfEndStepTriggeredAbility(new GainControlTargetEffect(Duration.Custom), TargetController.YOU, false);
|
Ability ability = new BeginningOfEndStepTriggeredAbility(new GainControlTargetEffect(Duration.Custom), TargetController.YOU, false);
|
||||||
ability.addTarget(new TargetNonlandPermanent(new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn")));
|
ability.addTarget(new TargetNonlandPermanent(filter2));
|
||||||
originalId = ability.getOriginalId();
|
|
||||||
this.addAbility(ability, new DamagedByPiratesWatcher());
|
this.addAbility(ability, new DamagedByPiratesWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
public AdmiralBeckettBrass(final AdmiralBeckettBrass card) {
|
public AdmiralBeckettBrass(final AdmiralBeckettBrass card) {
|
||||||
super(card);
|
super(card);
|
||||||
this.originalId = card.originalId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
|
||||||
if (ability.getOriginalId().equals(originalId)) {
|
|
||||||
ability.getTargets().clear();
|
|
||||||
FilterNonlandPermanent playerFilter = new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn");
|
|
||||||
playerFilter.add(new ControllerDealtDamageByPiratesPredicate());
|
|
||||||
TargetNonlandPermanent target = new TargetNonlandPermanent(1, 1, playerFilter, true);
|
|
||||||
ability.addTarget(target);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
101
Mage.Sets/src/mage/cards/a/AnaSanctuary.java
Normal file
101
Mage.Sets/src/mage/cards/a/AnaSanctuary.java
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* 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.a;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class AnaSanctuary extends CardImpl {
|
||||||
|
|
||||||
|
public AnaSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, if you control a blue or black permanent, target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead.
|
||||||
|
Ability ability = new SanctuaryTriggeredAbility(
|
||||||
|
new BoostEffect(1), new BoostEffect(5), ObjectColor.BLACK, ObjectColor.BLUE,
|
||||||
|
"At the beginning of your upkeep, if you control a blue or black permanent, "
|
||||||
|
+ "target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead."
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AnaSanctuary(final AnaSanctuary card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AnaSanctuary copy() {
|
||||||
|
return new AnaSanctuary(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BoostEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private final int amount;
|
||||||
|
|
||||||
|
BoostEffect(int amount) {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
BoostEffect(final BoostEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
this.amount = effect.amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BoostEffect copy() {
|
||||||
|
return new BoostEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
ContinuousEffect effect = new BoostTargetEffect(amount, amount, Duration.EndOfTurn);
|
||||||
|
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -29,7 +29,7 @@ package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.ModularAbility;
|
import mage.abilities.keyword.ModularAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -45,14 +45,14 @@ import mage.counters.CounterType;
|
||||||
public class ArcboundSlith extends CardImpl {
|
public class ArcboundSlith extends CardImpl {
|
||||||
|
|
||||||
public ArcboundSlith(UUID ownerId, CardSetInfo setInfo) {
|
public ArcboundSlith(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}");
|
||||||
this.subtype.add(SubType.SLITH);
|
this.subtype.add(SubType.SLITH);
|
||||||
this.power = new MageInt(0);
|
this.power = new MageInt(0);
|
||||||
this.toughness = new MageInt(0);
|
this.toughness = new MageInt(0);
|
||||||
|
|
||||||
// Whenever Arcbound Slith deals combat damage to a player, put a +1/+1 counter on it.
|
// Whenever Arcbound Slith deals combat damage to a player, put a +1/+1 counter on it.
|
||||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), false));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), false));
|
||||||
|
|
||||||
// Modular 1
|
// Modular 1
|
||||||
this.addAbility(new ModularAbility(this, 1));
|
this.addAbility(new ModularAbility(this, 1));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ package mage.cards.a;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.DiesTriggeredAbility;
|
import mage.abilities.common.DiesTriggeredAbility;
|
||||||
|
import mage.abilities.costs.OrCost;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
|
@ -61,7 +62,11 @@ public class ArcticNishoba extends CardImpl {
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
// Cumulative upkeep {G} or {W}
|
// Cumulative upkeep {G} or {W}
|
||||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{G/W}")));
|
this.addAbility(new CumulativeUpkeepAbility(new OrCost(
|
||||||
|
new ManaCostsImpl("{G}"),
|
||||||
|
new ManaCostsImpl("{W}"),
|
||||||
|
"{G} or {W}"
|
||||||
|
)));
|
||||||
|
|
||||||
// When Arctic Nishoba dies, you gain 2 life for each age counter on it.
|
// When Arctic Nishoba dies, you gain 2 life for each age counter on it.
|
||||||
Effect effect = new GainLifeEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2));
|
Effect effect = new GainLifeEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2));
|
||||||
|
|
|
||||||
86
Mage.Sets/src/mage/cards/a/AysenCrusader.java
Normal file
86
Mage.Sets/src/mage/cards/a/AysenCrusader.java
Normal 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.cards.a;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.IntPlusDynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class AysenCrusader extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldiers and Warriors you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.or(
|
||||||
|
new SubtypePredicate(SubType.SOLDIER),
|
||||||
|
new SubtypePredicate(SubType.WARRIOR)
|
||||||
|
));
|
||||||
|
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||||
|
}
|
||||||
|
|
||||||
|
public AysenCrusader(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.KNIGHT);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Aysen Crusader's power and toughness are each equal to 2 plus the number of Soldiers and Warriors you control.
|
||||||
|
DynamicValue value = new IntPlusDynamicValue(2, new PermanentsOnBattlefieldCount(filter));
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public AysenCrusader(final AysenCrusader card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AysenCrusader copy() {
|
||||||
|
return new AysenCrusader(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
98
Mage.Sets/src/mage/cards/b/BakisCurse.java
Normal file
98
Mage.Sets/src/mage/cards/b/BakisCurse.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 LIAB8LE 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.b;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class BakisCurse extends CardImpl {
|
||||||
|
|
||||||
|
public BakisCurse(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{U}");
|
||||||
|
|
||||||
|
// Baki's Curse deals 2 damage to each creature for each Aura attached to that creature.
|
||||||
|
this.getSpellAbility().addEffect(new BakisCurseEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public BakisCurse(final BakisCurse card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BakisCurse copy() {
|
||||||
|
return new BakisCurse(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BakisCurseEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public BakisCurseEffect() {
|
||||||
|
super(Outcome.Detriment);
|
||||||
|
staticText = "Baki's Curse deals 2 damage to each creature for each Aura attached to that creature.";
|
||||||
|
}
|
||||||
|
|
||||||
|
public BakisCurseEffect(final BakisCurseEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BakisCurseEffect copy() {
|
||||||
|
return new BakisCurseEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||||
|
int count = 0;
|
||||||
|
List<UUID> attachments = creature.getAttachments();
|
||||||
|
for (UUID attachmentId : attachments) {
|
||||||
|
Permanent attached = game.getPermanent(attachmentId);
|
||||||
|
if (attached != null && attached.getSubtype(game).contains(SubType.AURA)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
creature.damage(count * 2, source.getId(), game, false, true);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
76
Mage.Sets/src/mage/cards/b/BelbesArmor.java
Normal file
76
Mage.Sets/src/mage/cards/b/BelbesArmor.java
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
/*
|
||||||
|
* 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.b;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class BelbesArmor extends CardImpl {
|
||||||
|
|
||||||
|
public BelbesArmor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
// {X}, {tap}: Target creature gets -X/+X until end of turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new BoostTargetEffect(
|
||||||
|
new MultipliedValue(new ManacostVariableValue(), -1),
|
||||||
|
new ManacostVariableValue(),
|
||||||
|
Duration.EndOfTurn
|
||||||
|
),
|
||||||
|
new ManaCostsImpl("{X}"));
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BelbesArmor(final BelbesArmor card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BelbesArmor copy() {
|
||||||
|
return new BelbesArmor(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
78
Mage.Sets/src/mage/cards/b/BloodstokeHowler.java
Normal file
78
Mage.Sets/src/mage/cards/b/BloodstokeHowler.java
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
/*
|
||||||
|
* 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.b;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
|
import mage.abilities.keyword.MorphAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class BloodstokeHowler extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creatures you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.BEAST));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BloodstokeHowler(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.BEAST);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Morph {6}{R}
|
||||||
|
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{R}")));
|
||||||
|
|
||||||
|
// When Bloodstoke Howler is turned face up, Beast creatures you control get +3/+0 until end of turn.
|
||||||
|
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostControlledEffect(3, 0, Duration.EndOfTurn, filter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BloodstokeHowler(final BloodstokeHowler card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BloodstokeHowler copy() {
|
||||||
|
return new BloodstokeHowler(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -51,20 +51,20 @@ import mage.target.common.TargetCreatureOrPlayer;
|
||||||
public class BorosReckoner extends CardImpl {
|
public class BorosReckoner extends CardImpl {
|
||||||
|
|
||||||
public BorosReckoner(UUID ownerId, CardSetInfo setInfo) {
|
public BorosReckoner(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/W}{R/W}{R/W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/W}{R/W}{R/W}");
|
||||||
this.subtype.add(SubType.MINOTAUR, SubType.WIZARD);
|
this.subtype.add(SubType.MINOTAUR, SubType.WIZARD);
|
||||||
|
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Whenever Boros Reckoner is dealt damage, it deals that much damage to target creature or player.
|
// Whenever Boros Reckoner is dealt damage, it deals that much damage to target creature or player.
|
||||||
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false);
|
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false, false, true);
|
||||||
ability.addTarget(new TargetCreatureOrPlayer());
|
ability.addTarget(new TargetCreatureOrPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {R/W}: Boros Reckoner gains first strike until end of turn.
|
// {R/W}: Boros Reckoner gains first strike until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{R/W}")));
|
Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R/W}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BorosReckoner(final BorosReckoner card) {
|
public BorosReckoner(final BorosReckoner card) {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.effects.common.SacrificeEffect;
|
import mage.abilities.effects.common.SacrificeEffect;
|
||||||
|
|
@ -38,13 +37,15 @@ import mage.filter.FilterPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author cbt33, North (Karma)
|
* @author cbt33, North (Karma)
|
||||||
*/
|
*/
|
||||||
public class BraidsCabalMinion extends CardImpl {
|
public class BraidsCabalMinion extends CardImpl {
|
||||||
|
|
||||||
static final FilterPermanent filter = new FilterPermanent("artifact, creature, or land");
|
static final FilterPermanent filter = new FilterPermanent("an artifact, creature, or land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class BrassTalonChimera extends CardImpl {
|
public class BrassTalonChimera extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature you control");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.CHIMERA));
|
filter.add(new SubtypePredicate(SubType.CHIMERA));
|
||||||
|
|
@ -73,6 +73,7 @@ public class BrassTalonChimera extends CardImpl {
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost());
|
||||||
ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield));
|
ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrassTalonChimera(final BrassTalonChimera card) {
|
public BrassTalonChimera(final BrassTalonChimera card) {
|
||||||
|
|
|
||||||
|
|
@ -52,13 +52,13 @@ import mage.players.Player;
|
||||||
public class BroodhatchNantuko extends CardImpl {
|
public class BroodhatchNantuko extends CardImpl {
|
||||||
|
|
||||||
public BroodhatchNantuko(UUID ownerId, CardSetInfo setInfo) {
|
public BroodhatchNantuko(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||||
this.subtype.add(SubType.INSECT, SubType.DRUID);
|
this.subtype.add(SubType.INSECT, SubType.DRUID);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Broodhatch Nantuko is dealt damage, you may create that many 1/1 green Insect creature tokens.
|
// Whenever Broodhatch Nantuko is dealt damage, you may create that many 1/1 green Insect creature tokens.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BroodhatchNantukoDealDamageEffect(), true));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BroodhatchNantukoDealDamageEffect(), true, false, true));
|
||||||
// Morph {2}{G}
|
// Morph {2}{G}
|
||||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{G}")));
|
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{G}")));
|
||||||
}
|
}
|
||||||
|
|
@ -100,4 +100,4 @@ class BroodhatchNantukoDealDamageEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
||||||
|
|
@ -13,9 +12,11 @@ import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class BullElephant extends CardImpl {
|
public class BullElephant extends CardImpl {
|
||||||
|
|
||||||
private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("two forests you control");
|
private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("Forests you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
controlledForest.add(new SubtypePredicate(SubType.FOREST));
|
controlledForest.add(new SubtypePredicate(SubType.FOREST));
|
||||||
|
|
|
||||||
|
|
@ -30,44 +30,28 @@ package mage.cards.c;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
|
||||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.players.Player;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Pete Rossi
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public class CetaSanctuary extends CardImpl {
|
public class CetaSanctuary extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a red or green permanent");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public CetaSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
public CetaSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.
|
// At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.
|
||||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CetaSanctuaryEffect(), TargetController.YOU, true);
|
Ability ability = new SanctuaryTriggeredAbility(
|
||||||
this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter),
|
new DrawDiscardControllerEffect(1, 1), new DrawDiscardControllerEffect(2, 1), ObjectColor.GREEN, ObjectColor.RED,
|
||||||
"At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card."));
|
"At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. "
|
||||||
|
+ "If you control a red permanent and a green permanent, instead draw two cards, then discard a card."
|
||||||
|
);
|
||||||
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CetaSanctuary(final CetaSanctuary card) {
|
public CetaSanctuary(final CetaSanctuary card) {
|
||||||
|
|
@ -79,49 +63,3 @@ public class CetaSanctuary extends CardImpl {
|
||||||
return new CetaSanctuary(this);
|
return new CetaSanctuary(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CetaSanctuaryEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
public CetaSanctuaryEffect() {
|
|
||||||
super(Outcome.DrawCard);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CetaSanctuaryEffect(final CetaSanctuaryEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
|
||||||
if (controller != null) {
|
|
||||||
int red = 0;
|
|
||||||
int green = 0;
|
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) {
|
|
||||||
ObjectColor color = permanent.getColor(game);
|
|
||||||
if (color.isRed()) {
|
|
||||||
red = 1;
|
|
||||||
}
|
|
||||||
if (color.isGreen()) {
|
|
||||||
green = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (red == 1 && green == 1) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (red != 0 || green != 0) {
|
|
||||||
controller.drawCards((red + green), game);
|
|
||||||
controller.discard(1, false, source, game);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CetaSanctuaryEffect copy() {
|
|
||||||
return new CetaSanctuaryEffect(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -49,14 +49,14 @@ public class CoalhaulerSwine extends CardImpl {
|
||||||
|
|
||||||
public CoalhaulerSwine(UUID ownerId, CardSetInfo setInfo) {
|
public CoalhaulerSwine(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
|
||||||
|
|
||||||
this.subtype.add(SubType.BOAR);
|
this.subtype.add(SubType.BOAR);
|
||||||
this.subtype.add(SubType.BEAST);
|
this.subtype.add(SubType.BEAST);
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// Whenever Coalhauler Swine is dealt damage, it deals that much damage to each player.
|
// Whenever Coalhauler Swine is dealt damage, it deals that much damage to each player.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new CoalhaulerSwineEffect(), false));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new CoalhaulerSwineEffect(), false, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CoalhaulerSwine(final CoalhaulerSwine card) {
|
public CoalhaulerSwine(final CoalhaulerSwine card) {
|
||||||
|
|
@ -88,7 +88,7 @@ public class CoalhaulerSwine extends CardImpl {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (UUID playerId : game.getPlayers().keySet()) {
|
for (UUID playerId : game.getPlayers().keySet()) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if(player != null) {
|
if (player != null) {
|
||||||
player.damage((Integer) this.getValue("damage"), source.getSourceId(), game, false, true);
|
player.damage((Integer) this.getValue("damage"), source.getSourceId(), game, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||||
|
|
@ -36,9 +35,11 @@ import mage.abilities.keyword.FabricateAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -57,7 +58,7 @@ public class CultivatorOfBlades extends CardImpl {
|
||||||
this.addAbility(new FabricateAbility(2));
|
this.addAbility(new FabricateAbility(2));
|
||||||
|
|
||||||
// Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power.
|
// Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power.
|
||||||
this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, new FilterAttackingCreature(), true, true),
|
this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true, true),
|
||||||
true, "Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power."));
|
true, "Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
65
Mage.Sets/src/mage/cards/d/DegaSanctuary.java
Normal file
65
Mage.Sets/src/mage/cards/d/DegaSanctuary.java
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* 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.d;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class DegaSanctuary extends CardImpl {
|
||||||
|
|
||||||
|
public DegaSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. If you control a black permanent and a red permanent, you gain 4 life instead.
|
||||||
|
Ability ability = new SanctuaryTriggeredAbility(
|
||||||
|
new GainLifeEffect(2), new GainLifeEffect(4), ObjectColor.BLACK, ObjectColor.RED,
|
||||||
|
"At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. "
|
||||||
|
+ "If you control a black permanent and a red permanent, you gain 4 life instead."
|
||||||
|
);
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DegaSanctuary(final DegaSanctuary card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DegaSanctuary copy() {
|
||||||
|
return new DegaSanctuary(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -30,7 +30,7 @@ package mage.cards.d;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -47,14 +47,14 @@ import mage.players.Player;
|
||||||
public class DivinerSpirit extends CardImpl {
|
public class DivinerSpirit extends CardImpl {
|
||||||
|
|
||||||
public DivinerSpirit(UUID ownerId, CardSetInfo setInfo) {
|
public DivinerSpirit(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// Whenever Diviner Spirit deals combat damage to a player, you and that player each draw that many cards.
|
// Whenever Diviner Spirit deals combat damage to a player, you and that player each draw that many cards.
|
||||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DivinerSpiritEffect(), false, true));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DivinerSpiritEffect(), false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DivinerSpirit(final DivinerSpirit card) {
|
public DivinerSpirit(final DivinerSpirit card) {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class DualNatureCreateTokenEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source));
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(permanent.getControllerId());
|
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(permanent.getControllerId());
|
||||||
effect.setTargetPointer(targetPointer);
|
effect.setTargetPointer(targetPointer);
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public class EldraziDisplacer extends CardImpl {
|
||||||
effect.setText("Exile another target creature");
|
effect.setText("Exile another target creature");
|
||||||
effect.setApplyEffectsAfter(); // Needed to let temporary continuous effects end if a permanent is blinked
|
effect.setApplyEffectsAfter(); // Needed to let temporary continuous effects end if a permanent is blinked
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}{C}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{2}{C}"));
|
||||||
effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true, true);
|
effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true);
|
||||||
effect.setText(", then return it to the battlefield tapped under its owner's control");
|
effect.setText(", then return it to the battlefield tapped under its owner's control");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
ability.addTarget(new TargetCreaturePermanent(FILTER));
|
ability.addTarget(new TargetCreaturePermanent(FILTER));
|
||||||
|
|
|
||||||
97
Mage.Sets/src/mage/cards/e/ElephantResurgence.java
Normal file
97
Mage.Sets/src/mage/cards/e/ElephantResurgence.java
Normal 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.cards.e;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.ElephantResurgenceToken;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ElephantResurgence extends CardImpl {
|
||||||
|
|
||||||
|
public ElephantResurgence(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||||
|
|
||||||
|
// Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
|
||||||
|
this.getSpellAbility().addEffect(new ElephantResurgenceEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ElephantResurgence(final ElephantResurgence card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ElephantResurgence copy() {
|
||||||
|
return new ElephantResurgence(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ElephantResurgenceEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public ElephantResurgenceEffect() {
|
||||||
|
super(Outcome.Detriment);
|
||||||
|
this.staticText = "Each player creates a green Elephant creature token. Those creatures have "
|
||||||
|
+ "\"This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard.\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ElephantResurgenceEffect(final ElephantResurgenceEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ElephantResurgenceEffect copy() {
|
||||||
|
return new ElephantResurgenceEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
|
Effect effect = new CreateTokenTargetEffect(new ElephantResurgenceToken(), 1);
|
||||||
|
effect.setTargetPointer(new FixedTarget(playerId));
|
||||||
|
effect.apply(game, source);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
67
Mage.Sets/src/mage/cards/e/Embolden.java
Normal file
67
Mage.Sets/src/mage/cards/e/Embolden.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.cards.e;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.PreventDamageToTargetMultiAmountEffect;
|
||||||
|
import mage.abilities.keyword.FlashbackAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TimingRule;
|
||||||
|
import mage.target.common.TargetCreatureOrPlayerAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class Embolden extends CardImpl {
|
||||||
|
|
||||||
|
public Embolden(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||||
|
|
||||||
|
// Prevent the next 4 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||||
|
this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 4));
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4));
|
||||||
|
|
||||||
|
// Flashback {1}{W}
|
||||||
|
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Embolden(final Embolden card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Embolden copy() {
|
||||||
|
return new Embolden(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ public class FelidarGuardian extends CardImpl {
|
||||||
Effect effect = new ExileTargetForSourceEffect();
|
Effect effect = new ExileTargetForSourceEffect();
|
||||||
effect.setApplyEffectsAfter();
|
effect.setApplyEffectsAfter();
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
|
Ability ability = new EntersBattlefieldTriggeredAbility(effect, true);
|
||||||
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true));
|
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect());
|
||||||
ability.addTarget(new TargetControlledPermanent(filter));
|
ability.addTarget(new TargetControlledPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,26 +27,27 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class FierceEmpath extends CardImpl {
|
public class FierceEmpath extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with converted mana cost 6 or greater");
|
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 6 or greater");
|
||||||
static {
|
static {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 5));
|
filter.add(new ConvertedManaCostPredicate(ComparisonType.MORE_THAN, 5));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ import mage.players.Player;
|
||||||
public class FiredrinkerSatyr extends CardImpl {
|
public class FiredrinkerSatyr extends CardImpl {
|
||||||
|
|
||||||
public FiredrinkerSatyr(UUID ownerId, CardSetInfo setInfo) {
|
public FiredrinkerSatyr(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||||
this.subtype.add(SubType.SATYR);
|
this.subtype.add(SubType.SATYR);
|
||||||
this.subtype.add(SubType.SHAMAN);
|
this.subtype.add(SubType.SHAMAN);
|
||||||
|
|
||||||
|
|
@ -62,9 +62,9 @@ public class FiredrinkerSatyr extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Firedrinker Satyr is dealt damage, it deals that much damage to you.
|
// Whenever Firedrinker Satyr is dealt damage, it deals that much damage to you.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new FiredrinkerSatyrDealDamageEffect(), false));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new FiredrinkerSatyrDealDamageEffect(), false, false, true));
|
||||||
// {1}{R}: Firedrinker Satyr gets +1/+0 until end of turn and deals 1 damage to you.
|
// {1}{R}: Firedrinker Satyr gets +1/+0 until end of turn and deals 1 damage to you.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}"));
|
||||||
Effect effect = new DamageControllerEffect(1);
|
Effect effect = new DamageControllerEffect(1);
|
||||||
effect.setText("and deals 1 damage to you");
|
effect.setText("and deals 1 damage to you");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
|
|
|
||||||
90
Mage.Sets/src/mage/cards/f/FlamingSword.java
Normal file
90
Mage.Sets/src/mage/cards/f/FlamingSword.java
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* 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.f;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class FlamingSword extends CardImpl {
|
||||||
|
|
||||||
|
public FlamingSword(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+0 and has first strike.
|
||||||
|
Effect effect = new BoostEnchantedEffect(1, 0, Duration.WhileOnBattlefield);
|
||||||
|
effect.setText("Enchanted creature gets +1/+0");
|
||||||
|
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||||
|
effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA);
|
||||||
|
effect.setText("and has first strike");
|
||||||
|
ability.addEffect(effect);
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlamingSword(final FlamingSword card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlamingSword copy() {
|
||||||
|
return new FlamingSword(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
69
Mage.Sets/src/mage/cards/f/FleetingAven.java
Normal file
69
Mage.Sets/src/mage/cards/f/FleetingAven.java
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* 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.f;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.CycleAllTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class FleetingAven extends CardImpl {
|
||||||
|
|
||||||
|
public FleetingAven(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.BIRD);
|
||||||
|
this.subtype.add(SubType.WIZARD);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever a player cycles a card, return Fleeting Aven to its owner's hand.
|
||||||
|
this.addAbility(new CycleAllTriggeredAbility(new ReturnToHandSourceEffect(true), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public FleetingAven(final FleetingAven card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FleetingAven copy() {
|
||||||
|
return new FleetingAven(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -35,34 +34,28 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class Fork extends CardImpl {
|
public class Fork extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("target instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Fork(UUID ownerId, CardSetInfo setInfo) {
|
public Fork(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}");
|
||||||
|
|
||||||
// Copy target instant or sorcery spell, except that the copy is red. You may choose new targets for the copy.
|
// Copy target instant or sorcery spell, except that the copy is red. You may choose new targets for the copy.
|
||||||
this.getSpellAbility().addEffect(new ForkEffect());
|
this.getSpellAbility().addEffect(new ForkEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
|
|
@ -44,6 +43,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
|
@ -72,7 +73,7 @@ public class GatecreeperVine extends CardImpl {
|
||||||
|
|
||||||
// When Gatecreeper Vine enters the battlefield, you may search your library for a basic land card or a Gate card, reveal it, put it into your hand, then shuffle your library.
|
// When Gatecreeper Vine enters the battlefield, you may search your library for a basic land card or a Gate card, reveal it, put it into your hand, then shuffle your library.
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true)));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GatecreeperVine(final GatecreeperVine card) {
|
public GatecreeperVine(final GatecreeperVine card) {
|
||||||
|
|
|
||||||
80
Mage.Sets/src/mage/cards/g/GiftOfGranite.java
Normal file
80
Mage.Sets/src/mage/cards/g/GiftOfGranite.java
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
/*
|
||||||
|
* 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.constants.SubType;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class GiftOfGranite extends CardImpl {
|
||||||
|
|
||||||
|
public GiftOfGranite(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +0/+2.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftOfGranite(final GiftOfGranite card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GiftOfGranite copy() {
|
||||||
|
return new GiftOfGranite(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
91
Mage.Sets/src/mage/cards/g/GlacialPlating.java
Normal file
91
Mage.Sets/src/mage/cards/g/GlacialPlating.java
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
/*
|
||||||
|
* 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.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class GlacialPlating extends CardImpl {
|
||||||
|
|
||||||
|
public GlacialPlating(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.SNOW);
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Cumulative upkeep {snow}
|
||||||
|
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{S}")));
|
||||||
|
|
||||||
|
// Enchanted creature gets +3/+3 for each age counter on Glacial Plating.
|
||||||
|
DynamicValue boostValue = new MultipliedValue(new CountersSourceCount(CounterType.AGE), 3);
|
||||||
|
Effect effect = new BoostEnchantedEffect(boostValue, boostValue, Duration.WhileOnBattlefield);
|
||||||
|
effect.setText("Enchanted creature gets +3/+3 for each age counter on {this}");
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GlacialPlating(final GlacialPlating card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GlacialPlating copy() {
|
||||||
|
return new GlacialPlating(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -29,7 +29,7 @@ package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||||
import mage.abilities.effects.common.UnlessPaysDelayedEffect;
|
import mage.abilities.effects.common.UnlessPaysDelayedEffect;
|
||||||
|
|
@ -46,16 +46,16 @@ import mage.constants.PhaseStep;
|
||||||
public class GlassAsp extends CardImpl {
|
public class GlassAsp extends CardImpl {
|
||||||
|
|
||||||
public GlassAsp(UUID ownerId, CardSetInfo setInfo) {
|
public GlassAsp(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
|
||||||
this.subtype.add(SubType.SNAKE);
|
this.subtype.add(SubType.SNAKE);
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Glass Asp deals combat damage to a player, that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that step.
|
// Whenever Glass Asp deals combat damage to a player, that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that step.
|
||||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new UnlessPaysDelayedEffect(
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new UnlessPaysDelayedEffect(
|
||||||
new ManaCostsImpl("{2}"), new LoseLifeTargetEffect(2), PhaseStep.DRAW, true,
|
new ManaCostsImpl("{2}"), new LoseLifeTargetEffect(2), PhaseStep.DRAW, true,
|
||||||
"that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that draw step."),
|
"that player loses 2 life at the beginning of his or her next draw step unless he or she pays {2} before that draw step."),
|
||||||
false, true));
|
false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlassAsp(final GlassAsp card) {
|
public GlassAsp(final GlassAsp card) {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
|
@ -43,6 +42,8 @@ import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jonubuu
|
* @author jonubuu
|
||||||
|
|
@ -50,7 +51,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
public class GoblinWarchief extends CardImpl {
|
public class GoblinWarchief extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filterSpells = new FilterCard("Goblin spells");
|
private static final FilterCard filterSpells = new FilterCard("Goblin spells");
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creatures");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterSpells.add(new SubtypePredicate(SubType.GOBLIN));
|
filterSpells.add(new SubtypePredicate(SubType.GOBLIN));
|
||||||
|
|
|
||||||
|
|
@ -96,9 +96,9 @@ class GrimCaptainsCallEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void returnToHand(Game game, SubType subType, Player controller, Ability source) {
|
private void returnToHand(Game game, SubType subType, Player controller, Ability source) {
|
||||||
FilterCreatureCard filter = new FilterCreatureCard();
|
FilterCreatureCard filter = new FilterCreatureCard(subType.getDescription() + " card");
|
||||||
filter.add(new SubtypePredicate(subType));
|
filter.add(new SubtypePredicate(subType));
|
||||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard());
|
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard(filter));
|
||||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
|
@ -44,6 +43,8 @@ import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
|
@ -58,7 +59,7 @@ public class GuildFeud extends CardImpl {
|
||||||
// then puts the rest into his or her graveyard. You do the same with the top three
|
// then puts the rest into his or her graveyard. You do the same with the top three
|
||||||
// cards of your library. If two creatures are put onto the battlefield this way,
|
// cards of your library. If two creatures are put onto the battlefield this way,
|
||||||
// those creatures fight each other.
|
// those creatures fight each other.
|
||||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new GuildFeudEffect(), TargetController.YOU, true);
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(new GuildFeudEffect(), TargetController.YOU, false);
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
|
@ -45,6 +44,8 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
|
@ -68,7 +69,7 @@ public class HaazdaSnareSquad extends CardImpl {
|
||||||
|
|
||||||
// Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls.
|
// Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls.
|
||||||
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(""), new ManaCostsImpl("{W}")),false,
|
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(""), new ManaCostsImpl("{W}")),false,
|
||||||
"Whenever {this} attacks you may pay {W}. If you do, tap target creature an opponent controls.");
|
"Whenever {this} attacks, you may pay {W}. If you do, tap target creature an opponent controls.");
|
||||||
Target target = new TargetCreaturePermanent(filter);
|
Target target = new TargetCreaturePermanent(filter);
|
||||||
ability.addTarget(target);
|
ability.addTarget(target);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
59
Mage.Sets/src/mage/cards/h/HellSwarm.java
Normal file
59
Mage.Sets/src/mage/cards/h/HellSwarm.java
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* 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.h;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class HellSwarm extends CardImpl {
|
||||||
|
|
||||||
|
public HellSwarm(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||||
|
|
||||||
|
// All creatures get -1/-0 until end of turn.
|
||||||
|
this.getSpellAbility().addEffect(new BoostAllEffect(-1, 0, Duration.EndOfTurn, new FilterCreaturePermanent("All creatures"), false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public HellSwarm(final HellSwarm card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HellSwarm copy() {
|
||||||
|
return new HellSwarm(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -44,11 +44,14 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterPlayer;
|
import mage.filter.FilterPlayer;
|
||||||
import mage.filter.predicate.Predicate;
|
import mage.filter.predicate.ObjectSourcePlayer;
|
||||||
|
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.DamagedPlayerEvent;
|
import mage.game.events.DamagedPlayerEvent;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
import mage.game.stack.StackAbility;
|
||||||
|
import mage.game.stack.StackObject;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
@ -59,6 +62,12 @@ import mage.watchers.Watcher;
|
||||||
*/
|
*/
|
||||||
public class HopeOfGhirapur extends CardImpl {
|
public class HopeOfGhirapur extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPlayer filter = new FilterPlayer("player who was dealt combat damage by {this} this turn");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new HopeOfGhirapurPlayerLostLifePredicate());
|
||||||
|
}
|
||||||
|
|
||||||
public HopeOfGhirapur(UUID ownerId, CardSetInfo setInfo) {
|
public HopeOfGhirapur(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}");
|
||||||
|
|
||||||
|
|
@ -72,25 +81,8 @@ public class HopeOfGhirapur extends CardImpl {
|
||||||
|
|
||||||
// Sacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells.
|
// Sacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HopeOfGhirapurCantCastEffect(), new SacrificeSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HopeOfGhirapurCantCastEffect(), new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer(1, 1, false, filter));
|
||||||
this.addAbility(ability, new HopeOfGhirapurCombatDamageWatcher());
|
this.addAbility(ability, new HopeOfGhirapurCombatDamageWatcher());
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
|
||||||
if (ability instanceof SimpleActivatedAbility) {
|
|
||||||
if (!ability.getEffects().isEmpty() && (ability.getEffects().get(0) instanceof HopeOfGhirapurCantCastEffect)) {
|
|
||||||
MageObject sourceObject = ability.getSourceObject(game);
|
|
||||||
if (sourceObject != null) {
|
|
||||||
ability.getTargets().clear();
|
|
||||||
FilterPlayer playerFilter = new FilterPlayer("player who was dealt combat damage by " + sourceObject.getIdName() + " this turn");
|
|
||||||
MageObjectReference sourceReference = new MageObjectReference(ability.getSourceId(), ability.getSourceObjectZoneChangeCounter(), game);
|
|
||||||
playerFilter.add(new HopeOfGhirapurPlayerLostLifePredicate(sourceReference));
|
|
||||||
ability.addTarget(new TargetPlayer(1, 1, false, playerFilter));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public HopeOfGhirapur(final HopeOfGhirapur card) {
|
public HopeOfGhirapur(final HopeOfGhirapur card) {
|
||||||
|
|
@ -126,7 +118,7 @@ class HopeOfGhirapurCantCastEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getInfoMessage(Ability source, GameEvent event, Game game) {
|
public String getInfoMessage(Ability source, GameEvent event, Game game) {
|
||||||
MageObject mageObject = game.getObject(source.getSourceId());
|
MageObject mageObject = source.getSourceObject(game);
|
||||||
if (mageObject != null) {
|
if (mageObject != null) {
|
||||||
return "You can't cast noncreature spells this turn (you were dealt damage by " + mageObject.getLogName() + ')';
|
return "You can't cast noncreature spells this turn (you were dealt damage by " + mageObject.getLogName() + ')';
|
||||||
}
|
}
|
||||||
|
|
@ -151,19 +143,20 @@ class HopeOfGhirapurCantCastEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HopeOfGhirapurPlayerLostLifePredicate implements Predicate<Player> {
|
class HopeOfGhirapurPlayerLostLifePredicate implements ObjectSourcePlayerPredicate<ObjectSourcePlayer<Player>> {
|
||||||
|
|
||||||
private final MageObjectReference sourceReference;
|
public HopeOfGhirapurPlayerLostLifePredicate() {
|
||||||
|
|
||||||
public HopeOfGhirapurPlayerLostLifePredicate(MageObjectReference sourceReference) {
|
|
||||||
this.sourceReference = sourceReference;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Player input, Game game) {
|
public boolean apply(ObjectSourcePlayer<Player> input, Game game) {
|
||||||
|
Player targetPlayer = input.getObject();
|
||||||
|
if (targetPlayer == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
HopeOfGhirapurCombatDamageWatcher watcher = (HopeOfGhirapurCombatDamageWatcher) game.getState().getWatchers().get(HopeOfGhirapurCombatDamageWatcher.class.getSimpleName());
|
HopeOfGhirapurCombatDamageWatcher watcher = (HopeOfGhirapurCombatDamageWatcher) game.getState().getWatchers().get(HopeOfGhirapurCombatDamageWatcher.class.getSimpleName());
|
||||||
if (watcher != null) {
|
if (watcher != null) {
|
||||||
return watcher.playerGotCombatDamage(sourceReference, input.getId());
|
return watcher.playerGotCombatDamage(input.getSourceId(), input.getObject().getId(), game);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -179,10 +172,10 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher {
|
||||||
|
|
||||||
public HopeOfGhirapurCombatDamageWatcher(final HopeOfGhirapurCombatDamageWatcher watcher) {
|
public HopeOfGhirapurCombatDamageWatcher(final HopeOfGhirapurCombatDamageWatcher watcher) {
|
||||||
super(watcher);
|
super(watcher);
|
||||||
for (MageObjectReference sourceReference : watcher.combatDamagedPlayers.keySet()) {
|
for (MageObjectReference damager : watcher.combatDamagedPlayers.keySet()) {
|
||||||
Set<UUID> players = new HashSet<>();
|
Set<UUID> players = new HashSet<>();
|
||||||
players.addAll(watcher.combatDamagedPlayers.get(sourceReference));
|
players.addAll(watcher.combatDamagedPlayers.get(damager));
|
||||||
this.combatDamagedPlayers.put(sourceReference, players);
|
this.combatDamagedPlayers.put(damager, players);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -194,29 +187,37 @@ class HopeOfGhirapurCombatDamageWatcher extends Watcher {
|
||||||
@Override
|
@Override
|
||||||
public void watch(GameEvent event, Game game) {
|
public void watch(GameEvent event, Game game) {
|
||||||
if (event.getType() == EventType.DAMAGED_PLAYER && ((DamagedPlayerEvent) event).isCombatDamage()) {
|
if (event.getType() == EventType.DAMAGED_PLAYER && ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||||
MageObjectReference sourceReference = new MageObjectReference(event.getSourceId(), game);
|
MageObjectReference damager = new MageObjectReference(event.getSourceId(), game);
|
||||||
Set<UUID> players;
|
Set<UUID> players;
|
||||||
if (combatDamagedPlayers.containsKey(sourceReference)) {
|
if (combatDamagedPlayers.containsKey(damager)) {
|
||||||
players = combatDamagedPlayers.get(sourceReference);
|
players = combatDamagedPlayers.get(damager);
|
||||||
} else {
|
} else {
|
||||||
players = new HashSet<>();
|
players = new HashSet<>();
|
||||||
combatDamagedPlayers.put(sourceReference, players);
|
combatDamagedPlayers.put(damager, players);
|
||||||
}
|
}
|
||||||
players.add(event.getTargetId());
|
players.add(event.getTargetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the current object has damaged the player during
|
* Checks if the current object has damaged the player during the current
|
||||||
* the current turn.
|
* turn.
|
||||||
*
|
*
|
||||||
* @param objectReference
|
* @param objectId
|
||||||
* @param playerId
|
* @param playerId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean playerGotCombatDamage(MageObjectReference objectReference, UUID playerId) {
|
public boolean playerGotCombatDamage(UUID objectId, UUID playerId, Game game) {
|
||||||
if (combatDamagedPlayers.containsKey(objectReference)) {
|
StackObject stackObject = game.getState().getStack().getStackObject(objectId);
|
||||||
return combatDamagedPlayers.get(objectReference).contains(playerId);
|
MageObjectReference mor;
|
||||||
|
if (stackObject != null && stackObject instanceof StackAbility) {
|
||||||
|
// This is neccessary because the source object was sacrificed as cost and the correct zone change counter for target calid check can only be get from stack
|
||||||
|
mor = new MageObjectReference(objectId, ((StackAbility) stackObject).getSourceObjectZoneChangeCounter(), game);
|
||||||
|
} else {
|
||||||
|
mor = new MageObjectReference(objectId, game);
|
||||||
|
}
|
||||||
|
if (combatDamagedPlayers.containsKey(mor)) {
|
||||||
|
return combatDamagedPlayers.get(mor).contains(playerId);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class HornetNest extends CardImpl {
|
||||||
// Defender
|
// Defender
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.addAbility(DefenderAbility.getInstance());
|
||||||
// Whenever Hornet Nest is dealt damage, create that many 1/1 green Insect creature tokens with flying and deathtouch.
|
// Whenever Hornet Nest is dealt damage, create that many 1/1 green Insect creature tokens with flying and deathtouch.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new HornetNestDealDamageEffect(), false));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new HornetNestDealDamageEffect(), false, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HornetNest(final HornetNest card) {
|
public HornetNest(final HornetNest card) {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ import mage.players.Player;
|
||||||
public class IllusoryAmbusher extends CardImpl {
|
public class IllusoryAmbusher extends CardImpl {
|
||||||
|
|
||||||
public IllusoryAmbusher(UUID ownerId, CardSetInfo setInfo) {
|
public IllusoryAmbusher(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||||
this.subtype.add(SubType.CAT);
|
this.subtype.add(SubType.CAT);
|
||||||
this.subtype.add(SubType.ILLUSION);
|
this.subtype.add(SubType.ILLUSION);
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
|
|
@ -57,9 +57,9 @@ public class IllusoryAmbusher extends CardImpl {
|
||||||
|
|
||||||
// Flash
|
// Flash
|
||||||
this.addAbility(FlashAbility.getInstance());
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
// Whenever Illusory Ambusher is dealt damage, draw that many cards.
|
// Whenever Illusory Ambusher is dealt damage, draw that many cards.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new IllusoryAmbusherDealtDamageEffect(), false));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new IllusoryAmbusherDealtDamageEffect(), false, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IllusoryAmbusher(final IllusoryAmbusher card) {
|
public IllusoryAmbusher(final IllusoryAmbusher card) {
|
||||||
|
|
@ -100,4 +100,4 @@ class IllusoryAmbusherDealtDamageEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
87
Mage.Sets/src/mage/cards/i/IronHeartChimera.java
Normal file
87
Mage.Sets/src/mage/cards/i/IronHeartChimera.java
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* 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.i;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
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.counters.CounterType;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class IronHeartChimera extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.CHIMERA));
|
||||||
|
}
|
||||||
|
|
||||||
|
public IronHeartChimera(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.CHIMERA);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Vigilance
|
||||||
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
|
// Sacrifice Iron-Heart Chimera: Put a +2/+2 counter on target Chimera creature. It gains vigilance.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost());
|
||||||
|
ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||||
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IronHeartChimera(final IronHeartChimera card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IronHeartChimera copy() {
|
||||||
|
return new IronHeartChimera(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -49,14 +49,14 @@ import mage.players.Player;
|
||||||
public class JackalPup extends CardImpl {
|
public class JackalPup extends CardImpl {
|
||||||
|
|
||||||
public JackalPup(UUID ownerId, CardSetInfo setInfo) {
|
public JackalPup(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||||
this.subtype.add(SubType.JACKAL);
|
this.subtype.add(SubType.JACKAL);
|
||||||
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Jackal Pup is dealt damage, it deals that much damage to you.
|
// Whenever Jackal Pup is dealt damage, it deals that much damage to you.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new JackalPupEffect(), false));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new JackalPupEffect(), false, false, true));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.j;
|
package mage.cards.j;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
|
@ -36,18 +35,19 @@ import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class JelennSphinx extends CardImpl {
|
public class JelennSphinx extends CardImpl {
|
||||||
|
|
||||||
public JelennSphinx(UUID ownerId, CardSetInfo setInfo) {
|
public JelennSphinx(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{U}");
|
||||||
this.subtype.add(SubType.SPHINX);
|
this.subtype.add(SubType.SPHINX);
|
||||||
|
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
|
|
@ -58,7 +58,7 @@ public class JelennSphinx extends CardImpl {
|
||||||
// Vigilance
|
// Vigilance
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
// Whenever Jelenn Sphinx attacks, other attacking creatures get +1/+1 until end of turn.
|
// Whenever Jelenn Sphinx attacks, other attacking creatures get +1/+1 until end of turn.
|
||||||
this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1,1, Duration.EndOfTurn,new FilterAttackingCreature(),true), false));
|
this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public JelennSphinx(final JelennSphinx card) {
|
public JelennSphinx(final JelennSphinx card) {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ package mage.cards.j;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.DiesTriggeredAbility;
|
import mage.abilities.common.DiesTriggeredAbility;
|
||||||
|
import mage.abilities.costs.OrCost;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||||
|
|
@ -55,7 +56,11 @@ public class JotunOwlKeeper extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Cumulative upkeep {W} or {U}
|
// Cumulative upkeep {W} or {U}
|
||||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{W/U}")));
|
this.addAbility(new CumulativeUpkeepAbility(new OrCost(
|
||||||
|
new ManaCostsImpl("{W}"),
|
||||||
|
new ManaCostsImpl("{U}"),
|
||||||
|
"{W} or {U}"
|
||||||
|
)));
|
||||||
|
|
||||||
// When Jötun Owl Keeper dies, put a 1/1 white Bird creature token with flying onto the battlefield for each age counter on it.
|
// When Jötun Owl Keeper dies, put a 1/1 white Bird creature token with flying onto the battlefield for each age counter on it.
|
||||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new BirdToken(), new CountersSourceCount(CounterType.AGE))));
|
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new BirdToken(), new CountersSourceCount(CounterType.AGE))));
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.k;
|
package mage.cards.k;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
|
@ -49,6 +47,9 @@ import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
|
|
@ -120,7 +121,7 @@ class KatabaticWindsRuleModifyingEffect extends ContinuousRuleModifyingEffectImp
|
||||||
|
|
||||||
public KatabaticWindsRuleModifyingEffect() {
|
public KatabaticWindsRuleModifyingEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||||
staticText = ", and their activated abilities with {tap} in their costs can't be activated";
|
staticText = ", and their activated abilities with {T} in their costs can't be activated";
|
||||||
}
|
}
|
||||||
|
|
||||||
public KatabaticWindsRuleModifyingEffect(final KatabaticWindsRuleModifyingEffect effect) {
|
public KatabaticWindsRuleModifyingEffect(final KatabaticWindsRuleModifyingEffect effect) {
|
||||||
|
|
|
||||||
85
Mage.Sets/src/mage/cards/k/KelsinkoRanger.java
Normal file
85
Mage.Sets/src/mage/cards/k/KelsinkoRanger.java
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
/*
|
||||||
|
* 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.k;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class KelsinkoRanger extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("green creature");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||||
|
}
|
||||||
|
|
||||||
|
public KelsinkoRanger(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// {1}{W}: Target green creature gains first strike until end of turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn),
|
||||||
|
new ManaCostsImpl("{1}{W}")
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public KelsinkoRanger(final KelsinkoRanger card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KelsinkoRanger copy() {
|
||||||
|
return new KelsinkoRanger(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.AsThoughEffectImpl;
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -70,7 +70,7 @@ public class KheruMindEater extends CardImpl {
|
||||||
this.addAbility(new MenaceAbility());
|
this.addAbility(new MenaceAbility());
|
||||||
|
|
||||||
// Whenever Kheru Mind-Eater deals combat damage to a player, that player exiles a card from his or her hand face down.
|
// Whenever Kheru Mind-Eater deals combat damage to a player, that player exiles a card from his or her hand face down.
|
||||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new KheruMindEaterExileEffect(), false, true));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new KheruMindEaterExileEffect(), false, true));
|
||||||
|
|
||||||
// You may look at and play cards exiled with Kheru Mind-Eater.
|
// You may look at and play cards exiled with Kheru Mind-Eater.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KheruMindEaterEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KheruMindEaterEffect()));
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ public class KumenasSpeaker extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||||
|
|
||||||
this.subtype.add(SubType.MERFOLK);
|
this.subtype.add(SubType.MERFOLK);
|
||||||
|
this.subtype.add(SubType.SHAMAN);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
|
|
||||||
87
Mage.Sets/src/mage/cards/l/LeadBellyChimera.java
Normal file
87
Mage.Sets/src/mage/cards/l/LeadBellyChimera.java
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* 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.l;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
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.counters.CounterType;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class LeadBellyChimera extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.CHIMERA));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LeadBellyChimera(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.CHIMERA);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// Sacrifice Lead-Belly Chimera: Put a +2/+2 counter on target Chimera creature. It gains trample.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost());
|
||||||
|
ability.addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||||
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LeadBellyChimera(final LeadBellyChimera card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LeadBellyChimera copy() {
|
||||||
|
return new LeadBellyChimera(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
112
Mage.Sets/src/mage/cards/l/LifeChisel.java
Normal file
112
Mage.Sets/src/mage/cards/l/LifeChisel.java
Normal file
|
|
@ -0,0 +1,112 @@
|
||||||
|
/*
|
||||||
|
* 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.l;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.common.IsStepCondition;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class LifeChisel extends CardImpl {
|
||||||
|
|
||||||
|
public LifeChisel(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||||
|
|
||||||
|
// Sacrifice a creature: You gain life equal to the sacrificed creature's toughness. Activate this ability only during your upkeep.
|
||||||
|
Ability ability = new ConditionalActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new LifeChiselEffect(),
|
||||||
|
new SacrificeTargetCost(
|
||||||
|
new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)
|
||||||
|
),
|
||||||
|
new IsStepCondition(PhaseStep.UPKEEP),
|
||||||
|
null
|
||||||
|
);
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LifeChisel(final LifeChisel card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LifeChisel copy() {
|
||||||
|
return new LifeChisel(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LifeChiselEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public LifeChiselEffect() {
|
||||||
|
super(Outcome.GainLife);
|
||||||
|
this.staticText = "You gain life equal to the sacrificed creature's toughness";
|
||||||
|
}
|
||||||
|
|
||||||
|
public LifeChiselEffect(final LifeChiselEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LifeChiselEffect copy() {
|
||||||
|
return new LifeChiselEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
for (Cost cost : source.getCosts()) {
|
||||||
|
if (cost instanceof SacrificeTargetCost) {
|
||||||
|
int amount = ((SacrificeTargetCost) cost).getPermanents().get(0).getToughness().getValue();
|
||||||
|
if (amount > 0) {
|
||||||
|
controller.gainLife(amount, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
72
Mage.Sets/src/mage/cards/l/LimestoneGolem.java
Normal file
72
Mage.Sets/src/mage/cards/l/LimestoneGolem.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.cards.l;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class LimestoneGolem extends CardImpl {
|
||||||
|
|
||||||
|
public LimestoneGolem(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.GOLEM);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// {2}, Sacrifice Limestone Golem: Target player draws a card.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(1), new ManaCostsImpl("{2}"));
|
||||||
|
ability.addCost(new SacrificeSourceCost());
|
||||||
|
ability.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LimestoneGolem(final LimestoneGolem card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LimestoneGolem copy() {
|
||||||
|
return new LimestoneGolem(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
|
@ -39,13 +38,15 @@ import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Quercitron
|
* @author Quercitron
|
||||||
*/
|
*/
|
||||||
public class LivingLands extends CardImpl {
|
public class LivingLands extends CardImpl {
|
||||||
|
|
||||||
private static final FilterLandPermanent filter = new FilterLandPermanent("All Forests");
|
private static final FilterLandPermanent filter = new FilterLandPermanent("Forests");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.FOREST));
|
filter.add(new SubtypePredicate(SubType.FOREST));
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Abilities;
|
import mage.abilities.Abilities;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
|
@ -47,12 +46,14 @@ import mage.filter.predicate.Predicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author BursegSardaukar
|
* @author BursegSardaukar
|
||||||
*/
|
*/
|
||||||
public class MagewrightsStone extends CardImpl {
|
public class MagewrightsStone extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an ability with {T} in its cost");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that has an activated ability with {T} in its cost");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new HasAbilityWithTapSymbolPredicate());
|
filter.add(new HasAbilityWithTapSymbolPredicate());
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||||
|
|
@ -43,6 +40,10 @@ import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Plopman
|
* @author Plopman
|
||||||
|
|
@ -70,7 +71,7 @@ class ManabondEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ManabondEffect() {
|
public ManabondEffect() {
|
||||||
super(Outcome.PutCardInPlay);
|
super(Outcome.PutCardInPlay);
|
||||||
staticText = "you may reveal your hand and put all land cards from it onto the battlefield. If you do, discard your hand";
|
staticText = "reveal your hand and put all land cards from it onto the battlefield. If you do, discard your hand";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ManabondEffect(final ManabondEffect effect) {
|
public ManabondEffect(final ManabondEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,7 @@ public class MathasFiendSeeker extends CardImpl {
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
Ability ability2 = new DiesTriggeredAbility(new DrawCardAllEffect(1, TargetController.OPPONENT));
|
Ability ability2 = new DiesTriggeredAbility(new DrawCardAllEffect(1, TargetController.OPPONENT));
|
||||||
ability2.addEffect(new OpponentsGainLifeEffect());
|
ability2.addEffect(new OpponentsGainLifeEffect());
|
||||||
Effect effect = new MathasFiendSeekerGainAbilityEffect(
|
Effect effect = new MathasFiendSeekerGainAbilityEffect(ability2, Duration.Custom, rule);
|
||||||
ability2,
|
|
||||||
Duration.Custom, rule);
|
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
@ -112,8 +110,8 @@ class MathasFiendSeekerGainAbilityEffect extends GainAbilityTargetEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInactive(Ability source, Game game) {
|
public boolean isInactive(Ability source, Game game) {
|
||||||
Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source));
|
Permanent creature = game.getPermanent(this.targetPointer.getFirst(game, source));
|
||||||
if (land != null && land.getCounters(game).getCount(CounterType.BOUNTY) < 1) {
|
if (creature != null && creature.getCounters(game).getCount(CounterType.BOUNTY) < 1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -129,7 +127,7 @@ class OpponentsGainLifeEffect extends OneShotEffect {
|
||||||
|
|
||||||
public OpponentsGainLifeEffect() {
|
public OpponentsGainLifeEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
staticText = "Each opponent gains 2 life.";
|
staticText = "and gains 2 life.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public OpponentsGainLifeEffect(final OpponentsGainLifeEffect effect) {
|
public OpponentsGainLifeEffect(final OpponentsGainLifeEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
|
@ -50,6 +49,8 @@ import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
|
|
@ -132,6 +133,6 @@ class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Whenever you cast an instant or sorcery from your library, copy it. You may choose new targets for the copy.";
|
return "Whenever you cast an instant or sorcery spell from your library, copy it. You may choose new targets for the copy.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
80
Mage.Sets/src/mage/cards/m/MireShade.java
Normal file
80
Mage.Sets/src/mage/cards/m/MireShade.java
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
/*
|
||||||
|
* 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.m;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class MireShade extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Swamp");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.SWAMP));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MireShade(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.SHADE);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// {B}, Sacrifice a Swamp: Put a +1/+1 counter on Mire Shade. Activate this ability only any time you could cast a sorcery.
|
||||||
|
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{B}"));
|
||||||
|
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MireShade(final MireShade card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MireShade copy() {
|
||||||
|
return new MireShade(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ class MistbindCliqueAbility extends ZoneChangeTriggeredAbility {
|
||||||
&& event.getSourceId().equals(getSourceId())
|
&& event.getSourceId().equals(getSourceId())
|
||||||
&& !event.getSourceId().equals(event.getTargetId())) {
|
&& !event.getSourceId().equals(event.getTargetId())) {
|
||||||
Permanent sacrificed = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
Permanent sacrificed = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
||||||
if (sacrificed != null && sacrificed.hasSubtype(SubType.FAERIE, game)) {
|
if (sacrificed != null) {// no longer checks for Faerie as LKI isn't always accurate, can't think of how that could matter anyway - TheElk801
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,13 @@ import mage.target.common.TargetOpponent;
|
||||||
public class MoggManiac extends CardImpl {
|
public class MoggManiac extends CardImpl {
|
||||||
|
|
||||||
public MoggManiac(UUID ownerId, CardSetInfo setInfo) {
|
public MoggManiac(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||||
this.subtype.add(SubType.GOBLIN);
|
this.subtype.add(SubType.GOBLIN);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Mogg Maniac is dealt damage, it deals that much damage to target opponent.
|
// Whenever Mogg Maniac is dealt damage, it deals that much damage to target opponent.
|
||||||
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new MoggManiacDealDamageEffect(), false);
|
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new MoggManiacDealDamageEffect(), false, false, true);
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
145
Mage.Sets/src/mage/cards/m/MultanisPresence.java
Normal file
145
Mage.Sets/src/mage/cards/m/MultanisPresence.java
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
/*
|
||||||
|
* 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.m;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.WatcherScope;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class MultanisPresence extends CardImpl {
|
||||||
|
|
||||||
|
public MultanisPresence(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
|
||||||
|
|
||||||
|
// Whenever a spell you've cast is countered, draw a card.
|
||||||
|
this.addAbility(new MultanisPresenceTriggeredAbility(), new MultanisPresenceWatcher());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultanisPresence(final MultanisPresence card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MultanisPresence copy() {
|
||||||
|
return new MultanisPresence(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MultanisPresenceTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public MultanisPresenceTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultanisPresenceTriggeredAbility(final MultanisPresenceTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MultanisPresenceTriggeredAbility copy() {
|
||||||
|
return new MultanisPresenceTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.COUNTERED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
MultanisPresenceWatcher watcher = (MultanisPresenceWatcher) game.getState().getWatchers().get(MultanisPresenceWatcher.class.getSimpleName());
|
||||||
|
return (watcher.getSpellsCastThisTurn(controllerId).contains(event.getTargetId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever a spell you've cast is countered, " + super.getRule();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MultanisPresenceWatcher extends Watcher {
|
||||||
|
|
||||||
|
private final HashMap<UUID, List<UUID>> spellsCast = new HashMap<>();
|
||||||
|
|
||||||
|
public MultanisPresenceWatcher() {
|
||||||
|
super(MultanisPresenceWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultanisPresenceWatcher(final MultanisPresenceWatcher watcher) {
|
||||||
|
super(watcher);
|
||||||
|
this.spellsCast.putAll(watcher.spellsCast);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MultanisPresenceWatcher copy() {
|
||||||
|
return new MultanisPresenceWatcher(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void watch(GameEvent event, Game game) {
|
||||||
|
if (GameEvent.EventType.SPELL_CAST == event.getType()) {
|
||||||
|
Spell spell = game.getSpellOrLKIStack(event.getTargetId());
|
||||||
|
if (spell != null) {
|
||||||
|
List<UUID> spellIds;
|
||||||
|
if (!spellsCast.containsKey(spell.getControllerId())) {
|
||||||
|
spellIds = new ArrayList<>();
|
||||||
|
} else {
|
||||||
|
spellIds = spellsCast.get(spell.getControllerId());
|
||||||
|
}
|
||||||
|
spellIds.add(spell.getId());
|
||||||
|
spellsCast.put(spell.getControllerId(), spellIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
|
spellsCast.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<UUID> getSpellsCastThisTurn(UUID playerId) {
|
||||||
|
return spellsCast.get(playerId);
|
||||||
|
}
|
||||||
|
}
|
||||||
97
Mage.Sets/src/mage/cards/n/NaturesWrath.java
Normal file
97
Mage.Sets/src/mage/cards/n/NaturesWrath.java
Normal 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.cards.n;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.SacrificeEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SetTargetPointer;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class NaturesWrath extends CardImpl {
|
||||||
|
private static final FilterPermanent filterBlue = new FilterPermanent("an Island or blue permanent");
|
||||||
|
static{
|
||||||
|
filterBlue.add(Predicates.or(new ColorPredicate(ObjectColor.BLUE), new SubtypePredicate(SubType.ISLAND)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final FilterPermanent filterBlack = new FilterPermanent("a Swamp or black permanent");
|
||||||
|
static{
|
||||||
|
filterBlack.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new SubtypePredicate(SubType.SWAMP)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public NaturesWrath(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}{G}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, sacrifice Nature's Wrath unless you pay {G}.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{G}")), TargetController.YOU, false));
|
||||||
|
|
||||||
|
// Whenever a player puts an Island or blue permanent onto the battlefield, he or she sacrifices an Island or blue permanent.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new SacrificeEffect(filterBlue, 1, ""),
|
||||||
|
filterBlue,
|
||||||
|
false, SetTargetPointer.PLAYER,
|
||||||
|
"Whenever a player puts an Island or blue permanent onto the battlefield, he or she sacrifices an Island or blue permanent."));
|
||||||
|
|
||||||
|
// Whenever a player puts a Swamp or black permanent onto the battlefield, he or she sacrifices a Swamp or black permanent.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new SacrificeEffect(filterBlack, 1, ""),
|
||||||
|
filterBlack,
|
||||||
|
false, SetTargetPointer.PLAYER,
|
||||||
|
"Whenever a player puts a Swamp or black permanent onto the battlefield, he or she sacrifices a Swamp or black permanent."));
|
||||||
|
}
|
||||||
|
|
||||||
|
public NaturesWrath(final NaturesWrath card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NaturesWrath copy() {
|
||||||
|
return new NaturesWrath(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
67
Mage.Sets/src/mage/cards/n/NecraSanctuary.java
Normal file
67
Mage.Sets/src/mage/cards/n/NecraSanctuary.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.cards.n;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class NecraSanctuary extends CardImpl {
|
||||||
|
|
||||||
|
public NecraSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, if you control a green or white permanent, target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead.
|
||||||
|
Ability ability = new SanctuaryTriggeredAbility(
|
||||||
|
new LoseLifeTargetEffect(1), new LoseLifeTargetEffect(3), ObjectColor.GREEN, ObjectColor.WHITE,
|
||||||
|
"At the beginning of your upkeep, if you control a green or white permanent, "
|
||||||
|
+ "target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead."
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NecraSanctuary(final NecraSanctuary card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NecraSanctuary copy() {
|
||||||
|
return new NecraSanctuary(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,14 +24,14 @@
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.AsThoughEffectImpl;
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -51,23 +51,23 @@ import mage.players.Player;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FAQ
|
* FAQ
|
||||||
*
|
*
|
||||||
* The card is exiled face up. All players may look at it.
|
* The card is exiled face up. All players may look at it. Playing a card exiled
|
||||||
* Playing a card exiled with Nightveil Specter follows all the normal rules for
|
* with Nightveil Specter follows all the normal rules for playing that card.
|
||||||
* playing that card. You must pay its costs, and you must follow all timing
|
* You must pay its costs, and you must follow all timing restrictions, for
|
||||||
* restrictions, for example.
|
* example.
|
||||||
*
|
*
|
||||||
* Nightveil Specter's last ability applies to cards exiled with that specific
|
* Nightveil Specter's last ability applies to cards exiled with that specific
|
||||||
* Nightveil Specter, not any other creature named Nightveil Specter. You should
|
* Nightveil Specter, not any other creature named Nightveil Specter. You should
|
||||||
* keep cards exiled by different Nightveil Specters separate.
|
* keep cards exiled by different Nightveil Specters separate.
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class NightveilSpecter extends CardImpl {
|
public class NightveilSpecter extends CardImpl {
|
||||||
|
|
||||||
public NightveilSpecter(UUID ownerId, CardSetInfo setInfo) {
|
public NightveilSpecter(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/B}{U/B}{U/B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U/B}{U/B}{U/B}");
|
||||||
this.subtype.add(SubType.SPECTER);
|
this.subtype.add(SubType.SPECTER);
|
||||||
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
|
|
@ -77,7 +77,7 @@ public class NightveilSpecter extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Whenever Nightveil Specter deals combat damage to a player, that player exiles the top card of his or her library.
|
// Whenever Nightveil Specter deals combat damage to a player, that player exiles the top card of his or her library.
|
||||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new NightveilSpecterExileEffect(),false, true));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new NightveilSpecterExileEffect(), false, true));
|
||||||
|
|
||||||
// You may play cards exiled with Nightveil Specter.
|
// You may play cards exiled with Nightveil Specter.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NightveilSpecterEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NightveilSpecterEffect()));
|
||||||
|
|
|
||||||
70
Mage.Sets/src/mage/cards/n/NobleSteeds.java
Normal file
70
Mage.Sets/src/mage/cards/n/NobleSteeds.java
Normal 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.cards.n;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class NobleSteeds extends CardImpl {
|
||||||
|
|
||||||
|
public NobleSteeds(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||||
|
|
||||||
|
// {1}{W}: Target creature gains first strike until end of turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn),
|
||||||
|
new ManaCostsImpl("{1}{W}")
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NobleSteeds(final NobleSteeds card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NobleSteeds copy() {
|
||||||
|
return new NobleSteeds(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||||
|
|
@ -43,13 +42,15 @@ import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class OblivionRing extends CardImpl {
|
public class OblivionRing extends CardImpl {
|
||||||
|
|
||||||
private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another nonland permanent");
|
private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another target nonland permanent");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
anotherNonlandPermanent.add(new AnotherPredicate());
|
anotherNonlandPermanent.add(new AnotherPredicate());
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||||
|
|
@ -38,12 +37,13 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class OddsEnds extends SplitCard {
|
public class OddsEnds extends SplitCard {
|
||||||
|
|
||||||
public OddsEnds(UUID ownerId, CardSetInfo setInfo) {
|
public OddsEnds(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -56,7 +56,7 @@ public class OddsEnds extends SplitCard {
|
||||||
|
|
||||||
// Ends
|
// Ends
|
||||||
// Target player sacrifices two attacking creatures.
|
// Target player sacrifices two attacking creatures.
|
||||||
getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(new FilterAttackingCreature(), 2, "Target player"));
|
getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_ATTACKING_CREATURES, 2, "Target player"));
|
||||||
getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer());
|
getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ package mage.cards.o;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
|
@ -38,10 +39,10 @@ import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterLandCard;
|
import mage.filter.common.FilterBasicLandCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
@ -94,8 +95,8 @@ class OldGrowthDryadsEffect extends OneShotEffect {
|
||||||
Set<Player> playersThatSearched = new HashSet<>(1);
|
Set<Player> playersThatSearched = new HashSet<>(1);
|
||||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
Player opponent = game.getPlayer(opponentId);
|
||||||
if (opponent != null && opponent.chooseUse(Outcome.PutCreatureInPlay, "Search your library for a creature card and put it onto the battlefield?", source, game)) {
|
if (opponent != null && opponent.chooseUse(Outcome.PutLandInPlay, "Search your library for a basic land card and put it onto the battlefield tapped?", source, game)) {
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
|
TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
|
||||||
if (opponent.searchLibrary(target, game)) {
|
if (opponent.searchLibrary(target, game)) {
|
||||||
Card targetCard = opponent.getLibrary().getCard(target.getFirstTarget(), game);
|
Card targetCard = opponent.getLibrary().getCard(target.getFirstTarget(), game);
|
||||||
if (targetCard != null) {
|
if (targetCard != null) {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -35,7 +34,9 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -48,7 +49,7 @@ public class OrcishOriflamme extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Attacking creatures you control get +1/+0.
|
// Attacking creatures you control get +1/+0.
|
||||||
BoostControlledEffect boostEffect = new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, new FilterAttackingCreature(), false);
|
BoostControlledEffect boostEffect = new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_ATTACKING_CREATURES, false);
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
71
Mage.Sets/src/mage/cards/p/PhantasmalFiend.java
Normal file
71
Mage.Sets/src/mage/cards/p/PhantasmalFiend.java
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
/*
|
||||||
|
* 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.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.SwitchPowerToughnessSourceEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class PhantasmalFiend extends CardImpl {
|
||||||
|
|
||||||
|
public PhantasmalFiend(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ILLUSION);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
// {B}: Phantasmal Fiend gets +1/-1 until end of turn.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{B}")));
|
||||||
|
|
||||||
|
// {1}{U}: Switch Phantasmal Fiend's power and toughness until end of turn.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public PhantasmalFiend(final PhantasmalFiend card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PhantasmalFiend copy() {
|
||||||
|
return new PhantasmalFiend(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
73
Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java
Normal file
73
Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
/*
|
||||||
|
* 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.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||||
|
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||||
|
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class PhyrexianEtchings extends CardImpl {
|
||||||
|
|
||||||
|
public PhyrexianEtchings(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}");
|
||||||
|
|
||||||
|
// Cumulative upkeep-Pay {B}.
|
||||||
|
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{B}")));
|
||||||
|
|
||||||
|
// At the beginning of your end step, draw a card for each age counter on Phyrexian Etchings.
|
||||||
|
this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.AGE)), false));
|
||||||
|
|
||||||
|
// When Phyrexian Etchings is put into a graveyard from the battlefield, you lose 2 life for each age counter on it.
|
||||||
|
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2))));
|
||||||
|
}
|
||||||
|
|
||||||
|
public PhyrexianEtchings(final PhyrexianEtchings card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PhyrexianEtchings copy() {
|
||||||
|
return new PhyrexianEtchings(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
|
@ -36,19 +35,21 @@ import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.NamePredicate;
|
import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author lopho
|
* @author lopho
|
||||||
*/
|
*/
|
||||||
public class PlagueRats extends CardImpl {
|
public class PlagueRats extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent plagueRatsFilter = new FilterCreaturePermanent("Plague Rats on the battlefield");
|
private static final FilterCreaturePermanent plagueRatsFilter = new FilterCreaturePermanent("creatures named Plague Rats on the battlefield");
|
||||||
static {
|
static {
|
||||||
plagueRatsFilter.add(new NamePredicate("Plague Rats"));
|
plagueRatsFilter.add(new NamePredicate("Plague Rats"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
Mage.Sets/src/mage/cards/p/PrismaticLace.java
Normal file
60
Mage.Sets/src/mage/cards/p/PrismaticLace.java
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* 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.UUID;
|
||||||
|
import mage.abilities.effects.common.continuous.BecomesColorOrColorsTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class PrismaticLace extends CardImpl {
|
||||||
|
|
||||||
|
public PrismaticLace(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
|
||||||
|
|
||||||
|
// Target permanent becomes the color or colors of your choice.
|
||||||
|
this.getSpellAbility().addEffect(new BecomesColorOrColorsTargetEffect(Duration.Custom));
|
||||||
|
this.getSpellAbility().addTarget(new TargetPermanent());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PrismaticLace(final PrismaticLace card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PrismaticLace copy() {
|
||||||
|
return new PrismaticLace(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
72
Mage.Sets/src/mage/cards/p/PsionicEntity.java
Normal file
72
Mage.Sets/src/mage/cards/p/PsionicEntity.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.cards.p;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.effects.common.DamageSelfEffect;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class PsionicEntity extends CardImpl {
|
||||||
|
|
||||||
|
public PsionicEntity(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ILLUSION);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// {tap}: Psionic Entity deals 2 damage to target creature or player and 3 damage to itself.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost());
|
||||||
|
ability.addEffect(new DamageSelfEffect(3).setText("and 3 damage to itself"));
|
||||||
|
ability.addTarget(new TargetCreatureOrPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PsionicEntity(final PsionicEntity card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PsionicEntity copy() {
|
||||||
|
return new PsionicEntity(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -55,18 +55,24 @@ public class PsionicSliver extends CardImpl {
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.SLIVER, "All Sliver creatures");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.SLIVER, "All Sliver creatures");
|
||||||
|
|
||||||
public PsionicSliver(UUID ownerId, CardSetInfo setInfo) {
|
public PsionicSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||||
this.subtype.add(SubType.SLIVER);
|
this.subtype.add(SubType.SLIVER);
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// All Sliver creatures have "{T}: This creature deals 2 damage to target creature or player and 3 damage to itself."
|
// All Sliver creatures have "{T}: This creature deals 2 damage to target creature or player and 3 damage to itself."
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(
|
||||||
ability.addEffect(new DamageSelfEffect(3));
|
Zone.BATTLEFIELD,
|
||||||
|
new DamageTargetEffect(2).setText("This creature deals 2 damage to target creature or player"),
|
||||||
|
new TapSourceCost()
|
||||||
|
);
|
||||||
|
ability.addEffect(new DamageSelfEffect(3).setText("3 damage to itself."));
|
||||||
ability.addTarget(new TargetCreatureOrPlayer());
|
ability.addTarget(new TargetCreatureOrPlayer());
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
this.addAbility(
|
||||||
new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield,
|
new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter,
|
||||||
filter, "All Sliver creatures have \"{T}: This creature deals 2 damage to target creature or player and 3 damage to itself.\"")));
|
"All Sliver creatures have \"{T}: This creature deals 2 damage to target creature or player and 3 damage to itself.\"")
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PsionicSliver(final PsionicSliver card) {
|
public PsionicSliver(final PsionicSliver card) {
|
||||||
|
|
@ -77,4 +83,4 @@ public class PsionicSliver extends CardImpl {
|
||||||
public PsionicSliver copy() {
|
public PsionicSliver copy() {
|
||||||
return new PsionicSliver(this);
|
return new PsionicSliver(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.effects.common.DestroyAllEffect;
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -41,6 +40,8 @@ import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Wehk
|
* @author Wehk
|
||||||
|
|
@ -48,7 +49,7 @@ import mage.target.TargetPermanent;
|
||||||
public class PureSimple extends SplitCard {
|
public class PureSimple extends SplitCard {
|
||||||
|
|
||||||
private static final FilterPermanent filterDestroy = new FilterPermanent("Auras and Equipment");
|
private static final FilterPermanent filterDestroy = new FilterPermanent("Auras and Equipment");
|
||||||
private static final FilterPermanent filterMulticolor = new FilterPermanent("multicolor permanent");
|
private static final FilterPermanent filterMulticolor = new FilterPermanent("multicolored permanent");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterDestroy.add(Predicates.or(new SubtypePredicate(SubType.AURA), new SubtypePredicate(SubType.EQUIPMENT)));
|
filterDestroy.add(Predicates.or(new SubtypePredicate(SubType.AURA), new SubtypePredicate(SubType.EQUIPMENT)));
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.q;
|
package mage.cards.q;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
|
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
|
||||||
|
|
@ -43,13 +42,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jonubuu
|
* @author jonubuu
|
||||||
*/
|
*/
|
||||||
public class QuirionRanger extends CardImpl {
|
public class QuirionRanger extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Forest");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.FOREST));
|
filter.add(new SubtypePredicate(SubType.FOREST));
|
||||||
|
|
|
||||||
67
Mage.Sets/src/mage/cards/r/RakaSanctuary.java
Normal file
67
Mage.Sets/src/mage/cards/r/RakaSanctuary.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.cards.r;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class RakaSanctuary extends CardImpl {
|
||||||
|
|
||||||
|
public RakaSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead.
|
||||||
|
Ability ability = new SanctuaryTriggeredAbility(
|
||||||
|
new DamageTargetEffect(1), new DamageTargetEffect(3), ObjectColor.WHITE, ObjectColor.BLUE,
|
||||||
|
"At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. "
|
||||||
|
+ "If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead."
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RakaSanctuary(final RakaSanctuary card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RakaSanctuary copy() {
|
||||||
|
return new RakaSanctuary(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.HalfValue;
|
import mage.abilities.dynamicvalue.common.HalfValue;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount;
|
import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount;
|
||||||
|
|
@ -85,7 +85,7 @@ public class RakdosTheDefiler extends CardImpl {
|
||||||
// Whenever Rakdos deals combat damage to a player, that player sacrifices half the non-Demon permanents he or she controls, rounded up.
|
// Whenever Rakdos deals combat damage to a player, that player sacrifices half the non-Demon permanents he or she controls, rounded up.
|
||||||
effect = new SacrificeEffect(damageToPlayerTriggerFilter, new HalfValue(new PermanentsTargetOpponentControlsCount(damageToPlayerTriggerFilter), true), "");
|
effect = new SacrificeEffect(damageToPlayerTriggerFilter, new HalfValue(new PermanentsTargetOpponentControlsCount(damageToPlayerTriggerFilter), true), "");
|
||||||
effect.setText("that player sacrifices half the non-Demon permanents he or she controls, rounded up");
|
effect.setText("that player sacrifices half the non-Demon permanents he or she controls, rounded up");
|
||||||
ability = new DealsDamageToAPlayerTriggeredAbility(effect, false, true);
|
ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false, true);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect;
|
import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect;
|
||||||
import mage.abilities.keyword.MorphAbility;
|
import mage.abilities.keyword.MorphAbility;
|
||||||
|
|
@ -53,7 +53,7 @@ public class RavenGuildMaster extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever Raven Guild Master deals combat damage to a player, that player exiles the top ten cards of his or her library.
|
// Whenever Raven Guild Master deals combat damage to a player, that player exiles the top ten cards of his or her library.
|
||||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(10, "that player"), false, true));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(10, "that player"), false, true));
|
||||||
|
|
||||||
// Morph {2}{U}{U}
|
// Morph {2}{U}{U}
|
||||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}{U}")));
|
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}{U}")));
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost;
|
import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost;
|
||||||
|
|
@ -42,13 +41,15 @@ import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class RecurringNightmare extends CardImpl {
|
public class RecurringNightmare extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard");
|
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card");
|
||||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("creature");
|
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("creature");
|
||||||
|
|
||||||
public RecurringNightmare(UUID ownerId, CardSetInfo setInfo) {
|
public RecurringNightmare(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
140
Mage.Sets/src/mage/cards/r/RimefeatherOwl.java
Normal file
140
Mage.Sets/src/mage/cards/r/RimefeatherOwl.java
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
/*
|
||||||
|
* 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.r;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Layer;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubLayer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.CounterPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class RimefeatherOwl extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent("Permanents with ice counters on them");
|
||||||
|
private static final FilterPermanent filter2 = new FilterPermanent("snow permanents on the battlefield");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new CounterPredicate(CounterType.ICE)));
|
||||||
|
filter2.add(Predicates.not(new SupertypePredicate(SuperType.SNOW)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public RimefeatherOwl(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.SNOW);
|
||||||
|
this.subtype.add(SubType.BIRD);
|
||||||
|
this.power = new MageInt(0);
|
||||||
|
this.toughness = new MageInt(0);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Rimefeather Owl's power and toughness are each equal to the number of snow permanents on the battlefield.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter2), Duration.EndOfGame)));
|
||||||
|
|
||||||
|
// {1}{snow}: Put an ice counter on target permanent.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.ICE.createInstance()), new ManaCostsImpl("{1}{S}"));
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Permanents with ice counters on them are snow.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RimefeatherOwlEffect(Duration.WhileOnBattlefield, filter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public RimefeatherOwl(final RimefeatherOwl card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RimefeatherOwl copy() {
|
||||||
|
return new RimefeatherOwl(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RimefeatherOwlEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
private final FilterPermanent filter;
|
||||||
|
|
||||||
|
public RimefeatherOwlEffect(Duration duration, FilterPermanent filter) {
|
||||||
|
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||||
|
this.filter = filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RimefeatherOwlEffect(final RimefeatherOwlEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
this.filter = effect.filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RimefeatherOwlEffect copy() {
|
||||||
|
return new RimefeatherOwlEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
|
permanent.addSuperType(SuperType.SNOW);
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getText(Mode mode) {
|
||||||
|
return "All nonland permanents are legendary";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -46,18 +46,18 @@ import mage.players.Player;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LoneFox
|
* @author LoneFox
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class SaberAnts extends CardImpl {
|
public class SaberAnts extends CardImpl {
|
||||||
|
|
||||||
public SaberAnts(UUID ownerId, CardSetInfo setInfo) {
|
public SaberAnts(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||||
this.subtype.add(SubType.INSECT);
|
this.subtype.add(SubType.INSECT);
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Whenever Saber Ants is dealt damage, you may create that many 1/1 green Insect creature tokens.
|
// Whenever Saber Ants is dealt damage, you may create that many 1/1 green Insect creature tokens.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new SaberAntsEffect(), true));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new SaberAntsEffect(), true, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SaberAnts(final SaberAnts card) {
|
public SaberAnts(final SaberAnts card) {
|
||||||
|
|
|
||||||
66
Mage.Sets/src/mage/cards/s/ScorchingMissile.java
Normal file
66
Mage.Sets/src/mage/cards/s/ScorchingMissile.java
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* 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.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.keyword.FlashbackAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TimingRule;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ScorchingMissile extends CardImpl {
|
||||||
|
|
||||||
|
public ScorchingMissile(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||||
|
|
||||||
|
// Scorching Missile deals 4 damage to target player.
|
||||||
|
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||||
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
|
|
||||||
|
// Flashback {9}{R}
|
||||||
|
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{9}{R}"), TimingRule.SORCERY));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScorchingMissile(final ScorchingMissile card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScorchingMissile copy() {
|
||||||
|
return new ScorchingMissile(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
82
Mage.Sets/src/mage/cards/s/ShaukusMinion.java
Normal file
82
Mage.Sets/src/mage/cards/s/ShaukusMinion.java
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* 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.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ShaukusMinion extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creature");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShaukusMinion(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.MINION);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// {B}{R}, {tap}: Shauku's Minion deals 2 damage to target white creature.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{B}{R}"));
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShaukusMinion(final ShaukusMinion card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ShaukusMinion copy() {
|
||||||
|
return new ShaukusMinion(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -48,7 +48,7 @@ import mage.players.Player;
|
||||||
public class ShinkaGatekeeper extends CardImpl {
|
public class ShinkaGatekeeper extends CardImpl {
|
||||||
|
|
||||||
public ShinkaGatekeeper(UUID ownerId, CardSetInfo setInfo) {
|
public ShinkaGatekeeper(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||||
this.subtype.add(SubType.OGRE);
|
this.subtype.add(SubType.OGRE);
|
||||||
this.subtype.add(SubType.WARRIOR);
|
this.subtype.add(SubType.WARRIOR);
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class ShinkaGatekeeper extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Whenever Shinka Gatekeeper is dealt damage, it deals that much damage to you.
|
// Whenever Shinka Gatekeeper is dealt damage, it deals that much damage to you.
|
||||||
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new ShinkaGatekeeperDealDamageEffect(), false));
|
this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new ShinkaGatekeeperDealDamageEffect(), false, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShinkaGatekeeper(final ShinkaGatekeeper card) {
|
public ShinkaGatekeeper(final ShinkaGatekeeper card) {
|
||||||
|
|
@ -69,7 +69,6 @@ public class ShinkaGatekeeper extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ShinkaGatekeeperDealDamageEffect extends OneShotEffect {
|
class ShinkaGatekeeperDealDamageEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ShinkaGatekeeperDealDamageEffect() {
|
public ShinkaGatekeeperDealDamageEffect() {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.target.common.TargetOpponent;
|
|
||||||
import mage.watchers.common.PlayerAttackedWatcher;
|
import mage.watchers.common.PlayerAttackedWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -60,7 +59,6 @@ public class ShipwreckLooter extends CardImpl {
|
||||||
new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)),
|
new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)),
|
||||||
RaidCondition.instance,
|
RaidCondition.instance,
|
||||||
"<i>Raid</i> - When {this} enters the battlefield,if you attacked with a creature this turn, you may draw a card. If you do, discard a card.");
|
"<i>Raid</i> - When {this} enters the battlefield,if you attacked with a creature this turn, you may draw a card. If you do, discard a card.");
|
||||||
ability.addTarget(new TargetOpponent());
|
|
||||||
this.addAbility(ability, new PlayerAttackedWatcher());
|
this.addAbility(ability, new PlayerAttackedWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
|
@ -49,13 +48,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class SkirkDrillSergeant extends CardImpl {
|
public class SkirkDrillSergeant extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another Goblin");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("or another Goblin");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.GOBLIN));
|
filter.add(new SubtypePredicate(SubType.GOBLIN));
|
||||||
|
|
|
||||||
74
Mage.Sets/src/mage/cards/s/SkyshroudSentinel.java
Normal file
74
Mage.Sets/src/mage/cards/s/SkyshroudSentinel.java
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* 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.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class SkyshroudSentinel extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("cards named Skyshroud Sentinel");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new NamePredicate("Skyshroud Sentinel"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SkyshroudSentinel(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ELF);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// When Skyshroud Sentinel enters the battlefield, you may search your library for up to three cards named Skyshroud Sentinel, reveal them, and put them into your hand. If you do, shuffle your library.
|
||||||
|
TargetCardInLibrary target = new TargetCardInLibrary(0, 3, filter);
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SkyshroudSentinel(final SkyshroudSentinel card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SkyshroudSentinel copy() {
|
||||||
|
return new SkyshroudSentinel(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
78
Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java
Normal file
78
Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
/*
|
||||||
|
* 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.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DiesTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.HellbentCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AbilityWord;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class SlaughterhouseBouncer extends CardImpl {
|
||||||
|
|
||||||
|
public SlaughterhouseBouncer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.OGRE);
|
||||||
|
this.subtype.add(SubType.WARRIOR);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Hellbent - When Slaughterhouse Bouncer dies, if you have no cards in hand, target creature gets -3/-3 until end of turn.
|
||||||
|
Ability ability = new ConditionalTriggeredAbility(
|
||||||
|
new DiesTriggeredAbility(new BoostTargetEffect(-3, -3, Duration.EndOfTurn)),
|
||||||
|
HellbentCondition.instance,
|
||||||
|
"When {this} dies, if you have no cards in hand, target creature gets -3/-3 until end of turn."
|
||||||
|
);
|
||||||
|
ability.setAbilityWord(AbilityWord.HELLBENT);
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SlaughterhouseBouncer(final SlaughterhouseBouncer card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SlaughterhouseBouncer copy() {
|
||||||
|
return new SlaughterhouseBouncer(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -54,7 +54,7 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
public class SleepersRobe extends CardImpl {
|
public class SleepersRobe extends CardImpl {
|
||||||
|
|
||||||
public SleepersRobe(UUID ownerId, CardSetInfo setInfo) {
|
public SleepersRobe(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}");
|
||||||
this.subtype.add(SubType.AURA);
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
// Enchant creature
|
// Enchant creature
|
||||||
|
|
@ -63,12 +63,12 @@ public class SleepersRobe extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Enchanted creature has fear.
|
// Enchanted creature has fear.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.AURA)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.AURA)));
|
||||||
|
|
||||||
// Whenever enchanted creature deals combat damage to an opponent, you may draw a card.
|
// Whenever enchanted creature deals combat damage to an opponent, you may draw a card.
|
||||||
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature", true, false, false, TargetController.OPPONENT));
|
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature", true, false, true, TargetController.OPPONENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SleepersRobe(final SleepersRobe card) {
|
public SleepersRobe(final SleepersRobe card) {
|
||||||
|
|
@ -79,4 +79,4 @@ public class SleepersRobe extends CardImpl {
|
||||||
public SleepersRobe copy() {
|
public SleepersRobe copy() {
|
||||||
return new SleepersRobe(this);
|
return new SleepersRobe(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
66
Mage.Sets/src/mage/cards/s/StenchOfDecay.java
Normal file
66
Mage.Sets/src/mage/cards/s/StenchOfDecay.java
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* 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.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class StenchOfDecay extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Nonartifact creatures");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
|
}
|
||||||
|
|
||||||
|
public StenchOfDecay(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}{B}");
|
||||||
|
|
||||||
|
// Nonartifact creatures get -1/-1 until end of turn.
|
||||||
|
this.getSpellAbility().addEffect(new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public StenchOfDecay(final StenchOfDecay card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StenchOfDecay copy() {
|
||||||
|
return new StenchOfDecay(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
84
Mage.Sets/src/mage/cards/s/SubterraneanSpirit.java
Normal file
84
Mage.Sets/src/mage/cards/s/SubterraneanSpirit.java
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* 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.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.effects.common.DamageAllEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.ProtectionAbility;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class SubterraneanSpirit extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SubterraneanSpirit(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ELEMENTAL);
|
||||||
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Protection from red
|
||||||
|
this.addAbility(ProtectionAbility.from(ObjectColor.RED));
|
||||||
|
|
||||||
|
// {tap}: Subterranean Spirit deals 1 damage to each creature without flying.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(1, filter), new TapSourceCost());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SubterraneanSpirit(final SubterraneanSpirit card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SubterraneanSpirit copy() {
|
||||||
|
return new SubterraneanSpirit(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
|
|
@ -43,6 +42,8 @@ import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.permanent.token.KnightToken;
|
import mage.game.permanent.token.KnightToken;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
|
@ -68,7 +69,7 @@ public class SunspireGatekeepers extends CardImpl {
|
||||||
this.addAbility(new ConditionalTriggeredAbility(
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())),
|
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())),
|
||||||
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
|
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1),
|
||||||
"When {this} enter the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance."));
|
"When {this} enters the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance."));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SunspireGatekeepers (final SunspireGatekeepers card) {
|
public SunspireGatekeepers (final SunspireGatekeepers card) {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.DiscardTargetCost;
|
import mage.abilities.costs.common.DiscardTargetCost;
|
||||||
|
|
@ -43,13 +42,15 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class SurvivalOfTheFittest extends CardImpl {
|
public class SurvivalOfTheFittest extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("creature card");
|
private static final FilterCard filter = new FilterCard("a creature card");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
|
@ -43,6 +42,8 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author FenrisulfrX
|
* @author FenrisulfrX
|
||||||
|
|
@ -58,12 +59,12 @@ public class TemporaryInsanity extends CardImpl {
|
||||||
|
|
||||||
// and gain control of it until end of turn.
|
// and gain control of it until end of turn.
|
||||||
Effect effect = new GainControlTargetEffect(Duration.EndOfTurn);
|
Effect effect = new GainControlTargetEffect(Duration.EndOfTurn);
|
||||||
effect.setText("and gain control of it until end of the turn. ");
|
effect.setText("and gain control of it until end of turn. ");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
// That creature gains haste until end of turn.
|
// That creature gains haste until end of turn.
|
||||||
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||||
effect.setText("That creature gains haste until end of the turn.");
|
effect.setText("That creature gains haste until end of turn.");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
106
Mage.Sets/src/mage/cards/t/ThrashingMudspawn.java
Normal file
106
Mage.Sets/src/mage/cards/t/ThrashingMudspawn.java
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
/*
|
||||||
|
* 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.t;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.MorphAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ThrashingMudspawn extends CardImpl {
|
||||||
|
|
||||||
|
public ThrashingMudspawn(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.BEAST);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Whenever Thrashing Mudspawn is dealt damage, you lose that much life.
|
||||||
|
Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new ThrashingMudspawnEffect(), false);
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Morph {1}{B}{B}
|
||||||
|
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{B}{B}")));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ThrashingMudspawn(final ThrashingMudspawn card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThrashingMudspawn copy() {
|
||||||
|
return new ThrashingMudspawn(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ThrashingMudspawnEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public ThrashingMudspawnEffect() {
|
||||||
|
super(Outcome.Damage);
|
||||||
|
this.staticText = "you lose that much life";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ThrashingMudspawnEffect(final ThrashingMudspawnEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThrashingMudspawnEffect copy() {
|
||||||
|
return new ThrashingMudspawnEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
int amount = (Integer) getValue("damage");
|
||||||
|
if (amount > 0) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player != null) {
|
||||||
|
player.loseLife(amount, game, false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
84
Mage.Sets/src/mage/cards/t/TidalControl.java
Normal file
84
Mage.Sets/src/mage/cards/t/TidalControl.java
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* 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.t;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.CostImpl;
|
||||||
|
import mage.abilities.costs.common.PayLifeCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.costs.OrCost;
|
||||||
|
import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
|
import mage.abilities.effects.common.InfoEffect;
|
||||||
|
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class TidalControl extends CardImpl {
|
||||||
|
private static final FilterSpell filter = new FilterSpell("red or green spell");
|
||||||
|
static{
|
||||||
|
filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public TidalControl(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");
|
||||||
|
|
||||||
|
// Cumulative upkeep-Pay {2}.
|
||||||
|
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}")));
|
||||||
|
|
||||||
|
// Pay 2 life or {2}: Counter target red or green spell. Any player may activate this ability.
|
||||||
|
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new OrCost(new PayLifeCost(2), new ManaCostsImpl("{2}"), "pay 2 life or pay {2}"));
|
||||||
|
ability.addTarget(new TargetSpell(filter));
|
||||||
|
ability.setMayActivate(TargetController.ANY);
|
||||||
|
ability.addEffect(new InfoEffect("Any player may activate this ability"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TidalControl(final TidalControl card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TidalControl copy() {
|
||||||
|
return new TidalControl(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue