Minor fix

This commit is contained in:
Zzooouhh 2017-12-30 02:42:32 +01:00 committed by GitHub
parent c675f3b4d1
commit 310764814f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2321,13 +2321,15 @@ public abstract class PlayerImpl implements Player, Serializable {
}
do {
if (newTarget.choose(Outcome.Neutral, playerId, targetPlayerId, game)) {
if (!targetPlayerId.equals(playerId) || !handleLibraryCastableCreatures(library, game, targetPlayerId)) { // for handling Panglacial Wurm
target.getTargets().clear();
for (UUID targetId : newTarget.getTargets()) {
target.add(targetId, game);
}
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LIBRARY_SEARCHED, targetPlayerId, playerId));
if (targetPlayerId.equals(playerId) && handleLibraryCastableCreatures(library, game, targetPlayerId)) { // for handling Panglacial Wurm
newTarget.clearChosen();
continue;
}
target.getTargets().clear();
for (UUID targetId : newTarget.getTargets()) {
target.add(targetId, game);
}
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LIBRARY_SEARCHED, targetPlayerId, playerId));
} else if (targetPlayerId.equals(playerId) && handleLibraryCastableCreatures(library, game, targetPlayerId)) {
newTarget.clearChosen();
continue;