mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Fixed destroyPlaneswalkers checking non-Planeswalker types (so two Artifact Planeswalker won't destroy each other).
This commit is contained in:
@@ -447,7 +447,6 @@ public final class CardUtil {
|
||||
return (!isASuperType(cardType) && !isACardType(cardType));
|
||||
}
|
||||
|
||||
// Check if a Type is a Creature Type (by excluding all other types)
|
||||
/**
|
||||
* <p>isACreatureType.</p>
|
||||
*
|
||||
@@ -467,6 +466,10 @@ public final class CardUtil {
|
||||
public static boolean isALandType(final String cardType) {
|
||||
return (Constant.CardTypes.landTypes[0].list.contains(cardType));
|
||||
}
|
||||
|
||||
public static boolean isAPlaneswalkerType(final String cardType) {
|
||||
return (Constant.CardTypes.walkerTypes[0].list.contains(cardType));
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>isABasicLandType.</p>
|
||||
|
||||
@@ -826,16 +826,20 @@ public class GameAction {
|
||||
AllZone.getGameAction().moveToGraveyard(c);
|
||||
}
|
||||
|
||||
String subtype = c.getType().get(c.getType().size() - 1);
|
||||
CardList cl = list.getType(subtype);
|
||||
ArrayList<String> types = c.getType();
|
||||
for (String type : types) {
|
||||
if(!CardUtil.isAPlaneswalkerType(type))
|
||||
continue;
|
||||
|
||||
CardList cl = list.getType(type);
|
||||
|
||||
if (cl.size() > 1) {
|
||||
for (Card crd : cl) {
|
||||
AllZone.getGameAction().moveToGraveyard(crd);
|
||||
if (cl.size() > 1) {
|
||||
for (Card crd : cl) {
|
||||
AllZone.getGameAction().moveToGraveyard(crd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user