mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +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.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
|
@ -61,7 +60,7 @@ import mage.util.RandomUtil;
|
|||
public class ElkinLair extends CardImpl {
|
||||
|
||||
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);
|
||||
|
||||
// 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());
|
||||
game.addDelayedTriggeredAbility(delayed, source);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -150,8 +147,8 @@ class ElkinLairPlayExiledEffect extends AsThoughEffectImpl {
|
|||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
Card card = game.getCard(objectId);
|
||||
if (card != null
|
||||
&& affectedControllerId.equals(card.getOwnerId())
|
||||
&& game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||
&& affectedControllerId.equals(card.getOwnerId())
|
||||
&& game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -173,7 +170,6 @@ class ElkinLairPutIntoGraveyardEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player != null) {
|
||||
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), 0);
|
||||
Set<Card> cardsInExile = game.getExile().getExileZone(source.getSourceId()).getCards(game);
|
||||
if (cardsInExile != null) {
|
||||
player.moveCardsToGraveyardWithInfo(cardsInExile, source, game, Zone.EXILED);
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.TargetAttackedThisTurnCondition;
|
||||
import mage.abilities.condition.common.BeforeAttackersAreDeclaredCondition;
|
||||
import mage.abilities.condition.common.TargetAttackedThisTurnCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
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.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
@ -64,11 +63,13 @@ import mage.watchers.common.AttackedThisTurnWatcher;
|
|||
public class Norritt extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterBlue = new FilterCreaturePermanent("blue creature");
|
||||
|
||||
static {
|
||||
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("non-Wall creature");
|
||||
|
||||
static {
|
||||
filterCreature.add(Predicates.not(new SubtypePredicate(SubType.WALL)));
|
||||
filterCreature.add(new ControlledFromStartOfControllerTurnPredicate());
|
||||
|
|
|
@ -41,15 +41,13 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.Watcher;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
@ -117,13 +115,13 @@ class SeasonOfTheWitchEffect extends OneShotEffect {
|
|||
// Creatures that attacked are safe.
|
||||
AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName());
|
||||
if (watcher != null
|
||||
&& watcher.getAttackedThisTurnCreatures().contains(new MageObjectReference(permanent, game)) ) {
|
||||
&& watcher.getAttackedThisTurnCreatures().contains(new MageObjectReference(permanent, game))) {
|
||||
continue;
|
||||
}
|
||||
// Creatures that couldn't attack are safe.
|
||||
CouldAttackThisTurnWatcher watcher2 = (CouldAttackThisTurnWatcher) game.getState().getWatchers().get(CouldAttackThisTurnWatcher.class.getSimpleName());
|
||||
if (watcher2 != null
|
||||
&& !watcher2.getCouldAttackThisTurnCreatures().contains(new MageObjectReference(permanent, game)) ) {
|
||||
&& !watcher2.getCouldAttackThisTurnCreatures().contains(new MageObjectReference(permanent, game))) {
|
||||
continue;
|
||||
}
|
||||
// Destroy the rest.
|
||||
|
|
Loading…
Reference in a new issue