mirror of
https://github.com/correl/mage.git
synced 2024-11-25 11:09:53 +00:00
* Oreskos Explorer - fixed rollback error;
This commit is contained in:
parent
d12d1fffaf
commit
49d7dfa411
1 changed files with 8 additions and 7 deletions
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -11,21 +9,25 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterLandCard;
|
import mage.filter.common.FilterLandCard;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class OreskosExplorer extends CardImpl {
|
public final class OreskosExplorer extends CardImpl {
|
||||||
|
|
||||||
public OreskosExplorer(UUID ownerId, CardSetInfo setInfo) {
|
public OreskosExplorer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||||
this.subtype.add(SubType.CAT);
|
this.subtype.add(SubType.CAT);
|
||||||
this.subtype.add(SubType.SCOUT);
|
this.subtype.add(SubType.SCOUT);
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
|
@ -82,10 +84,9 @@ class OreskosExplorerEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
if (landsToSearch > 0) {
|
if (landsToSearch > 0) {
|
||||||
FilterLandCard filterPlains = new FilterLandCard("up to " + landsToSearch + " Plains cards");
|
FilterLandCard filterPlains = new FilterLandCard("up to " + landsToSearch + " Plains cards");
|
||||||
filterPlains.add(TargetController.YOU.getControllerPredicate());
|
|
||||||
filterPlains.add(SubType.PLAINS.getPredicate());
|
filterPlains.add(SubType.PLAINS.getPredicate());
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(0, landsToSearch, filterPlains);
|
TargetCardInLibrary target = new TargetCardInLibrary(0, landsToSearch, filterPlains);
|
||||||
if (controller.searchLibrary(target, source, game)) {
|
if (controller.searchLibrary(target, source, game, controller.getId())) {
|
||||||
Cards cards = new CardsImpl(target.getTargets());
|
Cards cards = new CardsImpl(target.getTargets());
|
||||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||||
controller.moveCards(cards.getCards(game), Zone.HAND, source, game);
|
controller.moveCards(cards.getCards(game), Zone.HAND, source, game);
|
||||||
|
|
Loading…
Reference in a new issue