mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Some minor fixes to player class.
This commit is contained in:
parent
abca80e951
commit
b10c01f517
1 changed files with 3 additions and 4 deletions
|
@ -875,16 +875,15 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean putCardsOnTopOfLibrary(Cards cardsToLibrary, Game game, Ability source, boolean anyOrder) {
|
public boolean putCardsOnTopOfLibrary(Cards cardsToLibrary, Game game, Ability source, boolean anyOrder) {
|
||||||
|
if (!cardsToLibrary.isEmpty()) {
|
||||||
Cards cards = new CardsImpl(cardsToLibrary); // prevent possible ConcurrentModificationException
|
Cards cards = new CardsImpl(cardsToLibrary); // prevent possible ConcurrentModificationException
|
||||||
cards.addAll(cardsToLibrary);
|
|
||||||
if (!cards.isEmpty()) {
|
|
||||||
UUID sourceId = (source == null ? null : source.getSourceId());
|
UUID sourceId = (source == null ? null : source.getSourceId());
|
||||||
if (!anyOrder) {
|
if (!anyOrder) {
|
||||||
for (UUID cardId : cards) {
|
for (UUID cardId : cards) {
|
||||||
moveObjectToLibrary(cardId, sourceId, game, true, false);
|
moveObjectToLibrary(cardId, sourceId, game, true, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the top of your library (last one chosen will be topmost)"));
|
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put on the top of your library (last one chosen will be topmost)"));
|
||||||
target.setRequired(true);
|
target.setRequired(true);
|
||||||
while (isInGame() && cards.size() > 1) {
|
while (isInGame() && cards.size() > 1) {
|
||||||
this.choose(Outcome.Neutral, cards, target, game);
|
this.choose(Outcome.Neutral, cards, target, game);
|
||||||
|
|
Loading…
Reference in a new issue