mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
remove deprecated discard method
This commit is contained in:
parent
f68d6b80ba
commit
978309827b
13 changed files with 10 additions and 33 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue