Minor formattings.

This commit is contained in:
LevelX2 2013-08-24 17:17:35 +02:00
parent d4b9f1d4c9
commit b8e7604ca7
3 changed files with 22 additions and 23 deletions

View file

@ -29,19 +29,18 @@
package mage.sets.conflux; package mage.sets.conflux;
import java.util.UUID; import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterBasicLandCard;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -96,11 +95,7 @@ class PathToExileEffect extends OneShotEffect {
if (player.searchLibrary(target, game)) { if (player.searchLibrary(target, game)) {
Card card = player.getLibrary().getCard(target.getFirstTarget(), game); Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
if (card != null) { if (card != null) {
if (card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), permanent.getControllerId())) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), permanent.getControllerId(), true);
Permanent land = game.getPermanent(card.getId());
if (land != null)
land.setTapped(true);
}
} }
} }
player.shuffleLibrary(game); player.shuffleLibrary(game);

View file

@ -25,9 +25,10 @@ public class CountersCount implements DynamicValue {
// if permanent already leaves the battlefield, try to find counters count via last known information // if permanent already leaves the battlefield, try to find counters count via last known information
if (p == null) { if (p == null) {
MageObject o = game.getLastKnownInformation(sourceAbility.getSourceId(), Zone.BATTLEFIELD); MageObject o = game.getLastKnownInformation(sourceAbility.getSourceId(), Zone.BATTLEFIELD);
if (o instanceof Permanent) if (o instanceof Permanent) {
p = (Permanent) o; p = (Permanent) o;
} }
}
if (p != null) { if (p != null) {
return p.getCounters().getCount(counter); return p.getCounters().getCount(counter);
} }

View file

@ -28,19 +28,17 @@
package mage.abilities.effects.common.search; package mage.abilities.effects.common.search;
import mage.constants.Outcome; import java.util.List;
import mage.constants.Zone; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.SearchEffect; import mage.abilities.effects.SearchEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.List;
import java.util.UUID;
/** /**
* *
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
@ -87,8 +85,9 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect<SearchLibraryPutI
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
if (player == null) if (player == null) {
return false; return false;
}
if (player.searchLibrary(target, game)) { if (player.searchLibrary(target, game)) {
if (target.getTargets().size() > 0) { if (target.getTargets().size() > 0) {
for (UUID cardId: (List<UUID>)target.getTargets()) { for (UUID cardId: (List<UUID>)target.getTargets()) {
@ -101,8 +100,9 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect<SearchLibraryPutI
player.shuffleLibrary(game); player.shuffleLibrary(game);
return true; return true;
} }
if (forceShuffle) if (forceShuffle) {
player.shuffleLibrary(game); player.shuffleLibrary(game);
}
return false; return false;
} }
@ -121,12 +121,15 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect<SearchLibraryPutI
else { else {
sb.append("a ").append(target.getTargetName()).append(" and put it onto the battlefield"); sb.append("a ").append(target.getTargetName()).append(" and put it onto the battlefield");
} }
if (tapped) if (tapped) {
sb.append(" tapped"); sb.append(" tapped");
if (forceShuffle) }
if (forceShuffle) {
sb.append(". Then shuffle your library"); sb.append(". Then shuffle your library");
else }
else {
sb.append(". If you do, shuffle your library"); sb.append(". If you do, shuffle your library");
}
staticText = sb.toString(); staticText = sb.toString();
} }