bcdice/BCDice

View on GitHub

Showing 1,176 of 1,233 total issues

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

        3 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 3)",
          "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 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 2 locations. Consider refactoring.
Open

module BCDice
  module GameSystem
    class MagicaLogia_Korean < MagicaLogia
      # ゲームシステムの識別子
      ID = "MagicaLogia:Korean"
Severity: Minor
Found in lib/bcdice/game_system/MagicaLogia_Korean.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/MagicaLogia_SimplifiedChinese.rb on lines 5..63

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

        4 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 4)",
          "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 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 2 locations. Consider refactoring.
Open

      def replace_text(string)
        string = string.gsub(/(\d+)MD6/i) { "#{Regexp.last_match(1)}R6" }
        string = string.gsub(/(\d+)MD/i) { "#{Regexp.last_match(1)}R6" }
        return string
Severity: Minor
Found in lib/bcdice/game_system/MeikyuDays.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/MetalHead.rb on lines 59..62

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/StarryDolls.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/PastFutureParadox.rb on lines 223..228

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

        2 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 2)",
          "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 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

        2 => DiceTable::RangeTable.new(
          "ナンバーワンノーマルくじ(phase 2)",
          "1D6",
          [
            [1, "バロールたわし"],
Severity: Major
Found in lib/bcdice/game_system/filled_with/lot_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 84..93
lib/bcdice/game_system/filled_with/cook_tables.rb on lines 96..105

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

      def normal2
        table = [
          'バロールたわし',
          'イグニスジッポ',
          'ヤコ仮面or梟の文鎮(選択可)',
Severity: Minor
Found in lib/bcdice/game_system/GurpsFW.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/GurpsFW.rb on lines 709..719

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

          'LU' => DiceTable::RangeTable.new(
            '命中部位表(左上半身)',
            '1D6',
            [
              [1..2, new(LEFT_TORSO, false)],
Severity: Minor
Found in lib/bcdice/game_system/BattleTech.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/BattleTech.rb on lines 497..505

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

      def premium2
        table = [
          '親衛隊バッジ',
          'ハタモトチャブダイ',
          '星のコンパス',
Severity: Minor
Found in lib/bcdice/game_system/GurpsFW.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/GurpsFW.rb on lines 639..649

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

      def change_text(string)
        string = string.gsub(/^(S)?AR/i) { "#{Regexp.last_match(1)}2D6" }
        string = string.gsub(/^(S)?SR/i) { "#{Regexp.last_match(1)}1D100" }
        return string
Severity: Minor
Found in lib/bcdice/game_system/MetalHead.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/MeikyuDays.rb on lines 41..44

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_technic_decide_table(num)
        table = [
          [1, "あなたの国は、魔法の研究、開発に力をそそぐ魔道国家である。その国のキャラクターは、星術、召喚、科学スキルの判定を行うとき、その達成値が1点上昇する(最大3点まで上昇する。4回目以降は振り直すこと)。"],
          [2, "あなたの国は、神話的遺物の逸話が残っている。レア一般アイテムの中からランダムに1種を選ぶ。そのレアアイテムのレシピを持っている。【王宮】のある部屋に、そのレア一般アイテムの名前を記入すること。"],
          [3, "あなたの国は、英雄が用いた武具の伝説が残っている。レア武具アイテムの中からランダムに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 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

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

      def eval_game_system_specific_command(command)
        debug('eval_game_system_specific_command command', command)

        result = ''

Severity: Minor
Found in lib/bcdice/game_system/GoldenSkyStories.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/Paranoia.rb on lines 28..40

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_resource_decide_table(num)
        table = [
          [1, "あなたの国は、過去に善政がしかれ、非常に安定している。セッション開始時の《民の声》の値が1点上昇する(最大3点まで上昇する。4回目以降は振り直すこと)。"],
          [2, "あなたの国は、天然の要害に囲まれており、外敵に襲われにくい。《民》が(2D6)人増加する。"],
          [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 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 13 locations. Consider refactoring.
Open

      def mk_random_encount1_table(num)
        table = [
          [1, "『守って守って突撃ゴー!』 前衛:ごんぎつね×宮廷の人数、後衛:ノコギリ猪×1"],
          [2, "『じわじわ削る、カボチャの舞』 前衛:焔虫×宮廷の人数、本陣:カボチャ頭×宮廷の人数の半分"],
          [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 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 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

        6 => DiceTable::RangeTable.new(
          "マジカルクッキング(Lv 6)",
          "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 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 2 locations. Consider refactoring.
Open

          'RU' => DiceTable::RangeTable.new(
            '命中部位表(右上半身)',
            '1D6',
            [
              [1..2, new(RIGHT_TORSO, false)],
Severity: Minor
Found in lib/bcdice/game_system/BattleTech.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/BattleTech.rb on lines 474..482

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

module BCDice
  module GameSystem
    class MagicaLogia_SimplifiedChinese < MagicaLogia
      # ゲームシステムの識別子
      ID = "MagicaLogia:SimplifiedChinese"
Severity: Minor
Found in lib/bcdice/game_system/MagicaLogia_SimplifiedChinese.rb and 1 other location - About 15 mins to fix
lib/bcdice/game_system/MagicaLogia_Korean.rb on lines 5..63

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

        "MT" => DiceTable::D66OneThirdTable.new(
          "邂逅表",
          [
            "師匠\nあなたは彼(彼女)から多くのものを学んだ。あなたにとって、彼(彼女)は師であった。",
            "保護者\nあなたは彼(彼女)を兄や姉、あるいは父親のように慕っている。もちろん本当に血縁関係があってもよい。",
Severity: Minor
Found in lib/bcdice/game_system/GranCrest.rb and 2 other locations - About 15 mins to fix
lib/bcdice/game_system/GranCrest.rb on lines 98..123
lib/bcdice/game_system/GranCrest.rb on lines 125..150

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

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