bcdice/BCDice

View on GitHub

Showing 364 of 1,225 total issues

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

        "WPCN" => DiceTable::Table.new(
          "砲開発表(燃料3/弾薬6/鋼材6/ボーキ3)",
          "4D6",
          [
            "開発失敗!(資材だけ失う)",
Severity: Minor
Found in lib/bcdice/game_system/KanColle.rb and 1 other location - About 20 mins to fix
lib/bcdice/game_system/KanColle.rb on lines 642..667

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

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

          "HG" => {
            name: "地獄門通過描写表",
            type: '1D20',
            table: [
              '背後見れば、地獄の門をば幻視せり。危うき次第を知りたり.',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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

          "BL" => {
            name: "血脈の喪失表",
            type: '1D20',
            table: [
              '髪の色。一夜にしてあなたの髪は白くなった。',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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

          "FL" => {
            name: "因縁表",
            type: '1D20',
            table: [
              '仇敵。奴は敵だ。あなたの敵だ。',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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

          "SL" => {
            name: "魂魄の喪失表",
            type: '1D20',
            table: [
              '誇り。誇りなど残ってはいない。',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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

        "WPFA" => DiceTable::Table.new(
          "艦載機開発表(燃料3/弾薬6/鋼材3/ボーキ6)",
          "4D6",
          [
            "開発失敗!(資材だけ失う)",
Severity: Minor
Found in lib/bcdice/game_system/KanColle.rb and 1 other location - About 20 mins to fix
lib/bcdice/game_system/KanColle.rb on lines 615..640

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

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

          "RG" => {
            name: "羅生門通過描写表",
            type: '1D20',
            table: [
              'むごき所業、目にせり。心強張りて、常の様にてあれず.',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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

          "LR" => {
            name: "喪失取戻表",
            type: '1D20',
            table: [
              '鬼化。妄執かくして鬼と結実す。欠けたるところすでになし。あやかし、己の欠けたるを足せり。すなわちその身、人ならず。',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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

          "OG" => {
            name: "応天門通過描写表",
            type: '1D20',
            table: [
              '光捕らへど暗し。新たなる地獄の門に落つる己を知りたり。',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 99..123
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258

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

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

        'FT' => DiceTable::RangeTable.new(
          '大失敗表',
          '1D12',
          [
            [1..3, '【余裕】が3点減少する(最低0まで)'],
Severity: Minor
Found in lib/bcdice/game_system/KemonoNoMori.rb and 2 other locations - About 20 mins to fix
lib/bcdice/game_system/Warhammer4.rb on lines 318..329
lib/bcdice/game_system/Yggdrasill.rb on lines 432..443

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

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

        "MIKUZI" => DiceTable::RangeTable.new(
          "おみくじ",
          "1D100",
          [
            [1..17, "大吉"],
Severity: Minor
Found in lib/bcdice/game_system/Yggdrasill.rb and 2 other locations - About 20 mins to fix
lib/bcdice/game_system/KemonoNoMori.rb on lines 112..123
lib/bcdice/game_system/Warhammer4.rb on lines 318..329

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

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

          "LL" => {
            name: "生様の喪失表",
            type: '1D20',
            table: [
              '主君の寵愛。不興を買ってしまった。',
Severity: Major
Found in lib/bcdice/game_system/Nuekagami.rb and 8 other locations - About 20 mins to fix
lib/bcdice/game_system/Nuekagami.rb on lines 45..69
lib/bcdice/game_system/Nuekagami.rb on lines 72..96
lib/bcdice/game_system/Nuekagami.rb on lines 126..150
lib/bcdice/game_system/Nuekagami.rb on lines 153..177
lib/bcdice/game_system/Nuekagami.rb on lines 180..204
lib/bcdice/game_system/Nuekagami.rb on lines 207..231
lib/bcdice/game_system/Nuekagami.rb on lines 234..258
lib/bcdice/game_system/Nuekagami.rb on lines 261..285

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

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 roll_bms_table()
        total_n = @randomizer.roll_once(10)
        text = MADNESS_SUMMARY_TABLE[total_n - 1]

        time_n = @randomizer.roll_once(10)
Severity: Minor
Found in lib/bcdice/game_system/Cthulhu7th.rb and 3 other locations - About 20 mins to fix
lib/bcdice/game_system/Cthulhu7th.rb on lines 274..280
lib/bcdice/game_system/PulpCthulhu.rb on lines 90..96
lib/bcdice/game_system/PulpCthulhu.rb on lines 113..119

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

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

      def mk_random_encount5_table(num)
        table = [
          [1, "『「死ぬが良い」最終鬼畜兵器岸降臨』 前衛:暗黒騎士×1"],
          [2, "『割と痛い。さりげなく魔王が分裂する』 前衛:カミツキ魔王×宮廷の人数の半分、本陣:雷鳥×1"],
          [3, "『ハマると死ぬ。5人パーティだと3体出てザマーミロ』 前衛:ヴァララカール×宮廷の人数の半分"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom/tables.rb and 12 other locations - About 15 mins to fix
lib/bcdice/game_system/BarnaKronika.rb on lines 174..184
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 467..477
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 481..491
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 495..505
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 509..519
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 537..547
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 108..117
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 121..130
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 134..143
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 147..156
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 160..169
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 173..182

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

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

        5 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 5)",
          "1D6",
          [
            [1, "グラント風香草焼き"],
Severity: Major
Found in lib/bcdice/game_system/filled_with/cook_tables.rb and 8 other locations - About 15 mins to fix
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 12..21
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 24..33
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 36..45
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 48..57
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 72..81
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 84..93
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 96..105
lib/bcdice/game_system/filled_with/lot_tables.rb on lines 22..31

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

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

      def mk_random_encount3_table(num)
        table = [
          [1, "『魅了→木霊ハメ』 後衛:淫魔×1、本陣:レーシィ×宮廷の人数"],
          [2, "『素早く【多勢に無勢】をしかけ……たい』 前衛:階賊×宮廷の人数、本陣:抜け忍×1"],
          [3, "『倒しても嬉しくない人柱をどうぞ』 前衛:人柱×宮廷の人数、本陣:恋のぼり×宮廷の人数の半分"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom/tables.rb and 12 other locations - About 15 mins to fix
lib/bcdice/game_system/BarnaKronika.rb on lines 174..184
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 467..477
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 481..491
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 509..519
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 523..533
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 537..547
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 108..117
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 121..130
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 134..143
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 147..156
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 160..169
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 173..182

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

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

        1 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 1)",
          "1D6",
          [
            [1, "おべんとミートボール"],
Severity: Major
Found in lib/bcdice/game_system/filled_with/cook_tables.rb and 8 other locations - About 15 mins to fix
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 24..33
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 36..45
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 48..57
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 60..69
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 72..81
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 84..93
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 96..105
lib/bcdice/game_system/filled_with/lot_tables.rb on lines 22..31

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

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

        7 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 7)",
          "1D6",
          [
            [1, "マツザカスペシャル"],
Severity: Major
Found in lib/bcdice/game_system/filled_with/cook_tables.rb and 8 other locations - About 15 mins to fix
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 12..21
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 24..33
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 36..45
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 48..57
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 60..69
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 72..81
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 96..105
lib/bcdice/game_system/filled_with/lot_tables.rb on lines 22..31

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

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

        sequence = [
          "(#{cmd.to_s(:after_modify_number)})",
          "#{dice_total}[#{dice_list.join(',')}]#{Format.modifier(cmd.modify_number)}",
          total,
          result.text
Severity: Minor
Found in lib/bcdice/game_system/PastFutureParadox.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/StarryDolls.rb on lines 131..136

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

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

      def mk_human_resources_decide_table(num)
        table = [
          [1, "あなたの国には、高い見識を持つ知識人がいる。「才覚系生まれ表」でランダムにジョブ1種を選ぶ。そのジョブの逸材を1人獲得する。逸材の名前を決定すること。"],
          [2, "あなたの国には、皆を魅了する好人物がいる。「魅了系生まれ表」でランダムにジョブ1種を選ぶ。そのジョブの逸材を1人獲得する。逸材の名前を決定すること。"],
          [3, "あなたの国には、巧みな技術を持つ専門家がいる。「探索系生まれ表」でランダムにジョブ1種を選ぶ。そのジョブの逸材を1人獲得する。逸材の名前を決定すること。"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb and 12 other locations - About 15 mins to fix
lib/bcdice/game_system/BarnaKronika.rb on lines 174..184
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 467..477
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 481..491
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 495..505
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 509..519
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 523..533
lib/bcdice/game_system/meikyu_kingdom/tables.rb on lines 537..547
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 108..117
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 121..130
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 134..143
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 147..156
lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb on lines 173..182

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

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