forked from External/mage
Added Fyndhorn Elves, Last Stand, Nullmage Advocate, Toshiro Umezawa, Silent-Blade Oni.
This commit is contained in:
parent
9af699574e
commit
6a250b1673
7 changed files with 710 additions and 0 deletions
52
Mage.Sets/src/mage/sets/apocalypse/LastStand.java
Normal file
52
Mage.Sets/src/mage/sets/apocalypse/LastStand.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class LastStand extends mage.sets.planechase2012.LastStand {
|
||||
|
||||
public LastStand(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 107;
|
||||
this.expansionSetCode = "APC";
|
||||
}
|
||||
|
||||
public LastStand(final LastStand card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LastStand copy() {
|
||||
return new LastStand(this);
|
||||
}
|
||||
}
|
||||
182
Mage.Sets/src/mage/sets/betrayersofkamigawa/ToshiroUmezawa.java
Normal file
182
Mage.Sets/src/mage/sets/betrayersofkamigawa/ToshiroUmezawa.java
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
/*
|
||||
* 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.betrayersofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ToshiroUmezawa extends CardImpl<ToshiroUmezawa> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls");
|
||||
private static final FilterCard filterInstant = new FilterCard("instant card from your graveyard");
|
||||
static {
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.OPPONENT));
|
||||
filterInstant.add(new CardTypePredicate(CardType.INSTANT));
|
||||
}
|
||||
|
||||
public ToshiroUmezawa(UUID ownerId) {
|
||||
super(ownerId, 89, "Toshiro Umezawa", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||
this.expansionSetCode = "BOK";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Samurai");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Bushido 1
|
||||
this.addAbility(new BushidoAbility(1));
|
||||
// Whenever a creature an opponent controls dies, you may cast target instant card from your graveyard. If that card would be put into a graveyard this turn, exile it instead.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new ToshiroUmezawaEffect(), true, filter);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(1,1, filterInstant));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public ToshiroUmezawa(final ToshiroUmezawa card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToshiroUmezawa copy() {
|
||||
return new ToshiroUmezawa(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ToshiroUmezawaEffect extends OneShotEffect<ToshiroUmezawaEffect> {
|
||||
|
||||
public ToshiroUmezawaEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "cast target instant card from your graveyard. If that card would be put into a graveyard this turn, exile it instead";
|
||||
}
|
||||
|
||||
public ToshiroUmezawaEffect(final ToshiroUmezawaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToshiroUmezawaEffect copy() {
|
||||
return new ToshiroUmezawaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Card card = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
if (card != null) {
|
||||
controller.cast(card.getSpellAbility(), game, false);
|
||||
game.addEffect(new ToshiroUmezawaReplacementEffect(card.getId()), source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ToshiroUmezawaReplacementEffect extends ReplacementEffectImpl<ToshiroUmezawaReplacementEffect> {
|
||||
|
||||
private UUID cardId;
|
||||
|
||||
public ToshiroUmezawaReplacementEffect(UUID cardId) {
|
||||
super(Duration.EndOfTurn, Outcome.Exile);
|
||||
this.cardId = cardId;
|
||||
}
|
||||
|
||||
public ToshiroUmezawaReplacementEffect(final ToshiroUmezawaReplacementEffect effect) {
|
||||
super(effect);
|
||||
this.cardId = effect.cardId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToshiroUmezawaReplacementEffect copy() {
|
||||
return new ToshiroUmezawaReplacementEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
UUID eventObject = ((ZoneChangeEvent) event).getTargetId();
|
||||
StackObject card = game.getStack().getStackObject(eventObject);
|
||||
if (card != null) {
|
||||
if (card instanceof Spell) {
|
||||
game.rememberLKI(card.getId(), Zone.STACK, (Spell) card);
|
||||
}
|
||||
if (card instanceof Card && eventObject.equals(cardId)) {
|
||||
((Card) card).moveToExile(null, null, source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == EventType.ZONE_CHANGE) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getToZone() == Zone.GRAVEYARD
|
||||
&& ((ZoneChangeEvent) event).getTargetId().equals(cardId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
67
Mage.Sets/src/mage/sets/iceage/FyndhornElves.java
Normal file
67
Mage.Sets/src/mage/sets/iceage/FyndhornElves.java
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.iceage;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FyndhornElves extends CardImpl<FyndhornElves> {
|
||||
|
||||
public FyndhornElves(UUID ownerId) {
|
||||
super(ownerId, 132, "Fyndhorn Elves", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.expansionSetCode = "ICE";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Druid");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Add {G} to your mana pool.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
}
|
||||
|
||||
public FyndhornElves(final FyndhornElves card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FyndhornElves copy() {
|
||||
return new FyndhornElves(this);
|
||||
}
|
||||
}
|
||||
52
Mage.Sets/src/mage/sets/judgment/NullmageAdvocate.java
Normal file
52
Mage.Sets/src/mage/sets/judgment/NullmageAdvocate.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.judgment;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class NullmageAdvocate extends mage.sets.planechase2012.NullmageAdvocate {
|
||||
|
||||
public NullmageAdvocate(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 126;
|
||||
this.expansionSetCode = "JUD";
|
||||
}
|
||||
|
||||
public NullmageAdvocate(final NullmageAdvocate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NullmageAdvocate copy() {
|
||||
return new NullmageAdvocate(this);
|
||||
}
|
||||
}
|
||||
144
Mage.Sets/src/mage/sets/planechase2012/LastStand.java
Normal file
144
Mage.Sets/src/mage/sets/planechase2012/LastStand.java
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* 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.planechase2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class LastStand extends CardImpl<LastStand> {
|
||||
|
||||
public LastStand(UUID ownerId) {
|
||||
super(ownerId, 100, "Last Stand", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{W}{U}{B}{R}{G}");
|
||||
this.expansionSetCode = "PC2";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
this.color.setGreen(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Target opponent loses 2 life for each Swamp you control. Last Stand deals damage equal to the number of Mountains you control to target creature. Put a 1/1 green Saproling creature token onto the battlefield for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards.
|
||||
this.getSpellAbility().addEffect(new LastStandEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent(true));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
}
|
||||
|
||||
public LastStand(final LastStand card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LastStand copy() {
|
||||
return new LastStand(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LastStandEffect extends OneShotEffect<LastStandEffect> {
|
||||
|
||||
private static final FilterControlledLandPermanent filterSwamp = new FilterControlledLandPermanent();
|
||||
private static final FilterControlledLandPermanent filterMountain = new FilterControlledLandPermanent();
|
||||
private static final FilterControlledLandPermanent filterPlains = new FilterControlledLandPermanent();
|
||||
private static final FilterControlledLandPermanent filterForest = new FilterControlledLandPermanent();
|
||||
private static final FilterControlledLandPermanent filterIsland = new FilterControlledLandPermanent();
|
||||
static {
|
||||
filterSwamp.add(new SubtypePredicate("Swamp"));
|
||||
filterMountain.add(new SubtypePredicate("Mountain"));
|
||||
filterPlains.add(new SubtypePredicate("Plains"));
|
||||
filterForest.add(new SubtypePredicate("Forest"));
|
||||
filterIsland.add(new SubtypePredicate("Island"));
|
||||
}
|
||||
|
||||
public LastStandEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Target opponent loses 2 life for each Swamp you control. Last Stand deals damage equal to the number of Mountains you control to target creature. Put a 1/1 green Saproling creature token onto the battlefield for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards";
|
||||
}
|
||||
|
||||
public LastStandEffect(final LastStandEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LastStandEffect copy() {
|
||||
return new LastStandEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
// Target opponent loses 2 life for each Swamp you control
|
||||
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (opponent != null) {
|
||||
int swamps = game.getBattlefield().count(filterSwamp, source.getSourceId(), source.getControllerId(), game);
|
||||
opponent.damage(swamps, source.getSourceId(), game, false, true);
|
||||
}
|
||||
// Last Stand deals damage equal to the number of Mountains you control to target creature.
|
||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (creature != null) {
|
||||
int mountains = game.getBattlefield().count(filterMountain, source.getSourceId(), source.getControllerId(), game);
|
||||
if (mountains > 0) {
|
||||
creature.damage(mountains, source.getSourceId(), game, true, false);
|
||||
}
|
||||
}
|
||||
// Put a 1/1 green Saproling creature token onto the battlefield for each Forest you control.
|
||||
int forests = game.getBattlefield().count(filterForest, source.getSourceId(), source.getControllerId(), game);
|
||||
if (forests > 0) {
|
||||
new CreateTokenEffect(new SaprolingToken(), forests).apply(game, source);
|
||||
}
|
||||
// You gain 2 life for each Plains you control.
|
||||
int plains = game.getBattlefield().count(filterPlains, source.getSourceId(), source.getControllerId(), game);
|
||||
controller.gainLife(plains, game);
|
||||
// Draw a card for each Island you control, then discard that many cards
|
||||
int islands = game.getBattlefield().count(filterIsland, source.getSourceId(), source.getControllerId(), game);
|
||||
if (islands > 0) {
|
||||
controller.drawCards(islands, game);
|
||||
controller.discard(islands, source, game);
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
92
Mage.Sets/src/mage/sets/planechase2012/NullmageAdvocate.java
Normal file
92
Mage.Sets/src/mage/sets/planechase2012/NullmageAdvocate.java
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* 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.planechase2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInOpponentsGraveyard;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class NullmageAdvocate extends CardImpl<NullmageAdvocate> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NullmageAdvocate(UUID ownerId) {
|
||||
super(ownerId, 70, "Nullmage Advocate", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "PC2";
|
||||
this.subtype.add("Insect");
|
||||
this.subtype.add("Druid");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {tap}: Return two target cards from an opponent's graveyard to his or her hand. Destroy target artifact or enchantment.
|
||||
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
|
||||
effect.setText("Return two target cards from an opponent's graveyard to his or her hand");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
|
||||
effect = new DestroyTargetEffect("Destroy target artifact or enchantment");
|
||||
effect.setTargetPointer(new SecondTargetPointer());
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public NullmageAdvocate(final NullmageAdvocate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NullmageAdvocate copy() {
|
||||
return new NullmageAdvocate(this);
|
||||
}
|
||||
}
|
||||
121
Mage.Sets/src/mage/sets/planechase2012/SilentBladeOni.java
Normal file
121
Mage.Sets/src/mage/sets/planechase2012/SilentBladeOni.java
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* 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.planechase2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.NinjutsuAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SilentBladeOni extends CardImpl<SilentBladeOni> {
|
||||
|
||||
public SilentBladeOni(UUID ownerId) {
|
||||
super(ownerId, 105, "Silent-Blade Oni", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}{B}{B}");
|
||||
this.expansionSetCode = "PC2";
|
||||
this.subtype.add("Demon");
|
||||
this.subtype.add("Ninja");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Ninjutsu {4}{U}{B}
|
||||
this.addAbility(new NinjutsuAbility(new ManaCostsImpl("{4}{U}{B}")));
|
||||
// Whenever Silent-Blade Oni deals combat damage to a player, look at that player's hand. You may cast a nonland card in it without paying that card's mana cost.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SilentBladeOniEffect(), false, true));
|
||||
|
||||
}
|
||||
|
||||
public SilentBladeOni(final SilentBladeOni card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SilentBladeOni copy() {
|
||||
return new SilentBladeOni(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SilentBladeOniEffect extends OneShotEffect<SilentBladeOniEffect> {
|
||||
|
||||
public SilentBladeOniEffect() {
|
||||
super(Outcome.PlayForFree);
|
||||
this.staticText = "look at that player's hand. You may cast a nonland card in it without paying that card's mana cost";
|
||||
}
|
||||
|
||||
public SilentBladeOniEffect(final SilentBladeOniEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SilentBladeOniEffect copy() {
|
||||
return new SilentBladeOniEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (opponent != null && controller != null) {
|
||||
Cards cardsInHand = new CardsImpl(Constants.Zone.PICK);
|
||||
cardsInHand.addAll(opponent.getHand());
|
||||
if (cardsInHand.size() > 0) {
|
||||
TargetCard target = new TargetCard(1, Constants.Zone.PICK, new FilterNonlandCard());
|
||||
if (controller.chooseTarget(outcome, cardsInHand, target, source, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
controller.cast(card.getSpellAbility(), game, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue