remove deprecated discard method

This commit is contained in:
Ingmar Goudt 2019-12-30 00:22:33 +01:00
parent f68d6b80ba
commit 978309827b
13 changed files with 10 additions and 33 deletions

View file

@ -50,7 +50,7 @@ public class DrawDiscardTargetEffect extends OneShotEffect {
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
if (player != null) {
player.drawCards(cardsToDraw, game);
player.discard(cardsToDiscard, source, game);
player.discard(cardsToDiscard, false, source, game);
return true;
}
return false;

View file

@ -44,7 +44,7 @@ public class DiscardHandTargetEffect extends OneShotEffect {
for (UUID playerId: getTargetPointer().getTargets(game, source)) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.discard(player.getHand().size(), source, game);
player.discard(player.getHand().size(), false, source, game);
}
}
return true;

View file

@ -408,9 +408,6 @@ public interface Player extends MageItem, Copyable<Player> {
PlanarDieRoll rollPlanarDie(Game game, ArrayList<UUID> appliedEffects, int numberChaosSides, int numberPlanarSides);
@Deprecated
void discard(int amount, Ability source, Game game);
Card discardOne(boolean random, Ability source, Game game);
Cards discard(int amount, boolean random, Ability source, Game game);

View file

@ -693,7 +693,7 @@ public abstract class PlayerImpl implements Player, Serializable {
+ (this.maxHandSize == 1
? " hand card" : " hand cards"));
}
discard(hand.size() - this.maxHandSize, null, game);
discard(hand.size() - this.maxHandSize, false,null, game);
}
}
@ -731,16 +731,6 @@ public abstract class PlayerImpl implements Player, Serializable {
return true;
}
/**
* @param amount
* @param source
* @param game
*/
@Override
public void discard(int amount, Ability source, Game game) {
discard(amount, false, source, game);
}
@Override
public Card discardOne(boolean random, Ability source, Game game) {
Cards cards = discard(1, random, source, game);