fix Card.isValidCard(String[], String). It was looping on a new array of length 1 instead of the passed in array, so things like "Artifact,Creature,Land" would only be recognized as "Artifact"

This commit is contained in:
jendave
2011-08-06 09:18:55 +00:00
parent 227fa25f70
commit e1e3b3d3e6

View File

@@ -2280,9 +2280,9 @@ public class Card extends MyObservable {
public boolean isValidCard(String Restris[], String You) {
String Restriction[] = {""};
String Restriction[] = new String[Restris.length];
String st = "";
for (int i=0; i<Restriction.length; i++)
for (int i=0; i<Restris.length; i++)
{
Restriction[i] = Restris[i];
if (Restriction[i].contains("YouCtrl"))
@@ -2306,7 +2306,7 @@ public class Card extends MyObservable {
}
public boolean isValidCard(String Restrictions[]) {
if (getName().equals("Mana Pool") || isImmutable()) return false;
for(int i = 0; i < Restrictions.length; i++) {