mirror of
https://github.com/correl/mage.git
synced 2025-04-14 01:01:08 -09:00
[AKH] Updated tooltip text on several white and blue cards. Some minor fixes.
This commit is contained in:
parent
88d25b7a3a
commit
06fdd17e7d
25 changed files with 666 additions and 613 deletions
Mage.Sets/src/mage/cards
a
b
c
d
e
f
g
n
r
s
v
Mage/src/main/java/mage
abilities
common
effects/common
game/events
Utils
|
@ -1,7 +1,6 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -10,15 +9,15 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.DamagedPlayerEvent;
|
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.stack.Spell;
|
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author stravant
|
* @author stravant
|
||||||
|
@ -46,8 +45,8 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect {
|
||||||
public ApproachOfTheSecondSunEffect() {
|
public ApproachOfTheSecondSunEffect() {
|
||||||
super(Outcome.Win);
|
super(Outcome.Win);
|
||||||
this.staticText =
|
this.staticText =
|
||||||
"If you cast {this} from you hand and you cast another spell named {this} this game, you win the game. " +
|
"If Approach of the Second Sun was cast from your hand and you've cast another spell named Approach of the Second Sun this game, you win the game. "
|
||||||
"If not, you gain 7 life and put {this} back into your library as the seventh card from the top.";
|
+ "Otherwise, put Approach of the Second Sun into its owner's library seventh from the top and you gain 7 life.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApproachOfTheSecondSunEffect(final ApproachOfTheSecondSunEffect effect) {
|
public ApproachOfTheSecondSunEffect(final ApproachOfTheSecondSunEffect effect) {
|
||||||
|
@ -73,21 +72,24 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect {
|
||||||
controller.gainLife(7, game);
|
controller.gainLife(7, game);
|
||||||
|
|
||||||
// Put this into the library as the 7th from the top
|
// Put this into the library as the 7th from the top
|
||||||
List<Card> top6 = new ArrayList<>();
|
Spell spell = game.getStack().getSpell(source.getSourceId());
|
||||||
// Cut the top 6 cards off into a temporary array
|
if (spell != null) {
|
||||||
for (int i = 0; i < 6 && controller.getLibrary().hasCards(); ++i) {
|
Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard();
|
||||||
top6.add(controller.getLibrary().removeFromTop(game));
|
if (spellCard != null) {
|
||||||
}
|
List<Card> top6 = new ArrayList<>();
|
||||||
// Put this card (if the ability came from an ApproachOfTheSecondSun spell card) on top
|
// Cut the top 6 cards off into a temporary array
|
||||||
Card sourceCard = game.getCard(source.getSourceId());
|
for (int i = 0; i < 6 && controller.getLibrary().hasCards(); ++i) {
|
||||||
if (sourceCard != null) {
|
top6.add(controller.getLibrary().removeFromTop(game));
|
||||||
controller.getLibrary().putOnTop(sourceCard, game);
|
}
|
||||||
}
|
// Put this card (if the ability came from an ApproachOfTheSecondSun spell card) on top
|
||||||
|
controller.moveCardToLibraryWithInfo(spellCard, source.getSourceId(), game, Zone.STACK, true, true);
|
||||||
|
|
||||||
// put the top 6 we took earlier back on top (going in reverse order this time to get them back
|
// put the top 6 we took earlier back on top (going in reverse order this time to get them back
|
||||||
// on top in the proper order)
|
// on top in the proper order)
|
||||||
for (int i = top6.size() - 1; i >= 0; --i) {
|
for (int i = top6.size() - 1; i >= 0; --i) {
|
||||||
controller.getLibrary().putOnTop(top6.get(i), game);
|
controller.getLibrary().putOnTop(top6.get(i), game);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -60,7 +60,7 @@ import mage.watchers.Watcher;
|
||||||
public class AsForetold extends CardImpl {
|
public class AsForetold extends CardImpl {
|
||||||
public AsForetold(UUID ownerId, CardSetInfo setInfo) {
|
public AsForetold(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||||
|
|
||||||
|
|
||||||
// At the beginning of your upkeep, put a time counter on As Foretold.
|
// At the beginning of your upkeep, put a time counter on As Foretold.
|
||||||
addAbility(
|
addAbility(
|
||||||
|
@ -145,7 +145,7 @@ class AsForetoldAlternativeCost extends AlternativeCostSourceAbility {
|
||||||
class AsForetoldAddAltCostEffect extends ContinuousEffectImpl {
|
class AsForetoldAddAltCostEffect extends ContinuousEffectImpl {
|
||||||
public AsForetoldAddAltCostEffect() {
|
public AsForetoldAddAltCostEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
staticText = "Once each turn, you may pay {0} rather than pay the mana cost for a spelly ou cast with converted mana cost X or less, where X is the number of time counters on {this}.";
|
staticText = "Once each turn, you may pay {0} rather than pay the mana cost for a spell you cast with converted mana cost X or less, where X is the number of time counters on {this}.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AsForetoldAddAltCostEffect(final AsForetoldAddAltCostEffect effect) {
|
public AsForetoldAddAltCostEffect(final AsForetoldAddAltCostEffect effect) {
|
||||||
|
|
|
@ -35,15 +35,14 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.keyword.EmbalmAbility;
|
import mage.abilities.keyword.EmbalmAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.v.Vigilance;
|
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.permanent.TokenPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -53,7 +52,7 @@ public class AvenWindGuide extends CardImpl {
|
||||||
|
|
||||||
public AvenWindGuide(UUID ownerId, CardSetInfo setInfo) {
|
public AvenWindGuide(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
|
||||||
|
|
||||||
this.subtype.add("Bird");
|
this.subtype.add("Bird");
|
||||||
this.subtype.add("Warrior");
|
this.subtype.add("Warrior");
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
|
@ -66,18 +65,18 @@ public class AvenWindGuide extends CardImpl {
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// Creature tokens you control have flying and vigilance.
|
// Creature tokens you control have flying and vigilance.
|
||||||
Ability ability =
|
Effect effect = new GainAbilityControlledEffect(
|
||||||
new SimpleStaticAbility(
|
|
||||||
Zone.BATTLEFIELD,
|
|
||||||
new GainAbilityControlledEffect(
|
|
||||||
FlyingAbility.getInstance(),
|
FlyingAbility.getInstance(),
|
||||||
Duration.WhileOnBattlefield,
|
Duration.WhileOnBattlefield,
|
||||||
StaticFilters.FILTER_CREATURE_TOKENS));
|
StaticFilters.FILTER_CREATURE_TOKENS);
|
||||||
ability.addEffect(
|
effect.setText("Creature tokens you control have flying");
|
||||||
new GainAbilityControlledEffect(
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||||
|
effect = new GainAbilityControlledEffect(
|
||||||
VigilanceAbility.getInstance(),
|
VigilanceAbility.getInstance(),
|
||||||
Duration.WhileOnBattlefield,
|
Duration.WhileOnBattlefield,
|
||||||
StaticFilters.FILTER_CREATURE_TOKENS));
|
StaticFilters.FILTER_CREATURE_TOKENS);
|
||||||
|
effect.setText("and vigilance");
|
||||||
|
ability.addEffect(effect);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Embalm {4}{W}{U}
|
// Embalm {4}{W}{U}
|
||||||
|
|
|
@ -1,112 +1,112 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility;
|
import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class BountyOfTheLuxa extends CardImpl {
|
public class BountyOfTheLuxa extends CardImpl {
|
||||||
|
|
||||||
public BountyOfTheLuxa(UUID ownerId, CardSetInfo setInfo) {
|
public BountyOfTheLuxa(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{U}");
|
||||||
|
|
||||||
//At the beginning of your precombat main phase, remove all flood counters from Bounty of the Luxa. If no flood counters were removed this way, put a flood counter on Bounty of the Luxa and draw a card. Otherwise, add {C}{G}{U} to your mana pool.
|
//At the beginning of your precombat main phase, remove all flood counters from Bounty of the Luxa. If no counters were removed this way, put a flood counter on Bounty of the Luxa and draw a card. Otherwise, add {C}{G}{U} to your mana pool.
|
||||||
this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(new BountyOfTheLuxaEffect(), TargetController.YOU, false));
|
this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(new BountyOfTheLuxaEffect(), TargetController.YOU, false));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BountyOfTheLuxa(final BountyOfTheLuxa card) {
|
public BountyOfTheLuxa(final BountyOfTheLuxa card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BountyOfTheLuxa copy() {
|
public BountyOfTheLuxa copy() {
|
||||||
return new BountyOfTheLuxa(this);
|
return new BountyOfTheLuxa(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class BountyOfTheLuxaEffect extends OneShotEffect {
|
class BountyOfTheLuxaEffect extends OneShotEffect {
|
||||||
|
|
||||||
public BountyOfTheLuxaEffect() {
|
public BountyOfTheLuxaEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "remove all flood counters from {this}. If no flood counters were removed this way, put a flood counter on {this} and draw a card. Otherwise, add {C}{G}{U} to your mana pool";
|
staticText = "remove all flood counters from {this}. If no counters were removed this way, put a flood counter on {this} and draw a card. Otherwise, add {C}{G}{U} to your mana pool";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BountyOfTheLuxaEffect(final BountyOfTheLuxaEffect effect) {
|
public BountyOfTheLuxaEffect(final BountyOfTheLuxaEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BountyOfTheLuxaEffect copy() {
|
public BountyOfTheLuxaEffect copy() {
|
||||||
return new BountyOfTheLuxaEffect(this);
|
return new BountyOfTheLuxaEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Permanent bountyOfLuxa = game.getPermanent(source.getSourceId());
|
Permanent bountyOfLuxa = game.getPermanent(source.getSourceId());
|
||||||
if (controller != null
|
if (controller != null
|
||||||
&& bountyOfLuxa != null) {
|
&& bountyOfLuxa != null) {
|
||||||
if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) > 0) {
|
if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) > 0) {
|
||||||
bountyOfLuxa.removeCounters(CounterType.FLOOD.createInstance(bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD)), game);
|
bountyOfLuxa.removeCounters(CounterType.FLOOD.createInstance(bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD)), game);
|
||||||
if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) == 0) {
|
if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) == 0) {
|
||||||
Mana manaToAdd = new Mana();
|
Mana manaToAdd = new Mana();
|
||||||
manaToAdd.increaseColorless();
|
manaToAdd.increaseColorless();
|
||||||
manaToAdd.increaseGreen();
|
manaToAdd.increaseGreen();
|
||||||
manaToAdd.increaseBlue();
|
manaToAdd.increaseBlue();
|
||||||
controller.getManaPool().addMana(manaToAdd, game, source);
|
controller.getManaPool().addMana(manaToAdd, game, source);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
new AddCountersSourceEffect(CounterType.FLOOD.createInstance()).apply(game, source);
|
new AddCountersSourceEffect(CounterType.FLOOD.createInstance()).apply(game, source);
|
||||||
new DrawCardSourceControllerEffect(1).apply(game, source);
|
new DrawCardSourceControllerEffect(1).apply(game, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,87 +1,90 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
|
||||||
import mage.constants.Outcome;
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
import mage.target.TargetPermanent;
|
import mage.constants.Outcome;
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.target.TargetPermanent;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.AttachmentType;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.AttachmentType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Zone;
|
||||||
/**
|
|
||||||
*
|
/**
|
||||||
* @author Styxo
|
*
|
||||||
*/
|
* @author Styxo
|
||||||
public class CompulsoryRest extends CardImpl {
|
*/
|
||||||
|
public class CompulsoryRest extends CardImpl {
|
||||||
public CompulsoryRest(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
public CompulsoryRest(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||||
this.subtype.add("Aura");
|
|
||||||
|
this.subtype.add("Aura");
|
||||||
// Enchant creature
|
|
||||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
// Enchant creature
|
||||||
this.getSpellAbility().addTarget(auraTarget);
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
this.addAbility(ability);
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
// Enchanted creature can't attack or block.
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAttachedEffect(AttachmentType.AURA)));
|
// Enchanted creature can't attack or block.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAttachedEffect(AttachmentType.AURA)));
|
||||||
// Enchanted creature has "{2}, Sacrifice this creature: You gain 2 life."
|
|
||||||
Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new GenericManaCost(2));
|
// Enchanted creature has "{2}, Sacrifice this creature: You gain 2 life."
|
||||||
grantedAbility.addCost(new SacrificeSourceCost());
|
Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new GenericManaCost(2));
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(grantedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield)));
|
Cost cost = new SacrificeSourceCost();
|
||||||
|
cost.setText("Sacrifice this creature");
|
||||||
}
|
grantedAbility.addCost(cost);
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(grantedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield)));
|
||||||
public CompulsoryRest(final CompulsoryRest card) {
|
|
||||||
super(card);
|
}
|
||||||
}
|
|
||||||
|
public CompulsoryRest(final CompulsoryRest card) {
|
||||||
@Override
|
super(card);
|
||||||
public CompulsoryRest copy() {
|
}
|
||||||
return new CompulsoryRest(this);
|
|
||||||
}
|
@Override
|
||||||
}
|
public CompulsoryRest copy() {
|
||||||
|
return new CompulsoryRest(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,78 +1,81 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.BecomesExertSourceTriggeredAbility;
|
import mage.abilities.common.BecomesExertSourceTriggeredAbility;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.keyword.ExertAbility;
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.abilities.keyword.ExertAbility;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.constants.ComparisonType;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
/**
|
|
||||||
*
|
/**
|
||||||
* @author Styxo
|
*
|
||||||
*/
|
* @author Styxo
|
||||||
public class DevotedCropMate extends CardImpl {
|
*/
|
||||||
|
public class DevotedCropMate extends CardImpl {
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
|
|
||||||
|
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
|
||||||
static {
|
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
static {
|
||||||
}
|
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
|
}
|
||||||
public DevotedCropMate(UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
public DevotedCropMate(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
this.subtype.add("Human");
|
|
||||||
this.subtype.add("Warrior");
|
this.subtype.add("Human");
|
||||||
this.power = new MageInt(3);
|
this.subtype.add("Warrior");
|
||||||
this.toughness = new MageInt(2);
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
// You may exert Devoted Crop-Mate as it attacks. When you do, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
|
|
||||||
BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect());
|
// You may exert Devoted Crop-Mate as it attacks. When you do, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
|
||||||
addAbility(new ExertAbility(ability));
|
effect.setText("return target creature card with converted mana cost 2 or less from your graveyard to the battlefield");
|
||||||
|
BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect);
|
||||||
}
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
|
addAbility(new ExertAbility(ability));
|
||||||
public DevotedCropMate(final DevotedCropMate card) {
|
|
||||||
super(card);
|
}
|
||||||
}
|
|
||||||
|
public DevotedCropMate(final DevotedCropMate card) {
|
||||||
@Override
|
super(card);
|
||||||
public DevotedCropMate copy() {
|
}
|
||||||
return new DevotedCropMate(this);
|
|
||||||
}
|
@Override
|
||||||
}
|
public DevotedCropMate copy() {
|
||||||
|
return new DevotedCropMate(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
|
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -59,7 +58,7 @@ public class EnigmaDrake extends CardImpl {
|
||||||
|
|
||||||
// Enigma Drakes's power is equal to the number of instant and sorcery cards in your graveyard.
|
// Enigma Drakes's power is equal to the number of instant and sorcery cards in your graveyard.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(
|
||||||
new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard("instant and sorcery cards in your graveyard")), Duration.EndOfGame)));
|
new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard("instant and sorcery cards")), Duration.EndOfGame)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnigmaDrake(final EnigmaDrake card) {
|
public EnigmaDrake(final EnigmaDrake card) {
|
||||||
|
|
|
@ -45,6 +45,7 @@ import mage.game.events.GameEvent.EventType;
|
||||||
import mage.abilities.effects.common.NameACardEffect;
|
import mage.abilities.effects.common.NameACardEffect;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author spjspj
|
* @author spjspj
|
||||||
|
@ -63,7 +64,9 @@ public class FailureComply extends SplitCard {
|
||||||
// Comply
|
// Comply
|
||||||
// Choose a card name. Until your next turn, your opponents can't cast spells with the chosen name
|
// Choose a card name. Until your next turn, your opponents can't cast spells with the chosen name
|
||||||
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
|
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
|
||||||
getRightHalfCard().getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL));
|
Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL);
|
||||||
|
effect.setText("Choose a card name");
|
||||||
|
getRightHalfCard().getSpellAbility().addEffect(effect);
|
||||||
getRightHalfCard().getSpellAbility().addEffect(new ComplyCantCastEffect());
|
getRightHalfCard().getSpellAbility().addEffect(new ComplyCantCastEffect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +84,7 @@ class ComplyCantCastEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
|
|
||||||
public ComplyCantCastEffect() {
|
public ComplyCantCastEffect() {
|
||||||
super(Duration.UntilYourNextTurn, Outcome.Benefit);
|
super(Duration.UntilYourNextTurn, Outcome.Benefit);
|
||||||
staticText = "Your opponents can't cast spells with the chosen name";
|
staticText = "Until your next turn, your opponents can't cast spells with the chosen name";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComplyCantCastEffect(final ComplyCantCastEffect effect) {
|
public ComplyCantCastEffect(final ComplyCantCastEffect effect) {
|
||||||
|
|
|
@ -34,8 +34,6 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
|
||||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.GetEmblemEffect;
|
import mage.abilities.effects.common.GetEmblemEffect;
|
||||||
|
@ -48,7 +46,6 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.command.Emblem;
|
import mage.game.command.Emblem;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
@ -63,20 +60,22 @@ public class GideonOfTheTrials extends CardImpl {
|
||||||
|
|
||||||
public GideonOfTheTrials(UUID ownerId, CardSetInfo setInfo) {
|
public GideonOfTheTrials(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{W}{W}");
|
||||||
|
|
||||||
this.subtype.add("Gideon");
|
this.subtype.add("Gideon");
|
||||||
|
|
||||||
//Starting Loyalty: 3
|
//Starting Loyalty: 3
|
||||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3));
|
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3));
|
||||||
|
|
||||||
// +1: Until your next turn, prevent all damage target permanent would deal.
|
// +1: Until your next turn, prevent all damage target permanent would deal.
|
||||||
LoyaltyAbility ability = new LoyaltyAbility(new PreventDamageByTargetEffect(Duration.UntilYourNextTurn), 1);
|
Effect effect = new PreventDamageByTargetEffect(Duration.UntilYourNextTurn);
|
||||||
|
effect.setText("Until your next turn, prevent all damage target permanent would deal");
|
||||||
|
LoyaltyAbility ability = new LoyaltyAbility(effect, 1);
|
||||||
ability.addTarget(new TargetPermanent());
|
ability.addTarget(new TargetPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// 0: Until end of turn, Gideon of the Trials becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.
|
// 0: Until end of turn, Gideon of the Trials becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.
|
||||||
ability = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonOfTheTrialsToken(), "planeswalker", Duration.EndOfTurn), 0);
|
ability = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonOfTheTrialsToken(), "planeswalker", Duration.EndOfTurn), 0);
|
||||||
Effect effect = new PreventAllDamageToSourceEffect(Duration.EndOfTurn);
|
effect = new PreventAllDamageToSourceEffect(Duration.EndOfTurn);
|
||||||
effect.setText("Prevent all damage that would be dealt to him this turn");
|
effect.setText("Prevent all damage that would be dealt to him this turn");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
@ -106,7 +105,7 @@ class GideonOfTheTrialsCantLoseEffect extends ContinuousRuleModifyingEffectImpl
|
||||||
|
|
||||||
public GideonOfTheTrialsCantLoseEffect() {
|
public GideonOfTheTrialsCantLoseEffect() {
|
||||||
super(Duration.EndOfGame, Outcome.Benefit);
|
super(Duration.EndOfGame, Outcome.Benefit);
|
||||||
staticText = "As long as you control a Gideon planeswalker, you can't lose the game and your opponent can't win the game";
|
staticText = "As long as you control a Gideon planeswalker, you can't lose the game and your opponents can't win the game";
|
||||||
}
|
}
|
||||||
|
|
||||||
public GideonOfTheTrialsCantLoseEffect(final GideonOfTheTrialsCantLoseEffect effect) {
|
public GideonOfTheTrialsCantLoseEffect(final GideonOfTheTrialsCantLoseEffect effect) {
|
||||||
|
|
|
@ -33,6 +33,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.PreventionEffectImpl;
|
import mage.abilities.effects.PreventionEffectImpl;
|
||||||
import mage.abilities.effects.common.NameACardEffect;
|
import mage.abilities.effects.common.NameACardEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -56,7 +57,9 @@ public class GideonsIntervention extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||||
|
|
||||||
// As Gideon's Intervention enters the battlefield, choose a card name.
|
// As Gideon's Intervention enters the battlefield, choose a card name.
|
||||||
this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL)));
|
Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL);
|
||||||
|
effect.setText("choose a card name");
|
||||||
|
this.addAbility(new AsEntersBattlefieldAbility(effect));
|
||||||
|
|
||||||
// Your opponents can't cast spells with the chosen name.
|
// Your opponents can't cast spells with the chosen name.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GideonsInterventionCantCastEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GideonsInterventionCantCastEffect()));
|
||||||
|
|
|
@ -29,8 +29,9 @@ package mage.cards.n;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -46,15 +47,15 @@ public class NagaOracle extends CardImpl {
|
||||||
|
|
||||||
public NagaOracle(UUID ownerId, CardSetInfo setInfo) {
|
public NagaOracle(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||||
|
|
||||||
this.subtype.add("Naga");
|
this.subtype.add("Naga");
|
||||||
this.subtype.add("Cleric");
|
this.subtype.add("Cleric");
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// When Naga Oracle enters the battlefield, look at the top three cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
|
// When Naga Oracle enters the battlefield, look at the top three cards of your library. Put any number of them into your graveyard
|
||||||
addAbility(new EntersBattlefieldAbility(
|
// and the rest back on top of your library in any order.
|
||||||
new LookLibraryAndPickControllerEffect(
|
Effect effect = new LookLibraryAndPickControllerEffect(
|
||||||
/* oh god, Microsoft looks conservative with their function parameters in comparison */
|
/* oh god, Microsoft looks conservative with their function parameters in comparison */
|
||||||
new StaticValue(3),
|
new StaticValue(3),
|
||||||
false,
|
false,
|
||||||
|
@ -65,7 +66,10 @@ public class NagaOracle extends CardImpl {
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
Zone.GRAVEYARD,
|
Zone.GRAVEYARD,
|
||||||
false)));
|
false);
|
||||||
|
effect.setText("look at the top three cards of your library. Put any number of them into your graveyard "
|
||||||
|
+ "and the rest back on top of your library in any order");
|
||||||
|
addAbility(new EntersBattlefieldTriggeredAbility(effect));
|
||||||
}
|
}
|
||||||
|
|
||||||
public NagaOracle(final NagaOracle card) {
|
public NagaOracle(final NagaOracle card) {
|
||||||
|
|
|
@ -53,6 +53,7 @@ import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -65,7 +66,9 @@ public class NissaStewardOfElements extends CardImpl {
|
||||||
|
|
||||||
this.subtype.add("Nissa");
|
this.subtype.add("Nissa");
|
||||||
|
|
||||||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.LOYALTY.createInstance())));
|
Ability abilityETB = new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.LOYALTY.createInstance()));
|
||||||
|
abilityETB.setRuleVisible(false);
|
||||||
|
this.addAbility(abilityETB);
|
||||||
|
|
||||||
// +2: Scry 2.
|
// +2: Scry 2.
|
||||||
this.addAbility(new LoyaltyAbility(new ScryEffect(2), 2));
|
this.addAbility(new LoyaltyAbility(new ScryEffect(2), 2));
|
||||||
|
@ -75,8 +78,12 @@ public class NissaStewardOfElements extends CardImpl {
|
||||||
this.addAbility(new LoyaltyAbility(new NissaStewardOfElementsEffect(), 0));
|
this.addAbility(new LoyaltyAbility(new NissaStewardOfElementsEffect(), 0));
|
||||||
|
|
||||||
// -6: Untap up to two target lands you control. They become 5/5 Elemental creatures with flying and haste until end of turn. They're still lands.
|
// -6: Untap up to two target lands you control. They become 5/5 Elemental creatures with flying and haste until end of turn. They're still lands.
|
||||||
LoyaltyAbility ability = new LoyaltyAbility(new UntapTargetEffect(), 6);
|
Effect effect = new UntapTargetEffect();
|
||||||
ability.addEffect(new BecomesCreatureTargetEffect(new NissaStewardOfElementsToken(), false, true, Duration.EndOfTurn));
|
effect.setText("Untap up to two target lands you control");
|
||||||
|
LoyaltyAbility ability = new LoyaltyAbility(effect, 6);
|
||||||
|
effect = new BecomesCreatureTargetEffect(new NissaStewardOfElementsToken(), false, true, Duration.EndOfTurn);
|
||||||
|
effect.setText("They become 5/5 Elemental creatures with flying and haste until end of turn. They're still lands");
|
||||||
|
ability.addEffect(effect);
|
||||||
ability.addTarget(new TargetPermanent(0, 2, new FilterControlledLandPermanent(), false));
|
ability.addTarget(new TargetPermanent(0, 2, new FilterControlledLandPermanent(), false));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
@ -95,7 +102,7 @@ class NissaStewardOfElementsEffect extends OneShotEffect {
|
||||||
|
|
||||||
public NissaStewardOfElementsEffect() {
|
public NissaStewardOfElementsEffect() {
|
||||||
super(Outcome.PutCardInPlay);
|
super(Outcome.PutCardInPlay);
|
||||||
this.staticText = "look at the top card of your library. If it's a land card or a creature card with converted mana cost less than or equal"
|
this.staticText = "look at the top card of your library. If it's a land card or a creature card with converted mana cost less than or equal "
|
||||||
+ "to the number of loyalty counters on {this}, you may put that card onto the battlefield";
|
+ "to the number of loyalty counters on {this}, you may put that card onto the battlefield";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
@ -75,7 +76,9 @@ public class RegalCaracal extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// When Regal Caracal enters the battlefield, create two 1/1 white Cat creature tokens with lifelink.
|
// When Regal Caracal enters the battlefield, create two 1/1 white Cat creature tokens with lifelink.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new CatToken2(), 2)));
|
Effect effect2 = new CreateTokenEffect(new CatToken2(), 2);
|
||||||
|
effect2.setText("create two 1/1 white Cat creature tokens with lifelink");
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(effect2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegalCaracal(final RegalCaracal card) {
|
public RegalCaracal(final RegalCaracal card) {
|
||||||
|
|
|
@ -30,6 +30,7 @@ package mage.cards.r;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.BecomesExertSourceTriggeredAbility;
|
import mage.abilities.common.BecomesExertSourceTriggeredAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
import mage.abilities.keyword.ExertAbility;
|
import mage.abilities.keyword.ExertAbility;
|
||||||
|
@ -47,17 +48,19 @@ public class RhetCropSpearmaster extends CardImpl {
|
||||||
|
|
||||||
public RhetCropSpearmaster(UUID ownerId, CardSetInfo setInfo) {
|
public RhetCropSpearmaster(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
|
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Warrior");
|
this.subtype.add("Warrior");
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// You may exert Rhet-Crop Spearmaster as it attacks. When you do, it gets +1/+0 and gains first strike until end of turn.
|
// You may exert Rhet-Crop Spearmaster as it attacks. When you do, it gets +1/+0 and gains first strike until end of turn.
|
||||||
BecomesExertSourceTriggeredAbility ability =
|
Effect effect = new BoostSourceEffect(1, 0, Duration.EndOfTurn);
|
||||||
new BecomesExertSourceTriggeredAbility(
|
effect.setText("it gets +1/+0");
|
||||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn));
|
BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect);
|
||||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
|
effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||||
|
effect.setText(" and gains first strike until end of turn");
|
||||||
|
ability.addEffect(effect);
|
||||||
this.addAbility(new ExertAbility(ability));
|
this.addAbility(new ExertAbility(ability));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import java.util.UUID;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
import mage.abilities.keyword.CyclingAbility;
|
import mage.abilities.keyword.CyclingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -38,7 +39,6 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.Predicate;
|
import mage.filter.predicate.Predicate;
|
||||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
|
@ -56,7 +56,9 @@ public class SacredExcavation extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||||
|
|
||||||
// Return up to two target cards with cycling from your graveyard to your hand.
|
// Return up to two target cards with cycling from your graveyard to your hand.
|
||||||
getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
|
||||||
|
effect.setText("Return up to two target cards with cycling from your graveyard to your hand");
|
||||||
|
getSpellAbility().addEffect(effect);
|
||||||
getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, cardsWithCycling));
|
getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, cardsWithCycling));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -67,7 +68,9 @@ public class ScribeOfTheMindful extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// {1}, {T}, Sacrifice Scribe of the Mindful: Return target instant or sorcery card from your graveyard to your hand.
|
// {1}, {T}, Sacrifice Scribe of the Mindful: Return target instant or sorcery card from your graveyard to your hand.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1));
|
Effect effect = new ReturnToHandTargetEffect();
|
||||||
|
effect.setText("Return target instant or sorcery card from your graveyard to your hand");
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class SeekerOfInsight extends CardImpl {
|
||||||
|
|
||||||
public SeekerOfInsight(UUID ownerId, CardSetInfo setInfo) {
|
public SeekerOfInsight(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||||
|
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Wizard");
|
this.subtype.add("Wizard");
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
|
@ -93,4 +93,9 @@ class CastNonCreatureSpellCondition implements Condition {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "you've cast a noncreature spell this turn";
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -29,6 +29,7 @@ package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.AftermathAbility;
|
import mage.abilities.keyword.AftermathAbility;
|
||||||
|
@ -53,7 +54,9 @@ public class StartFinish extends SplitCard {
|
||||||
|
|
||||||
// Start
|
// Start
|
||||||
// Create two 1/1 white Warrior creature tokens with vigilance.
|
// Create two 1/1 white Warrior creature tokens with vigilance.
|
||||||
getLeftHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new WarriorVigilantToken(), 2));
|
Effect effect = new CreateTokenEffect(new WarriorVigilantToken(), 2);
|
||||||
|
effect.setText("Create two 1/1 white Warrior creature tokens with vigilance");
|
||||||
|
getLeftHalfCard().getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
// Finish
|
// Finish
|
||||||
// Aftermath
|
// Aftermath
|
||||||
|
|
|
@ -1,151 +1,151 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.cards.v;
|
package mage.cards.v;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObjectReference;
|
import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
||||||
import mage.abilities.keyword.FlashAbility;
|
import mage.abilities.keyword.FlashAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||||
import mage.watchers.common.BlockedThisTurnWatcher;
|
import mage.watchers.common.BlockedThisTurnWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class VizierOfDeferment extends CardImpl {
|
public class VizierOfDeferment extends CardImpl {
|
||||||
|
|
||||||
public VizierOfDeferment(UUID ownerId, CardSetInfo setInfo) {
|
public VizierOfDeferment(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
|
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Cleric");
|
this.subtype.add("Cleric");
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Flash
|
// Flash
|
||||||
this.addAbility(FlashAbility.getInstance());
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
// When Vizier of Deferment enters the battlefield, you may exile target creature if it attacked or blocked this turn. Return that card to the battlefield under its owner's control at the beginning of the next end step.
|
// When Vizier of Deferment enters the battlefield, you may exile target creature if it attacked or blocked this turn. Return that card to the battlefield under its owner's control at the beginning of the next end step.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new VizierOfDefermentEffect(), true);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new VizierOfDefermentEffect(), true);
|
||||||
ability.addWatcher(new AttackedThisTurnWatcher());
|
ability.addWatcher(new AttackedThisTurnWatcher());
|
||||||
ability.addWatcher(new BlockedThisTurnWatcher());
|
ability.addWatcher(new BlockedThisTurnWatcher());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability instanceof EntersBattlefieldTriggeredAbility) {
|
if (ability instanceof EntersBattlefieldTriggeredAbility) {
|
||||||
List<PermanentIdPredicate> creaturesThatCanBeTargeted = new ArrayList<>();
|
List<PermanentIdPredicate> creaturesThatCanBeTargeted = new ArrayList<>();
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that attacked or blocked this turn.");
|
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that attacked or blocked this turn.");
|
||||||
AttackedThisTurnWatcher watcherAttacked = (AttackedThisTurnWatcher) game.getState().getWatchers().get("AttackedThisTurn");
|
AttackedThisTurnWatcher watcherAttacked = (AttackedThisTurnWatcher) game.getState().getWatchers().get("AttackedThisTurn");
|
||||||
BlockedThisTurnWatcher watcherBlocked = (BlockedThisTurnWatcher) game.getState().getWatchers().get("BlockedThisTurn");
|
BlockedThisTurnWatcher watcherBlocked = (BlockedThisTurnWatcher) game.getState().getWatchers().get("BlockedThisTurn");
|
||||||
if (watcherAttacked != null) {
|
if (watcherAttacked != null) {
|
||||||
for (UUID creatureId : watcherAttacked.getAttackedThisTurnCreatures()) {
|
for (UUID creatureId : watcherAttacked.getAttackedThisTurnCreatures()) {
|
||||||
creaturesThatCanBeTargeted.add(new PermanentIdPredicate(creatureId));
|
creaturesThatCanBeTargeted.add(new PermanentIdPredicate(creatureId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (watcherBlocked != null) {
|
if (watcherBlocked != null) {
|
||||||
for (MageObjectReference mor : watcherBlocked.getBlockedThisTurnCreatures()) {
|
for (MageObjectReference mor : watcherBlocked.getBlockedThisTurnCreatures()) {
|
||||||
creaturesThatCanBeTargeted.add(new PermanentIdPredicate(mor.getPermanent(game).getId()));
|
creaturesThatCanBeTargeted.add(new PermanentIdPredicate(mor.getPermanent(game).getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filter.add(Predicates.or(creaturesThatCanBeTargeted));
|
filter.add(Predicates.or(creaturesThatCanBeTargeted));
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public VizierOfDeferment(final VizierOfDeferment card) {
|
public VizierOfDeferment(final VizierOfDeferment card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VizierOfDeferment copy() {
|
public VizierOfDeferment copy() {
|
||||||
return new VizierOfDeferment(this);
|
return new VizierOfDeferment(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VizierOfDefermentEffect extends OneShotEffect {
|
class VizierOfDefermentEffect extends OneShotEffect {
|
||||||
|
|
||||||
public VizierOfDefermentEffect() {
|
public VizierOfDefermentEffect() {
|
||||||
super(Outcome.Detriment);
|
super(Outcome.Detriment);
|
||||||
staticText = "you may exile target creature if it attacked or blocked this turn. Return it to the battlefield under its owner's control at the beginning of the next end step";
|
staticText = "you may exile target creature if it attacked or blocked this turn. Return that card to the battlefield under its owner's control at the beginning of the next end step";
|
||||||
}
|
}
|
||||||
|
|
||||||
public VizierOfDefermentEffect(final VizierOfDefermentEffect effect) {
|
public VizierOfDefermentEffect(final VizierOfDefermentEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (controller != null
|
if (controller != null
|
||||||
&& permanent != null
|
&& permanent != null
|
||||||
&& sourcePermanent != null) {
|
&& sourcePermanent != null) {
|
||||||
if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) {
|
if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) {
|
||||||
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect();
|
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect();
|
||||||
effect.setText("Return that card to the battlefield under its owner's control at the beginning of the next end step");
|
effect.setText("Return that card to the battlefield under its owner's control at the beginning of the next end step");
|
||||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
|
effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
|
||||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
|
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VizierOfDefermentEffect copy() {
|
public VizierOfDefermentEffect copy() {
|
||||||
return new VizierOfDefermentEffect(this);
|
return new VizierOfDefermentEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,12 +34,15 @@ import mage.abilities.common.CycleTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.UntapTargetEffect;
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
import mage.abilities.keyword.CyclingAbility;
|
import mage.abilities.keyword.CyclingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,6 +51,12 @@ import mage.target.TargetPermanent;
|
||||||
*/
|
*/
|
||||||
public class VizierOfTumblingSands extends CardImpl {
|
public class VizierOfTumblingSands extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent("another target permanent");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new AnotherPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
public VizierOfTumblingSands(UUID ownerId, CardSetInfo setInfo) {
|
public VizierOfTumblingSands(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||||
|
|
||||||
|
@ -57,8 +66,10 @@ public class VizierOfTumblingSands extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// {T}: Untap another target permanent.
|
// {T}: Untap another target permanent.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
|
Effect effect = new UntapTargetEffect();
|
||||||
ability.addTarget(new TargetPermanent());
|
effect.setText("Untap another target permanent");
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||||
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Cycling {1}{U}
|
// Cycling {1}{U}
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
|
||||||
}
|
}
|
||||||
sb.append(condition.toString()).append('.');
|
sb.append(condition.toString()).append('.');
|
||||||
} else {
|
} else {
|
||||||
sb.append(" [Condition toSting() == null] ");
|
sb.append(" [Condition toString() == null] ");
|
||||||
}
|
}
|
||||||
return sb.toString() ;
|
return sb.toString() ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,9 +167,9 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
|
||||||
|
|
||||||
private void setText() {
|
private void setText() {
|
||||||
if (type != null && !type.isEmpty()) {
|
if (type != null && !type.isEmpty()) {
|
||||||
staticText = duration.toString() + " {this} becomes a " + token.getDescription() + " that's still a " + this.type;
|
staticText = duration.toString() + ", {this} becomes a " + token.getDescription() + " that's still a " + this.type;
|
||||||
} else {
|
} else {
|
||||||
staticText = duration.toString() + " {this} becomes a " + token.getDescription();
|
staticText = duration.toString() + ", {this} becomes a " + token.getDescription();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,113 +1,114 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.abilities.effects.common.search;
|
package mage.abilities.effects.common.search;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Styxo
|
* @author Styxo
|
||||||
*/
|
*/
|
||||||
public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
|
public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
|
||||||
|
|
||||||
private FilterCard filter;
|
private FilterCard filter;
|
||||||
private boolean forceToSearchBoth;
|
private boolean forceToSearchBoth;
|
||||||
|
|
||||||
public SearchLibraryGraveyardPutInHandEffect(FilterCard filter) {
|
public SearchLibraryGraveyardPutInHandEffect(FilterCard filter) {
|
||||||
this(filter, false);
|
this(filter, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SearchLibraryGraveyardPutInHandEffect(FilterCard filter, boolean forceToSearchBoth) {
|
public SearchLibraryGraveyardPutInHandEffect(FilterCard filter, boolean forceToSearchBoth) {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.forceToSearchBoth = forceToSearchBoth;
|
this.forceToSearchBoth = forceToSearchBoth;
|
||||||
staticText = "Search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage() + ", reveal it, and put it into your hand. Then shuffle your library";
|
staticText = "Search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage() +
|
||||||
}
|
", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it");
|
||||||
|
}
|
||||||
public SearchLibraryGraveyardPutInHandEffect(final SearchLibraryGraveyardPutInHandEffect effect) {
|
|
||||||
super(effect);
|
public SearchLibraryGraveyardPutInHandEffect(final SearchLibraryGraveyardPutInHandEffect effect) {
|
||||||
this.filter = effect.filter;
|
super(effect);
|
||||||
this.forceToSearchBoth = effect.forceToSearchBoth;
|
this.filter = effect.filter;
|
||||||
|
this.forceToSearchBoth = effect.forceToSearchBoth;
|
||||||
}
|
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public SearchLibraryGraveyardPutInHandEffect copy() {
|
@Override
|
||||||
return new SearchLibraryGraveyardPutInHandEffect(this);
|
public SearchLibraryGraveyardPutInHandEffect copy() {
|
||||||
}
|
return new SearchLibraryGraveyardPutInHandEffect(this);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
@Override
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
public boolean apply(Game game, Ability source) {
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Card cardFound = null;
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (controller != null && sourceObject != null) {
|
Card cardFound = null;
|
||||||
if (forceToSearchBoth || controller.chooseUse(outcome, "Search your library for a card named " + filter.getMessage() + '?', source, game)) {
|
if (controller != null && sourceObject != null) {
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
|
if (forceToSearchBoth || controller.chooseUse(outcome, "Search your library for a card named " + filter.getMessage() + '?', source, game)) {
|
||||||
target.clearChosen();
|
TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
|
||||||
if (controller.searchLibrary(target, game)) {
|
target.clearChosen();
|
||||||
if (!target.getTargets().isEmpty()) {
|
if (controller.searchLibrary(target, game)) {
|
||||||
cardFound = game.getCard(target.getFirstTarget());
|
if (!target.getTargets().isEmpty()) {
|
||||||
}
|
cardFound = game.getCard(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
controller.shuffleLibrary(source, game);
|
}
|
||||||
}
|
controller.shuffleLibrary(source, game);
|
||||||
|
}
|
||||||
if (cardFound == null && controller.chooseUse(outcome, "Search your graveyard for a card named " + filter.getMessage() + '?', source, game)) {
|
|
||||||
TargetCard target = new TargetCard(0, 1, Zone.GRAVEYARD, filter);
|
if (cardFound == null && controller.chooseUse(outcome, "Search your graveyard for a card named " + filter.getMessage() + '?', source, game)) {
|
||||||
target.clearChosen();
|
TargetCard target = new TargetCard(0, 1, Zone.GRAVEYARD, filter);
|
||||||
if (controller.choose(outcome, controller.getGraveyard(), target, game)) {
|
target.clearChosen();
|
||||||
if (!target.getTargets().isEmpty()) {
|
if (controller.choose(outcome, controller.getGraveyard(), target, game)) {
|
||||||
cardFound = game.getCard(target.getFirstTarget());
|
if (!target.getTargets().isEmpty()) {
|
||||||
}
|
cardFound = game.getCard(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (cardFound != null) {
|
|
||||||
controller.revealCards(sourceObject.getIdName(), new CardsImpl(cardFound), game);
|
if (cardFound != null) {
|
||||||
controller.moveCards(cardFound, Zone.HAND, source, game);
|
controller.revealCards(sourceObject.getIdName(), new CardsImpl(cardFound), game);
|
||||||
}
|
controller.moveCards(cardFound, Zone.HAND, source, game);
|
||||||
|
}
|
||||||
return true;
|
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
return false;
|
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class GameEvent implements Serializable {
|
||||||
INVESTIGATED,
|
INVESTIGATED,
|
||||||
DISCARD_CARD,
|
DISCARD_CARD,
|
||||||
DISCARDED_CARD,
|
DISCARDED_CARD,
|
||||||
// CYCLE_CARD, CYCLED_CARD,
|
CYCLE_CARD, CYCLED_CARD,
|
||||||
PAY_CYCLE_COST, CAN_PAY_CYCLE_COST,
|
PAY_CYCLE_COST, CAN_PAY_CYCLE_COST,
|
||||||
CLASH, CLASHED,
|
CLASH, CLASHED,
|
||||||
DAMAGE_PLAYER,
|
DAMAGE_PLAYER,
|
||||||
|
|
|
@ -30832,7 +30832,7 @@ Verdant Catacombs|Modern Masters 2017|249|R||Land|||{T}, Pay 1 life, Sacrifice V
|
||||||
Angel of Sanctions|Amonkhet|1|M|{3}{W}{W}|Creature - Angel|3|4|Flying$When Angel of Sanctions enters the battlefield, you may exile target nonland permanent an opponent controls until Angel of Sanctions leaves the battlefield.$Embalm {5}{W}|
|
Angel of Sanctions|Amonkhet|1|M|{3}{W}{W}|Creature - Angel|3|4|Flying$When Angel of Sanctions enters the battlefield, you may exile target nonland permanent an opponent controls until Angel of Sanctions leaves the battlefield.$Embalm {5}{W}|
|
||||||
Anointed Procession|Amonkhet|2|R|{3}{W}|Enchantment|||If an effect would create one or more tokens under your control, it creates twice that many of those tokens instead.|
|
Anointed Procession|Amonkhet|2|R|{3}{W}|Enchantment|||If an effect would create one or more tokens under your control, it creates twice that many of those tokens instead.|
|
||||||
Anointer Priest|Amonkhet|3|C|{1}{W}|Creature - Human Cleric|1|3|Whenever a creature token enters the battlefield under your control, you gain 1 life.$Embalm {3}{W}|
|
Anointer Priest|Amonkhet|3|C|{1}{W}|Creature - Human Cleric|1|3|Whenever a creature token enters the battlefield under your control, you gain 1 life.$Embalm {3}{W}|
|
||||||
Approach of the Second Sun|Amonkhet|4|R|{6}{W}|Sorcery|||If Approach of the Second Sun was cast from your hand and you cast another spell named Approach of the Second Sun this game, you win the game. If not, you gain 7 life and put Approach of the Second Sun back into your library as the 7th card from the top.|
|
Approach of the Second Sun|Amonkhet|4|R|{6}{W}|Sorcery|||If Approach of the Second Sun was cast from your hand and you've cast another spell named Approach of the Second Sun this game, you win the game. Otherwise, put Approach of the Second Sun into its owner's library seventh from the top and you gain 7 life.|
|
||||||
Aven Mindcensor|Amonkhet|5|R|{2}{W}|Creature - Bird Wizard|2|1|Flash$Flying$If an opponent would search a library, that player searches the top four cards of that library instead.|
|
Aven Mindcensor|Amonkhet|5|R|{2}{W}|Creature - Bird Wizard|2|1|Flash$Flying$If an opponent would search a library, that player searches the top four cards of that library instead.|
|
||||||
Binding Mummy|Amonkhet|6|C|{1}{W}|Creature - Zombie|2|2|Whenever another Zombie enters the battlefield under your control, you may tap target artifact or creature.|
|
Binding Mummy|Amonkhet|6|C|{1}{W}|Creature - Zombie|2|2|Whenever another Zombie enters the battlefield under your control, you may tap target artifact or creature.|
|
||||||
Cartouche of Solidarity|Amonkhet|7|C|{W}|Enchantment - Aura Cartouche|||Enchant creature you control$When Cartouche of Solidarity enters the battlefield, create a 1/1 white Warrior creature token with vigilance.$Enchanted creature gets +1/+1 and has first strike.|
|
Cartouche of Solidarity|Amonkhet|7|C|{W}|Enchantment - Aura Cartouche|||Enchant creature you control$When Cartouche of Solidarity enters the battlefield, create a 1/1 white Warrior creature token with vigilance.$Enchanted creature gets +1/+1 and has first strike.|
|
||||||
|
|
Loading…
Add table
Reference in a new issue