mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added 5 cards.
This commit is contained in:
parent
3d292c3495
commit
0e40fb41dd
11 changed files with 612 additions and 11 deletions
52
Mage.Sets/src/mage/sets/ajanivsnicolbolas/Recoil.java
Normal file
52
Mage.Sets/src/mage/sets/ajanivsnicolbolas/Recoil.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.ajanivsnicolbolas;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Recoil extends mage.sets.invasion.Recoil {
|
||||
|
||||
public Recoil(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 61;
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
public Recoil(final Recoil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recoil copy() {
|
||||
return new Recoil(this);
|
||||
}
|
||||
}
|
118
Mage.Sets/src/mage/sets/apocalypse/WhirlpoolDrake.java
Normal file
118
Mage.Sets/src/mage/sets/apocalypse/WhirlpoolDrake.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* 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;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class WhirlpoolDrake extends CardImpl {
|
||||
|
||||
public WhirlpoolDrake(UUID ownerId) {
|
||||
super(ownerId, 34, "Whirlpool Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.expansionSetCode = "APC";
|
||||
this.subtype.add("Drake");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Whirlpool Drake enters the battlefield, shuffle the cards from your hand into your library, then draw that many cards.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new WhirlpoolSDrakeTriggeredEffect(), false));
|
||||
|
||||
// When Whirlpool Drake dies, shuffle the cards from your hand into your library, then draw that many cards.
|
||||
this.addAbility(new DiesTriggeredAbility(new WhirlpoolSDrakeTriggeredEffect(), false));
|
||||
}
|
||||
|
||||
public WhirlpoolDrake(final WhirlpoolDrake card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WhirlpoolDrake copy() {
|
||||
return new WhirlpoolDrake(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WhirlpoolSDrakeTriggeredEffect extends OneShotEffect {
|
||||
|
||||
public WhirlpoolSDrakeTriggeredEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "shuffle the cards from your hand into your library, then draw that many cards";
|
||||
}
|
||||
|
||||
public WhirlpoolSDrakeTriggeredEffect(final WhirlpoolSDrakeTriggeredEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WhirlpoolSDrakeTriggeredEffect copy() {
|
||||
return new WhirlpoolSDrakeTriggeredEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int cardsHand = controller.getHand().size();
|
||||
if (cardsHand > 0){
|
||||
Cards cards = controller.getHand();
|
||||
for (UUID cardId: cards) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
controller.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(game);
|
||||
controller.drawCards(cardsHand, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -99,13 +99,13 @@ class WhirlpoolRiderTriggeredEffect extends OneShotEffect {
|
|||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
controller.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(game);
|
||||
controller.drawCards(cardsHand, game);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
71
Mage.Sets/src/mage/sets/coldsnap/IntoTheNorth.java
Normal file
71
Mage.Sets/src/mage/sets/coldsnap/IntoTheNorth.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.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class IntoTheNorth extends CardImpl {
|
||||
|
||||
private static final FilterLandCard filter = new FilterLandCard("snow land card");
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Snow"));
|
||||
}
|
||||
|
||||
public IntoTheNorth(UUID ownerId) {
|
||||
super(ownerId, 111, "Into the North", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
this.expansionSetCode = "CSP";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Search your library for a snow land card and put it onto the battlefield tapped. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true, Outcome.PutLandInPlay));
|
||||
|
||||
}
|
||||
|
||||
public IntoTheNorth(final IntoTheNorth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntoTheNorth copy() {
|
||||
return new IntoTheNorth(this);
|
||||
}
|
||||
}
|
87
Mage.Sets/src/mage/sets/coldsnap/StromgaldCrusader.java
Normal file
87
Mage.Sets/src/mage/sets/coldsnap/StromgaldCrusader.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class StromgaldCrusader extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("White");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public StromgaldCrusader(UUID ownerId) {
|
||||
super(ownerId, 71, "Stromgald Crusader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}{B}");
|
||||
this.expansionSetCode = "CSP";
|
||||
this.subtype.add("Zombie");
|
||||
this.subtype.add("Knight");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Protection from white
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
|
||||
// {B}: Stromgald Crusader gains flying until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{B}")));
|
||||
|
||||
// {B}{B}: Stromgald Crusader gets +1/+0 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{B}{B}")));
|
||||
}
|
||||
|
||||
public StromgaldCrusader(final StromgaldCrusader card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StromgaldCrusader copy() {
|
||||
return new StromgaldCrusader(this);
|
||||
}
|
||||
}
|
169
Mage.Sets/src/mage/sets/dissension/RiseFall.java
Normal file
169
Mage.Sets/src/mage/sets/dissension/RiseFall.java
Normal file
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class RiseFall extends SplitCard {
|
||||
|
||||
public RiseFall(UUID ownerId) {
|
||||
super(ownerId, 156, "Rise", "Fall", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{U}{B}","{B}{R}", false );
|
||||
this.expansionSetCode = "DIS";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setRed(true);
|
||||
|
||||
// Rise
|
||||
// Return target creature card from a graveyard and target creature on the battlefield to their owners' hands.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new RiseEffect());
|
||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
|
||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
getLeftHalfCard().getColor().setBlue(true);
|
||||
getLeftHalfCard().getColor().setBlack(true);
|
||||
|
||||
// Fall
|
||||
// Target player reveals two cards at random from his or her hand, then discards each nonland card revealed this way.
|
||||
getRightHalfCard().getSpellAbility().addEffect(new FallEffect());
|
||||
getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer());
|
||||
getLeftHalfCard().getColor().setBlack(true);
|
||||
getLeftHalfCard().getColor().setRed(true);
|
||||
}
|
||||
|
||||
public RiseFall(final RiseFall card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RiseFall copy() {
|
||||
return new RiseFall(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RiseEffect extends OneShotEffect {
|
||||
|
||||
public RiseEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "Return target creature card from a graveyard and target creature on the battlefield to their owners' hands";
|
||||
}
|
||||
|
||||
public RiseEffect(final RiseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RiseEffect copy() {
|
||||
return new RiseEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Card cardInGraveyard = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
if (cardInGraveyard != null) {
|
||||
controller.moveCardToHandWithInfo(cardInGraveyard, source.getSourceId(), game, Zone.GRAVEYARD);
|
||||
}
|
||||
Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (permanent != null) {
|
||||
controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class FallEffect extends OneShotEffect {
|
||||
|
||||
public FallEffect() {
|
||||
super(Outcome.Discard);
|
||||
this.staticText = "Target player reveals two cards at random from his or her hand, then discards each nonland card revealed this way";
|
||||
}
|
||||
|
||||
public FallEffect(final FallEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FallEffect copy() {
|
||||
return new FallEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null) {
|
||||
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (targetPlayer != null) {
|
||||
if (targetPlayer.getHand().size() > 0) {
|
||||
Cards cards = new CardsImpl();
|
||||
Card card = targetPlayer.getHand().getRandom(game);
|
||||
cards.add(card);
|
||||
if (targetPlayer.getHand().size() > 1) {
|
||||
do {
|
||||
card = targetPlayer.getHand().getRandom(game);
|
||||
} while (!cards.contains(card.getId()));
|
||||
cards.add(card);
|
||||
}
|
||||
targetPlayer.revealCards(sourceObject.getLogName(), cards, game);
|
||||
for (Card cardToDiscard: cards.getCards(game)) {
|
||||
if (!card.getCardType().contains(CardType.LAND)) {
|
||||
targetPlayer.discard(cardToDiscard, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -82,7 +82,7 @@ class TakeEffect extends OneShotEffect {
|
|||
|
||||
public TakeEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Remove all +1/+1 counters from target creature you control. Draw that many cards.";
|
||||
this.staticText = "Remove all +1/+1 counters from target creature you control. Draw that many cards";
|
||||
}
|
||||
|
||||
public TakeEffect(final TakeEffect effect) {
|
||||
|
|
|
@ -94,13 +94,14 @@ class DinrovaHorrorEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(target.getControllerId());
|
||||
if (target != null && controller != null) {
|
||||
target.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
controller.discard(1, source, game);
|
||||
return true;
|
||||
if (target != null) {
|
||||
Player controller = game.getPlayer(target.getControllerId());
|
||||
if (controller != null) {
|
||||
controller.moveCardToHandWithInfo(target, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||
controller.discard(1, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
101
Mage.Sets/src/mage/sets/invasion/Recoil.java
Normal file
101
Mage.Sets/src/mage/sets/invasion/Recoil.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.invasion;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Recoil extends CardImpl {
|
||||
|
||||
public Recoil(UUID ownerId) {
|
||||
super(ownerId, 264, "Recoil", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{B}");
|
||||
this.expansionSetCode = "INV";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Return target permanent to its owner's hand. Then that player discards a card.
|
||||
this.getSpellAbility().addEffect(new RecoilEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent());
|
||||
|
||||
}
|
||||
|
||||
public Recoil(final Recoil card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recoil copy() {
|
||||
return new Recoil(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RecoilEffect extends OneShotEffect {
|
||||
|
||||
public RecoilEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "return target permanent to its owner's hand. Then that player discards a card";
|
||||
}
|
||||
|
||||
public RecoilEffect(final RecoilEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecoilEffect copy() {
|
||||
return new RecoilEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (target != null) {
|
||||
Player controller = game.getPlayer(target.getControllerId());
|
||||
if (controller != null) {
|
||||
controller.moveCardToHandWithInfo(target, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||
controller.discard(1, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -107,13 +107,13 @@ class WhirlpoolWarriorTriggeredEffect extends OneShotEffect {
|
|||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
controller.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(game);
|
||||
controller.drawCards(cardsHand, game);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -44,6 +44,8 @@ public class Boomerang extends CardImpl {
|
|||
super(ownerId, 70, "Boomerang", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{U}");
|
||||
this.expansionSetCode = "10E";
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Return target permanent to its owner's hand.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue