mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[ROE] 5 cards
This commit is contained in:
parent
e96c47728b
commit
e18efae6bc
5 changed files with 579 additions and 0 deletions
111
Mage.Sets/src/mage/sets/riseoftheeldrazi/AuraFinesse.java
Normal file
111
Mage.Sets/src/mage/sets/riseoftheeldrazi/AuraFinesse.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.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterEnchantment;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class AuraFinesse extends CardImpl<AuraFinesse> {
|
||||
|
||||
private static final FilterEnchantment filter = new FilterEnchantment("Aura you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new SubtypePredicate("Aura"));
|
||||
}
|
||||
|
||||
public AuraFinesse(UUID ownerId) {
|
||||
super(ownerId, 54, "Aura Finesse", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Attach target Aura you control to target creature.
|
||||
this.getSpellAbility().addEffect(new AuraFinesseEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(1));
|
||||
}
|
||||
|
||||
public AuraFinesse(final AuraFinesse card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuraFinesse copy() {
|
||||
return new AuraFinesse(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AuraFinesseEffect extends OneShotEffect<AuraFinesseEffect> {
|
||||
|
||||
public AuraFinesseEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "Attach target Aura you control to target creature";
|
||||
}
|
||||
|
||||
public AuraFinesseEffect(final AuraFinesseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuraFinesseEffect copy() {
|
||||
return new AuraFinesseEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent aura = game.getPermanent(source.getFirstTarget());
|
||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (aura != null && creature != null) {
|
||||
aura.attachTo(creature.getId(), game);
|
||||
creature.addAttachment(aura.getId(), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
112
Mage.Sets/src/mage/sets/riseoftheeldrazi/Oust.java
Normal file
112
Mage.Sets/src/mage/sets/riseoftheeldrazi/Oust.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
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.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Oust extends CardImpl<Oust> {
|
||||
|
||||
public Oust(UUID ownerId) {
|
||||
super(ownerId, 40, "Oust", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{W}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Put target creature into its owner's library second from the top. Its controller gains 3 life.
|
||||
this.getSpellAbility().addEffect(new OustEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public Oust(final Oust card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Oust copy() {
|
||||
return new Oust(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OustEffect extends OneShotEffect<OustEffect> {
|
||||
|
||||
public OustEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Put target creature into its owner's library second from the top. Its controller gains 3 life";
|
||||
}
|
||||
|
||||
public OustEffect(final OustEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OustEffect copy() {
|
||||
return new OustEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
Player owner = game.getPlayer(permanent.getOwnerId());
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (owner == null || controller == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Card card = null;
|
||||
if (owner.getLibrary().size() > 0) {
|
||||
card = owner.getLibrary().removeFromTop(game);
|
||||
}
|
||||
|
||||
permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
if (card != null) {
|
||||
owner.getLibrary().putOnTop(card, game);
|
||||
}
|
||||
controller.gainLife(3, game);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
173
Mage.Sets/src/mage/sets/riseoftheeldrazi/RealmsUncharted.java
Normal file
173
Mage.Sets/src/mage/sets/riseoftheeldrazi/RealmsUncharted.java
Normal file
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
* 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.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.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class RealmsUncharted extends CardImpl<RealmsUncharted> {
|
||||
|
||||
public RealmsUncharted(UUID ownerId) {
|
||||
super(ownerId, 206, "Realms Uncharted", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Search your library for four land cards with different names and reveal them. An opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest into your hand. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new RealmsUnchartedEffect());
|
||||
}
|
||||
|
||||
public RealmsUncharted(final RealmsUncharted card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealmsUncharted copy() {
|
||||
return new RealmsUncharted(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RealmsUnchartedEffect extends OneShotEffect<RealmsUnchartedEffect> {
|
||||
|
||||
public RealmsUnchartedEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Search your library for four land cards with different names and reveal them. An opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest into your hand. Then shuffle your library";
|
||||
}
|
||||
|
||||
public RealmsUnchartedEffect(final RealmsUnchartedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealmsUnchartedEffect copy() {
|
||||
return new RealmsUnchartedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
RealmsUnchartedTarget target = new RealmsUnchartedTarget();
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Cards cards = new CardsImpl();
|
||||
for (UUID cardId : (List<UUID>) target.getTargets()) {
|
||||
Card card = player.getLibrary().remove(cardId, game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
player.revealCards("Realms Uncharted", cards, game);
|
||||
|
||||
CardsImpl cardsToKeep = new CardsImpl();
|
||||
if (cards.size() > 2) {
|
||||
cardsToKeep.addAll(cards);
|
||||
|
||||
Player opponent = game.getPlayer(game.getOpponents(player.getId()).iterator().next());
|
||||
TargetCard targetDiscard = new TargetCard(2, Zone.PICK, new FilterCard("cards to put in graveyard"));
|
||||
targetDiscard.setRequired(true);
|
||||
if (opponent != null && opponent.choose(Outcome.Discard, cards, targetDiscard, game)) {
|
||||
cardsToKeep.removeAll(targetDiscard.getTargets());
|
||||
cards.removeAll(cardsToKeep);
|
||||
}
|
||||
}
|
||||
|
||||
for (UUID cardId : cards) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
for (UUID cardId : cardsToKeep) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class RealmsUnchartedTarget extends TargetCardInLibrary {
|
||||
|
||||
public RealmsUnchartedTarget() {
|
||||
super(0, 4, new FilterLandCard("land cards with different names"));
|
||||
}
|
||||
|
||||
public RealmsUnchartedTarget(final RealmsUnchartedTarget target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealmsUnchartedTarget copy() {
|
||||
return new RealmsUnchartedTarget(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTarget(UUID id, Cards cards, Game game) {
|
||||
Card card = cards.get(id, game);
|
||||
if (card != null) {
|
||||
for (UUID targetId : this.getTargets()) {
|
||||
Card iCard = game.getCard(targetId);
|
||||
if (iCard != null && iCard.getName().equals(card.getName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return filter.match(card, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
118
Mage.Sets/src/mage/sets/riseoftheeldrazi/ReinforcedBulwark.java
Normal file
118
Mage.Sets/src/mage/sets/riseoftheeldrazi/ReinforcedBulwark.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
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.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class ReinforcedBulwark extends CardImpl<ReinforcedBulwark> {
|
||||
|
||||
public ReinforcedBulwark(UUID ownerId) {
|
||||
super(ownerId, 223, "Reinforced Bulwark", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.subtype.add("Wall");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
// {tap}: Prevent the next 1 damage that would be dealt to you this turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReinforcedBulwarkEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public ReinforcedBulwark(final ReinforcedBulwark card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReinforcedBulwark copy() {
|
||||
return new ReinforcedBulwark(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ReinforcedBulwarkEffect extends PreventionEffectImpl<ReinforcedBulwarkEffect> {
|
||||
|
||||
public ReinforcedBulwarkEffect() {
|
||||
super(Duration.EndOfTurn);
|
||||
this.staticText = "Prevent the next 1 damage that would be dealt to you this turn";
|
||||
}
|
||||
|
||||
public ReinforcedBulwarkEffect(final ReinforcedBulwarkEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReinforcedBulwarkEffect copy() {
|
||||
return new ReinforcedBulwarkEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE,
|
||||
source.getControllerId(), source.getId(), source.getControllerId(), event.getAmount(), false);
|
||||
if (!game.replaceEvent(preventEvent)) {
|
||||
int damage = event.getAmount();
|
||||
if (damage > 0) {
|
||||
event.setAmount(damage - 1);
|
||||
this.used = true;
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE,
|
||||
source.getControllerId(), source.getId(), source.getControllerId(), damage));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (!this.used && super.applies(event, source, game) && event.getTargetId().equals(source.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/riseoftheeldrazi/WrapInFlames.java
Normal file
65
Mage.Sets/src/mage/sets/riseoftheeldrazi/WrapInFlames.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.CantBlockTargetEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class WrapInFlames extends CardImpl<WrapInFlames> {
|
||||
|
||||
public WrapInFlames(UUID ownerId) {
|
||||
super(ownerId, 173, "Wrap in Flames", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Wrap in Flames deals 1 damage to each of up to three target creatures. Those creatures can't block this turn.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(1));
|
||||
this.getSpellAbility().addEffect(new CantBlockTargetEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 3));
|
||||
}
|
||||
|
||||
public WrapInFlames(final WrapInFlames card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WrapInFlames copy() {
|
||||
return new WrapInFlames(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue