manasimu 0.0.27 → 0.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/manasimu/card.rb +6 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f594d88260d5a385a6c371967d6dba160e1078a3b0df93afeb6b260ae24298c
4
- data.tar.gz: 3d5ad358c02c73e33802222f9729bd5c457249678eadb85f90420ff6703bb26f
3
+ metadata.gz: 4f05b8686e87a5b30f3437b017034b1d11ef8d4f0ee750ae8054294848e3e782
4
+ data.tar.gz: 031dbf782b235517129e04642108281c11f6de3a07dacd140bcbedbc22b56bfb
5
5
  SHA512:
6
- metadata.gz: 11c10118e360fa088964054f4f3083a6dc493528970083ca0af3b24b5729caeae89becb979d23ac872e99f83c6f7b6ac287b9feff70f8c2d724019865f1ba539
7
- data.tar.gz: 187a68ae85b566b9e8e592da86aa9e1338ee030b582211045be954e225ed450d3796fd171379e5862706f233a65b4bf506113d2cbc302d9af079924a97fbae39
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.split(',') : []
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 != "Land"}.first
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.split(",").each do |color|
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 == "Land"
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 == "Land"
479
+ return @types.include? "Land"
480
480
  end
481
481
 
482
482
  def to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manasimu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - so1itaryrove