mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Remove an unused argument to Player.putInGraveyard
This commit is contained in:
parent
db3c2e9d8c
commit
34846170c4
8 changed files with 18 additions and 20 deletions
|
@ -1239,8 +1239,8 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) {
|
||||
return computerPlayer.putInGraveyard(card, game, fromBattlefield);
|
||||
public boolean putInGraveyard(Card card, Game game) {
|
||||
return computerPlayer.putInGraveyard(card, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -594,7 +594,7 @@ public class PlayerStub implements Player {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) {
|
||||
public boolean putInGraveyard(Card card, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -350,7 +350,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
updateZoneChangeCounter(game);
|
||||
switch (event.getToZone()) {
|
||||
case GRAVEYARD:
|
||||
game.getPlayer(ownerId).putInGraveyard(this, game, !flag);
|
||||
game.getPlayer(ownerId).putInGraveyard(this, game);
|
||||
break;
|
||||
case HAND:
|
||||
game.getPlayer(ownerId).getHand().add(this);
|
||||
|
|
|
@ -32,10 +32,6 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import static mage.constants.Zone.EXILED;
|
||||
import static mage.constants.Zone.GRAVEYARD;
|
||||
import static mage.constants.Zone.HAND;
|
||||
import static mage.constants.Zone.LIBRARY;
|
||||
import mage.counters.Counter;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
@ -136,8 +132,8 @@ public abstract class MeldCard extends CardImpl {
|
|||
updateZoneChangeCounter(game);
|
||||
switch (event.getToZone()) {
|
||||
case GRAVEYARD:
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game);
|
||||
break;
|
||||
case HAND:
|
||||
game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard);
|
||||
|
@ -202,8 +198,8 @@ public abstract class MeldCard extends CardImpl {
|
|||
updateZoneChangeCounter(game);
|
||||
switch (event.getToZone()) {
|
||||
case GRAVEYARD:
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game);
|
||||
break;
|
||||
case HAND:
|
||||
game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard);
|
||||
|
|
|
@ -38,6 +38,8 @@ import mage.cards.Card;
|
|||
import mage.cards.LevelerCard;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.ZoneInfo;
|
||||
import mage.game.ZonesHandler;
|
||||
import mage.game.command.Commander;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.players.Player;
|
||||
|
@ -164,7 +166,7 @@ public class PermanentCard extends PermanentImpl {
|
|||
card.updateZoneChangeCounter(game);
|
||||
switch (event.getToZone()) {
|
||||
case GRAVEYARD:
|
||||
owner.putInGraveyard(card, game, !flag);
|
||||
owner.putInGraveyard(card, game);
|
||||
break;
|
||||
case HAND:
|
||||
owner.getHand().add(card);
|
||||
|
|
|
@ -69,8 +69,8 @@ public class PermanentMeld extends PermanentCard {
|
|||
Card bottomHalfCard = meldCard.getBottomHalfCard();
|
||||
switch (event.getToZone()) {
|
||||
case GRAVEYARD:
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game);
|
||||
break;
|
||||
case HAND:
|
||||
game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard);
|
||||
|
@ -118,8 +118,8 @@ public class PermanentMeld extends PermanentCard {
|
|||
Card bottomHalfCard = meldCard.getBottomHalfCard();
|
||||
switch (event.getToZone()) {
|
||||
case GRAVEYARD:
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game, true);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(topHalfCard, game);
|
||||
game.getPlayer(this.getOwnerId()).putInGraveyard(bottomHalfCard, game);
|
||||
break;
|
||||
case HAND:
|
||||
game.getPlayer(this.getOwnerId()).getHand().add(topHalfCard);
|
||||
|
|
|
@ -354,7 +354,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
|
||||
boolean removeFromBattlefield(Permanent permanent, Game game);
|
||||
|
||||
boolean putInGraveyard(Card card, Game game, boolean fromBattlefield);
|
||||
boolean putInGraveyard(Card card, Game game);
|
||||
|
||||
boolean removeFromGraveyard(Card card, Game game);
|
||||
|
||||
|
|
|
@ -853,11 +853,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield) {
|
||||
public boolean putInGraveyard(Card card, Game game) {
|
||||
if (card.getOwnerId().equals(playerId)) {
|
||||
this.graveyard.add(card);
|
||||
} else {
|
||||
return game.getPlayer(card.getOwnerId()).putInGraveyard(card, game, fromBattlefield);
|
||||
return game.getPlayer(card.getOwnerId()).putInGraveyard(card, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue