mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[ISD] cards
[ROE] Surreal Memoir [SHM] Fossil Find
This commit is contained in:
parent
20d8fa2f10
commit
3ea99c8d19
14 changed files with 1445 additions and 0 deletions
115
Mage.Sets/src/mage/sets/innistrad/CaravanVigil.java
Normal file
115
Mage.Sets/src/mage/sets/innistrad/CaravanVigil.java
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.common.FilterBasicLandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class CaravanVigil extends CardImpl<CaravanVigil> {
|
||||
|
||||
public CaravanVigil(UUID ownerId) {
|
||||
super(ownerId, 173, "Caravan Vigil", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.
|
||||
// Morbid - You may put that card onto the battlefield instead of putting it into your hand if a creature died this turn.
|
||||
this.getSpellAbility().addEffect(new CaravanVigilEffect());
|
||||
}
|
||||
|
||||
public CaravanVigil(final CaravanVigil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaravanVigil copy() {
|
||||
return new CaravanVigil(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CaravanVigilEffect extends OneShotEffect<CaravanVigilEffect> {
|
||||
|
||||
public CaravanVigilEffect() {
|
||||
super(Outcome.PutLandInPlay);
|
||||
this.staticText = "Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.\n"
|
||||
+ "Morbid - You may put that card onto the battlefield instead of putting it into your hand if a creature died this turn";
|
||||
}
|
||||
|
||||
public CaravanVigilEffect(final CaravanVigilEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaravanVigilEffect copy() {
|
||||
return new CaravanVigilEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
|
||||
if (player.searchLibrary(target, game)) {
|
||||
Cards cards = new CardsImpl();
|
||||
Card card = player.getLibrary().remove(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if (MorbidCondition.getInstance().apply(game, source)
|
||||
&& player.chooseUse(Outcome.PutLandInPlay, "Do you wish to put the card onto the battlefield instead?", game)) {
|
||||
card.putOntoBattlefield(game, Zone.HAND, source.getId(), source.getControllerId());
|
||||
} else {
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
}
|
||||
}
|
||||
player.revealCards("Caravan Vigil", cards, game);
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
71
Mage.Sets/src/mage/sets/innistrad/FesterhideBoar.java
Normal file
71
Mage.Sets/src/mage/sets/innistrad/FesterhideBoar.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.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class FesterhideBoar extends CardImpl<FesterhideBoar> {
|
||||
|
||||
public FesterhideBoar(UUID ownerId) {
|
||||
super(ownerId, 179, "Festerhide Boar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "ISD";
|
||||
this.subtype.add("Boar");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Morbid — Festerhide Boar enters the battlefield with two +1/+1 counters on it if a creature died this turn.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
|
||||
MorbidCondition.getInstance(), ""), "with two +1/+1 counters on it if a creature died this turn"));
|
||||
}
|
||||
|
||||
public FesterhideBoar(final FesterhideBoar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FesterhideBoar copy() {
|
||||
return new FesterhideBoar(this);
|
||||
}
|
||||
}
|
110
Mage.Sets/src/mage/sets/innistrad/GraveyardShovel.java
Normal file
110
Mage.Sets/src/mage/sets/innistrad/GraveyardShovel.java
Normal file
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* 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.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class GraveyardShovel extends CardImpl<GraveyardShovel> {
|
||||
|
||||
public GraveyardShovel(UUID ownerId) {
|
||||
super(ownerId, 225, "Graveyard Shovel", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
// {2}, {tap}: Target player exiles a card from his or her graveyard. If it's a creature card, you gain 2 life.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GraveyardShovelEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public GraveyardShovel(final GraveyardShovel card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraveyardShovel copy() {
|
||||
return new GraveyardShovel(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GraveyardShovelEffect extends OneShotEffect<GraveyardShovelEffect> {
|
||||
|
||||
public GraveyardShovelEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "Target player exiles a card from his or her graveyard. If it's a creature card, you gain 2 life";
|
||||
}
|
||||
|
||||
public GraveyardShovelEffect(final GraveyardShovelEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraveyardShovelEffect copy() {
|
||||
return new GraveyardShovelEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (targetPlayer != null && controller != null) {
|
||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard();
|
||||
if (targetPlayer.chooseTarget(Outcome.Exile, target, source, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
targetPlayer.getGraveyard().remove(card);
|
||||
card.moveToExile(null, "", source.getId(), game);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
controller.gainLife(2, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
142
Mage.Sets/src/mage/sets/innistrad/GrimgrinCorpseBorn.java
Normal file
142
Mage.Sets/src/mage/sets/innistrad/GrimgrinCorpseBorn.java
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* 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.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.SkipUntapSourceEffect;
|
||||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class GrimgrinCorpseBorn extends CardImpl<GrimgrinCorpseBorn> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
}
|
||||
|
||||
public GrimgrinCorpseBorn(UUID ownerId) {
|
||||
super(ownerId, 214, "Grimgrin, Corpse-Born", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{U}{B}");
|
||||
this.expansionSetCode = "ISD";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Zombie");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Grimgrin, Corpse-Born enters the battlefield tapped and doesn't untap during your untap step.
|
||||
this.getAbilities().add(new EntersBattlefieldTappedAbility());
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipUntapSourceEffect()));
|
||||
// Sacrifice another creature: Untap Grimgrin and put a +1/+1 counter on it.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
|
||||
ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||
this.addAbility(ability);
|
||||
// Whenever Grimgrin attacks, destroy target creature defending player controls, then put a +1/+1 counter on Grimgrin.
|
||||
this.addAbility(new GrimgrinCorpseBornAbility());
|
||||
}
|
||||
|
||||
public GrimgrinCorpseBorn(final GrimgrinCorpseBorn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrimgrinCorpseBorn copy() {
|
||||
return new GrimgrinCorpseBorn(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrimgrinCorpseBornAbility extends TriggeredAbilityImpl<GrimgrinCorpseBornAbility> {
|
||||
|
||||
private FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
|
||||
|
||||
public GrimgrinCorpseBornAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroyTargetEffect());
|
||||
this.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
|
||||
public GrimgrinCorpseBornAbility(final GrimgrinCorpseBornAbility ability) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
UUID defenderId = game.getCombat().getDefendingPlayer(sourceId);
|
||||
if (defenderId != null) {
|
||||
filter.getControllerId().clear();
|
||||
filter.getControllerId().add(defenderId);
|
||||
return super.activate(game, noMana);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} attacks, destroy target creature defending player controls, then put a +1/+1 counter on {this}.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrimgrinCorpseBornAbility copy() {
|
||||
return new GrimgrinCorpseBornAbility(this);
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/innistrad/InfernalPlunge.java
Normal file
65
Mage.Sets/src/mage/sets/innistrad/InfernalPlunge.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.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Mana;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class InfernalPlunge extends CardImpl<InfernalPlunge> {
|
||||
|
||||
public InfernalPlunge(UUID ownerId) {
|
||||
super(ownerId, 148, "Infernal Plunge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// As an additional cost to cast Infernal Plunge, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||
// Add {R}{R}{R} to your mana pool.
|
||||
this.getSpellAbility().addEffect(new BasicManaEffect(Mana.RedMana(3)));
|
||||
}
|
||||
|
||||
public InfernalPlunge(final InfernalPlunge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernalPlunge copy() {
|
||||
return new InfernalPlunge(this);
|
||||
}
|
||||
}
|
107
Mage.Sets/src/mage/sets/innistrad/KessigCagebreakers.java
Normal file
107
Mage.Sets/src/mage/sets/innistrad/KessigCagebreakers.java
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* 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.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.WolfToken;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class KessigCagebreakers extends CardImpl<KessigCagebreakers> {
|
||||
|
||||
public KessigCagebreakers(UUID ownerId) {
|
||||
super(ownerId, 189, "Kessig Cagebreakers", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
||||
this.expansionSetCode = "ISD";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Rogue");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever Kessig Cagebreakers attacks, put a 2/2 green Wolf creature token onto the battlefield tapped and attacking for each creature card in your graveyard.
|
||||
this.addAbility(new AttacksTriggeredAbility(new KessigCagebreakersEffect(), false));
|
||||
}
|
||||
|
||||
public KessigCagebreakers(final KessigCagebreakers card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KessigCagebreakers copy() {
|
||||
return new KessigCagebreakers(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KessigCagebreakersEffect extends OneShotEffect<KessigCagebreakersEffect> {
|
||||
|
||||
public KessigCagebreakersEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "put a 2/2 green Wolf creature token onto the battlefield tapped and attacking for each creature card in your graveyard";
|
||||
}
|
||||
|
||||
public KessigCagebreakersEffect(final KessigCagebreakersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KessigCagebreakersEffect copy() {
|
||||
return new KessigCagebreakersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
WolfToken token = new WolfToken();
|
||||
int count = player.getGraveyard().count(FilterCreatureCard.getDefault(), game);
|
||||
for (int i = 0; i < count; i++) {
|
||||
token.putOntoBattlefield(1, game, source.getId(), source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(token.getLastAddedToken());
|
||||
game.getCombat().declareAttacker(permanent.getId(), game.getCombat().getDefendingPlayer(source.getSourceId()), game);
|
||||
permanent.setTapped(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
164
Mage.Sets/src/mage/sets/innistrad/ManorGargoyle.java
Normal file
164
Mage.Sets/src/mage/sets/innistrad/ManorGargoyle.java
Normal file
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
* 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.innistrad;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class ManorGargoyle extends CardImpl<ManorGargoyle> {
|
||||
|
||||
private static final String rule = "{this} is indestructible as long as it has defender.";
|
||||
|
||||
public ManorGargoyle(UUID ownerId) {
|
||||
super(ownerId, 228, "Manor Gargoyle", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
|
||||
this.expansionSetCode = "ISD";
|
||||
this.subtype.add("Gargoyle");
|
||||
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
// Manor Gargoyle is indestructible as long as it has defender.
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), HasDefenderCondition.getInstance(), rule));
|
||||
// {1}: Until end of turn, Manor Gargoyle loses defender and gains flying.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{1}")));
|
||||
}
|
||||
|
||||
public ManorGargoyle(final ManorGargoyle card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManorGargoyle copy() {
|
||||
return new ManorGargoyle(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GargoyleSentinelEffect extends ContinuousEffectImpl<GargoyleSentinelEffect> {
|
||||
|
||||
public GargoyleSentinelEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.AddAbility);
|
||||
staticText = "Until end of turn, {this} loses defender and gains flying";
|
||||
}
|
||||
|
||||
public GargoyleSentinelEffect(final GargoyleSentinelEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GargoyleSentinelEffect copy() {
|
||||
return new GargoyleSentinelEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
switch (layer) {
|
||||
case AbilityAddingRemovingEffects_6:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
for (Iterator<Ability> ability = permanent.getAbilities().iterator(); ability.hasNext();) {
|
||||
Ability entry = ability.next();
|
||||
if (entry.getId().equals(DefenderAbility.getInstance().getId())) {
|
||||
ability.remove();
|
||||
}
|
||||
}
|
||||
permanent.getAbilities().add(FlyingAbility.getInstance());
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasLayer(Layer layer) {
|
||||
return layer == Layer.AbilityAddingRemovingEffects_6;
|
||||
}
|
||||
}
|
||||
|
||||
class HasDefenderCondition implements Condition {
|
||||
|
||||
private static HasDefenderCondition INSTANCE;
|
||||
|
||||
private HasDefenderCondition() {
|
||||
}
|
||||
|
||||
public static HasDefenderCondition getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new HasDefenderCondition();
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
Abilities<Ability> abilities = permanent.getAbilities();
|
||||
for (Ability ability : abilities) {
|
||||
if (ability.getClass().equals(DefenderAbility.getInstance().getClass())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
112
Mage.Sets/src/mage/sets/innistrad/Mulch.java
Normal file
112
Mage.Sets/src/mage/sets/innistrad/Mulch.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.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Mulch extends CardImpl<Mulch> {
|
||||
|
||||
public Mulch(UUID ownerId) {
|
||||
super(ownerId, 196, "Mulch", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Reveal the top four cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new MulchEffect());
|
||||
}
|
||||
|
||||
public Mulch(final Mulch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mulch copy() {
|
||||
return new Mulch(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MulchEffect extends OneShotEffect<MulchEffect> {
|
||||
|
||||
public MulchEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Reveal the top four cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard";
|
||||
}
|
||||
|
||||
public MulchEffect(final MulchEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MulchEffect copy() {
|
||||
return new MulchEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
int count = Math.min(player.getLibrary().size(), 4);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
game.setZone(card.getId(), Zone.PICK);
|
||||
if (card.getCardType().contains(CardType.LAND)) {
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, true);
|
||||
} else {
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cards.isEmpty()) {
|
||||
player.revealCards("Lead the Stampede", cards, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
69
Mage.Sets/src/mage/sets/innistrad/NightbirdsClutches.java
Normal file
69
Mage.Sets/src/mage/sets/innistrad/NightbirdsClutches.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.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TimingRule;
|
||||
import mage.abilities.common.CantBlockAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class NightbirdsClutches extends CardImpl<NightbirdsClutches> {
|
||||
|
||||
public NightbirdsClutches(UUID ownerId) {
|
||||
super(ownerId, 154, "Nightbird's Clutches", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Up to two target creatures can't block this turn.
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(CantBlockAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
public NightbirdsClutches(final NightbirdsClutches card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NightbirdsClutches copy() {
|
||||
return new NightbirdsClutches(this);
|
||||
}
|
||||
}
|
105
Mage.Sets/src/mage/sets/innistrad/SeverTheBloodline.java
Normal file
105
Mage.Sets/src/mage/sets/innistrad/SeverTheBloodline.java
Normal file
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* 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.innistrad;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TimingRule;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class SeverTheBloodline extends CardImpl<SeverTheBloodline> {
|
||||
|
||||
public SeverTheBloodline(UUID ownerId) {
|
||||
super(ownerId, 115, "Sever the Bloodline", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Exile target creature and all other creatures with the same name as that creature.
|
||||
this.getSpellAbility().addEffect(new SeverTheBloodlineEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
// Flashback {5}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}{B}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
public SeverTheBloodline(final SeverTheBloodline card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SeverTheBloodline copy() {
|
||||
return new SeverTheBloodline(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SeverTheBloodlineEffect extends OneShotEffect<SeverTheBloodlineEffect> {
|
||||
|
||||
public SeverTheBloodlineEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "Exile target creature and all other creatures with the same name as that creature";
|
||||
}
|
||||
|
||||
public SeverTheBloodlineEffect(final SeverTheBloodlineEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SeverTheBloodlineEffect copy() {
|
||||
return new SeverTheBloodlineEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(source));
|
||||
if (targetPermanent != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.getName().add(targetPermanent.getName());
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game);
|
||||
for (Permanent permanent : permanents) {
|
||||
permanent.moveToExile(null, "", source.getId(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/innistrad/TravelPreparations.java
Normal file
68
Mage.Sets/src/mage/sets/innistrad/TravelPreparations.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TimingRule;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class TravelPreparations extends CardImpl<TravelPreparations> {
|
||||
|
||||
public TravelPreparations(UUID ownerId) {
|
||||
super(ownerId, 206, "Travel Preparations", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Put a +1/+1 counter on each of up to two target creatures.
|
||||
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
// Flashback {1}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
public TravelPreparations(final TravelPreparations card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TravelPreparations copy() {
|
||||
return new TravelPreparations(this);
|
||||
}
|
||||
}
|
113
Mage.Sets/src/mage/sets/innistrad/WoodlandSleuth.java
Normal file
113
Mage.Sets/src/mage/sets/innistrad/WoodlandSleuth.java
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* 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.innistrad;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class WoodlandSleuth extends CardImpl<WoodlandSleuth> {
|
||||
|
||||
private final static String staticText = "Morbid - When {this} enters the battlefield, if a creature died this turn, return a creature card at random from your graveyard to your hand.";
|
||||
|
||||
public WoodlandSleuth(UUID ownerId) {
|
||||
super(ownerId, 210, "Woodland Sleuth", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "ISD";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Scout");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Morbid - When Woodland Sleuth enters the battlefield, if a creature died this turn, return a creature card at random from your graveyard to your hand.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new WoodlandSleuthEffect());
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.getInstance(), staticText));
|
||||
}
|
||||
|
||||
public WoodlandSleuth(final WoodlandSleuth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WoodlandSleuth copy() {
|
||||
return new WoodlandSleuth(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WoodlandSleuthEffect extends OneShotEffect<WoodlandSleuthEffect> {
|
||||
|
||||
public WoodlandSleuthEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "return a creature card at random from your graveyard to your hand";
|
||||
}
|
||||
|
||||
public WoodlandSleuthEffect(final WoodlandSleuthEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WoodlandSleuthEffect copy() {
|
||||
return new WoodlandSleuthEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Card[] cards = player.getGraveyard().getCards(new FilterCreatureCard(), game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, true);
|
||||
game.informPlayers(card.getName() + "returned to the hand of" + player.getName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
107
Mage.Sets/src/mage/sets/riseoftheeldrazi/SurrealMemoir.java
Normal file
107
Mage.Sets/src/mage/sets/riseoftheeldrazi/SurrealMemoir.java
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* 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.riseoftheeldrazi;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.ReboundAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class SurrealMemoir extends CardImpl<SurrealMemoir> {
|
||||
|
||||
public SurrealMemoir(UUID ownerId) {
|
||||
super(ownerId, 167, "Surreal Memoir", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Return an instant card at random from your graveyard to your hand.
|
||||
this.getSpellAbility().addEffect(new SurrealMemoirEffect());
|
||||
this.addAbility(new ReboundAbility());
|
||||
}
|
||||
|
||||
public SurrealMemoir(final SurrealMemoir card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurrealMemoir copy() {
|
||||
return new SurrealMemoir(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SurrealMemoirEffect extends OneShotEffect<SurrealMemoirEffect> {
|
||||
|
||||
public SurrealMemoirEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "Return an instant card at random from your graveyard to your hand";
|
||||
}
|
||||
|
||||
public SurrealMemoirEffect(final SurrealMemoirEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurrealMemoirEffect copy() {
|
||||
return new SurrealMemoirEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
FilterCard filter = new FilterCard("instant card");
|
||||
filter.getCardType().add(CardType.INSTANT);
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, true);
|
||||
game.informPlayers(card.getName() + "returned to the hand of" + player.getName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
97
Mage.Sets/src/mage/sets/shadowmoor/FossilFind.java
Normal file
97
Mage.Sets/src/mage/sets/shadowmoor/FossilFind.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.sets.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class FossilFind extends CardImpl<FossilFind> {
|
||||
|
||||
public FossilFind(UUID ownerId) {
|
||||
super(ownerId, 206, "Fossil Find", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R/G}");
|
||||
this.expansionSetCode = "SHM";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Return a card at random from your graveyard to your hand, then reorder your graveyard as you choose.
|
||||
}
|
||||
|
||||
public FossilFind(final FossilFind card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FossilFind copy() {
|
||||
return new FossilFind(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FossilFindEffect extends OneShotEffect<FossilFindEffect> {
|
||||
|
||||
public FossilFindEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "Return a card at random from your graveyard to your hand, then reorder your graveyard as you choose";
|
||||
}
|
||||
|
||||
public FossilFindEffect(final FossilFindEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FossilFindEffect copy() {
|
||||
return new FossilFindEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null && !player.getGraveyard().isEmpty()) {
|
||||
Card card = player.getGraveyard().getRandom(game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, true);
|
||||
game.informPlayers(card.getName() + "returned to the hand of" + player.getName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue