mirror of
https://github.com/correl/mage.git
synced 2024-11-25 11:09:53 +00:00
fixed Relentless Pursuit (NPE errors)
This commit is contained in:
parent
cff44f1436
commit
56d52899c8
1 changed files with 8 additions and 4 deletions
|
@ -89,15 +89,19 @@ class RelentlessPursuitEffect extends OneShotEffect {
|
||||||
if (creatureCardFound) {
|
if (creatureCardFound) {
|
||||||
TargetCard target = new TargetCardInLibrary(0, 1, creatureFilter);
|
TargetCard target = new TargetCardInLibrary(0, 1, creatureFilter);
|
||||||
controller.chooseTarget(Outcome.DrawCard, cards, target, source, game);
|
controller.chooseTarget(Outcome.DrawCard, cards, target, source, game);
|
||||||
|
if (target.getFirstTarget() != null) {
|
||||||
cards.remove(target.getFirstTarget());
|
cards.remove(target.getFirstTarget());
|
||||||
cardsToHand.add(target.getFirstTarget());
|
cardsToHand.add(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (landCardFound) {
|
if (landCardFound) {
|
||||||
TargetCard target = new TargetCardInLibrary(0, 1, landFilter);
|
TargetCard target = new TargetCardInLibrary(0, 1, landFilter);
|
||||||
controller.chooseTarget(Outcome.DrawCard, cards, target, source, game);
|
controller.chooseTarget(Outcome.DrawCard, cards, target, source, game);
|
||||||
|
if (target.getFirstTarget() != null) {
|
||||||
cards.remove(target.getFirstTarget());
|
cards.remove(target.getFirstTarget());
|
||||||
cardsToHand.add(target.getFirstTarget());
|
cardsToHand.add(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue