remove AIRevealAction.Hide from ShuffleLibraryAction, call it in executeEvent
parent
094967c0da
commit
232065a590
|
@ -17,7 +17,6 @@ public class ShuffleLibraryAction extends MagicAction {
|
|||
public void doAction(final MagicGame game) {
|
||||
oldLibrary=new MagicCardList(player.getLibrary());
|
||||
player.getLibrary().shuffle();
|
||||
game.doAction(AIRevealAction.Hide(player.getLibrary()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -45,6 +45,7 @@ public class MagicSearchOntoBattlefieldEvent extends MagicEvent {
|
|||
|
||||
@Override
|
||||
public void onAddEvent(final MagicGame game) {
|
||||
// reveal library so that search can choose the actual cards
|
||||
game.doAction(new AIRevealAction(getPlayer().getLibrary()));
|
||||
}
|
||||
|
||||
|
@ -54,7 +55,7 @@ public class MagicSearchOntoBattlefieldEvent extends MagicEvent {
|
|||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
// choice could be MagicMayChoice or MagicTargetChoice or MagicFromCardListChoice
|
||||
if (event.isNo()) {
|
||||
game.doAction(AIRevealAction.Hide(event.getPlayer().getLibrary()));
|
||||
// do nothing
|
||||
} else if (event.getChosen()[0] instanceof MagicCardChoiceResult) {
|
||||
event.processChosenCards(game, new MagicCardAction() {
|
||||
public void doAction(final MagicCard card) {
|
||||
|
@ -74,6 +75,8 @@ public class MagicSearchOntoBattlefieldEvent extends MagicEvent {
|
|||
});
|
||||
game.doAction(new ShuffleLibraryAction(event.getPlayer()));
|
||||
}
|
||||
// hide back all the cards in the library
|
||||
game.doAction(AIRevealAction.Hide(event.getPlayer().getLibrary()));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public class MagicSearchToLocationEvent extends MagicEvent {
|
|||
|
||||
@Override
|
||||
public void onAddEvent(final MagicGame game) {
|
||||
// reveal library so that search can choose the actual cards
|
||||
game.doAction(new AIRevealAction(getPlayer().getLibrary()));
|
||||
}
|
||||
|
||||
|
@ -42,7 +43,7 @@ public class MagicSearchToLocationEvent extends MagicEvent {
|
|||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
// choice could be MagicMayChoice or MagicTargetChoice or MagicFromCardListChoice
|
||||
if (event.isNo()) {
|
||||
game.doAction(AIRevealAction.Hide(event.getPlayer().getLibrary()));
|
||||
// do nothing
|
||||
} else if (event.getChosen()[0] instanceof MagicCardChoiceResult) {
|
||||
game.doAction(new ShuffleLibraryAction(event.getPlayer()));
|
||||
event.processChosenCards(game, new MagicCardAction() {
|
||||
|
@ -64,6 +65,8 @@ public class MagicSearchToLocationEvent extends MagicEvent {
|
|||
}
|
||||
});
|
||||
}
|
||||
// hide back all the cards in the library
|
||||
game.doAction(AIRevealAction.Hide(event.getPlayer().getLibrary()));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue