Moved some postresolveEffects to the correct package.

This commit is contained in:
LevelX2 2015-03-24 15:45:33 +01:00
parent 16b01b03be
commit 2a9af5ad99
17 changed files with 31 additions and 22 deletions

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.discard.DiscardControllerEffect; import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.abilities.effects.common.ReturnToHandSpellEffect; import mage.abilities.effects.postresolve.ReturnToHandSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;

View file

@ -32,7 +32,7 @@ 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.ReplacementEffectImpl; import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.ReturnToLibrarySpellEffect; import mage.abilities.effects.postresolve.ReturnToLibrarySpellEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;

View file

@ -32,7 +32,7 @@ import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;

View file

@ -33,7 +33,7 @@ import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game; import mage.game.Game;
import mage.game.turn.TurnMod; import mage.game.turn.TurnMod;

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.counters.CounterType; import mage.counters.CounterType;

View file

@ -33,7 +33,7 @@ import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DrawCardTargetEffect; import mage.abilities.effects.common.DrawCardTargetEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;

View file

@ -33,7 +33,7 @@ import mage.constants.Rarity;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.Outcome; import mage.constants.Outcome;

View file

@ -30,7 +30,7 @@ package mage.sets.mirrodinbesieged;
import java.util.UUID; import java.util.UUID;
import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies; import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;

View file

@ -33,7 +33,7 @@ import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;

View file

@ -29,7 +29,7 @@ package mage.sets.planechase;
import java.util.UUID; import java.util.UUID;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;

View file

@ -33,7 +33,7 @@ import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.postresolve.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;

View file

@ -663,16 +663,18 @@ public abstract class AbilityImpl implements Ability {
@Override @Override
public List<Watcher> getWatchers() { public List<Watcher> getWatchers() {
if (watchers != null) if (watchers != null) {
return watchers; return watchers;
else } else {
return emptyWatchers; return emptyWatchers;
}
} }
@Override @Override
public void addWatcher(Watcher watcher) { public void addWatcher(Watcher watcher) {
if (watchers == null) if (watchers == null) {
watchers = new ArrayList<>(); watchers = new ArrayList<>();
}
watcher.setSourceId(this.sourceId); watcher.setSourceId(this.sourceId);
watcher.setControllerId(this.controllerId); watcher.setControllerId(this.controllerId);
watchers.add(watcher); watchers.add(watcher);
@ -680,16 +682,18 @@ public abstract class AbilityImpl implements Ability {
@Override @Override
public List<Ability> getSubAbilities() { public List<Ability> getSubAbilities() {
if (subAbilities != null) if (subAbilities != null) {
return subAbilities; return subAbilities;
else } else {
return emptyAbilities; return emptyAbilities;
}
} }
@Override @Override
public void addSubAbility(Ability ability) { public void addSubAbility(Ability ability) {
if (subAbilities == null) if (subAbilities == null) {
subAbilities = new ArrayList<>(); subAbilities = new ArrayList<>();
}
ability.setSourceId(this.sourceId); ability.setSourceId(this.sourceId);
ability.setControllerId(this.controllerId); ability.setControllerId(this.controllerId);
subAbilities.add(ability); subAbilities.add(ability);

View file

@ -36,6 +36,8 @@ import mage.game.Game;
import java.io.ObjectStreamException; import java.io.ObjectStreamException;
import java.util.UUID; import java.util.UUID;
import mage.constants.Zone;
import mage.players.Player;
/** /**
* *
@ -64,6 +66,9 @@ public class ExileSpellEffect extends PostResolveEffect implements MageSingleton
@Override @Override
public void postResolve(Card card, Ability source, UUID controllerId, Game game) { public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
card.moveToExile(null, "", source.getSourceId(), game); Player controller = game.getPlayer(controllerId);
if (controller != null) {
controller.moveCardToExileWithInfo(card, null, "", controllerId, game, Zone.STACK);
}
} }
} }

View file

@ -1,4 +1,4 @@
package mage.abilities.effects.common; package mage.abilities.effects.postresolve;
import mage.constants.Zone; import mage.constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;

View file

@ -25,7 +25,7 @@
* 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; package mage.abilities.effects.postresolve;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;

View file

@ -26,7 +26,7 @@
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.abilities.effects.common; package mage.abilities.effects.postresolve;
import mage.constants.Zone; import mage.constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;