mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fixed a typo in the PLANESWALKERS card predicate preset.
This commit is contained in:
@@ -421,7 +421,7 @@ public class AiAttackController {
|
||||
CardCollectionView oppBattlefield = c.getController().getCardsIn(ZoneType.Battlefield);
|
||||
|
||||
if (c.getName().equals("Heart of Kiran")) {
|
||||
if (!CardLists.filter(oppBattlefield, CardPredicates.Presets.PLANEWALKERS).isEmpty()) {
|
||||
if (!CardLists.filter(oppBattlefield, CardPredicates.Presets.PLANESWALKERS).isEmpty()) {
|
||||
// can be activated by removing a loyalty counter instead of tapping a creature
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ComputerUtilCard {
|
||||
* @return best Planeswalker
|
||||
*/
|
||||
public static Card getBestPlaneswalkerAI(final List<Card> list) {
|
||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANEWALKERS);
|
||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
||||
if (all.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class ComputerUtilCard {
|
||||
* @return best Planeswalker
|
||||
*/
|
||||
public static Card getWorstPlaneswalkerAI(final List<Card> list) {
|
||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANEWALKERS);
|
||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
||||
if (all.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class CountersPutOrRemoveAi extends SpellAbilityAi {
|
||||
// with one touch
|
||||
CardCollection planeswalkerList = CardLists.filter(
|
||||
CardLists.filterControlledBy(countersList, ai.getOpponents()),
|
||||
CardPredicates.Presets.PLANEWALKERS,
|
||||
CardPredicates.Presets.PLANESWALKERS,
|
||||
CardPredicates.hasLessCounter(CounterType.LOYALTY, amount));
|
||||
|
||||
if (!planeswalkerList.isEmpty()) {
|
||||
|
||||
@@ -121,7 +121,7 @@ public class CountersRemoveAi extends SpellAbilityAi {
|
||||
list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
|
||||
list = CardLists.filter(list, CardPredicates.isTargetableBy(sa));
|
||||
|
||||
CardCollection planeswalkerList = CardLists.filter(list, CardPredicates.Presets.PLANEWALKERS,
|
||||
CardCollection planeswalkerList = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS,
|
||||
CardPredicates.hasCounter(CounterType.LOYALTY, 5));
|
||||
|
||||
if (!planeswalkerList.isEmpty()) {
|
||||
@@ -169,7 +169,7 @@ public class CountersRemoveAi extends SpellAbilityAi {
|
||||
list = CardLists.filter(list, CardPredicates.isTargetableBy(sa));
|
||||
|
||||
CardCollection planeswalkerList = CardLists.filter(list,
|
||||
Predicates.and(CardPredicates.Presets.PLANEWALKERS, CardPredicates.isControlledByAnyOf(ai.getOpponents())),
|
||||
Predicates.and(CardPredicates.Presets.PLANESWALKERS, CardPredicates.isControlledByAnyOf(ai.getOpponents())),
|
||||
CardPredicates.hasLessCounter(CounterType.LOYALTY, amount));
|
||||
|
||||
if (!planeswalkerList.isEmpty()) {
|
||||
|
||||
@@ -78,7 +78,7 @@ public abstract class DamageAiBase extends SpellAbilityAi {
|
||||
}
|
||||
|
||||
// burn Planeswalkers
|
||||
if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS)) {
|
||||
if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ public class DamageDealAi extends DamageAiBase {
|
||||
final Player activator = sa.getActivatingPlayer();
|
||||
final Card source = sa.getHostCard();
|
||||
final Game game = source.getGame();
|
||||
List<Card> hPlay = CardLists.filter(getTargetableCards(ai, sa, pl, tgt, activator, source, game), CardPredicates.Presets.PLANEWALKERS);
|
||||
List<Card> hPlay = CardLists.filter(getTargetableCards(ai, sa, pl, tgt, activator, source, game), CardPredicates.Presets.PLANESWALKERS);
|
||||
|
||||
List<Card> killables = CardLists.filter(hPlay, new Predicate<Card>() {
|
||||
@Override
|
||||
|
||||
@@ -180,7 +180,7 @@ public class DrawAi extends SpellAbilityAi {
|
||||
|
||||
int numHand = ai.getCardsIn(ZoneType.Hand).size();
|
||||
if ("Jace, Vryn's Prodigy".equals(sourceName) && ai.getCardsIn(ZoneType.Graveyard).size() > 3) {
|
||||
return CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS,
|
||||
return CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS,
|
||||
CardPredicates.isType("Jace")).size() <= 0;
|
||||
}
|
||||
if (source.isSpell() && ai.getCardsIn(ZoneType.Hand).contains(source)) {
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PermanentAi extends SpellAbilityAi {
|
||||
/* -- not used anymore after Ixalan (Planeswalkers are now legendary, not unique by subtype) --
|
||||
if (card.isPlaneswalker()) {
|
||||
CardCollection list = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield),
|
||||
CardPredicates.Presets.PLANEWALKERS);
|
||||
CardPredicates.Presets.PLANESWALKERS);
|
||||
for (String type : card.getType().getSubtypes()) { // determine
|
||||
// planewalker
|
||||
// subtype
|
||||
|
||||
@@ -1303,7 +1303,7 @@ public class GameAction {
|
||||
|
||||
private boolean handlePlaneswalkerRule(Player p) {
|
||||
// get all Planeswalkers
|
||||
final List<Card> list = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS);
|
||||
final List<Card> list = CardLists.filter(p.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS);
|
||||
boolean recheck = false;
|
||||
|
||||
//final Multimap<String, Card> uniqueWalkers = ArrayListMultimap.create(); // Not used as of Ixalan
|
||||
|
||||
@@ -587,7 +587,7 @@ public final class CardPredicates {
|
||||
return c.isLand() && c.isSnow();
|
||||
}
|
||||
};
|
||||
public static final Predicate<Card> PLANEWALKERS = new Predicate<Card>() {
|
||||
public static final Predicate<Card> PLANESWALKERS = new Predicate<Card>() {
|
||||
@Override
|
||||
public boolean apply(final Card c) {
|
||||
return c.isPlaneswalker();
|
||||
|
||||
@@ -77,7 +77,7 @@ public class AttackRequirement {
|
||||
if (c.hasKeyword("Each opponent must attack you or a planeswalker you control with at least one creature each combat if able.")) {
|
||||
if (attacker.getController().isOpponentOf(c.getController()) && !defenderOrPWSpecific.containsKey(c.getController())) {
|
||||
defenderOrPWSpecific.put(c.getController(), 1);
|
||||
for (Card pw : CardLists.filter(c.getController().getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS)) {
|
||||
for (Card pw : CardLists.filter(c.getController().getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) {
|
||||
// Add the attack alternatives that suffice (planeswalkers that can be attacked instead of the player)
|
||||
if (!defenderSpecificAlternatives.containsKey(c.getController())) {
|
||||
defenderSpecificAlternatives.put(c.getController(), Lists.<GameEntity>newArrayList());
|
||||
|
||||
@@ -62,7 +62,7 @@ public class CombatUtil {
|
||||
final FCollection<GameEntity> defenders = new FCollection<GameEntity>();
|
||||
for (final Player defender : playerWhoAttacks.getOpponents()) {
|
||||
defenders.add(defender);
|
||||
final CardCollection planeswalkers = CardLists.filter(defender.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANEWALKERS);
|
||||
final CardCollection planeswalkers = CardLists.filter(defender.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS);
|
||||
defenders.addAll(planeswalkers);
|
||||
}
|
||||
return defenders;
|
||||
|
||||
Reference in New Issue
Block a user