mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
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:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user