mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Updated some more checks to use isCreatureType.
This commit is contained in:
@@ -6077,9 +6077,7 @@ public class CardFactory implements NewConstants {
|
||||
input[0] = JOptionPane.showInputDialog(null, "Which creature type?", "Pick type",
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
if(input[0].equals("Legendary") || input[0].equals("Artifact")
|
||||
|| input[0].equals("Enchantment") || input[0].equals("Shrine")
|
||||
|| input[0].equals("Creature")) input[0] = "";
|
||||
if(!CardUtil.isCreatureType(input[0])) input[0] = "";
|
||||
//TODO: some more input validation, case-sensitivity, etc.
|
||||
|
||||
input[0] = input[0].trim(); //this is to prevent "cheating", and selecting multiple creature types,eg "Goblin Soldier"
|
||||
|
||||
@@ -4010,9 +4010,7 @@ public class CardFactoryUtil {
|
||||
ArrayList<String> typeList = c.getType();
|
||||
|
||||
for(String var:typeList) {
|
||||
if(var.equals("Creature") || var.equals("Artifact") || var.equals("Land") || var.equals("Tribal")
|
||||
|| var.equals("Enchantment") || var.equals("Legendary")) ;
|
||||
else if(!map.containsKey(var)) map.put(var, 1);
|
||||
if(CardUtil.isCreatureType(var) && !map.containsKey(var)) map.put(var, 1);
|
||||
else {
|
||||
map.put(var, map.get(var) + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user