mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[NPH] Blind Zealot; Fresh Meat; Phyrexian Ingester; Postmortem Lunge
[ROE] Brood Birthing [LRW] Gilt-Leaf Seer; Immaculate Magistrate; Scarred Vinebreeder; Warren-Scourge Elf
This commit is contained in:
parent
a63cebc455
commit
0d5f71635d
9 changed files with 1079 additions and 0 deletions
134
Mage.Sets/src/mage/sets/lorwyn/GiltLeafSeer.java
Normal file
134
Mage.Sets/src/mage/sets/lorwyn/GiltLeafSeer.java
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.lorwyn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
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.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class GiltLeafSeer extends CardImpl<GiltLeafSeer> {
|
||||
|
||||
public GiltLeafSeer(UUID ownerId) {
|
||||
super(ownerId, 215, "Gilt-Leaf Seer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "LRW";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Shaman");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {G}, {tap}: Look at the top two cards of your library, then put them back in any order.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GiltLeafSeerEffect(), new ManaCostsImpl("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public GiltLeafSeer(final GiltLeafSeer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiltLeafSeer copy() {
|
||||
return new GiltLeafSeer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GiltLeafSeerEffect extends OneShotEffect<GiltLeafSeerEffect> {
|
||||
|
||||
public GiltLeafSeerEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "look at the top two cards of your library, then put them back in any order";
|
||||
}
|
||||
|
||||
public GiltLeafSeerEffect(final GiltLeafSeerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiltLeafSeerEffect copy() {
|
||||
return new GiltLeafSeerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
int count = Math.min(player.getLibrary().size(), 2);
|
||||
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);
|
||||
}
|
||||
}
|
||||
player.lookAtCards("Sage Owl", cards, game);
|
||||
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of your 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;
|
||||
}
|
||||
}
|
111
Mage.Sets/src/mage/sets/lorwyn/ImmaculateMagistrate.java
Normal file
111
Mage.Sets/src/mage/sets/lorwyn/ImmaculateMagistrate.java
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.lorwyn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class ImmaculateMagistrate extends CardImpl<ImmaculateMagistrate> {
|
||||
|
||||
public ImmaculateMagistrate(UUID ownerId) {
|
||||
super(ownerId, 219, "Immaculate Magistrate", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "LRW";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Shaman");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {tap}: Put a +1/+1 counter on target creature for each Elf you control.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ImmaculateMagistrateEffect(),
|
||||
new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ImmaculateMagistrate(final ImmaculateMagistrate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmaculateMagistrate copy() {
|
||||
return new ImmaculateMagistrate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ImmaculateMagistrateEffect extends OneShotEffect<ImmaculateMagistrateEffect> {
|
||||
|
||||
public ImmaculateMagistrateEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "Put a +1/+1 counter on target creature for each Elf you control";
|
||||
}
|
||||
|
||||
public ImmaculateMagistrateEffect(final ImmaculateMagistrateEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmaculateMagistrateEffect copy() {
|
||||
return new ImmaculateMagistrateEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
FilterPermanent filter = new FilterPermanent("Elf card");
|
||||
filter.getSubtype().add("Elf");
|
||||
int count = game.getBattlefield().count(filter, source.getControllerId(), game);
|
||||
if (count > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(count), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
82
Mage.Sets/src/mage/sets/lorwyn/ScarredVinebreeder.java
Normal file
82
Mage.Sets/src/mage/sets/lorwyn/ScarredVinebreeder.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.lorwyn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class ScarredVinebreeder extends CardImpl<ScarredVinebreeder> {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Elf card");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Elf");
|
||||
}
|
||||
|
||||
public ScarredVinebreeder(UUID ownerId) {
|
||||
super(ownerId, 138, "Scarred Vinebreeder", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.expansionSetCode = "LRW";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Shaman");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {2}{B}, Exile an Elf card from your graveyard: Scarred Vinebreeder gets +3/+3 until end of turn.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(3, 3, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{2}{B}"));
|
||||
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ScarredVinebreeder(final ScarredVinebreeder card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScarredVinebreeder copy() {
|
||||
return new ScarredVinebreeder(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/lorwyn/WarrenScourgeElf.java
Normal file
72
Mage.Sets/src/mage/sets/lorwyn/WarrenScourgeElf.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.lorwyn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class WarrenScourgeElf extends CardImpl<WarrenScourgeElf> {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Goblin");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Goblin");
|
||||
}
|
||||
|
||||
public WarrenScourgeElf(UUID ownerId) {
|
||||
super(ownerId, 241, "Warren-Scourge Elf", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.expansionSetCode = "LRW";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Protection from Goblins
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
}
|
||||
|
||||
public WarrenScourgeElf(final WarrenScourgeElf card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WarrenScourgeElf copy() {
|
||||
return new WarrenScourgeElf(this);
|
||||
}
|
||||
}
|
155
Mage.Sets/src/mage/sets/newphyrexia/BlindZealot.java
Normal file
155
Mage.Sets/src/mage/sets/newphyrexia/BlindZealot.java
Normal file
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* 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.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.IntimidateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class BlindZealot extends CardImpl<BlindZealot> {
|
||||
|
||||
public BlindZealot(UUID ownerId) {
|
||||
super(ownerId, 52, "Blind Zealot", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||
this.expansionSetCode = "NPH";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(IntimidateAbility.getInstance());
|
||||
this.addAbility(new BlindZealotTriggeredAbility());
|
||||
}
|
||||
|
||||
public BlindZealot(final BlindZealot card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlindZealot copy() {
|
||||
return new BlindZealot(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BlindZealotTriggeredAbility extends TriggeredAbilityImpl<BlindZealotTriggeredAbility> {
|
||||
|
||||
public BlindZealotTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new BlindZealotEffect(), false);
|
||||
}
|
||||
|
||||
public BlindZealotTriggeredAbility(final BlindZealotTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlindZealotTriggeredAbility copy() {
|
||||
return new BlindZealotTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)
|
||||
&& ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
|
||||
Player player = game.getPlayer(this.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanent(this.getSourceId());
|
||||
|
||||
if (player != null && sourcePermanent != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Do you wish to sacrifice ").append(sourcePermanent.getName());
|
||||
sb.append(" to destroy target creature controlled by ");
|
||||
sb.append(game.getPlayer(event.getTargetId()).getName()).append("?");
|
||||
if (player.chooseUse(Outcome.DestroyPermanent, sb.toString(), game)) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.getControllerId().add(event.getTargetId());
|
||||
filter.setNotController(false);
|
||||
filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getName());
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever Blind Zealot deals combat damage to a player, you may sacrifice it. If you do, destroy target creature that player controls.";
|
||||
}
|
||||
}
|
||||
|
||||
class BlindZealotEffect extends OneShotEffect<BlindZealotEffect> {
|
||||
|
||||
public BlindZealotEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
}
|
||||
|
||||
public BlindZealotEffect(final BlindZealotEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlindZealotEffect copy() {
|
||||
return new BlindZealotEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
||||
|
||||
if (sourcePermanent != null && targetPermanent != null) {
|
||||
if (sourcePermanent.sacrifice(source.getSourceId(), game)) {
|
||||
targetPermanent.destroy(source.getId(), game, false);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
140
Mage.Sets/src/mage/sets/newphyrexia/FreshMeat.java
Normal file
140
Mage.Sets/src/mage/sets/newphyrexia/FreshMeat.java
Normal file
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* 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.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.token.BeastToken;
|
||||
import mage.watchers.WatcherImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class FreshMeat extends CardImpl<FreshMeat> {
|
||||
|
||||
public FreshMeat(UUID ownerId) {
|
||||
super(ownerId, 109, "Fresh Meat", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
this.addWatcher(new FreshMeatWatcher());
|
||||
this.getSpellAbility().addEffect(new FreshMeatEffect());
|
||||
}
|
||||
|
||||
public FreshMeat(final FreshMeat card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreshMeat copy() {
|
||||
return new FreshMeat(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FreshMeatWatcher extends WatcherImpl<FreshMeatWatcher> {
|
||||
|
||||
private int creaturesCount = 0;
|
||||
|
||||
public FreshMeatWatcher() {
|
||||
super("CreaturesDiedFreshMeat");
|
||||
condition = true;
|
||||
}
|
||||
|
||||
public FreshMeatWatcher(final FreshMeatWatcher watcher) {
|
||||
super(watcher);
|
||||
this.creaturesCount = watcher.creaturesCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreshMeatWatcher copy() {
|
||||
return new FreshMeatWatcher(this);
|
||||
}
|
||||
|
||||
public int getCreaturesCount() {
|
||||
return creaturesCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.ZONE_CHANGE
|
||||
&& ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD
|
||||
&& ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) {
|
||||
Card card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||
if (card != null && card.getOwnerId().equals(this.controllerId) && card.getCardType().contains(CardType.CREATURE)) {
|
||||
creaturesCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
creaturesCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
class FreshMeatEffect extends OneShotEffect<FreshMeatEffect> {
|
||||
|
||||
public FreshMeatEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Put a 3/3 green Beast creature token onto the battlefield for each creature put into your graveyard from the battlefield this turn";
|
||||
}
|
||||
|
||||
public FreshMeatEffect(final FreshMeatEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreshMeatEffect copy() {
|
||||
return new FreshMeatEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FreshMeatWatcher watcher = (FreshMeatWatcher) game.getState().getWatchers().get(source.getControllerId(), "CreaturesDiedFreshMeat");
|
||||
int count = watcher.getCreaturesCount();
|
||||
BeastToken token = new BeastToken();
|
||||
for (int i = 0; i < count; i++) {
|
||||
token.putOntoBattlefield(game, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
159
Mage.Sets/src/mage/sets/newphyrexia/PhyrexianIngester.java
Normal file
159
Mage.Sets/src/mage/sets/newphyrexia/PhyrexianIngester.java
Normal file
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
* 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.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class PhyrexianIngester extends CardImpl<PhyrexianIngester> {
|
||||
|
||||
public PhyrexianIngester(UUID ownerId) {
|
||||
super(ownerId, 41, "Phyrexian Ingester", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{U}");
|
||||
this.expansionSetCode = "NPH";
|
||||
this.subtype.add("Beast");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Imprint - When Phyrexian Ingester enters the battlefield, you may exile target nontoken creature.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new PhyrexianIngesterImprintEffect(), true);
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature") {
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent) {
|
||||
if (!super.match(permanent)) {
|
||||
return notFilter;
|
||||
}
|
||||
|
||||
if (permanent instanceof PermanentToken) {
|
||||
return notFilter;
|
||||
}
|
||||
|
||||
return !notFilter;
|
||||
}
|
||||
};
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
// Phyrexian Ingester gets +X/+Y, where X is the exiled creature card's power and Y is its toughness.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PhyrexianIngesterBoostEffect()));
|
||||
}
|
||||
|
||||
public PhyrexianIngester(final PhyrexianIngester card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyrexianIngester copy() {
|
||||
return new PhyrexianIngester(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PhyrexianIngesterImprintEffect extends OneShotEffect<PhyrexianIngesterImprintEffect> {
|
||||
|
||||
public PhyrexianIngesterImprintEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "exile target nontoken creature";
|
||||
}
|
||||
|
||||
public PhyrexianIngesterImprintEffect(final PhyrexianIngesterImprintEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyrexianIngesterImprintEffect copy() {
|
||||
return new PhyrexianIngesterImprintEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
||||
if (targetPermanent != null) {
|
||||
targetPermanent.moveToExile(getId(), "Phyrexian Ingester (Imprint)", source.getSourceId(), game);
|
||||
sourcePermanent.imprint(targetPermanent.getId(), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class PhyrexianIngesterBoostEffect extends ContinuousEffectImpl<PhyrexianIngesterBoostEffect> {
|
||||
|
||||
public PhyrexianIngesterBoostEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
this.staticText = "{this} gets +X/+Y, where X is the exiled creature card's power and Y is its toughness";
|
||||
}
|
||||
|
||||
public PhyrexianIngesterBoostEffect(final PhyrexianIngesterBoostEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyrexianIngesterBoostEffect copy() {
|
||||
return new PhyrexianIngesterBoostEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null && !permanent.getImprinted().isEmpty()) {
|
||||
Card card = game.getCard(permanent.getImprinted().get(0));
|
||||
if (card != null) {
|
||||
permanent.addPower(card.getPower().getValue());
|
||||
permanent.addToughness(card.getToughness().getValue());
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
129
Mage.Sets/src/mage/sets/newphyrexia/PostmortemLunge.java
Normal file
129
Mage.Sets/src/mage/sets/newphyrexia/PostmortemLunge.java
Normal file
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* 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.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.VariableCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class PostmortemLunge extends CardImpl<PostmortemLunge> {
|
||||
|
||||
public PostmortemLunge(UUID ownerId) {
|
||||
super(ownerId, 70, "Postmortem Lunge", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{BP}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new PostmortemLungeEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
||||
}
|
||||
|
||||
public PostmortemLunge(final PostmortemLunge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PostmortemLunge copy() {
|
||||
return new PostmortemLunge(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
Card card = game.getCard(ability.getFirstTarget());
|
||||
if (card != null) {
|
||||
// insert at the beginning (so it will be {2}{B}, not {B}{2})
|
||||
ability.getManaCostsToPay().add(0, new GenericManaCost(card.getManaCost().convertedManaCost()));
|
||||
}
|
||||
// no {X} anymore as we already have chosen the target with defined manacost
|
||||
for (ManaCost cost : ability.getManaCostsToPay()) {
|
||||
if (cost instanceof VariableCost) {
|
||||
cost.setPaid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PostmortemLungeEffect extends OneShotEffect<PostmortemLungeEffect> {
|
||||
|
||||
public PostmortemLungeEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Return target creature card with converted mana cost X from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public PostmortemLungeEffect(final PostmortemLungeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PostmortemLungeEffect copy() {
|
||||
return new PostmortemLungeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getFirstTarget());
|
||||
Player player = game.getPlayer(card.getOwnerId());
|
||||
if (card != null && player != null && player.removeFromGraveyard(card, game)) {
|
||||
card.addAbility(HasteAbility.getInstance());
|
||||
card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getId(), source.getControllerId());
|
||||
|
||||
ExileTargetEffect exileEffect = new ExileTargetEffect();
|
||||
exileEffect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
97
Mage.Sets/src/mage/sets/riseoftheeldrazi/BroodBirthing.java
Normal file
97
Mage.Sets/src/mage/sets/riseoftheeldrazi/BroodBirthing.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.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.EldraziSpawnToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class BroodBirthing extends CardImpl<BroodBirthing> {
|
||||
|
||||
public BroodBirthing(UUID ownerId) {
|
||||
super(ownerId, 138, "Brood Birthing", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new BroodBirthingEffect());
|
||||
}
|
||||
|
||||
public BroodBirthing(final BroodBirthing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BroodBirthing copy() {
|
||||
return new BroodBirthing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BroodBirthingEffect extends OneShotEffect<BroodBirthingEffect> {
|
||||
|
||||
public BroodBirthingEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "If you control an Eldrazi Spawn, put three 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have \"Sacrifice this creature: Add {1} to your mana pool.\" Otherwise, put one of those tokens onto the battlefield";
|
||||
}
|
||||
|
||||
public BroodBirthingEffect(final BroodBirthingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BroodBirthingEffect copy() {
|
||||
return new BroodBirthingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Eldrazi Spawn");
|
||||
filter.getSubtype().add("Eldrazi");
|
||||
filter.getSubtype().add("Spawn");
|
||||
filter.setScopeSubtype(ComparisonScope.All);
|
||||
|
||||
EldraziSpawnToken token = new EldraziSpawnToken();
|
||||
int count = game.getBattlefield().countAll(filter, source.getControllerId()) > 0 ? 3 : 1;
|
||||
for (int i = 0; i < count; i++) {
|
||||
token.putOntoBattlefield(game, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue