mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Some minor fixes.
This commit is contained in:
parent
77d9aa0315
commit
c42841196f
5 changed files with 266 additions and 271 deletions
|
@ -30,7 +30,7 @@ package mage.cards.e;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DontUntapInOpponentsNextUntapStepAllEffect;
|
import mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -96,7 +96,7 @@ class ExhaustionEffect extends OneShotEffect {
|
||||||
Player player = game.getPlayer(source.getFirstTarget());
|
Player player = game.getPlayer(source.getFirstTarget());
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
ContinuousEffect effect = new DontUntapInOpponentsNextUntapStepAllEffect(filter);
|
ContinuousEffect effect = new DontUntapInPlayersNextUntapStepAllEffect(filter);
|
||||||
effect.setTargetPointer(new FixedTarget(player.getId()));
|
effect.setTargetPointer(new FixedTarget(player.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,148 +1,144 @@
|
||||||
/*
|
/*
|
||||||
* 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.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
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.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterControlledLandPermanent;
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.common.FilterNonlandCard;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.game.ExileZone;
|
||||||
import mage.game.ExileZone;
|
import mage.game.Game;
|
||||||
import mage.game.Game;
|
import mage.players.Player;
|
||||||
import mage.players.Player;
|
import mage.target.TargetCard;
|
||||||
import mage.target.TargetCard;
|
|
||||||
|
/**
|
||||||
/**
|
*
|
||||||
*
|
* @author ciaccona007
|
||||||
* @author ciaccona007
|
*/
|
||||||
*/
|
public class HazoretsUndyingFury extends CardImpl {
|
||||||
public class HazoretsUndyingFury extends CardImpl {
|
|
||||||
|
public HazoretsUndyingFury(UUID ownerId, CardSetInfo setInfo) {
|
||||||
public HazoretsUndyingFury(UUID ownerId, CardSetInfo setInfo) {
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
|
|
||||||
|
//Shuffle your library, then exile the top four cards.
|
||||||
//Shuffle your library, then exile the top four cards.
|
//You may cast any number of nonland cards with converted mana
|
||||||
//You may cast any number of nonland cards with converted mana
|
//cost 5 or less from among them without paying their mana costs.
|
||||||
//cost 5 or less from among them without paying their mana costs.
|
getSpellAbility().addEffect(new HazoretsUndyingFuryEffect());
|
||||||
getSpellAbility().addEffect(new HazoretsUndyingFuryEffect());
|
|
||||||
|
//Land you control don't untap during your next untap step.
|
||||||
//Land you control don't untap during your next untap step.
|
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
||||||
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
.setText("Lands you control don't untap during your next untap phase"));
|
||||||
.setText("Lands you control don't untap during your next untap phase"));
|
}
|
||||||
}
|
|
||||||
|
public HazoretsUndyingFury(final HazoretsUndyingFury card) {
|
||||||
public HazoretsUndyingFury(final HazoretsUndyingFury card) {
|
super(card);
|
||||||
super(card);
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public HazoretsUndyingFury copy() {
|
||||||
public HazoretsUndyingFury copy() {
|
return new HazoretsUndyingFury(this);
|
||||||
return new HazoretsUndyingFury(this);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
class HazoretsUndyingFuryEffect extends OneShotEffect {
|
||||||
class HazoretsUndyingFuryEffect extends OneShotEffect {
|
|
||||||
|
private final static FilterCard filter = new FilterCard("nonland cards with converted mana cost 5 or less");
|
||||||
private static FilterCard filter = new FilterCard("any number of nonland cards with converted mana cost 5 or less");
|
|
||||||
|
static {
|
||||||
static {
|
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 6));
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 6));
|
}
|
||||||
}
|
|
||||||
|
public HazoretsUndyingFuryEffect() {
|
||||||
public HazoretsUndyingFuryEffect() {
|
super(Outcome.Benefit);
|
||||||
super(Outcome.Benefit);
|
this.staticText = "Shuffle your library, then exile the top four cards. You may cast any number of nonland cards with converted mana cost 5 or less from among them without paying their mana costs";
|
||||||
this.staticText = "Shuffle your library, then exile the top four cards. You may cast any number of nonland cards with converted mana cost 5 or less from among them without paying their mana costs. ";
|
}
|
||||||
}
|
|
||||||
|
public HazoretsUndyingFuryEffect(final HazoretsUndyingFuryEffect effect) {
|
||||||
public HazoretsUndyingFuryEffect(final HazoretsUndyingFuryEffect effect) {
|
super(effect);
|
||||||
super(effect);
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public HazoretsUndyingFuryEffect copy() {
|
||||||
public HazoretsUndyingFuryEffect copy() {
|
return new HazoretsUndyingFuryEffect(this);
|
||||||
return new HazoretsUndyingFuryEffect(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());
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
if (controller != null && sourceObject != null) {
|
||||||
if (controller != null && sourceObject != null) {
|
controller.shuffleLibrary(source, game);
|
||||||
controller.shuffleLibrary(source, game);
|
// move cards from library to exile
|
||||||
// move cards from library to exile
|
controller.moveCardsToExile(controller.getLibrary().getTopCards(game, 4), source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||||
controller.moveCardsToExile(controller.getLibrary().getTopCards(game, 4), source, game, true, source.getSourceId(), sourceObject.getIdName());
|
// cast the possible cards without paying the mana
|
||||||
// cast the possible cards without paying the mana
|
ExileZone hazoretsUndyingFuryExileZone = game.getExile().getExileZone(source.getSourceId());
|
||||||
ExileZone hazoretsUndyingFuryExileZone = game.getExile().getExileZone(source.getSourceId());
|
Cards cardsToCast = new CardsImpl();
|
||||||
FilterCard filter = new FilterNonlandCard();
|
if (hazoretsUndyingFuryExileZone == null) {
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 6));
|
return true;
|
||||||
filter.setMessage("nonland cards with converted mana cost 5 or less");
|
}
|
||||||
Cards cardsToCast = new CardsImpl();
|
cardsToCast.addAll(hazoretsUndyingFuryExileZone.getCards(filter, source.getSourceId(), source.getControllerId(), game));
|
||||||
if (hazoretsUndyingFuryExileZone == null) {
|
while (!cardsToCast.isEmpty()) {
|
||||||
return true;
|
if (!controller.chooseUse(Outcome.PlayForFree, "Cast (another) a card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) {
|
||||||
}
|
break;
|
||||||
cardsToCast.addAll(hazoretsUndyingFuryExileZone.getCards(filter, source.getSourceId(), source.getControllerId(), game));
|
}
|
||||||
while (!cardsToCast.isEmpty()) {
|
TargetCard targetCard = new TargetCard(1, Zone.EXILED, new FilterCard("nonland card to cast for free"));
|
||||||
if (!controller.chooseUse(Outcome.PlayForFree, "Cast (another) a card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) {
|
if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) {
|
||||||
break;
|
Card card = game.getCard(targetCard.getFirstTarget());
|
||||||
}
|
if (card != null) {
|
||||||
TargetCard targetCard = new TargetCard(1, Zone.EXILED, new FilterCard("nonland card to cast for free"));
|
if (controller.cast(card.getSpellAbility(), game, true)) {
|
||||||
if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) {
|
cardsToCast.remove(card);
|
||||||
Card card = game.getCard(targetCard.getFirstTarget());
|
} else {
|
||||||
if (card != null) {
|
game.informPlayer(controller, "You're not able to cast " + card.getIdName() + " or you canceled the casting.");
|
||||||
if (controller.cast(card.getSpellAbility(), game, true)) {
|
}
|
||||||
cardsToCast.remove(card);
|
}
|
||||||
} else {
|
}
|
||||||
game.informPlayer(controller, "You're not able to cast " + card.getIdName() + " or you canceled the casting.");
|
}
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
}
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,106 +1,106 @@
|
||||||
/*
|
/*
|
||||||
* 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.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.RequirementEffect;
|
import mage.abilities.effects.RequirementEffect;
|
||||||
import mage.abilities.effects.common.DontUntapInOpponentsNextUntapStepAllEffect;
|
import mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect;
|
||||||
import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
|
import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
|
||||||
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.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class ImaginaryThreats extends CardImpl {
|
public class ImaginaryThreats extends CardImpl {
|
||||||
|
|
||||||
public ImaginaryThreats(UUID ownerId, CardSetInfo setInfo) {
|
public ImaginaryThreats(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
|
||||||
|
|
||||||
// Creatures target opponent controls attack this turn if able. During that player's next untap step, creatures he or she controls don't untap.
|
// Creatures target opponent controls attack this turn if able. During that player's next untap step, creatures he or she controls don't untap.
|
||||||
getSpellAbility().addEffect(new ImaginaryThreatsEffect());
|
getSpellAbility().addEffect(new ImaginaryThreatsEffect());
|
||||||
getSpellAbility().addTarget(new TargetOpponent());
|
getSpellAbility().addTarget(new TargetOpponent());
|
||||||
getSpellAbility().addEffect(new DontUntapInOpponentsNextUntapStepAllEffect(new FilterCreaturePermanent())
|
getSpellAbility().addEffect(new DontUntapInPlayersNextUntapStepAllEffect(new FilterCreaturePermanent())
|
||||||
.setText("During that player's next untap step, creatures he or she controls don't untap"));
|
.setText("During that player's next untap step, creatures he or she controls don't untap"));
|
||||||
// Cycling {2}
|
// Cycling {2}
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImaginaryThreats(final ImaginaryThreats card) {
|
public ImaginaryThreats(final ImaginaryThreats card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImaginaryThreats copy() {
|
public ImaginaryThreats copy() {
|
||||||
return new ImaginaryThreats(this);
|
return new ImaginaryThreats(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ImaginaryThreatsEffect extends OneShotEffect {
|
class ImaginaryThreatsEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ImaginaryThreatsEffect() {
|
public ImaginaryThreatsEffect() {
|
||||||
super(Outcome.Detriment);
|
super(Outcome.Detriment);
|
||||||
staticText = "Creatures target opponent controls attack this turn if able";
|
staticText = "Creatures target opponent controls attack this turn if able";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImaginaryThreatsEffect(final ImaginaryThreatsEffect effect) {
|
public ImaginaryThreatsEffect(final ImaginaryThreatsEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImaginaryThreatsEffect copy() {
|
public ImaginaryThreatsEffect copy() {
|
||||||
return new ImaginaryThreatsEffect(this);
|
return new ImaginaryThreatsEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||||
filter.add(new ControllerIdPredicate(player.getId()));
|
filter.add(new ControllerIdPredicate(player.getId()));
|
||||||
RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn);
|
RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn);
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,11 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DontUntapInOpponentsNextUntapStepAllEffect;
|
import mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -42,8 +43,6 @@ import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author ciaccona007
|
* @author ciaccona007
|
||||||
|
@ -67,11 +66,12 @@ public class ManaVapors extends CardImpl {
|
||||||
return new ManaVapors(this);
|
return new ManaVapors(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ManaVaporsEffect extends OneShotEffect {
|
class ManaVaporsEffect extends OneShotEffect {
|
||||||
|
|
||||||
ManaVaporsEffect() {
|
ManaVaporsEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Lands target player controls don't untap during his or her next untap step.";
|
this.staticText = "Lands target player controls don't untap during his or her next untap step";
|
||||||
}
|
}
|
||||||
|
|
||||||
ManaVaporsEffect(final ManaVaporsEffect effect) {
|
ManaVaporsEffect(final ManaVaporsEffect effect) {
|
||||||
|
@ -85,13 +85,12 @@ class ManaVaporsEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getFirstTarget());
|
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
if (targetPlayer != null) {
|
||||||
if (player != null) {
|
|
||||||
FilterLandPermanent filter = new FilterLandPermanent();
|
FilterLandPermanent filter = new FilterLandPermanent();
|
||||||
filter.add(new ControllerIdPredicate(player.getId()));
|
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
|
||||||
ContinuousEffect effect = new DontUntapInOpponentsNextUntapStepAllEffect(filter);
|
ContinuousEffect effect = new DontUntapInPlayersNextUntapStepAllEffect(filter);
|
||||||
effect.setTargetPointer(new FixedTarget(player.getId()));
|
effect.setTargetPointer(new FixedTarget(targetPlayer.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ import mage.players.Player;
|
||||||
/**
|
/**
|
||||||
* @author okuRaku
|
* @author okuRaku
|
||||||
*/
|
*/
|
||||||
public class DontUntapInOpponentsNextUntapStepAllEffect extends ContinuousRuleModifyingEffectImpl {
|
public class DontUntapInPlayersNextUntapStepAllEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
|
|
||||||
private int validForTurnNum;
|
private int validForTurnNum;
|
||||||
//private String targetName;
|
//private String targetName;
|
||||||
|
@ -57,12 +57,12 @@ public class DontUntapInOpponentsNextUntapStepAllEffect extends ContinuousRuleMo
|
||||||
*
|
*
|
||||||
* @param filter
|
* @param filter
|
||||||
*/
|
*/
|
||||||
public DontUntapInOpponentsNextUntapStepAllEffect(FilterPermanent filter) {
|
public DontUntapInPlayersNextUntapStepAllEffect(FilterPermanent filter) {
|
||||||
super(Duration.Custom, Outcome.Detriment, false, true);
|
super(Duration.Custom, Outcome.Detriment, false, true);
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DontUntapInOpponentsNextUntapStepAllEffect(final DontUntapInOpponentsNextUntapStepAllEffect effect) {
|
public DontUntapInPlayersNextUntapStepAllEffect(final DontUntapInPlayersNextUntapStepAllEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.validForTurnNum = effect.validForTurnNum;
|
this.validForTurnNum = effect.validForTurnNum;
|
||||||
this.filter = effect.filter;
|
this.filter = effect.filter;
|
||||||
|
@ -70,8 +70,8 @@ public class DontUntapInOpponentsNextUntapStepAllEffect extends ContinuousRuleMo
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DontUntapInOpponentsNextUntapStepAllEffect copy() {
|
public DontUntapInPlayersNextUntapStepAllEffect copy() {
|
||||||
return new DontUntapInOpponentsNextUntapStepAllEffect(this);
|
return new DontUntapInPlayersNextUntapStepAllEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
Loading…
Reference in a new issue