mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* 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:
parent
f6f178c390
commit
a5f69e584c
3 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue