bcdice/BCDice

View on GitHub

Showing 367 of 1,233 total issues

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

      def get_emotion_table(roc)
        name = "感情表"
        table = [
          [13, '勇気'],
          [16, '怒り'],
Severity: Major
Found in lib/bcdice/game_system/AlterRaise.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/AlterRaise.rb on lines 127..143
lib/bcdice/game_system/AlterRaise.rb on lines 146..162
lib/bcdice/game_system/AlterRaise.rb on lines 165..181
lib/bcdice/game_system/AlterRaise.rb on lines 184..200

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 47.

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 11 locations. Consider refactoring.
Open

      def getWeaponTableBow
        {name: '弓',
         table: [[11, '影縫い', '麻痺効果「注意力」0'],
                 [22, 'アローレイン', '全体攻撃・回避ー50'],
                 [33, '速射', '2連続攻撃'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

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 47.

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 11 locations. Consider refactoring.
Open

      def getWeaponTableProWrestling
        {name: 'プロレス',
         table: [[11, 'ボディスラム', '盾受け不可'],
                 [22, 'ドロップキック', 'B・D'],
                 [33, '水車落とし', '盾受け不可、成功度+5'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

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 47.

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 11 locations. Consider refactoring.
Open

      def getWeaponTableSpear
        {name: '槍',
         table: [[11, 'チャージ', 'ダメージ1.5倍、盾受けー30'],
                 [22, '稲妻突き', '回避不可'],
                 [33, '脳削り', '麻痺効果「根性」0'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

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 47.

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 11 locations. Consider refactoring.
Open

      def getWeaponTableAx
        {name: '斧',
         table: [[11, '一人時間差', '防御行動ー100'],
                 [22, 'トマホーク', 'カウンター不可'],
                 [33, '大木断', 'ダメージ2倍'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

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 47.

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 11 locations. Consider refactoring.
Open

      def getWeaponTableStand
        {name: '幽波紋',
         table: [[11, 'SILER CHARIOT', '攻撃量5倍、刺しタイプ攻撃'],
                 [22, 'TOWER OF GRAY', '防御力無視'],
                 [33, 'DARK BLUE MOON', '全体攻撃、攻撃量2倍、水属性斬りタイプ攻撃'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440

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 47.

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 5 locations. Consider refactoring.
Open

      def get_location_table(roc)
        name = "場所表"
        table = [
          [13, '教室'],
          [16, '部室'],
Severity: Major
Found in lib/bcdice/game_system/AlterRaise.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/AlterRaise.rb on lines 146..162
lib/bcdice/game_system/AlterRaise.rb on lines 165..181
lib/bcdice/game_system/AlterRaise.rb on lines 184..200
lib/bcdice/game_system/AlterRaise.rb on lines 229..245

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 47.

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 5 locations. Consider refactoring.
Open

      def get_trauma_table(roc)
        name = "心の傷・経験表"
        table = [
          [13, '敗北'],
          [16, '仲違い'],
Severity: Major
Found in lib/bcdice/game_system/AlterRaise.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/AlterRaise.rb on lines 127..143
lib/bcdice/game_system/AlterRaise.rb on lines 146..162
lib/bcdice/game_system/AlterRaise.rb on lines 165..181
lib/bcdice/game_system/AlterRaise.rb on lines 229..245

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 47.

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 11 locations. Consider refactoring.
Open

      def getWeaponTableMartialArt
        {name: '体術',
         table: [[11, '集気法', '通常ダメージ分自分のHP回復'],
                 [22, 'コンビネーション', '2連続攻撃'],
                 [33, '逆一本', '盾受け不可、防御力半分、スタン効果「根性」0'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

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 47.

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 origin_protection(order)
        natural_result = @randomizer.roll_barabara(4, 6)
        case order[1]
        when "R"
          message = fate_reversal(natural_result)
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 55 mins to fix
lib/bcdice/game_system/HeroScale.rb on lines 313..326

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 45.

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 origin_curse(order)
        natural_result = @randomizer.roll_barabara(2, 20)
        case order[1]
        when "R"
          message = fate_ruin(natural_result)
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 55 mins to fix
lib/bcdice/game_system/HeroScale.rb on lines 174..187

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 45.

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 5 locations. Consider refactoring.
Open

        fsuc = [0, 1, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 18, 18, 20, 21, 22, 23, 23, 24, 25, 26, 26, 27, 28, 29, 30,]
Severity: Major
Found in lib/bcdice/game_system/EarthDawn.rb and 4 other locations - About 55 mins to fix
lib/bcdice/game_system/EarthDawn.rb on lines 164..164
lib/bcdice/game_system/EarthDawn.rb on lines 165..165
lib/bcdice/game_system/EarthDawn.rb on lines 166..166
lib/bcdice/game_system/EarthDawn.rb on lines 167..167

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 44.

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 5 locations. Consider refactoring.
Open

        ssuc = [4, 6, 8, 10, 11, 13, 15, 16, 18, 19, 21, 22, 24, 26, 27, 29, 30, 32, 33, 34, 35, 37, 38, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 52, 53, 55, 56, 58, 59, 60, 61, 62,]
Severity: Major
Found in lib/bcdice/game_system/EarthDawn.rb and 4 other locations - About 55 mins to fix
lib/bcdice/game_system/EarthDawn.rb on lines 164..164
lib/bcdice/game_system/EarthDawn.rb on lines 166..166
lib/bcdice/game_system/EarthDawn.rb on lines 167..167
lib/bcdice/game_system/EarthDawn.rb on lines 168..168

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 44.

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 5 locations. Consider refactoring.
Open

        nsuc = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,]
Severity: Major
Found in lib/bcdice/game_system/EarthDawn.rb and 4 other locations - About 55 mins to fix
lib/bcdice/game_system/EarthDawn.rb on lines 164..164
lib/bcdice/game_system/EarthDawn.rb on lines 165..165
lib/bcdice/game_system/EarthDawn.rb on lines 166..166
lib/bcdice/game_system/EarthDawn.rb on lines 168..168

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 44.

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_ordeal(natural_result)
        modified_result = []
        natural_result.each do |result|
          if result < 9
            result = 9
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 55 mins to fix
lib/bcdice/game_system/HeroScale.rb on lines 760..771

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 44.

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 5 locations. Consider refactoring.
Open

        exsuc = [6, 8, 10, 12, 14, 17, 19, 20, 22, 24, 25, 27, 29, 32, 33, 35, 37, 38, 39, 41, 42, 44, 45, 47, 48, 49, 51, 52, 54, 55, 56, 58, 59, 60, 62, 64, 65, 67, 68, 70, 71, 72,]
Severity: Major
Found in lib/bcdice/game_system/EarthDawn.rb and 4 other locations - About 55 mins to fix
lib/bcdice/game_system/EarthDawn.rb on lines 165..165
lib/bcdice/game_system/EarthDawn.rb on lines 166..166
lib/bcdice/game_system/EarthDawn.rb on lines 167..167
lib/bcdice/game_system/EarthDawn.rb on lines 168..168

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 44.

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 5 locations. Consider refactoring.
Open

        gsuc = [2, 4, 6, 7, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54,]
Severity: Major
Found in lib/bcdice/game_system/EarthDawn.rb and 4 other locations - About 55 mins to fix
lib/bcdice/game_system/EarthDawn.rb on lines 164..164
lib/bcdice/game_system/EarthDawn.rb on lines 165..165
lib/bcdice/game_system/EarthDawn.rb on lines 167..167
lib/bcdice/game_system/EarthDawn.rb on lines 168..168

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 44.

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_anguish(natural_result)
        modified_result = []
        natural_result.each do |result|
          if result < 7
            result = 7
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 55 mins to fix
lib/bcdice/game_system/HeroScale.rb on lines 774..785

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 44.

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 6 locations. Consider refactoring.
Open

          'SPT' => {
            name: "特徴表",
            type: 'D66',
            table: [
              '死んだ魚の目',
Severity: Major
Found in lib/bcdice/game_system/ColossalHunter.rb and 5 other locations - About 50 mins to fix
lib/bcdice/game_system/ColossalHunter.rb on lines 279..319
lib/bcdice/game_system/ColossalHunter.rb on lines 322..362
lib/bcdice/game_system/ColossalHunter.rb on lines 365..405
lib/bcdice/game_system/ColossalHunter.rb on lines 451..491
lib/bcdice/game_system/ColossalHunter.rb on lines 494..534

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 43.

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 6 locations. Consider refactoring.
Open

          'PRT' => {
            name: "プレシャス表",
            type: 'D66',
            table: [
              '壊れたスマートフォン',
Severity: Major
Found in lib/bcdice/game_system/ColossalHunter.rb and 5 other locations - About 50 mins to fix
lib/bcdice/game_system/ColossalHunter.rb on lines 279..319
lib/bcdice/game_system/ColossalHunter.rb on lines 322..362
lib/bcdice/game_system/ColossalHunter.rb on lines 365..405
lib/bcdice/game_system/ColossalHunter.rb on lines 408..448
lib/bcdice/game_system/ColossalHunter.rb on lines 494..534

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 43.

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