* Tezzeret the Seeker - Fixed a bug that the X ability could only search for artifacts with exactly X converted mana costs instead of X or less (fixes #407).

This commit is contained in:
LevelX2 2014-04-11 10:57:46 +02:00
parent f6f178c390
commit a5f69e584c
3 changed files with 6 additions and 8 deletions

View file

@ -110,8 +110,7 @@ class MistbindCliqueAbility extends ZoneChangeTriggeredAbility<MistbindCliqueAbi
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getSourceId() != null && event.getSourceId().equals(getSourceId())) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.EXILED) {
MageObject object = game.getObject(event.getTargetId());
if (object != null && object.getSubtype().contains("Faerie")) {
if (zEvent.getTarget() != null && zEvent.getTarget().getSubtype().contains("Faerie")) {
return true;
}
}

View file

@ -49,7 +49,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetArtifactPermanent;
import mage.target.common.TargetCardInLibrary;
import java.util.List;
import java.util.UUID;
@ -117,14 +116,14 @@ class TezzeretTheSeekerEffect2 extends OneShotEffect<TezzeretTheSeekerEffect2> {
}
}
FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost " + cmc);
filter.add(new ConvertedManaCostPredicate(ComparisonType.Equal, cmc));
FilterArtifactCard filter = new FilterArtifactCard(new StringBuilder("artifact card with converted mana cost ").append(cmc).append(" or less").toString());
filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, cmc + 1));
TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (player.searchLibrary(target, game)) {
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
if (card != null) {
card.putOntoBattlefield(game, Zone.HAND, source.getId(), source.getControllerId());
player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
}
player.shuffleLibrary(game);
return true;

View file

@ -84,7 +84,7 @@ public class ChampionAbility extends StaticAbility<ChampionAbility> {
this.subtypes = subtypes;
StringBuilder sb = new StringBuilder("another ");
ArrayList<Predicate<MageObject>> subtypesPredicates = new ArrayList<Predicate<MageObject>>();
ArrayList<Predicate<MageObject>> subtypesPredicates = new ArrayList<>();
int i = 0;
for (String subtype : this.subtypes) {
subtypesPredicates.add(new SubtypePredicate(subtype));
@ -128,7 +128,7 @@ public class ChampionAbility extends StaticAbility<ChampionAbility> {
StringBuilder sb = new StringBuilder("Champion ").append(objectDescription);
sb.append("<i>(When this enters the battlefield, sacrifice it unless you exile another ");
sb.append(objectDescription);
sb.append("you control. When this leaves the battlefield, that card returns to the battlefield.)</i>");
sb.append(" you control. When this leaves the battlefield, that card returns to the battlefield.)</i>");
return sb.toString();
}
}