mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Implemented old cards
This commit is contained in:
parent
196e428f7b
commit
58a829de0e
20 changed files with 1211 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue