mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
*Fixed AF_NameCard crashing if the named card didn't exist or wasn't implemented. Now it will simply ask again. It is,sadly, still case sensitive.
This commit is contained in:
@@ -1286,12 +1286,17 @@ public class AbilityFactory_Choose {
|
||||
String name = null;
|
||||
while (!ok) {
|
||||
if (sa.getActivatingPlayer().isHuman()) {
|
||||
String message = validDesc.equals("card") ? "Name a card" : "Name a " + validDesc + " card";
|
||||
String message = validDesc.equals("card") ? "Name a card" : "Name a " + validDesc + " card. (Case sensitive)";
|
||||
name = JOptionPane.showInputDialog(null, message, host.getName(), JOptionPane.QUESTION_MESSAGE);
|
||||
if (!valid.equals("Card") && !(null == name)) {
|
||||
try {
|
||||
Card temp = AllZone.getCardFactory().getCard(name, p);
|
||||
ok = temp.isValid(valid, host.getController(), host);
|
||||
}
|
||||
catch(Exception ignored) {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ok = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user