From efb8f4de97e95b2d8eb50613f7cac9b26ae46c57 Mon Sep 17 00:00:00 2001 From: "marcin.sciesinski" Date: Sun, 20 Oct 2019 18:55:11 -0700 Subject: [PATCH] Made the maximum of the same card configurable per format --- .../game/formats/LotroFormatLibrary.java | 6 +- .../src/main/resources/lotrFormats.json | 158 ++++++++++++++---- 2 files changed, 123 insertions(+), 41 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/formats/LotroFormatLibrary.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/formats/LotroFormatLibrary.java index ba4690a83..2cd559f50 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/formats/LotroFormatLibrary.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/formats/LotroFormatLibrary.java @@ -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); diff --git a/gemp-lotr/gemp-lotr-server/src/main/resources/lotrFormats.json b/gemp-lotr/gemp-lotr-server/src/main/resources/lotrFormats.json index 6be805e51..2e4740f2c 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/resources/lotrFormats.json +++ b/gemp-lotr/gemp-lotr-server/src/main/resources/lotrFormats.json @@ -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 } ]