mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
updated Cyclonic Rift
This commit is contained in:
parent
1311cf52bb
commit
473834b1da
1 changed files with 6 additions and 38 deletions
|
@ -28,21 +28,17 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.OverloadAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -65,7 +61,9 @@ public class CyclonicRift extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
|
||||
// Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
|
||||
this.addAbility(new OverloadAbility(this, new CyclonicRiftEffect(), new ManaCostsImpl("{6}{U}")));
|
||||
Effect effect = new ReturnToHandFromBattlefieldAllEffect(filter);
|
||||
effect.setText("Return each nonland permanent you don't control to its owner's hand");
|
||||
this.addAbility(new OverloadAbility(this, effect, new ManaCostsImpl("{6}{U}")));
|
||||
}
|
||||
|
||||
public CyclonicRift(final CyclonicRift card) {
|
||||
|
@ -77,33 +75,3 @@ public class CyclonicRift extends CardImpl {
|
|||
return new CyclonicRift(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CyclonicRiftEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
|
||||
|
||||
public CyclonicRiftEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
staticText = "Return each nonland permanent you don't control to its owner's hand";
|
||||
}
|
||||
|
||||
public CyclonicRiftEffect(final CyclonicRiftEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
if (!creature.getControllerId().equals(source.getControllerId())) {
|
||||
creature.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CyclonicRiftEffect copy() {
|
||||
return new CyclonicRiftEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue