Reworked some card movement handling (#4866).

This commit is contained in:
LevelX2 2018-05-15 17:56:55 +02:00
parent 08b9f61749
commit e2f22d3bc9
19 changed files with 199 additions and 198 deletions

View file

@ -27,6 +27,8 @@
*/
package mage.abilities.effects.common;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
@ -37,14 +39,10 @@ import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import java.util.ArrayList;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com

View file

@ -655,6 +655,15 @@ public abstract class PlayerImpl implements Player, Serializable {
}
}
/**
* Don't use this in normal card code, it's for more internal use. Always
* use the [Player].moveCards methods if possible for card movement of card
* code.
*
* @param card
* @param game
* @return
*/
@Override
public boolean putInHand(Card card, Game game) {
if (card.getOwnerId().equals(playerId)) {