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));
|
return (!isASuperType(cardType) && !isACardType(cardType));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if a Type is a Creature Type (by excluding all other types)
|
|
||||||
/**
|
/**
|
||||||
* <p>isACreatureType.</p>
|
* <p>isACreatureType.</p>
|
||||||
*
|
*
|
||||||
@@ -467,6 +466,10 @@ public final class CardUtil {
|
|||||||
public static boolean isALandType(final String cardType) {
|
public static boolean isALandType(final String cardType) {
|
||||||
return (Constant.CardTypes.landTypes[0].list.contains(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>
|
* <p>isABasicLandType.</p>
|
||||||
|
|||||||
@@ -826,16 +826,20 @@ public class GameAction {
|
|||||||
AllZone.getGameAction().moveToGraveyard(c);
|
AllZone.getGameAction().moveToGraveyard(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
String subtype = c.getType().get(c.getType().size() - 1);
|
ArrayList<String> types = c.getType();
|
||||||
CardList cl = list.getType(subtype);
|
for (String type : types) {
|
||||||
|
if(!CardUtil.isAPlaneswalkerType(type))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CardList cl = list.getType(type);
|
||||||
|
|
||||||
if (cl.size() > 1) {
|
if (cl.size() > 1) {
|
||||||
for (Card crd : cl) {
|
for (Card crd : cl) {
|
||||||
AllZone.getGameAction().moveToGraveyard(crd);
|
AllZone.getGameAction().moveToGraveyard(crd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user