mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +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;
|
||||||
|
|
|
@ -45,7 +45,6 @@ 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;
|
||||||
|
@ -86,7 +85,7 @@ public class HazoretsUndyingFury extends CardImpl {
|
||||||
|
|
||||||
class HazoretsUndyingFuryEffect extends OneShotEffect {
|
class HazoretsUndyingFuryEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static FilterCard filter = new FilterCard("any number of nonland cards with converted mana cost 5 or less");
|
private final static FilterCard filter = new FilterCard("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)));
|
||||||
|
@ -95,7 +94,7 @@ class HazoretsUndyingFuryEffect extends OneShotEffect {
|
||||||
|
|
||||||
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) {
|
||||||
|
@ -117,9 +116,6 @@ class HazoretsUndyingFuryEffect extends OneShotEffect {
|
||||||
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());
|
||||||
FilterCard filter = new FilterNonlandCard();
|
|
||||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 6));
|
|
||||||
filter.setMessage("nonland cards with converted mana cost 5 or less");
|
|
||||||
Cards cardsToCast = new CardsImpl();
|
Cards cardsToCast = new CardsImpl();
|
||||||
if (hazoretsUndyingFuryExileZone == null) {
|
if (hazoretsUndyingFuryExileZone == null) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -32,7 +32,7 @@ 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;
|
||||||
|
@ -58,7 +58,7 @@ public class ImaginaryThreats extends CardImpl {
|
||||||
// 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}")));
|
||||||
|
|
|
@ -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