Made the maximum of the same card configurable per format

This commit is contained in:
marcin.sciesinski
2019-10-20 18:55:11 -07:00
parent 136a98e936
commit efb8f4de97
2 changed files with 123 additions and 41 deletions

View File

@@ -46,11 +46,9 @@ public class LotroFormatLibrary {
Boolean winOnControlling5Sites = (Boolean) formatDef.get("winOnControlling5Sites");
if (winOnControlling5Sites == null)
winOnControlling5Sites = false;
Boolean limited = (Boolean) formatDef.get("limited");
if (limited == null)
limited = false;
Number maximumSameNameCount = (Number) formatDef.get("maximumSameName");
int maximumSameName = limited ? 20 : 4;
int maximumSameName = (maximumSameNameCount != null) ? maximumSameNameCount.intValue() : 4;
final DefaultLotroFormat format = new DefaultLotroFormat(adventure, library, name, surveyUrl, block, true, 60, maximumSameName, true,
cancelRingBearerSkirmish, hasRuleOfFour, winAtEndOfRegroup, winOnControlling5Sites);

View File

@@ -240,42 +240,6 @@
"restricted":["1_40", "1_80", "1_108", "1_139", "1_195", "1_248", "2_32", "2_75", "3_106", "4_276", "4_304"],
"set":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
},
{
"name":"Limited",
"code":"limited_fotr",
"sites":"FELLOWSHIP",
"cancelRingBearerSkirmish":true,
"limited":true,
"set":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"hall":false
},
{
"name":"Limited",
"code":"limited_ttt",
"sites":"TWO_TOWERS",
"cancelRingBearerSkirmish":true,
"limited":true,
"set":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"hall":false
},
{
"name":"Limited",
"code":"limited_king",
"sites":"KING",
"cancelRingBearerSkirmish":true,
"limited":true,
"set":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"hall":false
},
{
"name":"Limited",
"code":"limited_shadows",
"sites":"SHADOWS",
"cancelRingBearerSkirmish":false,
"limited":true,
"set":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"hall":false
},
{
"name":"War of the Ring block - Set 11",
"code":"war_block11",
@@ -391,8 +355,128 @@
"code":"limited_hobbit",
"sites":"HOBBIT",
"cancelRingBearerSkirmish":true,
"limited":true,
"maximumSameName": 100,
"set":[30, 31],
"hall":false
},
{
"name": "Limited",
"code": "limited_fotr",
"sites": "FELLOWSHIP",
"cancelRingBearerSkirmish": true,
"maximumSameName": 100,
"set": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"hall": false
},
{
"name": "Limited",
"code": "limited_ttt",
"sites": "TWO_TOWERS",
"cancelRingBearerSkirmish": true,
"maximumSameName": 100,
"set": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"hall": false
},
{
"name": "Limited",
"code": "limited_king",
"sites": "KING",
"cancelRingBearerSkirmish": true,
"maximumSameName": 100,
"set": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"hall": false
},
{
"name": "Limited",
"code": "limited_shadows",
"sites": "SHADOWS",
"cancelRingBearerSkirmish": false,
"maximumSameName": 100,
"set": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"hall": false
}
]