Adding Kings block boosters and tengwars.

This commit is contained in:
marcins78@gmail.com
2012-03-10 15:53:18 +00:00
parent 13c7db5d88
commit f2d410878c
16 changed files with 751 additions and 7 deletions

View File

@@ -19,9 +19,18 @@ public class RarityReader {
Map<String, String> cardRarity = new HashMap<String, String>();
while ((line = bufferedReader.readLine()) != null) {
if (line.endsWith("T"))
tengwar.add(line);
else {
if (line.endsWith("T")) {
if (!line.substring(0, setNo.length()).equals(setNo))
throw new IllegalStateException("Seems the rarity is for some other set");
String rarity = line.substring(setNo.length(), setNo.length() + 1);
List<String> cards = cardsByRarity.get(rarity);
if (cards == null) {
cards = new LinkedList<String>();
cardsByRarity.put(rarity, cards);
}
String blueprintId = setNo + "_" + line.substring(setNo.length() + 1);
tengwar.add(blueprintId);
} else {
if (!line.substring(0, setNo.length()).equals(setNo))
throw new IllegalStateException("Seems the rarity is for some other set");
String rarity = line.substring(setNo.length(), setNo.length() + 1);

View File

@@ -0,0 +1,127 @@
10R1
10U2
10R3
10U4
10U5
10R6
10R6T
10R7
10R8
10R9
10R9T
10C10
10R11
10U12
10R13
10R14
10U15
10C16
10R17
10R18
10R19
10U20
10R21
10U22
10R23
10C24
10R25
10R25T
10U26
10C27
10R28
10R29
10C30
10C31
10U32
10U33
10C34
10U35
10C36
10C37
10R38
10U39
10R40
10C41
10C42
10U43
10U44
10R45
10R46
10U47
10R48
10C49
10C50
10R51
10C52
10U53
10U54
10C55
10C56
10U57
10R58
10R59
10R60
10C61
10C62
10R63
10C64
10C65
10C66
10R67
10R68
10U69
10U70
10R71
10R72
10U73
10U74
10R75
10C76
10C77
10U78
10C79
10C80
10C81
10U82
10U83
10C84
10C85
10C86
10C87
10R88
10R88T
10R89
10C90
10C91
10U92
10U93
10R94
10R95
10U96
10U97
10U98
10R99
10R100
10R101
10C102
10C103
10R104
10U105
10C106
10C107
10U108
10C109
10C110
10U111
10C112
10C113
10U114
10U115
10U116
10U117
10U118
10U119
10U120
10P121
10P122
10P122T

View File

@@ -0,0 +1,372 @@
7C1
7R2
7R2T
7U3
7C4
7R5
7C6
7R7
7U8
7R9
7R10
7C11
7R12
7U13
7U14
7U15
7R16
7R17
7R18
7U19
7C20
7R21
7R22
7C23
7R24
7R25
7C26
7R27
7R28
7C29
7C30
7C31
7R32
7R33
7C34
7U35
7C36
7R37
7R38
7R39
7C40
7C41
7U42
7R43
7R44
7U45
7C46
7U47
7R48
7U49
7R50
7C51
7C52
7C53
7U54
7U55
7R56
7R57
7R58
7C59
7U60
7R61
7C62
7R63
7U64
7C65
7R66
7R67
7R68
7R69
7R70
7R71
7C72
7R73
7R74
7C75
7C76
7U77
7U78
7R79
7R79T
7R80
7C81
7C82
7C83
7C84
7R85
7C86
7R87
7U88
7C89
7C90
7R91
7C92
7U93
7U94
7R95
7C96
7R97
7U98
7C99
7R100
7R101
7U102
7R103
7R104
7C105
7C106
7U107
7C108
7U109
7U110
7C111
7R112
7R113
7R114
7C115
7C116
7C117
7C118
7R119
7U120
7C121
7R122
7U123
7C124
7U125
7U126
7R127
7U128
7R129
7C130
7C131
7C132
7C133
7U134
7C135
7U136
7C137
7U138
7C139
7C140
7C141
7C142
7R143
7C144
7R145
7U146
7U147
7R148
7C149
7C150
7U151
7R152
7C153
7C154
7C155
7C156
7U157
7R158
7R159
7U160
7C161
7U162
7R163
7R164
7R165
7R166
7R167
7U168
7R169
7R170
7U171
7C172
7C173
7U174
7U175
7U176
7R177
7U178
7R179
7R180
7R181
7R182
7R183
7C184
7U185
7C186
7U187
7R188
7C189
7U190
7R191
7C192
7C193
7C194
7U195
7C196
7R197
7C198
7C199
7C200
7C201
7U202
7U203
7R204
7R205
7R206
7U207
7C208
7C209
7R210
7R211
7R211T
7U212
7R213
7U214
7R215
7U216
7U217
7U218
7R219
7C220
7R221
7R221T
7C222
7R223
7U224
7C225
7C226
7R227
7R227T
7R228
7C229
7R230
7U231
7R232
7R233
7U234
7C235
7R236
7C237
7U238
7R239
7C240
7R241
7R242
7C243
7U244
7U245
7C246
7C247
7C248
7R249
7R250
7R251
7U252
7C253
7U254
7R255
7C256
7C257
7U258
7C259
7R260
7R261
7C262
7C263
7U264
7C265
7R266
7R267
7R268
7R269
7U270
7U271
7U272
7C273
7R274
7C275
7C276
7C277
7U278
7R279
7U280
7U281
7U282
7R283
7R284
7C285
7R286
7C287
7C288
7U289
7C290
7C291
7U292
7U293
7U294
7U295
7C296
7C297
7C298
7C299
7C300
7U301
7U302
7C303
7C304
7U305
7R306
7U307
7R308
7U309
7U310
7R311
7C312
7C313
7R314
7C315
7R316
7C317
7R318
7C319
7C320
7R321
7R321T
7C322
7C323
7R324
7R324T
7R325
7C326
7R327
7U328
7U329
7U330
7U331
7U332
7U333
7U334
7U335
7U336
7U337
7U338
7U339
7U340
7U341
7U342
7U343
7U344
7U345
7U346
7U347
7U348
7U349
7U350
7U351
7U352
7U353
7U354
7U355
7U356
7U357
7U358
7U359
7U360
7U361
7U362
7U363
7P364
7P365

View File

@@ -0,0 +1,128 @@
8C1
8R2
8R3
8U4
8C5
8C6
8R7
8U8
8U9
8C10
8R11
8R12
8U13
8C14
8R15
8R15T
8U16
8U17
8U18
8U19
8R20
8R21
8C22
8U23
8R24
8R25
8R25T
8C26
8R27
8C28
8U29
8C30
8C31
8R32
8R33
8C34
8C35
8R36
8R37
8R38
8R38T
8C39
8C40
8C41
8U42
8R43
8U44
8U45
8U46
8C47
8C48
8R49
8C50
8R51
8R51T
8C52
8C53
8C54
8C55
8U56
8R57
8R57T
8C58
8U59
8U60
8C61
8R62
8C63
8U64
8R65
8C66
8R67
8R68
8U69
8R70
8U71
8R72
8U73
8C74
8C75
8C76
8R77
8U78
8U79
8U80
8R81
8U82
8U83
8R84
8U85
8U86
8C87
8R88
8C89
8C90
8R91
8R92
8R93
8U94
8R95
8R96
8U97
8U98
8U99
8U100
8C101
8C102
8R103
8R103T
8C104
8R105
8C106
8U107
8R108
8C109
8U110
8C111
8U112
8R113
8C114
8R115
8C116
8U117
8U118
8U119
8U120
8P121
8P122

View File

@@ -0,0 +1,52 @@
9X1
9X2
9X3
9X4
9R5
9R6
9X7
9R8
9R9
9R10
9R11
9X12
9R13
9X14
9X15
9X16
9X17
9R18
9R19
9R20
9R21
9R22
9R23
9R24
9R25
9X26
9R27
9X28
9X29
9X30
9X31
9X32
9X33
9X34
9R35
9R36
9R37
9R38
9X39
9R40
9X41
9R42
9X43
9R44
9R45
9R46
9X47
9X48
9X49
9R50
9X51
9X52

View File

@@ -31,6 +31,10 @@ public class CollectionSerializer {
loadSet("4");
loadSet("5");
loadSet("6");
loadSet("7");
loadSet("8");
loadSet("9");
loadSet("10");
} catch (IOException exp) {
throw new RuntimeException("Problem loading collection data", exp);
}

View File

@@ -0,0 +1,24 @@
package com.gempukku.lotro.packs;
import com.gempukku.lotro.cards.packs.RarityReader;
import com.gempukku.lotro.game.CardCollection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class TengwarPackBox implements PackBox {
private List<CardCollection.Item> _cards = new ArrayList<CardCollection.Item>();
public TengwarPackBox(int[] sets) {
RarityReader rarityReader = new RarityReader();
for (int set : sets)
for (String tengwarCard : rarityReader.getSetRarity(String.valueOf(set)).getTengwarCards())
_cards.add(new CardCollection.Item(CardCollection.Item.Type.CARD, 1, tengwarCard));
}
@Override
public List<CardCollection.Item> openPack() {
return Collections.unmodifiableList(_cards);
}
}

View File

@@ -27,4 +27,8 @@ EoF - Witch-king Starter
(S)RotEL - Starter
Random FotR Foil Common
Random FotR Foil Uncommon
(S)TTT - Tengwar
(S)TTT - Tengwar
(S)RotK - Tengwar
RotK - Booster
SoG - Booster
MD - Booster

View File

@@ -60,6 +60,10 @@ public class CollectionResource extends AbstractResource {
_rarities.put("4", reader.getSetRarity("4"));
_rarities.put("5", reader.getSetRarity("5"));
_rarities.put("6", reader.getSetRarity("6"));
_rarities.put("7", reader.getSetRarity("7"));
_rarities.put("8", reader.getSetRarity("8"));
_rarities.put("9", reader.getSetRarity("9"));
_rarities.put("10", reader.getSetRarity("10"));
}
@Path("/{collectionType}")

View File

@@ -44,8 +44,9 @@ public class PacksStorageProvider implements Injectable<PacksStorage>, Injectabl
packStorage.addPackBox("(S)BoHD - Starter", new FixedPackBox("(S)BoHD - Starter"));
packStorage.addPackBox("(S)EoF - Starter", new FixedPackBox("(S)EoF - Starter"));
packStorage.addPackBox("(S)FotR - Tengwar", new FixedPackBox("(S)FotR - Tengwar"));
packStorage.addPackBox("(S)TTT - Tengwar", new FixedPackBox("(S)TTT - Tengwar"));
packStorage.addPackBox("(S)FotR - Tengwar", new TengwarPackBox(new int[]{1, 2, 3}));
packStorage.addPackBox("(S)TTT - Tengwar", new TengwarPackBox(new int[]{4, 5, 6}));
packStorage.addPackBox("(S)Booster Choice", new FixedPackBox("(S)Booster Choice"));
packStorage.addPackBox("FotR - Gandalf Starter", new FixedPackBox("FotR - Gandalf Starter"));
@@ -74,6 +75,10 @@ public class PacksStorageProvider implements Injectable<PacksStorage>, Injectabl
packStorage.addPackBox("BoHD - Booster", new RarityPackBox(5));
packStorage.addPackBox("EoF - Booster", new RarityPackBox(6));
packStorage.addPackBox("RotK - Booster", new RarityPackBox(7));
packStorage.addPackBox("SoG - Booster", new RarityPackBox(8));
packStorage.addPackBox("MD - Booster", new RarityPackBox(10));
return packStorage;
} catch (IOException exp) {
_logger.error("Error while creating resource", exp);

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@@ -154,6 +154,7 @@ var CardFilter = Class.extend({
+ "<option value='C'>Common</option>"
+ "<option value='A'>Alternate Image</option>"
+ "<option value='P'>Promo</option>"
+ "<option value='X'>Rare+</option>"
+ "<option value='unknown'>Unknown</option>"
+ "</select>");

View File

@@ -18,6 +18,8 @@ var packBlueprints = {
"(S)FotR - Tengwar": "/gemp-lotr/images/boosters/fotr_tengwar_selection.png",
"(S)TTT - Tengwar": "/gemp-lotr/images/boosters/ttt_tengwar_selection.png",
"(S)RotK - Tengwar": "/gemp-lotr/images/boosters/rotk_tengwar_selection.png",
"(S)Booster Choice": "/gemp-lotr/images/boosters/booster_selection.png",
"FotR - League Starter": "/gemp-lotr/images/boosters/fotr_league_starter.png",
@@ -46,7 +48,19 @@ var packBlueprints = {
"EoF - Faramir Starter": "/gemp-lotr/images/boosters/eof_faramir_starter.png",
"EoF - Witch-king Starter": "/gemp-lotr/images/boosters/eof_witch_king_starter.png",
"EoF - Booster": "/gemp-lotr/images/boosters/eof_booster.png"
"EoF - Booster": "/gemp-lotr/images/boosters/eof_booster.png",
"RotK - Aragorn Starter": "/gemp-lotr/images/boosters/ttt_aragorn_starter.png",
"RotK - Theoden Starter": "/gemp-lotr/images/boosters/ttt_theoden_starter.png",
"RotK - Booster": "/gemp-lotr/images/boosters/rotk_booster.png",
"SoG - Eowyn Starter": "/gemp-lotr/images/boosters/bohd_eowyn_starter.png",
"SoG - Legolas Starter": "/gemp-lotr/images/boosters/bohd_legolas_starter.png",
"SoG - Booster": "/gemp-lotr/images/boosters/sog_booster.png",
"MD - Faramir Starter": "/gemp-lotr/images/boosters/eof_faramir_starter.png",
"MD - Witch-king Starter": "/gemp-lotr/images/boosters/eof_witch_king_starter.png",
"MD - Booster": "/gemp-lotr/images/boosters/md_booster.png"
};
var Card = Class.extend({