mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Fixed a typo in the PLANESWALKERS card predicate preset.
This commit is contained in:
@@ -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