admiral_stats_parser 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21c3548c1043a396927fd0e6893258b699303d6c
|
4
|
+
data.tar.gz: 9306cca5e82f639df4286f0d477b2c74643ebc58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a246e7a4560863fb3dfebdf0f337791deb08bcdc5d711bdd6b36a035077d5bfaaaba647743f1508aa44d73f08c66effc72b3d8d3c3dd2e609f725b0c5fc0e4b7
|
7
|
+
data.tar.gz: 470107dac29c48e72f892e5b85664a53a9c91951d134d80e34d369b50d24dc576cd7b6befd07d6c053bec59e2c16cfd18e09afd1235a7a0a0bc8ca43f5b388aa
|
@@ -136,7 +136,8 @@ class EventInfoParser
|
|
136
136
|
list = event_info_list.select{|info| info.level == level }
|
137
137
|
|
138
138
|
# その周回をクリア済みかどうか
|
139
|
-
|
139
|
+
# 最初の海域が 'NOOPEN' でなく、かつ 'NOTCLEAR' の海域が存在しない場合はクリア済み
|
140
|
+
cleared = ( list.first.area_clear_state != 'NOOPEN' and list.select{|i| i.area_clear_state == 'NOTCLEAR' }.size == 0 )
|
140
141
|
|
141
142
|
# 現在の周回数
|
142
143
|
loop_count = list.map{|i| i.loop_count }.max
|
@@ -151,6 +152,9 @@ class EventInfoParser
|
|
151
152
|
# 指定されたレベルの情報を、サブ海域番号の小さい順に取り出し
|
152
153
|
list = event_info_list.select{|info| info.level == level}.sort_by {|info| info.area_sub_id }
|
153
154
|
|
155
|
+
# 最初の海域が NOOPEN の場合は、難易度自体が開放されていないため、0 を返す
|
156
|
+
return 0 if list.first.area_clear_state == 'NOOPEN'
|
157
|
+
|
154
158
|
list.each_with_index do |info, prev_stage_no|
|
155
159
|
return prev_stage_no if info.area_clear_state == 'NOTCLEAR'
|
156
160
|
end
|
@@ -166,7 +170,7 @@ class EventInfoParser
|
|
166
170
|
list = event_info_list.select{|info| info.level == level}.sort_by {|info| info.area_sub_id }
|
167
171
|
|
168
172
|
list.each_with_index do |info, prev_stage_no|
|
169
|
-
if info.area_clear_state == 'NOTCLEAR'
|
173
|
+
if info.area_clear_state == 'NOTCLEAR' or info.area_clear_state == 'NOOPEN'
|
170
174
|
return info.military_gauge_left
|
171
175
|
end
|
172
176
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: admiral_stats_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Yoshizawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|