mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Removed unused code.
This commit is contained in:
parent
d2c649e6f9
commit
89542ccb67
3 changed files with 19 additions and 24 deletions
|
@ -51,7 +51,6 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
import mage.util.CardUtil;
|
|
||||||
import mage.util.RandomUtil;
|
import mage.util.RandomUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,7 +60,7 @@ import mage.util.RandomUtil;
|
||||||
public class ElkinLair extends CardImpl {
|
public class ElkinLair extends CardImpl {
|
||||||
|
|
||||||
public ElkinLair(UUID ownerId, CardSetInfo setInfo) {
|
public ElkinLair(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
|
||||||
addSuperType(SuperType.WORLD);
|
addSuperType(SuperType.WORLD);
|
||||||
|
|
||||||
// At the beginning of each player's upkeep, that player exiles a card at random from his or her hand. The player may play that card this turn. At the beginning of the next end step, if the player hasn't played the card, he or she puts it into his or her graveyard.
|
// At the beginning of each player's upkeep, that player exiles a card at random from his or her hand. The player may play that card this turn. At the beginning of the next end step, if the player hasn't played the card, he or she puts it into his or her graveyard.
|
||||||
|
@ -114,8 +113,6 @@ class ElkinLairUpkeepEffect extends OneShotEffect {
|
||||||
|
|
||||||
DelayedTriggeredAbility delayed = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ElkinLairPutIntoGraveyardEffect());
|
DelayedTriggeredAbility delayed = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ElkinLairPutIntoGraveyardEffect());
|
||||||
game.addDelayedTriggeredAbility(delayed, source);
|
game.addDelayedTriggeredAbility(delayed, source);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -173,7 +170,6 @@ class ElkinLairPutIntoGraveyardEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(game.getActivePlayerId());
|
Player player = game.getPlayer(game.getActivePlayerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0);
|
|
||||||
Set<Card> cardsInExile = game.getExile().getExileZone(source.getSourceId()).getCards(game);
|
Set<Card> cardsInExile = game.getExile().getExileZone(source.getSourceId()).getCards(game);
|
||||||
if (cardsInExile != null) {
|
if (cardsInExile != null) {
|
||||||
player.moveCardsToGraveyardWithInfo(cardsInExile, source, game, Zone.EXILED);
|
player.moveCardsToGraveyardWithInfo(cardsInExile, source, game, Zone.EXILED);
|
||||||
|
|
|
@ -34,8 +34,8 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
import mage.abilities.condition.InvertCondition;
|
import mage.abilities.condition.InvertCondition;
|
||||||
import mage.abilities.condition.common.TargetAttackedThisTurnCondition;
|
|
||||||
import mage.abilities.condition.common.BeforeAttackersAreDeclaredCondition;
|
import mage.abilities.condition.common.BeforeAttackersAreDeclaredCondition;
|
||||||
|
import mage.abilities.condition.common.TargetAttackedThisTurnCondition;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
@ -52,7 +52,6 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.filter.predicate.permanent.ControlledFromStartOfControllerTurnPredicate;
|
import mage.filter.predicate.permanent.ControlledFromStartOfControllerTurnPredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
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;
|
||||||
|
@ -64,11 +63,13 @@ import mage.watchers.common.AttackedThisTurnWatcher;
|
||||||
public class Norritt extends CardImpl {
|
public class Norritt extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filterBlue = new FilterCreaturePermanent("blue creature");
|
private static final FilterCreaturePermanent filterBlue = new FilterCreaturePermanent("blue creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
|
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("non-Wall creature");
|
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("non-Wall creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterCreature.add(Predicates.not(new SubtypePredicate(SubType.WALL)));
|
filterCreature.add(Predicates.not(new SubtypePredicate(SubType.WALL)));
|
||||||
filterCreature.add(new ControlledFromStartOfControllerTurnPredicate());
|
filterCreature.add(new ControlledFromStartOfControllerTurnPredicate());
|
||||||
|
|
|
@ -41,15 +41,13 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||||
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.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.WatcherScope;
|
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.WatcherScope;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.filter.StaticFilters;
|
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||||
|
@ -117,13 +115,13 @@ class SeasonOfTheWitchEffect extends OneShotEffect {
|
||||||
// Creatures that attacked are safe.
|
// Creatures that attacked are safe.
|
||||||
AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName());
|
AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName());
|
||||||
if (watcher != null
|
if (watcher != null
|
||||||
&& watcher.getAttackedThisTurnCreatures().contains(new MageObjectReference(permanent, game)) ) {
|
&& watcher.getAttackedThisTurnCreatures().contains(new MageObjectReference(permanent, game))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Creatures that couldn't attack are safe.
|
// Creatures that couldn't attack are safe.
|
||||||
CouldAttackThisTurnWatcher watcher2 = (CouldAttackThisTurnWatcher) game.getState().getWatchers().get(CouldAttackThisTurnWatcher.class.getSimpleName());
|
CouldAttackThisTurnWatcher watcher2 = (CouldAttackThisTurnWatcher) game.getState().getWatchers().get(CouldAttackThisTurnWatcher.class.getSimpleName());
|
||||||
if (watcher2 != null
|
if (watcher2 != null
|
||||||
&& !watcher2.getCouldAttackThisTurnCreatures().contains(new MageObjectReference(permanent, game)) ) {
|
&& !watcher2.getCouldAttackThisTurnCreatures().contains(new MageObjectReference(permanent, game))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Destroy the rest.
|
// Destroy the rest.
|
||||||
|
|
Loading…
Reference in a new issue