mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Academy Rector - minor changes.
This commit is contained in:
parent
aa5c0cb387
commit
a4087b5e4d
1 changed files with 8 additions and 10 deletions
|
@ -96,21 +96,19 @@ class AcademyRectorEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
boolean applied = false;
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Player you = game.getPlayer(source.getControllerId());
|
if (controller != null) {
|
||||||
if (you != null) {
|
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
you.searchLibrary(target, game);
|
controller.searchLibrary(target, game);
|
||||||
Card targetCard = game.getCard(target.getFirstTarget());
|
Card targetCard = game.getCard(target.getFirstTarget());
|
||||||
if (targetCard == null) {
|
if (targetCard != null) {
|
||||||
applied = false;
|
controller.putOntoBattlefieldWithInfo(targetCard, game, Zone.LIBRARY, source.getSourceId());
|
||||||
} else{
|
|
||||||
applied = you.putOntoBattlefieldWithInfo(targetCard, game, Zone.LIBRARY, source.getSourceId());
|
|
||||||
you.shuffleLibrary(game);
|
|
||||||
}
|
}
|
||||||
|
controller.shuffleLibrary(game);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return applied;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue