mirror of
https://github.com/correl/mage.git
synced 2025-04-08 17:00:07 -09:00
Clean up the deprecated moveCards methods in Player
This commit is contained in:
parent
bec11804f5
commit
ef5ed5256a
97 changed files with 108 additions and 200 deletions
Mage.Sets/src/mage/sets
alarareborn
battleforzendikar
BaneOfBalaGed.javaBlightHerder.javaKioraMasterOfTheDepths.javaUlamogsDespoiler.javaUlamogsNullifier.java
betrayersofkamigawa
bornofthegods
championsofkamigawa
commander
commander2013
commander2014
conflux
darkascension
darksteel
dissension
dragonsmaze
dragonsoftarkir
elspethvstezzeret
fatereforged
fifthedition
gatecrash
BalustradeSpy.javaBorborygmosEnraged.javaCoercedConfession.javaConsumingAberration.javaDimirCharm.javaMindGrind.javaUndercityInformer.java
iceage
innistrad
journeyintonyx
khansoftarkir
limitedalpha
magic2011
magic2012
magic2014
magicorigins
masterseditionii
mirrodin
modernmasters2015
newphyrexia
onslaught
planarchaos
prereleaseevents
ravnica
returntoravnica
riseoftheeldrazi
scarsofmirrodin
seventhedition
shadowmoor
shardsofalara
stronghold
tempest
thedark
theros
timeshifted
torment
urzassaga
weatherlight
zendikar
Mage.Tests/src/test/java/org/mage/test
Mage/src/main/java/mage
abilities
effects
common
EnvoyEffect.javaExileCardsFromTopOfLibraryTargetEffect.javaLookLibraryControllerEffect.javaReturnToHandChosenPermanentEffect.javaRevealLibraryPutIntoHandEffect.javaShuffleIntoLibraryGraveOfSourceOwnerEffect.java
search
keyword
keyword
cards
players
|
@ -104,7 +104,7 @@ class MindFuneralEffect extends OneShotEffect {
|
|||
cards.add(card);
|
||||
}
|
||||
opponent.revealCards("Mind Funeral", cards, game);
|
||||
opponent.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
opponent.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class BaneOfBalaGedEffect extends OneShotEffect {
|
|||
if (defendingPlayer != null) {
|
||||
Target target = new TargetControlledPermanent(2);
|
||||
defendingPlayer.chooseTarget(outcome, target, source, game);
|
||||
defendingPlayer.moveCards(new CardsImpl(target.getTargets()), null, Zone.EXILED, source, game);
|
||||
defendingPlayer.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -107,7 +107,7 @@ class BlightHerderEffect extends OneShotEffect {
|
|||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||
Cards cardsToGraveyard = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToGraveyard, Zone.GRAVEYARD, source, game);
|
||||
return new CreateTokenEffect(new EldraziScionToken(), 3).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ class KioraRevealEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, null, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -108,7 +108,7 @@ class UlamogsDespoilerEffect extends OneShotEffect {
|
|||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||
Cards cardsToGraveyard = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToGraveyard, Zone.GRAVEYARD, source, game);
|
||||
return new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ class UlamogsNullifierEffect extends OneShotEffect {
|
|||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||
Cards cardsToGraveyard = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(cardsToGraveyard, null, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToGraveyard, Zone.GRAVEYARD, source, game);
|
||||
game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ class SwayOfTheStarsEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getHand(), Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.LIBRARY, source, game);
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(new OwnerIdPredicate(playerId));
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), source.getSourceId(), game)) {
|
||||
|
|
|
@ -113,7 +113,7 @@ class SatyrWayfinderEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -119,8 +119,8 @@ class GiftsUngivenEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cardsToKeep, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cardsToKeep, Zone.HAND, source, game);
|
||||
}
|
||||
player.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -98,7 +98,7 @@ class InameDeathAspectEffect extends SearchEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null && player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
player.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -89,7 +89,7 @@ class BuriedAliveEffect extends SearchEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.searchLibrary(target, game)) {
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -124,7 +124,7 @@ class DesecratorHagEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
return you.moveCards(cards, null, Zone.HAND, source, game);
|
||||
return you.moveCards(cards, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -126,7 +126,7 @@ class FosterEffect extends OneShotEffect {
|
|||
controller.moveCards(cardFound, Zone.HAND, source, game);
|
||||
cards.remove(cardFound);
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ class StrategicPlanningEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class GraveSifterEffect extends OneShotEffect {
|
|||
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
Target target = new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, filter);
|
||||
player.chooseTarget(outcome, target, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), null, Zone.HAND, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ class StitcherGeralfEffect extends OneShotEffect {
|
|||
cards.addAll(player.getLibrary().getTopCards(game, 3));
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
TargetCard target = new TargetCard(0,2,Zone.GRAVEYARD, new FilterCreatureCard("creature cards to exile"));
|
||||
controller.chooseTarget(outcome, cards, target, source, game);
|
||||
int power = 0;
|
||||
|
|
|
@ -104,7 +104,7 @@ class TeleminPerformanceEffect extends OneShotEffect {
|
|||
}
|
||||
if (!cards.isEmpty()) {
|
||||
opponent.revealCards("Telemin Performance", cards, game);
|
||||
opponent.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
opponent.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
if (creature != null) {
|
||||
return creature.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
|
||||
|
|
|
@ -118,7 +118,7 @@ class TrackersInstinctsEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -109,8 +109,8 @@ class ChromescaleDrakeEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ class BoundEffect extends OneShotEffect {
|
|||
TargetCardInYourGraveyard targetCard = new TargetCardInYourGraveyard(0, colors,
|
||||
new FilterCard("up to " + colors + " card" + (colors > 1 ? "s" : "") + " from your graveyard"));
|
||||
controller.chooseTarget(outcome, targetCard, source, game);
|
||||
controller.moveCards(new CardsImpl(targetCard.getTargets()), null, Zone.HAND, source, game);
|
||||
controller.moveCards(new CardsImpl(targetCard.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ class MomirVigSimicVisionaryEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ class RiseEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
cardsToHand.add(permanent);
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -119,7 +119,7 @@ class MirkoVoskMindDrinkerEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
player.revealCards("by " + sourceObject.getName() + " from " + player.getName(), cards, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class GurmagDrownerEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class ProfanerOfTheDeadReturnEffect extends OneShotEffect {
|
|||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
cardsToHand.add(permanent);
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -103,7 +103,7 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect {
|
|||
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
cardsToHand.add(perm);
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -150,7 +150,7 @@ class RenownedWeaponsmithEffect extends OneShotEffect {
|
|||
Cards revealed = new CardsImpl();
|
||||
revealed.add(card);
|
||||
controller.revealCards(sourceObject.getIdName(), revealed, game);
|
||||
controller.moveCards(revealed, null, Zone.HAND, source, game);
|
||||
controller.moveCards(revealed, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
|
|
|
@ -110,7 +110,7 @@ class SuddenReclamationEffect extends OneShotEffect {
|
|||
cardsToHand.add(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -96,7 +96,7 @@ class RecallEffect extends OneShotEffect {
|
|||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(cardsDiscarded.size(), new FilterCard());
|
||||
target.setNotTarget(true);
|
||||
target.choose(Outcome.ReturnToHand, controller.getId(), source.getSourceId(), game);
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), null, Zone.HAND, source, game);
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -89,7 +89,7 @@ class WindsOfChangeEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
permanentsCount.put(playerId, player.getHand().size());
|
||||
player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getHand(), Zone.LIBRARY, source, game);
|
||||
player.shuffleLibrary(source, game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class BalustradeSpyEffect extends OneShotEffect {
|
|||
}
|
||||
if (!cards.isEmpty()) {
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -121,8 +121,8 @@ class BorborygmosEnragedEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(landCards, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(landCards, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ class CoercedConfessionMillEffect extends OneShotEffect {
|
|||
++foundCreatures;
|
||||
}
|
||||
}
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
if (foundCreatures > 0) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
|
|
|
@ -116,7 +116,7 @@ class ConsumingAberrationEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
player.revealCards("Consuming Aberrtion", cards, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ class DimirCharmEffect extends OneShotEffect {
|
|||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
cards.remove(card);
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class MindGrindEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
player.revealCards("by " + sourceCard.getName() + " from " + player.getName(), cards, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class UndercityInformerEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
player.revealCards("Undercity Informer", cards, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ class DemonicConsultationEffect extends OneShotEffect {
|
|||
controller.moveCards(cardToHand, Zone.HAND, source, game);
|
||||
controller.revealCards(sourceObject.getIdName(), cardsToReaveal, game);
|
||||
cardsToReaveal.remove(cardToHand);
|
||||
controller.moveCards(cardsToReaveal, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(cardsToReaveal, Zone.EXILED, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -108,7 +108,7 @@ class MirrorMadPhantasmEffect extends OneShotEffect {
|
|||
cards.add(card);
|
||||
}
|
||||
player.revealCards("Mirror-Mad Phantasm", cards, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,8 +101,8 @@ class MulchEffect extends OneShotEffect {
|
|||
otherCards.add(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(landCards, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(otherCards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(landCards, Zone.HAND, source, game);
|
||||
controller.moveCards(otherCards, Zone.GRAVEYARD, source, game);
|
||||
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -120,7 +120,7 @@ class TrepanationBladeDiscardEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
if (!cards.isEmpty()) {
|
||||
player.revealCards(equipment.getName(), cards, game);
|
||||
game.getState().setValue(source.getSourceId().toString() + "_TrepanationBlade", cards.size());
|
||||
|
|
|
@ -101,7 +101,7 @@ class HubrisReturnEffect extends OneShotEffect {
|
|||
if (creature != null) {
|
||||
Cards cardsToHand = new CardsImpl(creature.getAttachments());
|
||||
cardsToHand.add(creature);
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -113,7 +113,7 @@ class ScourgeOfFleetsEffect extends OneShotEffect {
|
|||
for (Permanent permanent : game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
cardsToHand.add(permanent);
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -111,8 +111,8 @@ class BitterRevelationEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
player.moveCards(cardsToHand, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ class ScoutTheBordersEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ class SultaiSoothsayerEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class VillainousWealthEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
Cards cardsToExile = new CardsImpl();
|
||||
cardsToExile.addAll(player.getLibrary().getTopCards(game, source.getManaCostsToPay().getX()));
|
||||
controller.moveCards(cardsToExile, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(cardsToExile, Zone.EXILED, source, game);
|
||||
if (controller.chooseUse(Outcome.PlayForFree, "Cast cards exiled with " + mageObject.getLogName() + " without paying its mana cost?", source, game)) {
|
||||
OuterLoop:
|
||||
while (cardsToExile.count(filter, game) > 0) {
|
||||
|
|
|
@ -84,8 +84,8 @@ class TimetwisterEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getHand(), Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.LIBRARY, source, game);
|
||||
player.shuffleLibrary(source, game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,8 +86,8 @@ class TimeReversalEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getHand(), Zone.LIBRARY, source, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.LIBRARY, source, game);
|
||||
player.shuffleLibrary(source, game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class SuturedGhoulEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
Cards cardsToExile = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(cardsToExile, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(cardsToExile, Zone.EXILED, source, game);
|
||||
|
||||
String msg = count == 1 ? "1 card" : count + "cards";
|
||||
game.informPlayers(permanent.getLogName() + ": " + controller.getLogName() + " exiled " + msg);
|
||||
|
|
|
@ -109,7 +109,7 @@ class GlimpseTheFutureEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -103,12 +103,12 @@ class GatherThePackEffect extends OneShotEffect {
|
|||
Cards cardsToHand = new CardsImpl(target.getTargets());
|
||||
if (cardsToHand.size() > 0) {
|
||||
cards.removeAll(cardsToHand);
|
||||
controller.moveCards(cardsToHand, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cards.size() > 0) {
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -120,7 +120,7 @@ class SphinxsTutelageEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
targetPlayer.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
targetPlayer.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
} while (colorShared && targetPlayer.canRespond());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class ForgottenLoreEffect extends OneShotEffect {
|
|||
if(card != null) {
|
||||
Cards cardsToHand = new CardsImpl();
|
||||
cardsToHand.add(card);
|
||||
you.moveCards(cardsToHand, Zone.GRAVEYARD, Zone.HAND, source, game);
|
||||
you.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class ThoughtLashExileLibraryEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, controller.getLibrary().size()));
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.EXILED, source, game);
|
||||
controller.moveCards(cards, Zone.EXILED, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -108,7 +108,7 @@ class SpoilsOfTheVaultEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
controller.revealCards(sourceObject.getIdName(), cardsToReveal, game);
|
||||
controller.moveCards(cardsToExile, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(cardsToExile, Zone.EXILED, source, game);
|
||||
controller.loseLife(cardsToExile.size(), game);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -120,7 +120,7 @@ class AllSunsDawnEffect extends OneShotEffect {
|
|||
cardsToHand.add(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -98,7 +98,7 @@ class LifesFinaleEffect extends OneShotEffect {
|
|||
if (player != null && opponent != null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(0, 3, new FilterCreatureCard("creature cards from his library to put in his graveyard"));
|
||||
if (player.searchLibrary(target, game, opponent.getId())) {
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
opponent.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -118,7 +118,7 @@ class WeirdHarvestEffect extends OneShotEffect {
|
|||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Cards cards = new CardsImpl(target.getTargets());
|
||||
player.moveCards(cards, null, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.HAND, source, game);
|
||||
player.revealCards(sourceObject.getIdName() + " (" + player.getName() + ")", cards, game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ class ShroudedLoreEffect extends OneShotEffect {
|
|||
if(card != null) {
|
||||
Cards cardsToHand = new CardsImpl();
|
||||
cardsToHand.add(card);
|
||||
you.moveCards(cardsToHand, Zone.GRAVEYARD, Zone.HAND, source, game);
|
||||
you.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class GleancrawlerEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, Zone.GRAVEYARD, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -128,7 +128,7 @@ class GrozothEffect extends SearchEffect {
|
|||
}
|
||||
}
|
||||
player.revealCards(sourceCard.getIdName(), cards, game);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.HAND, source, game);
|
||||
}
|
||||
player.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -114,7 +114,7 @@ class DestroyTheEvidenceEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
player.revealCards(sourceObject.getName(), cards, game, true);
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -116,7 +116,7 @@ class GrislySalvageEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ class GuildFeudEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
player.moveCards(topThreeCards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(topThreeCards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
||||
// If two creatures are put onto the battlefield this way, those creatures fight each other
|
||||
|
|
|
@ -128,8 +128,8 @@ class RealmsUnchartedEffect extends OneShotEffect {
|
|||
cards.removeAll(cardsToKeep);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToKeep, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToKeep, Zone.HAND, source, game);
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -126,7 +126,7 @@ class GenesisWaveEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
controller.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game, false, false, false, null);
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ class AncestralMemoriesEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class AdviceFromTheFaeEffect extends OneShotEffect {
|
|||
TargetCard target = new TargetCard(moreCreatures ? 2 : 1, Zone.LIBRARY, new FilterCard());
|
||||
if (controller.choose(Outcome.DrawCard, cardsFromLibrary, target, game)) {
|
||||
cardsFromLibrary.removeAll(target.getTargets());
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), null, Zone.HAND, source, game);
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(cardsFromLibrary, game, source, true);
|
||||
return true;
|
||||
|
|
|
@ -121,7 +121,7 @@ class TwilightShepherdEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, Zone.GRAVEYARD, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -149,7 +149,7 @@ class TidehollowScullerLeaveEffect extends OneShotEffect {
|
|||
int zoneChangeCounter = (sourceObject instanceof PermanentToken) ? source.getSourceObjectZoneChangeCounter() : source.getSourceObjectZoneChangeCounter() - 1;
|
||||
ExileZone exZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter));
|
||||
if (exZone != null) {
|
||||
controller.moveCards(exZone, null, Zone.HAND, source, game);
|
||||
controller.moveCards(exZone, Zone.HAND, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class HermitDruidEffect extends OneShotEffect {
|
|||
} while (library.size() > 0 && card != null && !filter.match(card, game));
|
||||
|
||||
if (!cards.isEmpty()) {
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class GrindstoneEffect extends OneShotEffect {
|
|||
colorShared = card1.getColor(game).shares(targetPlayer.getLibrary().removeFromTop(game).getColor(game));
|
||||
}
|
||||
}
|
||||
targetPlayer.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
targetPlayer.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
} while (colorShared && targetPlayer.canRespond());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ class IntuitionEffect extends SearchEffect {
|
|||
cards.remove(card);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -154,7 +154,7 @@ class LobotomyEffect extends OneShotEffect {
|
|||
|
||||
}
|
||||
if (!cardsToExile.isEmpty()) {
|
||||
controller.moveCards(cardsToExile, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(cardsToExile, Zone.EXILED, source, game);
|
||||
}
|
||||
targetPlayer.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
|
@ -123,8 +123,8 @@ class WoodSageEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ class DanceOfManyExileTokenEffect extends OneShotEffect {
|
|||
for (Permanent permanent : tokenPermanents) {
|
||||
cards.add(permanent);
|
||||
}
|
||||
controller.moveCards(cards, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(cards, Zone.EXILED, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ class CommuneWithTheGodsEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ class GrinningTotemPutIntoGraveyardEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
ExileZone zone = game.getExile().getExileZone(exileZoneId);
|
||||
if (controller != null && zone != null) {
|
||||
return controller.moveCards(zone, Zone.EXILED, Zone.GRAVEYARD, source, game);
|
||||
return controller.moveCards(zone, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ class MesmericFiendLeaveEffect extends OneShotEffect {
|
|||
int zoneChangeCounter = (sourceObject instanceof PermanentToken) ? source.getSourceObjectZoneChangeCounter() : source.getSourceObjectZoneChangeCounter() - 1;
|
||||
ExileZone exZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter));
|
||||
if (exZone != null) {
|
||||
return controller.moveCards(exZone, null, Zone.HAND, source, game);
|
||||
return controller.moveCards(exZone, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -101,7 +101,7 @@ class NoRestForTheWickedEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -118,7 +118,7 @@ class SpinningDarknessCost extends CostImpl {
|
|||
}
|
||||
i++;
|
||||
}
|
||||
paid = controller.moveCards(cardsToExile, Zone.GRAVEYARD, Zone.EXILED, ability, game);
|
||||
paid = controller.moveCards(cardsToExile, Zone.EXILED, ability, game);
|
||||
}
|
||||
}
|
||||
return paid;
|
||||
|
|
|
@ -96,8 +96,8 @@ class BeastHuntEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, Zone.LIBRARY, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1882,24 +1882,6 @@ public class TestPlayer implements Player {
|
|||
return computerPlayer.getCommanderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(cards, fromZone, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(card, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(cards, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game) {
|
||||
return computerPlayer.moveCardToHandWithInfo(card, sourceId, game);
|
||||
|
@ -2156,7 +2138,7 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone, Ability source, Game game) {
|
||||
return computerPlayer.moveCards(cards, toZone, source, game);
|
||||
}
|
||||
|
||||
|
|
|
@ -1093,21 +1093,6 @@ public class PlayerStub implements Player {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone toZone, Ability source, Game game) {
|
||||
return false;
|
||||
|
|
|
@ -84,7 +84,7 @@ public class EnvoyEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
cards.removeAll(cardsToHand);
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ExileCardsFromTopOfLibraryTargetEffect extends OneShotEffect {
|
|||
if (targetPlayer != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(targetPlayer.getLibrary().getTopCards(game, amount));
|
||||
return targetPlayer.moveCards(cards, null, Zone.EXILED, source, game);
|
||||
return targetPlayer.moveCards(cards, Zone.EXILED, source, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ public class LookLibraryControllerEffect extends OneShotEffect {
|
|||
}
|
||||
break;
|
||||
case GRAVEYARD:
|
||||
player.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
break;
|
||||
default:
|
||||
// not supported yet
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ReturnToHandChosenPermanentEffect extends OneShotEffect {
|
|||
if (available > 0) {
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(Math.min(number, available), number, filter, true);
|
||||
if (player.chooseTarget(this.outcome, target, source, game)) {
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.BATTLEFIELD, Zone.HAND, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -97,7 +97,7 @@ public class RevealLibraryPutIntoHandEffect extends OneShotEffect {
|
|||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, anyOrder);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ShuffleIntoLibraryGraveOfSourceOwnerEffect extends OneShotEffect {
|
|||
}
|
||||
Player owner = game.getPlayer(ownerId);
|
||||
if (owner != null) {
|
||||
owner.moveCards(owner.getGraveyard(), null, Zone.LIBRARY, source, game);
|
||||
owner.moveCards(owner.getGraveyard(), Zone.LIBRARY, source, game);
|
||||
owner.shuffleLibrary(source, game);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class SearchLibraryPutInHandEffect extends SearchEffect {
|
|||
cards.add(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, null, Zone.HAND, source, game);
|
||||
controller.moveCards(cards, Zone.HAND, source, game);
|
||||
if (revealCards) {
|
||||
String name = "Reveal";
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
|
|
|
@ -74,7 +74,7 @@ public class SweepEffect extends OneShotEffect {
|
|||
Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||
game.getState().setValue(CardUtil.getCardZoneString("sweep", source.getSourceId(), game), target.getTargets().size());
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), null, Zone.HAND, source, game);
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class TransmuteEffect extends OneShotEffect {
|
|||
if (target.getTargets().size() > 0) {
|
||||
Cards revealed = new CardsImpl(target.getTargets());
|
||||
controller.revealCards(sourceObject.getIdName(), revealed, game);
|
||||
controller.moveCards(revealed, null, Zone.HAND, source, game);
|
||||
controller.moveCards(revealed, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
|
|
|
@ -141,6 +141,8 @@ public interface Card extends MageObject {
|
|||
|
||||
boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId, boolean tapped, boolean facedown, ArrayList<UUID> appliedEffects);
|
||||
|
||||
void setZone(Zone zone, Game game);
|
||||
|
||||
List<Mana> getMana();
|
||||
|
||||
void build();
|
||||
|
@ -172,6 +174,4 @@ public interface Card extends MageObject {
|
|||
* returned
|
||||
*/
|
||||
Card getMainCard();
|
||||
|
||||
void setZone(Zone zone, Game game);
|
||||
}
|
||||
|
|
|
@ -654,27 +654,17 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* Moves cards from one zone to another
|
||||
*
|
||||
* @param cards
|
||||
* @param fromZone
|
||||
* @param toZone
|
||||
* @param source
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game);
|
||||
|
||||
@Deprecated
|
||||
boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game);
|
||||
|
||||
@Deprecated
|
||||
boolean moveCards(Set<Card> cards, Zone fromZone, Zone toZone, Ability source, Game game);
|
||||
boolean moveCards(Cards cards, Zone toZone, Ability source, Game game);
|
||||
|
||||
boolean moveCards(Card card, Zone toZone, Ability source, Game game);
|
||||
|
||||
boolean moveCards(Card card, Zone toZone, Ability source, Game game, boolean tapped, boolean faceDown, boolean byOwner, ArrayList<UUID> appliedEffects);
|
||||
|
||||
boolean moveCards(Cards cards, Zone toZone, Ability source, Game game);
|
||||
|
||||
boolean moveCards(Set<Card> cards, Zone toZone, Ability source, Game game);
|
||||
|
||||
/**
|
||||
|
|
|
@ -3116,55 +3116,6 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return this.commanderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
if (cards.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
Set<Card> cardList = new HashSet<>();
|
||||
for (UUID cardId : cards) {
|
||||
fromZone = game.getState().getZone(cardId);
|
||||
if (Zone.BATTLEFIELD.equals(fromZone)) {
|
||||
Permanent permanent = game.getPermanent(cardId);
|
||||
if (permanent != null) {
|
||||
cardList.add(permanent);
|
||||
}
|
||||
} else {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card == null) {
|
||||
Spell spell = game.getState().getStack().getSpell(cardId);
|
||||
if (spell != null) {
|
||||
if (!spell.isCopy()) {
|
||||
card = spell.getCard();
|
||||
} else {
|
||||
// If a spell is returned to its owner's hand, it's removed from the stack and thus will not resolve
|
||||
game.getStack().remove(spell);
|
||||
game.informPlayers(spell.getLogName() + " was removed from the stack");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (card != null) {
|
||||
cardList.add(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
return moveCards(cardList, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
Set<Card> cardList = new HashSet<>();
|
||||
if (card != null) {
|
||||
cardList.add(card);
|
||||
}
|
||||
return moveCards(cardList, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
return moveCards(cards, toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone toZone, Ability source, Game game) {
|
||||
return moveCards(card, toZone, source, game, false, false, false, null);
|
||||
|
|
Loading…
Add table
Reference in a new issue