- Fixed AI ignoring NeedsToPlay SVars when playing lands.

This commit is contained in:
Sloth
2014-03-23 22:57:09 +00:00
parent a3ed2dbb14
commit 5e38f04fa2

View File

@@ -417,6 +417,15 @@ public class AiController {
landList = CardLists.filter(landList, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
if (!c.getSVar("NeedsToPlay").isEmpty()) {
final String needsToPlay = c.getSVar("NeedsToPlay");
List<Card> list = game.getCardsIn(ZoneType.Battlefield);
list = CardLists.getValidCards(list, needsToPlay.split(","), c.getController(), c);
if (list.isEmpty()) {
return false;
}
}
return player.canPlayLand(c);
}
});