mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Fixed AI ignoring NeedsToPlay SVars when playing lands.
This commit is contained in:
@@ -417,6 +417,15 @@ public class AiController {
|
|||||||
landList = CardLists.filter(landList, new Predicate<Card>() {
|
landList = CardLists.filter(landList, new Predicate<Card>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(final Card c) {
|
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);
|
return player.canPlayLand(c);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user