Some minor changes.

This commit is contained in:
LevelX2 2015-04-07 16:46:10 +02:00
parent a58afbde4f
commit 2f09b2859c
3 changed files with 13 additions and 24 deletions

View file

@ -315,29 +315,18 @@ public class HumanPlayer extends PlayerImpl {
game.fireSelectTargetEvent(playerId, target.getMessage(), possibleTargets, required, getOptions(target, null));
waitForResponse(game);
if (response.getUUID() != null) {
if (target.getTargets().contains(response.getUUID())) {
target.remove(response.getUUID());
continue;
}
if (possibleTargets.contains(response.getUUID())) {
if (target instanceof TargetPermanent) {
if (((TargetPermanent)target).canTarget(playerId, response.getUUID(), source, game)) {
if (target.getTargets().contains(response.getUUID())) { // if already included remove it with
target.remove(response.getUUID());
} else {
if (target.canTarget(playerId, response.getUUID(), source, game)) {
target.addTarget(response.getUUID(), source, game);
if(target.doneChosing()){
return true;
}
}
}
} else if (target.canTarget(playerId, response.getUUID(), source, game)) {
if (target.getTargets().contains(response.getUUID())) { // if already included remove it with
target.remove(response.getUUID());
} else {
target.addTarget(response.getUUID(), source, game);
}
if(target.doneChosing()){
return true;
}
}
} // else do nothing - allow to pick another target
} else {
if (target.getTargets().size() >= target.getNumberOfTargets()) {
return true;

View file

@ -92,8 +92,9 @@ public class ReturnFromExileEffect extends OneShotEffect {
switch (zone) {
case BATTLEFIELD:
card.moveToZone(zone, source.getSourceId(), game, tapped);
if (!game.isSimulation())
game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
if (!game.isSimulation()) {
game.informPlayers(controller.getName() + " moves " + card.getName() + " to " + zone.toString().toLowerCase());
}
break;
case HAND:
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
@ -106,8 +107,9 @@ public class ReturnFromExileEffect extends OneShotEffect {
break;
default:
card.moveToZone(zone, source.getSourceId(), game, tapped);
if (!game.isSimulation())
game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
if (!game.isSimulation()) {
game.informPlayers(controller.getName() + " moves " + card.getName() + " to " + zone.toString().toLowerCase());
}
}
}
}

View file

@ -32,7 +32,6 @@ import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureEffect;
import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureEffect.FaceDownType;
@ -44,7 +43,6 @@ import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
/**