mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Updated Chaos Warp
This commit is contained in:
parent
dc943fd851
commit
9533a513be
1 changed files with 5 additions and 4 deletions
|
@ -44,6 +44,9 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -97,7 +100,7 @@ class ChaosWarpShuffleIntoLibraryEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
if (permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true) ) {
|
||||
if (game.getPlayer(permanent.getOwnerId()).moveCardToLibrary(permanent)) {
|
||||
game.getPlayer(permanent.getOwnerId()).shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
|
@ -136,9 +139,7 @@ public ChaosWarpRevealEffect() {
|
|||
player.revealCards("Chaos Warp", cards, game);
|
||||
|
||||
if (card != null) {
|
||||
if ((cardType.contains(CardType.ARTIFACT) || cardType.contains(CardType.CREATURE)
|
||||
|| cardType.contains(CardType.ENCHANTMENT) || cardType.contains(CardType.LAND)
|
||||
|| cardType.contains(CardType.PLANESWALKER)))) {
|
||||
if (card.FilterPermanentCard.match()) {
|
||||
card = player.getLibrary().removeFromTop(game);
|
||||
card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue