- Fixed destroyPlaneswalkers checking non-Planeswalker types (so two Artifact Planeswalker won't destroy each other).

This commit is contained in:
Sloth
2011-09-24 07:18:12 +00:00
parent 1774ca0173
commit d1f3b3164b
2 changed files with 14 additions and 7 deletions

View File

@@ -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>

View File

@@ -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);
}
}
}
}
}
/**