- Fixed AI using Man-o'-War.

This commit is contained in:
Sloth
2013-03-14 08:24:50 +00:00
parent a5f7855e03
commit 5e687f98b9
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ Types:Creature Jellyfish
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, return target creature to its owner's hand.
SVar:TrigChangeZone:DB$ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand
SVar:PlayMain1:TRUE
SVar:Picture:http://resources.wizards.com/magic/cards/po/en-us/card4266.jpg
Oracle:When Man-o'-War enters the battlefield, return target creature to its owner's hand.
SetInfo:VIS Common

View File

@@ -745,7 +745,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
}
}
// Blink permanents with ETB triggers
else if (SpellAbilityAi.playReusable(ai, sa)) {
else if (!sa.isTrigger() && SpellAbilityAi.playReusable(ai, sa)) {
aiPermanents = CardLists.filter(aiPermanents, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
@@ -755,7 +755,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
// counters TODO check good and
// bad counters
// checks only if there is a dangerous ETB effect
return SpellPermanent.checkETBEffects(c, ai);
return !c.equals(sa.getSourceCard()) && SpellPermanent.checkETBEffects(c, ai);
}
});
if (!aiPermanents.isEmpty()) {