forked from External/mage
[refactoring][minor] Replaced all tabs with four spaces.
This commit is contained in:
parent
e646e4768d
commit
239a4fb100
2891 changed files with 79411 additions and 79411 deletions
|
|
@ -54,7 +54,7 @@ public class LookLibraryControllerEffect extends OneShotEffect<LookLibraryContro
|
|||
protected DynamicValue numberOfCards;
|
||||
protected boolean mayShuffleAfter = false;
|
||||
protected boolean putOnTop = true; // if false on put back on bottom of library
|
||||
protected Zone targetZoneLookedCards; // GRAVEYARD, LIBRARY
|
||||
protected Zone targetZoneLookedCards; // GRAVEYARD, LIBRARY
|
||||
|
||||
public LookLibraryControllerEffect() {
|
||||
this(1);
|
||||
|
|
@ -76,16 +76,16 @@ public class LookLibraryControllerEffect extends OneShotEffect<LookLibraryContro
|
|||
this(new StaticValue(numberOfCards), mayShuffleAfter, putOnTop);
|
||||
}
|
||||
|
||||
public LookLibraryControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, boolean putOnTop) {
|
||||
this(Outcome.Benefit, numberOfCards, mayShuffleAfter, Zone.LIBRARY, putOnTop);
|
||||
}
|
||||
public LookLibraryControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, boolean putOnTop) {
|
||||
this(Outcome.Benefit, numberOfCards, mayShuffleAfter, Zone.LIBRARY, putOnTop);
|
||||
}
|
||||
|
||||
public LookLibraryControllerEffect(Outcome outcome, DynamicValue numberOfCards, boolean mayShuffleAfter, Zone targetZoneLookedCards, boolean putOnTop) {
|
||||
super(outcome);
|
||||
this.numberOfCards = numberOfCards;
|
||||
this.mayShuffleAfter = mayShuffleAfter;
|
||||
this.targetZoneLookedCards = targetZoneLookedCards;
|
||||
this.putOnTop = putOnTop;
|
||||
public LookLibraryControllerEffect(Outcome outcome, DynamicValue numberOfCards, boolean mayShuffleAfter, Zone targetZoneLookedCards, boolean putOnTop) {
|
||||
super(outcome);
|
||||
this.numberOfCards = numberOfCards;
|
||||
this.mayShuffleAfter = mayShuffleAfter;
|
||||
this.targetZoneLookedCards = targetZoneLookedCards;
|
||||
this.putOnTop = putOnTop;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ public class LookLibraryControllerEffect extends OneShotEffect<LookLibraryContro
|
|||
super(effect);
|
||||
this.numberOfCards = effect.numberOfCards.clone();
|
||||
this.mayShuffleAfter = effect.mayShuffleAfter;
|
||||
this.targetZoneLookedCards = effect.targetZoneLookedCards;
|
||||
this.targetZoneLookedCards = effect.targetZoneLookedCards;
|
||||
this.putOnTop = effect.putOnTop;
|
||||
}
|
||||
|
||||
|
|
@ -161,33 +161,33 @@ public class LookLibraryControllerEffect extends OneShotEffect<LookLibraryContro
|
|||
* @param game
|
||||
*/
|
||||
protected void putCardsBack(Ability source, Player player, Cards cards, Game game) {
|
||||
switch(targetZoneLookedCards) {
|
||||
case LIBRARY:
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard(this.getPutBackText()));
|
||||
target.setRequired(true);
|
||||
while (cards.size() > 1) {
|
||||
player.choose(Outcome.Neutral, cards, target, game);
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(targetZoneLookedCards, source.getId(), game, putOnTop);
|
||||
}
|
||||
target.clearChosen();
|
||||
}
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.get(cards.iterator().next(), game);
|
||||
card.moveToZone(targetZoneLookedCards, source.getId(), game, true);
|
||||
}
|
||||
break;
|
||||
case GRAVEYARD:
|
||||
for (Card card : cards.getCards(game)) {
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// not supported yet
|
||||
}
|
||||
}
|
||||
switch(targetZoneLookedCards) {
|
||||
case LIBRARY:
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard(this.getPutBackText()));
|
||||
target.setRequired(true);
|
||||
while (cards.size() > 1) {
|
||||
player.choose(Outcome.Neutral, cards, target, game);
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(targetZoneLookedCards, source.getId(), game, putOnTop);
|
||||
}
|
||||
target.clearChosen();
|
||||
}
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.get(cards.iterator().next(), game);
|
||||
card.moveToZone(targetZoneLookedCards, source.getId(), game, true);
|
||||
}
|
||||
break;
|
||||
case GRAVEYARD:
|
||||
for (Card card : cards.getCards(game)) {
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// not supported yet
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to shuffle library if allowed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue