Implemented old cards

This commit is contained in:
L_J 2018-05-01 02:07:45 +02:00 committed by GitHub
parent 196e428f7b
commit 58a829de0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1211 additions and 5 deletions

View file

@ -47,11 +47,13 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
protected int amount;
protected boolean putToGraveyard;
protected boolean mayShuffleAfter; // for Visions
public LookLibraryTopCardTargetPlayerEffect(int amount) {
super(Outcome.Benefit);
this.amount = amount;
this.putToGraveyard = false;
this.mayShuffleAfter = false;
setText();
}
@ -59,6 +61,15 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
super(Outcome.Benefit);
this.amount = amount;
this.putToGraveyard = putToGraveyard;
this.mayShuffleAfter = false;
setText();
}
public LookLibraryTopCardTargetPlayerEffect(int amount, boolean putToGraveyard, boolean mayShuffleAfter) {
super(Outcome.Benefit);
this.amount = amount;
this.putToGraveyard = putToGraveyard;
this.mayShuffleAfter = mayShuffleAfter;
setText();
}
@ -70,6 +81,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
super(effect);
amount = effect.amount;
putToGraveyard = effect.putToGraveyard;
mayShuffleAfter = effect.mayShuffleAfter;
}
@Override
@ -95,6 +107,11 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
}
}
}
if (mayShuffleAfter) {
if (player.chooseUse(Outcome.Benefit, (player == targetPlayer ? "Shuffle your library?" : "Do you want the chosen player to shuffle his or her library?"), source, game)) {
targetPlayer.shuffleLibrary(source, game);
}
}
return true;
}
return false;
@ -118,6 +135,9 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
}
sb.append(" into that player's graveyard");
}
if (mayShuffleAfter) {
sb.append(". You may then have that player shuffle that library");
}
this.staticText = sb.toString();
}
}