mgmg 1.6.1 → 1.6.2

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
  SHA256:
3
- metadata.gz: b9da45e92b9c5fb1cae6577e532cce280c997f46c1df019514b1eb976d89f03f
4
- data.tar.gz: 6f905a8d05126dbc81c71e73ddd64988e96a2033f520f6ded8b595ac96eb06be
3
+ metadata.gz: 0aee0bc2d348dfc0e23ce8556cea710f7645b6a590145f67bc1d5715b8c999a1
4
+ data.tar.gz: eed968af79443fabb9b65e931b93079a5dd8c839af6ea0b6f84a62c1ad411eda
5
5
  SHA512:
6
- metadata.gz: cfaf9d22a5aaa36fdef9c15348117a014a4a9385947417a614a3f1fc82622ee4f1ad4c0d5615cbde9dded71b4a2a13edb88938e0fc88c818fafe27625b8f9885
7
- data.tar.gz: 46734977a74542248d65449eb9b49aa4c9ce6f5b875a194c1ec8db6bdab47856fa341c9c77ef29f28c76dd4d078899260da64a6c8d04510fd7b4c692af8581c1
6
+ metadata.gz: 218e8c123428a6ec6228c1d296973c8ec01ba77d09430c3e33e49df081364b2e3e295b4f02a480b5349a709dd26e955e8472852e872ba73dd87b2044ec690904
7
+ data.tar.gz: 1c9db46a5f5fe0fdcb76bc0fbeab261414e2d9df4661d3dfe91f137ab066e739584170695fc58868d5d64e1ddec578866a90fd9291c9a47eca31f3cfafab915d
data/CHANGELOG.md CHANGED
@@ -174,3 +174,6 @@
174
174
  - `Mgmg.#find_lowerbound`,`Mgmg.#find_upperbound`において,同値レシピを指定した場合などを例外とするように修正.
175
175
  - `Enumerable#to_recipe`にも`allow_over20`キーワード引数を導入し,デフォルトで☆20を超えるレシピを含む場合に例外とするように修正.
176
176
  - 実効HP(最大HP+腕力)を表す`Mgmg::Equip#hs`を追加.
177
+
178
+ ## 1.6.2 2022/10/31
179
+ - 既製品を含むかどうかのチェックを行った場合,同じレシピについては繰り返しチェックしないようにして高速化した.
data/lib/mgmg/option.rb CHANGED
@@ -33,9 +33,10 @@ module Mgmg
33
33
  @irep = irep
34
34
  @cut_exp = cut_exp
35
35
  @include_system_equips = include_system_equips
36
+ @system_equips_checked = false
36
37
  end
37
38
  attr_accessor :left_associative, :smith_min, :armor_min, :comp_min, :smith_max, :armor_max, :comp_max
38
- attr_accessor :step, :magdef_maximize, :target_weight, :reinforcement, :irep, :cut_exp, :include_system_equips
39
+ attr_accessor :step, :magdef_maximize, :target_weight, :reinforcement, :irep, :cut_exp, :include_system_equips, :system_equips_checked
39
40
  def initialize_copy(other)
40
41
  @left_associative = other.left_associative
41
42
  @smith_min = other.smith_min
@@ -76,7 +77,7 @@ module Mgmg
76
77
  self
77
78
  end
78
79
  def set_default(recipe, force: false)
79
- if @include_system_equips
80
+ if (!@system_equips_checked) and @include_system_equips then
80
81
  case recipe
81
82
  when String
82
83
  @include_system_equips = false unless Mgmg::SystemEquipRegexp.values.any?{|re| re.match(recipe)}
@@ -85,6 +86,7 @@ module Mgmg
85
86
  else
86
87
  raise ArgumentError, 'recipe should be String or Enumerable'
87
88
  end
89
+ @system_equips_checked = true
88
90
  end
89
91
  update_sa_min(recipe, force)
90
92
  @comp_min = recipe.min_comp(opt: self) if force || @comp_min.nil?
data/lib/mgmg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mgmg
2
- VERSION = "1.6.1"
2
+ VERSION = "1.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mgmg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - KAZOON
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2022-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler