mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
fixed issue 225
This commit is contained in:
parent
19481bf961
commit
d903ba56e1
11 changed files with 14 additions and 10 deletions
|
@ -95,7 +95,7 @@ class ElixerOfImmortalityEffect extends OneShotEffect<ElixerOfImmortalityEffect>
|
|||
}
|
||||
player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
|
||||
player.getGraveyard().clear();
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -104,7 +104,7 @@ class MassPolymorphEffect extends OneShotEffect<MassPolymorphEffect> {
|
|||
creatureCard.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId());
|
||||
}
|
||||
player.getLibrary().addAll(nonCreatureCards.getCards(game), game);
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class TimeReversalEffect extends OneShotEffect<TimeReversalEffect> {
|
|||
if (player != null) {
|
||||
player.getLibrary().addAll(player.getHand().getCards(game), game);
|
||||
player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
player.getHand().clear();
|
||||
player.getGraveyard().clear();
|
||||
player.drawCards(7, game);
|
||||
|
|
|
@ -139,7 +139,7 @@ class EmrakultheAeonsTornEffect extends OneShotEffect<EmrakultheAeonsTornEffect>
|
|||
/*permanent.moveToZone(Zone.LIBRARY, source.getId(), game, true);*/
|
||||
player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
|
||||
player.getGraveyard().clear();
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -128,7 +128,7 @@ class KozilekButcherOfTruthEffect extends OneShotEffect<KozilekButcherOfTruthEff
|
|||
/*permanent.moveToZone(Zone.LIBRARY, source.getId(), game, true);*/
|
||||
player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
|
||||
player.getGraveyard().clear();
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -91,7 +91,7 @@ class SeeBeyondEffect extends OneShotEffect<SeeBeyondEffect> {
|
|||
if (card != null) {
|
||||
player.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, true);
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ class UlamogTheInfiniteGyreEnterGraveyardEffect extends OneShotEffect<UlamogTheI
|
|||
if (player != null) {
|
||||
player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
|
||||
player.getGraveyard().clear();
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -87,7 +87,7 @@ class MoltenPsycheEffect extends OneShotEffect<MoltenPsycheEffect> {
|
|||
if (player != null) {
|
||||
int count = player.getHand().size();
|
||||
player.getLibrary().addAll(player.getHand().getCards(game), game);
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
player.getHand().clear();
|
||||
player.drawCards(count, game);
|
||||
if (MetalcraftCondition.getInstance().apply(game, source) && !playerId.equals(source.getControllerId())) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public class ShapeAnew extends CardImpl<ShapeAnew> {
|
|||
player.revealCards("Shape Anew", revealed, game);
|
||||
artifactCard.putOntoBattlefield(game, Constants.Zone.LIBRARY, source.getId(), controller.getId());
|
||||
player.getLibrary().addAll(nonArtifactCards.getCards(game), game);
|
||||
player.getLibrary().shuffle();
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ public class GameEvent {
|
|||
DECLARING_BLOCKERS, DECLARED_BLOCKERS,
|
||||
DECLARE_BLOCKER, BLOCKER_DECLARED,
|
||||
SEARCH_LIBRARY, LIBRARY_SEARCHED,
|
||||
SHUFFLE_LIBRARY, LIBRARY_SHUFFLED,
|
||||
|
||||
//permanent events
|
||||
ENTERS_THE_BATTLEFIELD,
|
||||
|
|
|
@ -612,7 +612,10 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
|
||||
@Override
|
||||
public void shuffleLibrary(Game game) {
|
||||
this.library.shuffle();
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.SHUFFLE_LIBRARY, playerId, playerId))) {
|
||||
this.library.shuffle();
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LIBRARY_SHUFFLED, playerId, playerId));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue