* Leyline of Anticipation - Fixed that it only worked for creatures instead of all nonland permanents.

This commit is contained in:
LevelX2 2014-08-14 12:48:41 +02:00
parent a8bf35e39a
commit 484a4fe0f6
4 changed files with 80 additions and 14 deletions

View file

@ -37,7 +37,6 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
/**
*
@ -77,17 +76,10 @@ public class CastAsThoughItHadFlashEffect extends AsThoughEffectImpl {
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
Card card = game.getCard(sourceId);
if (card != null && filter.match(card, game) && card.getSpellAbility().isInUseableZone(game, card, false)) {
if (anyPlayer) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
return controller.getInRange().contains(card.getOwnerId());
}
} else {
return card.getOwnerId().equals(source.getControllerId());
}
public boolean applies(UUID affectedSpellId, Ability source, UUID affectedControllerId, Game game) {
if (anyPlayer || source.getControllerId().equals(affectedControllerId)) {
Card card = game.getCard(affectedSpellId);
return card != null && filter.match(card, game);
}
return false;
}