manasimu 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/manasimu/card.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f05b8686e87a5b30f3437b017034b1d11ef8d4f0ee750ae8054294848e3e782
|
4
|
+
data.tar.gz: 031dbf782b235517129e04642108281c11f6de3a07dacd140bcbedbc22b56bfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fbd32550c42b6360ff607e7d2c7f7e37e508736c5a8441e3bf6e7a54a5e8ee113530af81af27b5ec435b0483df2c6fee5ec4131b365e09983060620ff0acc8c
|
7
|
+
data.tar.gz: 984bcb2a54f4c30ed6505514f93bd58f9b3ca489f0c38dae55156d8ba44b8586251a3d3296db7aea6c2ba1458c04dbed656a3f730f66b8f8b8ee51c6ea16accf
|
data/lib/manasimu/card.rb
CHANGED
@@ -192,7 +192,7 @@ class CardType
|
|
192
192
|
|
193
193
|
def mana_source
|
194
194
|
@mana_source ||= @contents.map { |c|
|
195
|
-
c.color_identity ? c.color_identity
|
195
|
+
c.color_identity ? c.color_identity : []
|
196
196
|
}.flatten.uniq
|
197
197
|
end
|
198
198
|
|
@@ -206,7 +206,7 @@ class CardType
|
|
206
206
|
|
207
207
|
def mana_cost
|
208
208
|
return @mana_cost if @mana_cost
|
209
|
-
spell = @contents.select {|c| c.types
|
209
|
+
spell = @contents.select {|c| not c.types.include? "Land"}.first
|
210
210
|
if spell
|
211
211
|
@mana_cost = spell.mana_cost
|
212
212
|
else
|
@@ -227,7 +227,7 @@ class CardType
|
|
227
227
|
end
|
228
228
|
|
229
229
|
def types
|
230
|
-
@types ||= @contents.map {|c| c.types}
|
230
|
+
@types ||= @contents.map {|c| c.types}.flatten
|
231
231
|
end
|
232
232
|
|
233
233
|
def color_identity
|
@@ -235,7 +235,7 @@ class CardType
|
|
235
235
|
@memo_colors ||= []
|
236
236
|
@contents.each do |c|
|
237
237
|
if c.color_identity
|
238
|
-
c.color_identity.
|
238
|
+
c.color_identity.each do |color|
|
239
239
|
@memo_colors << color if not @memo_colors.include? color
|
240
240
|
end
|
241
241
|
end
|
@@ -289,7 +289,7 @@ class CardType
|
|
289
289
|
[0,1]
|
290
290
|
end
|
291
291
|
@is_land = arr.select do |i|
|
292
|
-
@contents[i] and @contents[i].types
|
292
|
+
@contents[i] and @contents[i].types.include? "Land"
|
293
293
|
end.length > 0
|
294
294
|
return @is_land
|
295
295
|
end
|
@@ -476,7 +476,7 @@ class Content
|
|
476
476
|
end
|
477
477
|
|
478
478
|
def mana_source?
|
479
|
-
return @types
|
479
|
+
return @types.include? "Land"
|
480
480
|
end
|
481
481
|
|
482
482
|
def to_s
|