bcdice/BCDice

View on GitHub

Showing 388 of 1,274 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            '1ターン朦朧状態。2ターン目に自動回復。',
            '1ターン朦朧状態。2ターン目に自動回復。',
            '1ターン朦朧状態。以後、毎ターン不利な修正を無視した意志判定を行い、成功すると回復。',
            '1ターン朦朧状態。以後、毎ターン不利な修正を無視した意志判定を行い、成功すると回復。',
            '1ターン朦朧状態。以後、毎ターン通常の意志判定を行い、成功すると回復。',
Severity: Minor
Found in lib/bcdice/game_system/GurpsFW.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/GURPS.rb on lines 109..145

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def fate_oblivion(natural_result)
        modified_result = natural_result.dup
        modified_result << @randomizer.roll_once(60)
        subtotal = results_multiplication(natural_result)
        total = results_multiplication(modified_result) / 2
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/HeroScale.rb on lines 751..757

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if nick_n <= 1
          nick_table = mk_nick_pr_table(d1)
        elsif name_n <= 2
          nick_table = mk_nick_fo_table(d1)
        elsif name_n <= 3
Severity: Minor
Found in lib/bcdice/game_system/meikyu_kingdom_basic/name_table.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/meikyu_kingdom_basic/name_table.rb on lines 61..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        when /^CTR([+-]?)$/
          sign = Regexp.last_match(1)
          title = '因縁表(リインカーネイション) 『BAR』P51、299'
          table = [
            "【他生】",
Severity: Major
Found in lib/bcdice/game_system/BladeOfArcana.rb and 3 other locations - About 40 mins to fix
lib/bcdice/game_system/BladeOfArcana.rb on lines 69..96
lib/bcdice/game_system/BladeOfArcana.rb on lines 127..154
lib/bcdice/game_system/BladeOfArcana.rb on lines 156..183

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if name_n <= 1
          name_table = mk_name_ar_table(d2)
        elsif name_n <= 2
          name_table = mk_name_fo_table(d2)
        elsif name_n <= 3
Severity: Minor
Found in lib/bcdice/game_system/meikyu_kingdom_basic/name_table.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/meikyu_kingdom_basic/name_table.rb on lines 46..58

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          table = [
            '「宝物の迷宮」
財宝決定の際、1段階深度の高い財宝テーブルを使用する。',
            '「密林の迷宮」 初期深度+10
分類が「魔獣」「獣人」「霊獣」のモンスターは全ての判定に+2のボーナスを得る。',
Severity: Minor
Found in lib/bcdice/game_system/GurpsFW.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/EndBreaker.rb on lines 84..126

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def fate_destruction(natural_result)
        modified_result = natural_result.dup
        modified_result << @randomizer.roll_once(12)
        subtotal = results_multiplication(natural_result)
        total = results_multiplication(modified_result) - 300
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/HeroScale.rb on lines 475..481

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        functionTable = [
          [1, lambda { mk_technic_decide_table(d1) }],
          [2, lambda { mk_national_style_decide_table(d1) }],
          [3, lambda { mk_resource_decide_table(d1) }],
          [4, lambda { mk_facility_decide_table(d1) }],
Severity: Minor
Found in lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/meikyu_kingdom/landscape_table.rb on lines 18..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        '1ターン朦朧状態。2ターン目に自動回復。',
        '1ターン朦朧状態。2ターン目に自動回復。',
        '1ターン朦朧状態。以後、毎ターン不利な修正を無視した意志判定を行い、成功すると回復。',
        '1ターン朦朧状態。以後、毎ターン不利な修正を無視した意志判定を行い、成功すると回復。',
        '1ターン朦朧状態。以後、毎ターン通常の意志判定を行い、成功すると回復。',
Severity: Minor
Found in lib/bcdice/game_system/GURPS.rb and 1 other location - About 40 mins to fix
lib/bcdice/game_system/GurpsFW.rb on lines 236..272

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        when /^(\d+)?CP(\d+)?(\[(\d+)(,(\d+))?\])?(@(\d+))?$/i
          number = (Regexp.last_match(1) || 1).to_i
          target = (Regexp.last_match(2) || 14).to_i
          fumble1 = (Regexp.last_match(4) || 21).to_i
          fumble2 = (Regexp.last_match(6) || 21).to_i
Severity: Major
Found in lib/bcdice/game_system/Paradiso.rb and 2 other locations - About 40 mins to fix
lib/bcdice/game_system/Paradiso.rb on lines 56..61
lib/bcdice/game_system/StellarLife.rb on lines 55..60

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        when /^DJV(-?)$/
          sign = Regexp.last_match(1)
          title = '前世邂逅表(デジャブ) 『BAR』P235'
          table = [
            "【鮮烈な風】\n風は懐かしい匂いを、香りを運んでくる。それは……。",
Severity: Major
Found in lib/bcdice/game_system/BladeOfArcana.rb and 3 other locations - About 40 mins to fix
lib/bcdice/game_system/BladeOfArcana.rb on lines 69..96
lib/bcdice/game_system/BladeOfArcana.rb on lines 98..125
lib/bcdice/game_system/BladeOfArcana.rb on lines 156..183

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

      def result_2d6(total, dice_total, _dice_list, cmp_op, target)
        return nil unless cmp_op == :>=

        if dice_total <= 2
          Result.fumble("ファンブル(判定失敗。失敗表(FT)を追加で1回振る)")
Severity: Major
Found in lib/bcdice/game_system/DarkDaysDrive.rb and 3 other locations - About 40 mins to fix
lib/bcdice/game_system/BloodMoon.rb on lines 46..59
lib/bcdice/game_system/EmbryoMachine.rb on lines 48..61
lib/bcdice/game_system/MeikyuDays.rb on lines 47..60

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'AC'
          name = '命中部位表:装甲車'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'BG'
          name = '命中部位表:バギー'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'PT'
          name = '命中部位表:ポケットタンク'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'BO'
          name = '命中部位表:ボート'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'AM'
          name = '命中部位表:オートモビル'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'S'
          name = '射撃/投擲アクシデント表'
          table = [
            [1, 'ささいなミス。その攻撃は失敗する。'],
            [2, 'ささいなミス。その攻撃は失敗する。'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'BK'
          name = '命中部位表:バイク'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 288..301
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 26 locations. Consider refactoring.
Open

        when 'IN'
          name = '命中部位表:インセクター'
          table = [
            [1, '本体(クリティカル)'],
            [2, '本体'],
Severity: Major
Found in lib/bcdice/game_system/MetalHeadExtream.rb and 25 other locations - About 40 mins to fix
lib/bcdice/game_system/MetalHeadExtream.rb on lines 218..231
lib/bcdice/game_system/MetalHeadExtream.rb on lines 232..245
lib/bcdice/game_system/MetalHeadExtream.rb on lines 246..259
lib/bcdice/game_system/MetalHeadExtream.rb on lines 260..273
lib/bcdice/game_system/MetalHeadExtream.rb on lines 274..287
lib/bcdice/game_system/MetalHeadExtream.rb on lines 302..315
lib/bcdice/game_system/MetalHeadExtream.rb on lines 316..329
lib/bcdice/game_system/MetalHeadExtream.rb on lines 330..343
lib/bcdice/game_system/MetalHeadExtream.rb on lines 344..357
lib/bcdice/game_system/MetalHeadExtream.rb on lines 358..371
lib/bcdice/game_system/MetalHeadExtream.rb on lines 372..385
lib/bcdice/game_system/MetalHeadExtream.rb on lines 386..399
lib/bcdice/game_system/MetalHeadExtream.rb on lines 400..413
lib/bcdice/game_system/MetalHeadExtream.rb on lines 414..427
lib/bcdice/game_system/MetalHeadExtream.rb on lines 428..441
lib/bcdice/game_system/MetalHeadExtream.rb on lines 442..455
lib/bcdice/game_system/MetalHeadExtream.rb on lines 456..469
lib/bcdice/game_system/MetalHeadExtream.rb on lines 470..483
lib/bcdice/game_system/MetalHeadExtream.rb on lines 484..497
lib/bcdice/game_system/MetalHeadExtream.rb on lines 498..511
lib/bcdice/game_system/MetalHeadExtream.rb on lines 512..525
lib/bcdice/game_system/MetalHeadExtream.rb on lines 692..705
lib/bcdice/game_system/MetalHeadExtream.rb on lines 706..719
lib/bcdice/game_system/MetalHeadExtream.rb on lines 720..733
lib/bcdice/game_system/MetalHeadExtream.rb on lines 734..747

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 37.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language