Removed some wrong import of Poison the Well and some minor changes.

This commit is contained in:
LevelX2 2015-01-20 14:00:56 +01:00
parent 8990163a7e
commit cbfc32db3c
7 changed files with 18 additions and 17 deletions

View file

@ -47,7 +47,6 @@ import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.TappedPredicate; import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.events.ZoneChangeEvent; import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;

View file

@ -28,15 +28,12 @@
package mage.sets.shadowmoor; package mage.sets.shadowmoor;
import java.util.UUID; import java.util.UUID;
import static jdk.nashorn.internal.runtime.Debug.id;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
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;
@ -87,9 +84,11 @@ class PoisonTheWellEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent targetedLand = game.getPermanent(source.getFirstTarget()); Permanent targetedLand = game.getPermanent(source.getFirstTarget());
if (targetedLand != null) { if (targetedLand != null) {
targetedLand.destroy(source.getSourceId(), game, true);
Player controller = game.getPlayer(targetedLand.getControllerId()); Player controller = game.getPlayer(targetedLand.getControllerId());
targetedLand.destroy(source.getId(), game, true); if (controller != null) {
controller.damage(2, source.getId(), game, false, true); controller.damage(2, source.getSourceId(), game, false, true);
}
return true; return true;
} }
return false; return false;

View file

@ -80,7 +80,7 @@ public class WhiplashTrap extends CardImpl {
class WhiplashTrapWatcher extends Watcher { class WhiplashTrapWatcher extends Watcher {
private Map<UUID, Integer> amountOfCreaturesPlayedThisTurn = new HashMap<UUID, Integer>(); private Map<UUID, Integer> amountOfCreaturesPlayedThisTurn = new HashMap<>();
public WhiplashTrapWatcher() { public WhiplashTrapWatcher() {
super("WhiplashTrapWatcher", WatcherScope.GAME); super("WhiplashTrapWatcher", WatcherScope.GAME);
@ -105,7 +105,7 @@ class WhiplashTrapWatcher extends Watcher {
if (perm.getCardType().contains(CardType.CREATURE)) { if (perm.getCardType().contains(CardType.CREATURE)) {
Integer amount = amountOfCreaturesPlayedThisTurn.get(perm.getControllerId()); Integer amount = amountOfCreaturesPlayedThisTurn.get(perm.getControllerId());
if (amount == null) { if (amount == null) {
amount = Integer.valueOf(1); amount = 1;
} else { } else {
++amount; ++amount;
} }
@ -118,8 +118,8 @@ class WhiplashTrapWatcher extends Watcher {
int maxCreatures = 0; int maxCreatures = 0;
for (UUID opponentId : game.getOpponents(playerId)) { for (UUID opponentId : game.getOpponents(playerId)) {
Integer amount = amountOfCreaturesPlayedThisTurn.get(opponentId); Integer amount = amountOfCreaturesPlayedThisTurn.get(opponentId);
if (amount != null && amount.intValue() > maxCreatures) { if (amount != null && amount > maxCreatures) {
maxCreatures = amount.intValue(); maxCreatures = amount;
} }
} }
return maxCreatures; return maxCreatures;
@ -159,6 +159,6 @@ class WhiplashAlternativeCost extends AlternativeCostImpl {
@Override @Override
public String getText() { public String getText() {
return "If an opponent had two or more creatures enter the battlefield under his or her control this turn, you may pay {U} rather than pay Whiplash Trap's mana cost"; return "If an opponent had two or more creatures enter the battlefield under his or her control this turn, you may pay {U} rather than pay {this}'s mana cost";
} }
} }

View file

@ -41,11 +41,13 @@ import mage.game.Game;
public class MyMainPhaseCondition implements Condition { public class MyMainPhaseCondition implements Condition {
private static MyMainPhaseCondition fInstance = new MyMainPhaseCondition(); private static final MyMainPhaseCondition fInstance = new MyMainPhaseCondition();
private static Set<TurnPhase> turnPhases = new HashSet<TurnPhase>() {{
private static final Set<TurnPhase> turnPhases = new HashSet<TurnPhase>() {{
add(TurnPhase.PRECOMBAT_MAIN); add(TurnPhase.PRECOMBAT_MAIN);
add(TurnPhase.POSTCOMBAT_MAIN); add(TurnPhase.POSTCOMBAT_MAIN);
}}; }};
public static Condition getInstance() { public static Condition getInstance() {
return fInstance; return fInstance;
} }

View file

@ -113,9 +113,9 @@ public class ExileTargetEffect extends OneShotEffect {
return staticText; return staticText;
} }
if (mode.getTargets().isEmpty()) { if (mode.getTargets().isEmpty()) {
return "Exile it"; return "exile it";
} else { } else {
return "Exile target " + mode.getTargets().get(0).getTargetName(); return "exile target " + mode.getTargets().get(0).getTargetName();
} }
} }
} }

View file

@ -30,6 +30,7 @@ package mage.filter.predicate;
/** /**
* *
* @author North * @author North
* @param <T>
*/ */
public interface ObjectSourcePlayerPredicate<T extends ObjectSourcePlayer> extends ObjectPlayerPredicate<T> { public interface ObjectSourcePlayerPredicate<T extends ObjectSourcePlayer> extends ObjectPlayerPredicate<T> {
} }

View file

@ -159,7 +159,7 @@ public class Spell implements StackObject, Card {
} }
public String getSpellCastText(Game game) { public String getSpellCastText(Game game) {
for (Ability spellAbility : (Abilities<Ability>) getAbilities()) { for (Ability spellAbility : getAbilities()) {
if (spellAbility instanceof MorphAbility if (spellAbility instanceof MorphAbility
&& ((AlternativeSourceCosts) spellAbility).isActivated(getSpellAbility(), game)) { && ((AlternativeSourceCosts) spellAbility).isActivated(getSpellAbility(), game)) {
return "a card face down"; return "a card face down";