forked from External/mage
* Some more move actions replaced and added missing methods for move to command zone.
This commit is contained in:
parent
349a2cc612
commit
47a8686958
5 changed files with 64 additions and 65 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbilityImpl;
|
||||
import mage.abilities.costs.Cost;
|
||||
|
|
@ -20,8 +21,6 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 702.47. Ninjutsu
|
||||
* <p>
|
||||
|
|
@ -149,11 +148,12 @@ class ReturnAttackerToHandTargetCost extends CostImpl {
|
|||
if (targets.choose(Outcome.ReturnToHand, controllerId, sourceId, game)) {
|
||||
for (UUID targetId : targets.get(0).getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent == null) {
|
||||
Player controller = game.getPlayer(controllerId);
|
||||
if (permanent == null || controller == null) {
|
||||
return false;
|
||||
}
|
||||
defendingPlayerId = game.getCombat().getDefenderId(permanent.getId());
|
||||
paid |= permanent.moveToZone(Zone.HAND, sourceId, game, false);
|
||||
paid |= controller.moveCardToHandWithInfo(permanent, sourceId, game);
|
||||
}
|
||||
}
|
||||
return paid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue