mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Another refinement to Chaos Warp.
This commit is contained in:
parent
ce5d03446f
commit
bef951d522
1 changed files with 4 additions and 3 deletions
|
@ -99,9 +99,10 @@ class ChaosWarpShuffleIntoLibraryEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
if (permanent != null) {
|
Player owner = game.getPlayer(permanent.getOwnerId());
|
||||||
if (game.getPlayer(permanent.getOwnerId()).moveCardToLibraryWithInfo(permanent, source.getSourceID(), game, null, true, true)) {
|
if (permanent != null && owner != null) {
|
||||||
game.getPlayer(permanent.getOwnerId()).shuffleLibrary(game);
|
if (owner.moveCardToLibrary(permanent, source.getSourceID(), game, Zone.Battlefield, true, true) {
|
||||||
|
owner.shuffleLibrary(game);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue