mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Planechase variant now launched from Constructed match setup screen.
- moved random deck checkboxes into deck panel. Only show them when a random deck type is selected. They are still global settings however. - when player 1 name is changed in preferences, switching back to constructed setup screen will reflect the change
This commit is contained in:
@@ -170,27 +170,6 @@ public enum DeckFormat {
|
||||
|
||||
break;
|
||||
|
||||
case Planechase: //Must contain at least 10 planes/phenomenons, but max 2 phenomenons. Singleton.
|
||||
final CardPool planes = deck.get(DeckSection.Planes);
|
||||
if (planes == null || planes.countAll() < 10) {
|
||||
return "should have at least 10 planes";
|
||||
}
|
||||
int phenoms = 0;
|
||||
for (Entry<PaperCard, Integer> cp : planes) {
|
||||
|
||||
if (cp.getKey().getRules().getType().typeContains(CardType.CoreType.Phenomenon)) {
|
||||
phenoms++;
|
||||
}
|
||||
if (cp.getValue() > 1) {
|
||||
return "must not contain multiple copies of any Plane or Phenomena";
|
||||
}
|
||||
|
||||
}
|
||||
if (phenoms > 2) {
|
||||
return "must not contain more than 2 Phenomena";
|
||||
}
|
||||
break;
|
||||
|
||||
case Archenemy: //Must contain at least 20 schemes, max 2 of each.
|
||||
final CardPool schemes = deck.get(DeckSection.Schemes);
|
||||
if (schemes == null || schemes.countAll() < 20) {
|
||||
@@ -242,4 +221,25 @@ public enum DeckFormat {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getPlaneSectionConformanceProblem(CardPool planes) {
|
||||
//Must contain at least 10 planes/phenomenons, but max 2 phenomenons. Singleton.
|
||||
if (planes == null || planes.countAll() < 10) {
|
||||
return "should have at least 10 planes";
|
||||
}
|
||||
int phenoms = 0;
|
||||
for (Entry<PaperCard, Integer> cp : planes) {
|
||||
if (cp.getKey().getRules().getType().typeContains(CardType.CoreType.Phenomenon)) {
|
||||
phenoms++;
|
||||
}
|
||||
if (cp.getValue() > 1) {
|
||||
return "must not contain multiple copies of any Plane or Phenomena";
|
||||
}
|
||||
|
||||
}
|
||||
if (phenoms > 2) {
|
||||
return "must not contain more than 2 Phenomena";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user