mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
[NPH] Arm with AEther, Brutalizer Exarch, Due Respect, Geosurge, Leeching Bite, Pshychic Surgery, Remember the Fallen, Soul Conduit
[ZEN] Cosi's Trickster, Warren Instigator
This commit is contained in:
parent
8737722e90
commit
120468f8ca
10 changed files with 1184 additions and 0 deletions
104
Mage.Sets/src/mage/sets/newphyrexia/ArmWithAEther.java
Normal file
104
Mage.Sets/src/mage/sets/newphyrexia/ArmWithAEther.java
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class ArmWithAEther extends CardImpl<ArmWithAEther> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Creatures you control");
|
||||
|
||||
public ArmWithAEther(UUID ownerId) {
|
||||
super(ownerId, 28, "Arm with AEther", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(new ArmWithAEtherTriggeredAbility(), Duration.EndOfTurn, filter));
|
||||
}
|
||||
|
||||
public ArmWithAEther(final ArmWithAEther card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmWithAEther copy() {
|
||||
return new ArmWithAEther(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArmWithAEtherTriggeredAbility extends TriggeredAbilityImpl<ArmWithAEtherTriggeredAbility> {
|
||||
|
||||
public ArmWithAEtherTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), true);
|
||||
}
|
||||
|
||||
public ArmWithAEtherTriggeredAbility(final ArmWithAEtherTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmWithAEtherTriggeredAbility copy() {
|
||||
return new ArmWithAEtherTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null && event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
filter.getControllerId().add(opponent.getId());
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever this creature deals damage to an opponent, you may return target creature that player controls to its owner's hand.";
|
||||
}
|
||||
}
|
158
Mage.Sets/src/mage/sets/newphyrexia/BrutalizerExarch.java
Normal file
158
Mage.Sets/src/mage/sets/newphyrexia/BrutalizerExarch.java
Normal file
|
@ -0,0 +1,158 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
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.Mode;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class BrutalizerExarch extends CardImpl<BrutalizerExarch> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
|
||||
|
||||
static {
|
||||
filter.getNotCardType().add(CardType.CREATURE);
|
||||
}
|
||||
|
||||
public BrutalizerExarch(UUID ownerId) {
|
||||
super(ownerId, 105, "Brutalizer Exarch", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{G}");
|
||||
this.expansionSetCode = "NPH";
|
||||
this.subtype.add("Cleric");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BrutalizerExarchEffect1());
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new BrutalizerExarchEffect2());
|
||||
mode.getTargets().add(new TargetPermanent(filter));
|
||||
ability.addMode(mode);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public BrutalizerExarch(final BrutalizerExarch card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrutalizerExarch copy() {
|
||||
return new BrutalizerExarch(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BrutalizerExarchEffect1 extends OneShotEffect<BrutalizerExarchEffect1> {
|
||||
|
||||
public BrutalizerExarchEffect1() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Search your library for a creature card, reveal it, then shuffle your library and put that card on top of it";
|
||||
}
|
||||
|
||||
public BrutalizerExarchEffect1(final BrutalizerExarchEffect1 effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrutalizerExarchEffect1 copy() {
|
||||
return new BrutalizerExarchEffect1(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard("creature card in your library"));
|
||||
target.setRequired(true);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
player.revealCards("Brutalizer Exarch", cards, game);
|
||||
player.shuffleLibrary(game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class BrutalizerExarchEffect2 extends OneShotEffect<BrutalizerExarchEffect2> {
|
||||
|
||||
public BrutalizerExarchEffect2() {
|
||||
super(Outcome.Removal);
|
||||
this.staticText = "put target noncreature permanent on the bottom of its owner's library";
|
||||
}
|
||||
|
||||
public BrutalizerExarchEffect2(final BrutalizerExarchEffect2 effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrutalizerExarchEffect2 copy() {
|
||||
return new BrutalizerExarchEffect2(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
Player player = game.getPlayer(permanent.getOwnerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return permanent.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
108
Mage.Sets/src/mage/sets/newphyrexia/DueRespect.java
Normal file
108
Mage.Sets/src/mage/sets/newphyrexia/DueRespect.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class DueRespect extends CardImpl<DueRespect> {
|
||||
|
||||
public DueRespect(UUID ownerId) {
|
||||
super(ownerId, 8, "Due Respect", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Permanents enter the battlefield tapped this turn.
|
||||
this.getSpellAbility().addEffect(new DueRespectEffect());
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(1));
|
||||
}
|
||||
|
||||
public DueRespect(final DueRespect card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DueRespect copy() {
|
||||
return new DueRespect(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DueRespectEffect extends ReplacementEffectImpl<DueRespectEffect> {
|
||||
|
||||
DueRespectEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Tap);
|
||||
staticText = "Permanents enter the battlefield tapped this turn";
|
||||
}
|
||||
|
||||
DueRespectEffect(final DueRespectEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DueRespectEffect copy() {
|
||||
return new DueRespectEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null) {
|
||||
permanent.setTapped(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
}
|
86
Mage.Sets/src/mage/sets/newphyrexia/Geosurge.java
Normal file
86
Mage.Sets/src/mage/sets/newphyrexia/Geosurge.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ConditionalMana;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Geosurge extends CardImpl<Geosurge> {
|
||||
|
||||
public Geosurge(UUID ownerId) {
|
||||
super(ownerId, 85, "Geosurge", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R}{R}{R}{R}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new BasicManaEffect(new GeosurgeConditionalMana()));
|
||||
}
|
||||
|
||||
public Geosurge(final Geosurge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Geosurge copy() {
|
||||
return new Geosurge(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GeosurgeConditionalMana extends ConditionalMana {
|
||||
|
||||
public GeosurgeConditionalMana() {
|
||||
super(Mana.RedMana(7));
|
||||
staticText = "Spend this mana only to cast artifact or creature spells";
|
||||
addCondition(new GeosurgeManaCondition());
|
||||
}
|
||||
}
|
||||
|
||||
class GeosurgeManaCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null && (card.getCardType().contains(CardType.ARTIFACT) || card.getCardType().contains(CardType.CREATURE))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
100
Mage.Sets/src/mage/sets/newphyrexia/LeechingBite.java
Normal file
100
Mage.Sets/src/mage/sets/newphyrexia/LeechingBite.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
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.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class LeechingBite extends CardImpl<LeechingBite> {
|
||||
|
||||
public LeechingBite(UUID ownerId) {
|
||||
super(ownerId, 113, "Leeching Bite", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new LeechingBiteEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2));
|
||||
}
|
||||
|
||||
public LeechingBite(final LeechingBite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeechingBite copy() {
|
||||
return new LeechingBite(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LeechingBiteEffect extends ContinuousEffectImpl<LeechingBiteEffect> {
|
||||
|
||||
public LeechingBiteEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
this.staticText = "Target creature gets +1/+1 until end of turn. Another target creature gets -1/-1 until end of turn";
|
||||
}
|
||||
|
||||
public LeechingBiteEffect(final LeechingBiteEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeechingBiteEffect copy() {
|
||||
return new LeechingBiteEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.addPower(1);
|
||||
permanent.addToughness(1);
|
||||
}
|
||||
permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
|
||||
if (permanent != null) {
|
||||
permanent.addPower(-1);
|
||||
permanent.addToughness(-1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
167
Mage.Sets/src/mage/sets/newphyrexia/PsychicSurgery.java
Normal file
167
Mage.Sets/src/mage/sets/newphyrexia/PsychicSurgery.java
Normal file
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
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.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class PsychicSurgery extends CardImpl<PsychicSurgery> {
|
||||
|
||||
public PsychicSurgery(UUID ownerId) {
|
||||
super(ownerId, 44, "Psychic Surgery", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
this.addAbility(new PsychicSurgeryTriggeredAbility());
|
||||
}
|
||||
|
||||
public PsychicSurgery(final PsychicSurgery card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsychicSurgery copy() {
|
||||
return new PsychicSurgery(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PsychicSurgeryTriggeredAbility extends TriggeredAbilityImpl<PsychicSurgeryTriggeredAbility> {
|
||||
|
||||
public PsychicSurgeryTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new PsychicSurgeryEffect(), true);
|
||||
}
|
||||
|
||||
public PsychicSurgeryTriggeredAbility(final PsychicSurgeryTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsychicSurgeryTriggeredAbility copy() {
|
||||
return new PsychicSurgeryTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.LIBRARY_SHUFFLED && game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
||||
this.getEffects().get(0).setValue("PsychicSurgeryOpponent", event.getPlayerId());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent shuffles his or her library, you may look at the top two cards of that library. You may exile one of those cards. Then put the rest on top of that library in any order.";
|
||||
}
|
||||
}
|
||||
|
||||
class PsychicSurgeryEffect extends OneShotEffect<PsychicSurgeryEffect> {
|
||||
|
||||
public PsychicSurgeryEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "look at the top two cards of that library. You may exile one of those cards. Then put the rest on top of that library in any order";
|
||||
}
|
||||
|
||||
public PsychicSurgeryEffect(final PsychicSurgeryEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsychicSurgeryEffect copy() {
|
||||
return new PsychicSurgeryEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
UUID opponentId = (UUID) this.getValue("PsychicSurgeryOpponent");
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
|
||||
if (player != null && opponent != null) {
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
int count = Math.min(player.getLibrary().size(), 2);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = opponent.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
player.lookAtCards("Psychic Surgery", cards, game);
|
||||
|
||||
if (!cards.isEmpty() && player.chooseUse(Outcome.Exile, "Do you wish to exile a card?", game)) {
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to exile"));
|
||||
if (player.choose(Outcome.Exile, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.EXILED, source.getId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on top of his library"));
|
||||
target.setRequired(true);
|
||||
while (cards.size() > 1) {
|
||||
player.choose(Outcome.Neutral, cards, target, game);
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
|
||||
}
|
||||
target.clearChosen();
|
||||
}
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.get(cards.iterator().next(), game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
117
Mage.Sets/src/mage/sets/newphyrexia/RememberTheFallen.java
Normal file
117
Mage.Sets/src/mage/sets/newphyrexia/RememberTheFallen.java
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
import java.util.List;
|
||||
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.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class RememberTheFallen extends CardImpl<RememberTheFallen> {
|
||||
|
||||
private static final FilterCreatureCard filterCreature = new FilterCreatureCard();
|
||||
private static final FilterArtifactCard filterArtifact = new FilterArtifactCard();
|
||||
|
||||
public RememberTheFallen(UUID ownerId) {
|
||||
super(ownerId, 21, "Remember the Fallen", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filterCreature));
|
||||
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new ReturnToHandTargetEffect());
|
||||
mode.getTargets().add(new TargetCardInYourGraveyard(filterArtifact));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
mode = new Mode();
|
||||
mode.getTargets().add(new TargetCardInYourGraveyard(filterCreature));
|
||||
mode.getTargets().add(new TargetCardInYourGraveyard(filterArtifact));
|
||||
mode.getEffects().add(new RememberTheFallenEffect());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
public RememberTheFallen(final RememberTheFallen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RememberTheFallen copy() {
|
||||
return new RememberTheFallen(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RememberTheFallenEffect extends OneShotEffect<RememberTheFallenEffect> {
|
||||
|
||||
public RememberTheFallenEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "Return target creature card and target artifact card from your graveyard to your hand";
|
||||
}
|
||||
|
||||
public RememberTheFallenEffect(final RememberTheFallenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RememberTheFallenEffect copy() {
|
||||
return new RememberTheFallenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Target target : source.getTargets()) {
|
||||
List<UUID> targets = target.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
102
Mage.Sets/src/mage/sets/newphyrexia/SoulConduit.java
Normal file
102
Mage.Sets/src/mage/sets/newphyrexia/SoulConduit.java
Normal file
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* 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.newphyrexia;
|
||||
|
||||
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.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class SoulConduit extends CardImpl<SoulConduit> {
|
||||
|
||||
public SoulConduit(UUID ownerId) {
|
||||
super(ownerId, 158, "Soul Conduit", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
// {6}, {tap}: Two target players exchange life totals.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulConduitEffect(), new GenericManaCost(6));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SoulConduit(final SoulConduit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulConduit copy() {
|
||||
return new SoulConduit(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoulConduitEffect extends OneShotEffect<SoulConduitEffect> {
|
||||
|
||||
public SoulConduitEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "Two target players exchange life totals";
|
||||
}
|
||||
|
||||
public SoulConduitEffect(final SoulConduitEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulConduitEffect copy() {
|
||||
return new SoulConduitEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player1 = game.getPlayer(source.getFirstTarget());
|
||||
Player player2 = game.getPlayer(source.getTargets().get(1).getFirstTarget());
|
||||
if (player1 != null && player2 != null) {
|
||||
int lifePlayer1 = player1.getLife();
|
||||
int lifePlayer2 = player2.getLife();
|
||||
|
||||
player1.setLife(lifePlayer2, game);
|
||||
player2.setLife(lifePlayer1, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
98
Mage.Sets/src/mage/sets/zendikar/CosisTrickster.java
Normal file
98
Mage.Sets/src/mage/sets/zendikar/CosisTrickster.java
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE 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.zendikar;
|
||||
|
||||
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.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class CosisTrickster extends CardImpl<CosisTrickster> {
|
||||
|
||||
public CosisTrickster(UUID ownerId) {
|
||||
super(ownerId, 45, "Cosi's Trickster", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.subtype.add("Merfolk");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new CosisTricksterTriggeredAbility());
|
||||
}
|
||||
|
||||
public CosisTrickster(final CosisTrickster card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CosisTrickster copy() {
|
||||
return new CosisTrickster(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CosisTricksterTriggeredAbility extends TriggeredAbilityImpl<CosisTricksterTriggeredAbility> {
|
||||
|
||||
public CosisTricksterTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true);
|
||||
}
|
||||
|
||||
public CosisTricksterTriggeredAbility(final CosisTricksterTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CosisTricksterTriggeredAbility copy() {
|
||||
return new CosisTricksterTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.LIBRARY_SHUFFLED && game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent shuffles his or her library, you may put a +1/+1 counter on {this}.";
|
||||
}
|
||||
}
|
144
Mage.Sets/src/mage/sets/zendikar/WarrenInstigator.java
Normal file
144
Mage.Sets/src/mage/sets/zendikar/WarrenInstigator.java
Normal file
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.zendikar;
|
||||
|
||||
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.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class WarrenInstigator extends CardImpl<WarrenInstigator> {
|
||||
|
||||
public WarrenInstigator(UUID ownerId) {
|
||||
super(ownerId, 154, "Warren Instigator", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{R}{R}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.subtype.add("Goblin");
|
||||
this.subtype.add("Berserker");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(DoubleStrikeAbility.getInstance());
|
||||
this.addAbility(new WarrenInstigatorTriggeredAbility());
|
||||
}
|
||||
|
||||
public WarrenInstigator(final WarrenInstigator card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WarrenInstigator copy() {
|
||||
return new WarrenInstigator(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WarrenInstigatorTriggeredAbility extends TriggeredAbilityImpl<WarrenInstigatorTriggeredAbility> {
|
||||
|
||||
public WarrenInstigatorTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new WarrenInstigatorEffect(), true);
|
||||
}
|
||||
|
||||
public WarrenInstigatorTriggeredAbility(final WarrenInstigatorTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WarrenInstigatorTriggeredAbility copy() {
|
||||
return new WarrenInstigatorTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)
|
||||
&& game.getOpponents(this.getControllerId()).contains(event.getTargetId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} deals damage to an opponent, you may put a Goblin creature card from your hand onto the battlefield.";
|
||||
}
|
||||
}
|
||||
|
||||
class WarrenInstigatorEffect extends OneShotEffect<WarrenInstigatorEffect> {
|
||||
|
||||
public WarrenInstigatorEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "you may put a Goblin creature card from your hand onto the battlefield";
|
||||
}
|
||||
|
||||
public WarrenInstigatorEffect(final WarrenInstigatorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WarrenInstigatorEffect copy() {
|
||||
return new WarrenInstigatorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FilterCreatureCard filter = new FilterCreatureCard("Goblin creature card from your hand");
|
||||
filter.getSubtype().add("Goblin");
|
||||
TargetCardInHand target = new TargetCardInHand(filter);
|
||||
if (player.choose(Outcome.PutCreatureInPlay, target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.removeFromHand(card, game);
|
||||
card.putOntoBattlefield(game, Zone.HAND, source.getId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue