mtg-db 1.0.15 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,420 @@
1
+ [
2
+ {
3
+ "name": "Aegis Angel",
4
+ "set_name": "Welcome Deck 2016",
5
+ "collector_num": "1",
6
+ "illustrator": "Aleksi Briclot",
7
+ "types": [
8
+ "Creature"
9
+ ],
10
+ "supertypes": [],
11
+ "subtypes": [
12
+ "Angel"
13
+ ],
14
+ "rarity": "Rare",
15
+ "mana_cost": "4WW",
16
+ "converted_mana_cost": 6,
17
+ "oracle_text": [
18
+ "Flying (This creature can't be blocked except by creatures with flying or reach.)",
19
+ "When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel. (Effects that say \"destroy\" don't destroy it. A creature with indestructible can't be destroyed by damage.)"
20
+ ],
21
+ "flavor_text": null,
22
+ "power": "5",
23
+ "toughness": "5",
24
+ "loyalty": null,
25
+ "multiverse_id": 413367,
26
+ "other_part": null,
27
+ "color_indicator": null
28
+ },
29
+ {
30
+ "name": "Marked by Honor",
31
+ "set_name": "Welcome Deck 2016",
32
+ "collector_num": "2",
33
+ "illustrator": "David Palumbo",
34
+ "types": [
35
+ "Enchantment"
36
+ ],
37
+ "supertypes": [],
38
+ "subtypes": [
39
+ "Aura"
40
+ ],
41
+ "rarity": "Common",
42
+ "mana_cost": "3W",
43
+ "converted_mana_cost": 4,
44
+ "oracle_text": [
45
+ "Enchant creature",
46
+ "Enchanted creature gets +2/+2 and has vigilance. (Attacking doesn't cause it to tap.)"
47
+ ],
48
+ "flavor_text": "Stand your post for duty. Stand your ground for honor.",
49
+ "power": null,
50
+ "toughness": null,
51
+ "loyalty": null,
52
+ "multiverse_id": 413368,
53
+ "other_part": null,
54
+ "color_indicator": null
55
+ },
56
+ {
57
+ "name": "Serra Angel",
58
+ "set_name": "Welcome Deck 2016",
59
+ "collector_num": "3",
60
+ "illustrator": "Greg Staples",
61
+ "types": [
62
+ "Creature"
63
+ ],
64
+ "supertypes": [],
65
+ "subtypes": [
66
+ "Angel"
67
+ ],
68
+ "rarity": "Uncommon",
69
+ "mana_cost": "3WW",
70
+ "converted_mana_cost": 5,
71
+ "oracle_text": [
72
+ "Flying (This creature can't be blocked except by creatures with flying or reach.)",
73
+ "Vigilance (Attacking doesn't cause this creature to tap.)"
74
+ ],
75
+ "flavor_text": "Follow the light. In its absence, follow her.",
76
+ "power": "4",
77
+ "toughness": "4",
78
+ "loyalty": null,
79
+ "multiverse_id": 413369,
80
+ "other_part": null,
81
+ "color_indicator": null
82
+ },
83
+ {
84
+ "name": "Air Servant",
85
+ "set_name": "Welcome Deck 2016",
86
+ "collector_num": "4",
87
+ "illustrator": "Lars Grant-West",
88
+ "types": [
89
+ "Creature"
90
+ ],
91
+ "supertypes": [],
92
+ "subtypes": [
93
+ "Elemental"
94
+ ],
95
+ "rarity": "Uncommon",
96
+ "mana_cost": "4U",
97
+ "converted_mana_cost": 5,
98
+ "oracle_text": [
99
+ "Flying",
100
+ "{2}{U}: Tap target creature with flying."
101
+ ],
102
+ "flavor_text": "Wind is forceful, yet ephemeral. It can knock a dragon out of the sky, yet pass through the smallest crack unhindered.",
103
+ "power": "4",
104
+ "toughness": "3",
105
+ "loyalty": null,
106
+ "multiverse_id": 413370,
107
+ "other_part": null,
108
+ "color_indicator": null
109
+ },
110
+ {
111
+ "name": "Disperse",
112
+ "set_name": "Welcome Deck 2016",
113
+ "collector_num": "5",
114
+ "illustrator": "Ryan Yee",
115
+ "types": [
116
+ "Instant"
117
+ ],
118
+ "supertypes": [],
119
+ "subtypes": [],
120
+ "rarity": "Common",
121
+ "mana_cost": "1U",
122
+ "converted_mana_cost": 2,
123
+ "oracle_text": [
124
+ "Return target nonland permanent to its owner's hand."
125
+ ],
126
+ "flavor_text": "It's pointless to hold on when you have nothing to hold on with.",
127
+ "power": null,
128
+ "toughness": null,
129
+ "loyalty": null,
130
+ "multiverse_id": 413371,
131
+ "other_part": null,
132
+ "color_indicator": null
133
+ },
134
+ {
135
+ "name": "Sphinx of Magosi",
136
+ "set_name": "Welcome Deck 2016",
137
+ "collector_num": "6",
138
+ "illustrator": "James Ryman",
139
+ "types": [
140
+ "Creature"
141
+ ],
142
+ "supertypes": [],
143
+ "subtypes": [
144
+ "Sphinx"
145
+ ],
146
+ "rarity": "Rare",
147
+ "mana_cost": "3UUU",
148
+ "converted_mana_cost": 6,
149
+ "oracle_text": [
150
+ "Flying",
151
+ "{2}{U}: Draw a card, then put a +1/+1 counter on Sphinx of Magosi."
152
+ ],
153
+ "flavor_text": "\"A riddle is nothing more than a trap for small minds, baited with the promise of understanding.\"",
154
+ "power": "6",
155
+ "toughness": "6",
156
+ "loyalty": null,
157
+ "multiverse_id": 413372,
158
+ "other_part": null,
159
+ "color_indicator": null
160
+ },
161
+ {
162
+ "name": "Mind Rot",
163
+ "set_name": "Welcome Deck 2016",
164
+ "collector_num": "7",
165
+ "illustrator": "Steve Luke",
166
+ "types": [
167
+ "Sorcery"
168
+ ],
169
+ "supertypes": [],
170
+ "subtypes": [],
171
+ "rarity": "Common",
172
+ "mana_cost": "2B",
173
+ "converted_mana_cost": 3,
174
+ "oracle_text": [
175
+ "Target player discards two cards."
176
+ ],
177
+ "flavor_text": "\"It saddens me to lose a source of inspiration. This one seemed especially promising.\"\n—Ashiok",
178
+ "power": null,
179
+ "toughness": null,
180
+ "loyalty": null,
181
+ "multiverse_id": 413373,
182
+ "other_part": null,
183
+ "color_indicator": null
184
+ },
185
+ {
186
+ "name": "Nightmare",
187
+ "set_name": "Welcome Deck 2016",
188
+ "collector_num": "8",
189
+ "illustrator": "Vance Kovacs",
190
+ "types": [
191
+ "Creature"
192
+ ],
193
+ "supertypes": [],
194
+ "subtypes": [
195
+ "Nightmare",
196
+ "Horse"
197
+ ],
198
+ "rarity": "Rare",
199
+ "mana_cost": "5B",
200
+ "converted_mana_cost": 6,
201
+ "oracle_text": [
202
+ "Flying (This creature can't be blocked except by creatures with flying or reach.)",
203
+ "Nightmare's power and toughness are each equal to the number of Swamps you control."
204
+ ],
205
+ "flavor_text": "The thunder of its hooves beats dreams into despair.",
206
+ "power": "*",
207
+ "toughness": "*",
208
+ "loyalty": null,
209
+ "multiverse_id": 413374,
210
+ "other_part": null,
211
+ "color_indicator": null
212
+ },
213
+ {
214
+ "name": "Sengir Vampire",
215
+ "set_name": "Welcome Deck 2016",
216
+ "collector_num": "9",
217
+ "illustrator": "Kev Walker",
218
+ "types": [
219
+ "Creature"
220
+ ],
221
+ "supertypes": [],
222
+ "subtypes": [
223
+ "Vampire"
224
+ ],
225
+ "rarity": "Uncommon",
226
+ "mana_cost": "3BB",
227
+ "converted_mana_cost": 5,
228
+ "oracle_text": [
229
+ "Flying (This creature can't be blocked except by creatures with flying or reach.)",
230
+ "Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire."
231
+ ],
232
+ "flavor_text": "Empires rise and fall, but evil is eternal.",
233
+ "power": "4",
234
+ "toughness": "4",
235
+ "loyalty": null,
236
+ "multiverse_id": 413375,
237
+ "other_part": null,
238
+ "color_indicator": null
239
+ },
240
+ {
241
+ "name": "Walking Corpse",
242
+ "set_name": "Welcome Deck 2016",
243
+ "collector_num": "10",
244
+ "illustrator": "Igor Kieryluk",
245
+ "types": [
246
+ "Creature"
247
+ ],
248
+ "supertypes": [],
249
+ "subtypes": [
250
+ "Zombie"
251
+ ],
252
+ "rarity": "Common",
253
+ "mana_cost": "1B",
254
+ "converted_mana_cost": 2,
255
+ "oracle_text": [],
256
+ "flavor_text": "\"Feeding a normal army is a problem of logistics. With zombies, it is an asset. Feeding is why they fight. Feeding is why they are feared.\"\n—Jadar, ghoulcaller of Nephalia",
257
+ "power": "2",
258
+ "toughness": "2",
259
+ "loyalty": null,
260
+ "multiverse_id": 413376,
261
+ "other_part": null,
262
+ "color_indicator": null
263
+ },
264
+ {
265
+ "name": "Borderland Marauder",
266
+ "set_name": "Welcome Deck 2016",
267
+ "collector_num": "11",
268
+ "illustrator": "Scott M. Fischer",
269
+ "types": [
270
+ "Creature"
271
+ ],
272
+ "supertypes": [],
273
+ "subtypes": [
274
+ "Human",
275
+ "Warrior"
276
+ ],
277
+ "rarity": "Common",
278
+ "mana_cost": "1R",
279
+ "converted_mana_cost": 2,
280
+ "oracle_text": [
281
+ "Whenever Borderland Marauder attacks, it gets +2/+0 until end of turn."
282
+ ],
283
+ "flavor_text": "Though she is rightly feared, there are relatively few tales of her deeds in battle, for few survive her raids.",
284
+ "power": "1",
285
+ "toughness": "2",
286
+ "loyalty": null,
287
+ "multiverse_id": 413377,
288
+ "other_part": null,
289
+ "color_indicator": null
290
+ },
291
+ {
292
+ "name": "Cone of Flame",
293
+ "set_name": "Welcome Deck 2016",
294
+ "collector_num": "12",
295
+ "illustrator": "Chippy",
296
+ "types": [
297
+ "Sorcery"
298
+ ],
299
+ "supertypes": [],
300
+ "subtypes": [],
301
+ "rarity": "Uncommon",
302
+ "mana_cost": "3RR",
303
+ "converted_mana_cost": 5,
304
+ "oracle_text": [
305
+ "Cone of Flame deals 1 damage to target creature or player, 2 damage to another target creature or player, and 3 damage to a third target creature or player."
306
+ ],
307
+ "flavor_text": null,
308
+ "power": null,
309
+ "toughness": null,
310
+ "loyalty": null,
311
+ "multiverse_id": 413378,
312
+ "other_part": null,
313
+ "color_indicator": null
314
+ },
315
+ {
316
+ "name": "Shivan Dragon",
317
+ "set_name": "Welcome Deck 2016",
318
+ "collector_num": "13",
319
+ "illustrator": "Donato Giancola",
320
+ "types": [
321
+ "Creature"
322
+ ],
323
+ "supertypes": [],
324
+ "subtypes": [
325
+ "Dragon"
326
+ ],
327
+ "rarity": "Rare",
328
+ "mana_cost": "4RR",
329
+ "converted_mana_cost": 6,
330
+ "oracle_text": [
331
+ "Flying (This creature can't be blocked except by creatures with flying or reach.)",
332
+ "{R}: Shivan Dragon gets +1/+0 until end of turn."
333
+ ],
334
+ "flavor_text": "The undisputed master of the mountains of Shiv.",
335
+ "power": "5",
336
+ "toughness": "5",
337
+ "loyalty": null,
338
+ "multiverse_id": 413379,
339
+ "other_part": null,
340
+ "color_indicator": null
341
+ },
342
+ {
343
+ "name": "Incremental Growth",
344
+ "set_name": "Welcome Deck 2016",
345
+ "collector_num": "14",
346
+ "illustrator": "Chuck Lukacs",
347
+ "types": [
348
+ "Sorcery"
349
+ ],
350
+ "supertypes": [],
351
+ "subtypes": [],
352
+ "rarity": "Uncommon",
353
+ "mana_cost": "3GG",
354
+ "converted_mana_cost": 5,
355
+ "oracle_text": [
356
+ "Put a +1/+1 counter on target creature, two +1/+1 counters on another target creature, and three +1/+1 counters on a third target creature."
357
+ ],
358
+ "flavor_text": "\"Tie a mouse under a bridge, and your cabbages will triple in size.\"\n—Kithkin superstition",
359
+ "power": null,
360
+ "toughness": null,
361
+ "loyalty": null,
362
+ "multiverse_id": 413380,
363
+ "other_part": null,
364
+ "color_indicator": null
365
+ },
366
+ {
367
+ "name": "Oakenform",
368
+ "set_name": "Welcome Deck 2016",
369
+ "collector_num": "15",
370
+ "illustrator": "Wayne Reynolds",
371
+ "types": [
372
+ "Enchantment"
373
+ ],
374
+ "supertypes": [],
375
+ "subtypes": [
376
+ "Aura"
377
+ ],
378
+ "rarity": "Common",
379
+ "mana_cost": "2G",
380
+ "converted_mana_cost": 3,
381
+ "oracle_text": [
382
+ "Enchant creature",
383
+ "Enchanted creature gets +3/+3."
384
+ ],
385
+ "flavor_text": "\"When the beast cloaks itself in the mighty oak, what good is a bow? When the oak wraps itself around the snarling beast, what good is a hatchet?\"\n—Dionus, elvish archdruid",
386
+ "power": null,
387
+ "toughness": null,
388
+ "loyalty": null,
389
+ "multiverse_id": 413381,
390
+ "other_part": null,
391
+ "color_indicator": null
392
+ },
393
+ {
394
+ "name": "Soul of the Harvest",
395
+ "set_name": "Welcome Deck 2016",
396
+ "collector_num": "16",
397
+ "illustrator": "Eytan Zana",
398
+ "types": [
399
+ "Creature"
400
+ ],
401
+ "supertypes": [],
402
+ "subtypes": [
403
+ "Elemental"
404
+ ],
405
+ "rarity": "Rare",
406
+ "mana_cost": "4GG",
407
+ "converted_mana_cost": 6,
408
+ "oracle_text": [
409
+ "Trample",
410
+ "Whenever another nontoken creature enters the battlefield under your control, you may draw a card."
411
+ ],
412
+ "flavor_text": null,
413
+ "power": "6",
414
+ "toughness": "6",
415
+ "loyalty": null,
416
+ "multiverse_id": 413382,
417
+ "other_part": null,
418
+ "color_indicator": null
419
+ }
420
+ ]
data/lib/mtg-db.rb CHANGED
@@ -2,14 +2,18 @@ require 'json'
2
2
 
3
3
  module Mtg
4
4
  module Db
5
- VERSION = '1.0.15'
5
+ VERSION = '1.1.0'
6
6
  CARDS_PATH = File.expand_path('../../data_v2/sets/%s.json', __FILE__)
7
7
  SETS_PATH = File.expand_path('../../data_v2/sets.json', __FILE__)
8
8
 
9
9
  class << self
10
- def cards
11
- @cards ||= sets.inject([]) do |cards, set|
12
- cards + load_json(CARDS_PATH % set['code'])
10
+ def cards(set_code = nil)
11
+ if set_code
12
+ load_json(CARDS_PATH % set_code)
13
+ else
14
+ @cards ||= sets.inject([]) do |cards, set|
15
+ cards + load_json(CARDS_PATH % set['code'])
16
+ end
13
17
  end
14
18
  end
15
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtg-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabe Smith
@@ -28,6 +28,7 @@ files:
28
28
  - data_v2/sets/7ed.json
29
29
  - data_v2/sets/8ed.json
30
30
  - data_v2/sets/9ed.json
31
+ - data_v2/sets/aer.json
31
32
  - data_v2/sets/ala.json
32
33
  - data_v2/sets/all.json
33
34
  - data_v2/sets/apc.json
@@ -55,6 +56,10 @@ files:
55
56
  - data_v2/sets/con.json
56
57
  - data_v2/sets/csp.json
57
58
  - data_v2/sets/dd2.json
59
+ - data_v2/sets/dda_dvd.json
60
+ - data_v2/sets/dda_evg.json
61
+ - data_v2/sets/dda_gvl.json
62
+ - data_v2/sets/dda_jvc.json
58
63
  - data_v2/sets/ddc.json
59
64
  - data_v2/sets/ddd.json
60
65
  - data_v2/sets/dde.json
@@ -118,6 +123,7 @@ files:
118
123
  - data_v2/sets/mma.json
119
124
  - data_v2/sets/mmq.json
120
125
  - data_v2/sets/mor.json
126
+ - data_v2/sets/mps.json
121
127
  - data_v2/sets/mrd.json
122
128
  - data_v2/sets/nem.json
123
129
  - data_v2/sets/nph.json
@@ -163,6 +169,7 @@ files:
163
169
  - data_v2/sets/v15.json
164
170
  - data_v2/sets/v16.json
165
171
  - data_v2/sets/vis.json
172
+ - data_v2/sets/w16.json
166
173
  - data_v2/sets/wth.json
167
174
  - data_v2/sets/wwk.json
168
175
  - data_v2/sets/zen.json
@@ -187,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
194
  version: '0'
188
195
  requirements: []
189
196
  rubyforge_project:
190
- rubygems_version: 2.4.6
197
+ rubygems_version: 2.2.2
191
198
  signing_key:
192
199
  specification_version: 4
193
200
  summary: 'A JSON database of Magic: The Gathering cards and sets.'