- Added some requested cards.

This commit is contained in:
Jeff 2014-02-14 17:19:26 -06:00
parent f2cf060b21
commit f01692f804
7 changed files with 631 additions and 0 deletions

View file

@ -0,0 +1,141 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.commander;
import java.util.List;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.DamagePlayerEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author jeffwadsworth
*
*/
public class SzadekLordOfSecrets extends CardImpl<SzadekLordOfSecrets> {
public SzadekLordOfSecrets(UUID ownerId) {
super(ownerId, 228, "Szadek, Lord of Secrets", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}{B}{B}");
this.expansionSetCode = "CMD";
this.supertype.add("Legendary");
this.subtype.add("Vampire");
this.color.setBlue(true);
this.color.setBlack(true);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// If Szadek, Lord of Secrets would deal combat damage to a player, instead put that many +1/+1 counters on Szadek and that player puts that many cards from the top of his or her library into his or her graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SzadekLordOfSecretsEffect()));
}
public SzadekLordOfSecrets(final SzadekLordOfSecrets card) {
super(card);
}
@Override
public SzadekLordOfSecrets copy() {
return new SzadekLordOfSecrets(this);
}
}
class SzadekLordOfSecretsEffect extends ReplacementEffectImpl<SzadekLordOfSecretsEffect> {
List<Card> cards;
SzadekLordOfSecretsEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "If {this} would deal combat damage to a player, instead put that many +1/+1 counters on Szadek and that player puts that many cards from the top of his or her library into his or her graveyard";
}
SzadekLordOfSecretsEffect(final SzadekLordOfSecretsEffect effect) {
super(effect);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
DamagePlayerEvent damageEvent = (DamagePlayerEvent) event;
Player damagedPlayer = game.getPlayer(damageEvent.getTargetId());
if (damageEvent.isCombatDamage()) {
Permanent p = game.getPermanent(source.getSourceId());
if (p != null) {
p.addCounters(CounterType.P1P1.createInstance(damageEvent.getAmount()), game);
if (damagedPlayer != null) {
cards = damagedPlayer.getLibrary().getTopCards(game, damageEvent.getAmount());
}
for (Card card : cards) {
card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, false);
}
}
}
return true;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER
&& event.getSourceId().equals(source.getSourceId())) {
DamagePlayerEvent damageEvent = (DamagePlayerEvent) event;
if (damageEvent.isCombatDamage()) {
return true;
}
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public SzadekLordOfSecretsEffect copy() {
return new SzadekLordOfSecretsEffect(this);
}
}

View file

@ -0,0 +1,95 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.dissension;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SpellCastAllTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.RevealLibraryPutIntoHandEffect;
import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetCardInLibrary;
/**
*
* @author jeffwadsworth
*
*/
public class MomirVigSimicVisionary extends CardImpl<MomirVigSimicVisionary> {
private static final FilterSpell filter = new FilterSpell("a green creature spell");
private static final FilterSpell filter2 = new FilterSpell("a blue creature spell");
static {
filter.add(new ColorPredicate(ObjectColor.GREEN));
filter.add(new CardTypePredicate(CardType.CREATURE));
filter2.add(new ColorPredicate(ObjectColor.BLUE));
filter2.add(new CardTypePredicate(CardType.CREATURE));
}
public MomirVigSimicVisionary(UUID ownerId) {
super(ownerId, 118, "Momir Vig, Simic Visionary", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{U}");
this.expansionSetCode = "DIS";
this.supertype.add("Legendary");
this.subtype.add("Elf");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Whenever you cast a green creature spell, you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it.
Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(), true, true);
effect.setText("you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it");
this.addAbility(new SpellCastAllTriggeredAbility(effect, filter, true));
// Whenever you cast a blue creature spell, reveal the top card of your library. If it's a creature card, put that card into your hand.
Effect effect2 = new RevealLibraryPutIntoHandEffect(1, new FilterCreatureCard(), false);
effect2.setText("reveal the top card of your library. If it's a creature card, put that card into your hand");
this.addAbility(new SpellCastAllTriggeredAbility(effect2, filter2, false));
}
public MomirVigSimicVisionary(final MomirVigSimicVisionary card) {
super(card);
}
@Override
public MomirVigSimicVisionary copy() {
return new MomirVigSimicVisionary(this);
}
}

View file

@ -0,0 +1,115 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.eventide;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetOpponent;
/**
*
* @author jeffwadsworth
*
*/
public class CankerAbomination extends CardImpl<CankerAbomination> {
public CankerAbomination(UUID ownerId) {
super(ownerId, 115, "Canker Abomination", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B/G}{B/G}");
this.expansionSetCode = "EVE";
this.subtype.add("Treefolk");
this.subtype.add("Horror");
this.color.setGreen(true);
this.color.setBlack(true);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// As Canker Abomination enters the battlefield, choose an opponent. Canker Abomination enters the battlefield with a -1/-1 counter on it for each creature that player controls.
Ability ability = new AsEntersBattlefieldAbility(new CankerAbominationEffect());
Target target = new TargetOpponent(true);
target.setNotTarget(true);
ability.addTarget(target);
this.addAbility(ability);
}
public CankerAbomination(final CankerAbomination card) {
super(card);
}
@Override
public CankerAbomination copy() {
return new CankerAbomination(this);
}
}
class CankerAbominationEffect extends OneShotEffect<CankerAbominationEffect> {
public CankerAbominationEffect() {
super(Outcome.Neutral);
this.staticText = "choose an opponent. {this} enters the battlefield with a -1/-1 counter on it for each creature that player controls";
}
public CankerAbominationEffect(final CankerAbominationEffect effect) {
super(effect);
}
@Override
public CankerAbominationEffect copy() {
return new CankerAbominationEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent CankerAbomination = game.getPermanent(source.getSourceId());
if (player != null && CankerAbomination != null) {
Player chosenPlayer = game.getPlayer(source.getFirstTarget());
if (chosenPlayer != null) {
game.informPlayers(CankerAbomination.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
int amount = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), chosenPlayer.getId(), game).size();
CankerAbomination.addCounters(CounterType.M1M1.createInstance(amount), game);
return true;
}
}
return false;
}
}

View file

@ -0,0 +1,96 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.lorwyn;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.ControlsPermanentCondition;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
/**
*
* @author jeffwadsworth
*
*/
public class DauntlessDourbark extends CardImpl<DauntlessDourbark> {
final static private FilterControlledPermanent filter = new FilterControlledPermanent("Forests you control plus the number of Treefolk you control");
final static private FilterControlledPermanent filter2 = new FilterControlledPermanent();
static {
filter.add(Predicates.or(new SubtypePredicate("Forest"),
new SubtypePredicate("Treefolk")));
filter2.add(new SubtypePredicate("Treefolk"));
filter2.add(new AnotherPredicate());
}
final static private String rule = "{this} has trample as long as you control another Treefolk";
public DauntlessDourbark(UUID ownerId) {
super(ownerId, 203, "Dauntless Dourbark", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.expansionSetCode = "LRW";
this.subtype.add("Treefolk");
this.subtype.add("Warrior");
this.color.setGreen(true);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Dauntless Dourbark's power and toughness are each equal to the number of Forests you control plus the number of Treefolk you control.
DynamicValue amount = new PermanentsOnBattlefieldCount(filter);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(amount, Duration.WhileOnBattlefield)));
// Dauntless Dourbark has trample as long as you control another Treefolk.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), new ControlsPermanentCondition(filter2), rule)));
}
public DauntlessDourbark(final DauntlessDourbark card) {
super(card);
}
@Override
public DauntlessDourbark copy() {
return new DauntlessDourbark(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.lorwyn;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.DiscardsACardOpponentTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DiscardTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.game.permanent.token.ElfToken;
import mage.target.common.TargetOpponent;
/**
*
* @author jeffwadsworth
*
*/
public class NathOfTheGiltLeaf extends CardImpl<NathOfTheGiltLeaf> {
public NathOfTheGiltLeaf(UUID ownerId) {
super(ownerId, 250, "Nath of the Gilt-Leaf", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{G}");
this.expansionSetCode = "LRW";
this.supertype.add("Legendary");
this.subtype.add("Elf");
this.subtype.add("Warrior");
this.color.setGreen(true);
this.color.setBlack(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// At the beginning of your upkeep, you may have target opponent discard a card at random.
Effect effect = new DiscardTargetEffect(1, true);
effect.setText("you may have target opponent discard a card at random");
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, true);
ability.addTarget(new TargetOpponent(true));
this.addAbility(ability);
// Whenever an opponent discards a card, you may put a 1/1 green Elf Warrior creature token onto the battlefield.
Effect effect2 = new CreateTokenEffect(new ElfToken());
effect2.setText("you may put a 1/1 green Elf Warrior creature token onto the battlefield");
this.addAbility(new DiscardsACardOpponentTriggeredAbility(effect2, true));
}
public NathOfTheGiltLeaf(final NathOfTheGiltLeaf card) {
super(card);
}
@Override
public NathOfTheGiltLeaf copy() {
return new NathOfTheGiltLeaf(this);
}
}

View file

@ -0,0 +1,53 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.ravnika;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public class SzadekLordOfSecrets extends mage.sets.commander.SzadekLordOfSecrets {
public SzadekLordOfSecrets(UUID ownerId) {
super(ownerId);
this.cardNumber = 234;
this.expansionSetCode = "RAV";
}
public SzadekLordOfSecrets(final SzadekLordOfSecrets card) {
super(card);
}
@Override
public SzadekLordOfSecrets copy() {
return new SzadekLordOfSecrets(this);
}
}

View file

@ -0,0 +1,45 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
/**
*
* @author jeffwadsworth
*/
public class DiscardsACardOpponentTriggeredAbility extends TriggeredAbilityImpl<DiscardsACardOpponentTriggeredAbility> {
public DiscardsACardOpponentTriggeredAbility(Effect effect, Boolean isOptional) {
super(Zone.BATTLEFIELD, effect, isOptional);
}
public DiscardsACardOpponentTriggeredAbility(final DiscardsACardOpponentTriggeredAbility ability) {
super(ability);
}
@Override
public DiscardsACardOpponentTriggeredAbility copy() {
return new DiscardsACardOpponentTriggeredAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.DISCARDED_CARD && game.getOpponents(controllerId).contains(event.getPlayerId())) {
return true;
}
return false;
}
@Override
public String getRule() {
return "Whenever an opponent discards a card, " + super.getRule();
}
}