1
0
Fork 0
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:
Samuel Sandeen 2016-09-03 20:04:12 -04:00
parent bec11804f5
commit ef5ed5256a
97 changed files with 108 additions and 200 deletions
Mage.Sets/src/mage/sets
alarareborn
battleforzendikar
betrayersofkamigawa
bornofthegods
championsofkamigawa
commander
commander2013
commander2014
conflux
darkascension
darksteel
dissension
dragonsmaze
dragonsoftarkir
elspethvstezzeret
fatereforged
fifthedition
gatecrash
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

View file

@ -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;
}

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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)) {

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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());

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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);
}
}
}

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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;
}
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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) {

View file

@ -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;
}

View file

@ -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);
}
}
}

View file

@ -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;
}

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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());

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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());

View file

@ -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;
}

View file

@ -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);

View file

@ -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);
}

View file

@ -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);
/**

View file

@ -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);