mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
fix crash when card defined is missing or invalid
these card should be replaced or create a custom card for adventure mode Power Struggle, Necropolis of Azar
This commit is contained in:
@@ -48,9 +48,14 @@ public class EffectData implements Serializable {
|
||||
if(C != null)
|
||||
startCards.add(C);
|
||||
else {
|
||||
try {
|
||||
PaperToken T = FModel.getMagicDb().getAllTokens().getToken(name);
|
||||
if (T != null) startCards.add(T);
|
||||
else System.err.print("Can not find card \"" + name + "\"\n");
|
||||
else System.err.print("Can not find card/token \"" + name + "\"\n");
|
||||
} catch (Exception e) {
|
||||
//if it's not found probably the item is using funny cards and the users setting disabled non legal cards
|
||||
System.err.print("Can not find card/token \"" + name + "\"\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,9 +70,14 @@ public class EffectData implements Serializable {
|
||||
if(C != null)
|
||||
startCardsInCommandZone.add(C);
|
||||
else {
|
||||
try {
|
||||
PaperToken T = FModel.getMagicDb().getAllTokens().getToken(name);
|
||||
if (T != null) startCardsInCommandZone.add(T);
|
||||
else System.err.print("Can not find card \"" + name + "\"\n");
|
||||
else System.err.print("Can not find card/token \"" + name + "\"\n");
|
||||
} catch (Exception e) {
|
||||
//if it's not found probably the item is using funny cards and the users setting disabled non legal cards
|
||||
System.err.print("Can not find card/token \"" + name + "\"\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user