bcdice/BCDice

View on GitHub

Showing 367 of 1,233 total issues

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

      def get_torg_eternity_bonus(value)
        bonus_table = [
          [1, -10],
          [2, -8],
          [3, -6],
Severity: Major
Found in lib/bcdice/game_system/TorgEternity.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/Torg.rb on lines 335..360

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

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 get_torg_bonus(value)
        bonus_table = [
          [1, -12],
          [2, -10],
          [3, -8],
Severity: Major
Found in lib/bcdice/game_system/Torg.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/TorgEternity.rb on lines 421..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 70.

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 get_identity_table2
        name = 'アイデンティティ表:ヴァリアンスネイヴァー'
        table = [
          [1, '戦い:戦いへの衝動が、あなたをあなたたらしめている。'],
          [2, '守護:守るべきものの存在が、あなたをあなたたらしめている。'],
Severity: Major
Found in lib/bcdice/game_system/Strave.rb and 3 other locations - About 1 hr to fix
lib/bcdice/game_system/Strave.rb on lines 103..127
lib/bcdice/game_system/Strave.rb on lines 130..154
lib/bcdice/game_system/Strave.rb on lines 157..181

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

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

        "PE" => DiceTable::RangeTable.new(
          "ポジティブ感情表",
          "1D100",
          [
            [1..5, "【希望】相手はまるで自分の過去、あるいは未来を見ているように感じる。"],
Severity: Major
Found in lib/bcdice/game_system/RuinBreakers.rb and 2 other locations - About 1 hr to fix
lib/bcdice/game_system/RuinBreakers.rb on lines 177..202
lib/bcdice/game_system/RuinBreakers.rb on lines 232..257

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

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

      CATALYST_TABLES = {
        'CElement' => DiceTable::Table.new(
          "奇跡の触媒(エレメント)",
          "1D6",
          [
Severity: Major
Found in lib/bcdice/game_system/AlchemiaStruggle.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/PastFutureParadox.rb on lines 1099..1158

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

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

        "RDF" => DiceTable::RangeTable.new(
          "破滅のイヤな感じ表",
          "1D100",
          [
            [1..5, "【水中で拘束】\n演出:水中で長い髪の毛が全身に絡みついて動きが重くなるような感覚。\nルーインブレイク成功:重い拘束から解き放たれたような快感。"],
Severity: Major
Found in lib/bcdice/game_system/RuinBreakers.rb and 2 other locations - About 1 hr to fix
lib/bcdice/game_system/RuinBreakers.rb on lines 150..175
lib/bcdice/game_system/RuinBreakers.rb on lines 177..202

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

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

      TABLES_MOD_1D = {
        'RT' => DiceTable::Table.new(
          '帰還演出表',
          '1D6',
          [
Severity: Major
Found in lib/bcdice/game_system/PastFutureParadox.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/AlchemiaStruggle.rb on lines 138..197

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

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

        "NE" => DiceTable::RangeTable.new(
          "ネガティブ感情表",
          "1D100",
          [
            [1..5, "【同族嫌悪】1日に自分の忌むべき過去、あるいは自分自身を見ているように感じる。"],
Severity: Major
Found in lib/bcdice/game_system/RuinBreakers.rb and 2 other locations - About 1 hr to fix
lib/bcdice/game_system/RuinBreakers.rb on lines 150..175
lib/bcdice/game_system/RuinBreakers.rb on lines 232..257

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

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 roll_rehabilitation_chart(command)
        parser = Command::Parser.new("RTJC", round_type: @round_type).restrict_cmp_op_to(nil)
        parsed = parser.parse(command)
        return nil unless parsed

Severity: Major
Found in lib/bcdice/game_system/GundamSentinel.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/GundamSentinel.rb on lines 230..246

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

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

        "A" => CriticalTable.new(
          "腕部CT表",
          [
            [10, '腕痺れ:耐久値-1:手に持っているものを落としてしまう。'],
            [20, '小さな裂傷:耐久値-1:「出血状態」1つを得る。'],
Severity: Major
Found in lib/bcdice/game_system/Warhammer4.rb and 3 other locations - About 1 hr to fix
lib/bcdice/game_system/Warhammer4.rb on lines 148..171
lib/bcdice/game_system/Warhammer4.rb on lines 198..221
lib/bcdice/game_system/Warhammer4.rb on lines 223..246

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

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 get_pb_aas_urge_table
        return [[
          # **第1段階
          '『緊急停止/20』機能異常の警報と共に、機能が緊急停止。次のターンのターン終了時まで[行動不能]となる。',
          '『動作不調/10』駆動系に異常発生。このターンのターン終了まで[行動不能]となる。',
Severity: Major
Found in lib/bcdice/game_system/ParasiteBlood.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/ParasiteBlood.rb on lines 84..149

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

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

        "B" => CriticalTable.new(
          "胴体CT表",
          [
            [10, 'ただのかすり傷だって!:耐久値-1:「出血状態」1つを得る。'],
            [20, 'みぞおちへの一打:耐久値-1:「朦朧状態」1つを得る。「容易(+40)」な〈肉体抵抗〉テストを行い、失敗したなら「伏せ状態」になる。'],
Severity: Major
Found in lib/bcdice/game_system/Warhammer4.rb and 3 other locations - About 1 hr to fix
lib/bcdice/game_system/Warhammer4.rb on lines 148..171
lib/bcdice/game_system/Warhammer4.rb on lines 173..196
lib/bcdice/game_system/Warhammer4.rb on lines 223..246

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

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

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

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

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

Refactorings

Further Reading

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

          if order.length > 2 && order[1] =~ /^\d+$/ && order[2] =~ /^\d+$/
            modified_result = natural_result.dup
            modified_result <<  order[1].to_i
            modified_result <<  order[2].to_i
            total = results_multiplication(modified_result)
Severity: Major
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/HeroScale.rb on lines 262..270

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

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

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

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

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

Refactorings

Further Reading

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

        if order.length > 3 && order[2] =~ /^\d+$/ && order[3] =~ /^\d+$/
          modified_result = natural_result.dup
          modified_result <<  order[2].to_i
          modified_result <<  order[3].to_i
          total = results_multiplication(modified_result)
Severity: Major
Found in lib/bcdice/game_system/HeroScale.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/HeroScale.rb on lines 247..255

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

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 roll_escape_chart(command)
        parser = Command::Parser.new("PEJC", round_type: @round_type).restrict_cmp_op_to(nil)
        parsed = parser.parse(command)
        return nil unless parsed

Severity: Major
Found in lib/bcdice/game_system/GundamSentinel.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/GundamSentinel.rb on lines 265..281

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

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

        "H" => CriticalTable.new(
          "頭部CT表",
          [
            [10, '勲章となる傷:耐久値-1:「出血状態」1つを得る。社交系テストSL+1(累積なし)。'],
            [20, '小さな裂傷:耐久値-1:「出血状態」1つを得る。'],
Severity: Major
Found in lib/bcdice/game_system/Warhammer4.rb and 3 other locations - About 1 hr to fix
lib/bcdice/game_system/Warhammer4.rb on lines 173..196
lib/bcdice/game_system/Warhammer4.rb on lines 198..221
lib/bcdice/game_system/Warhammer4.rb on lines 223..246

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

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

        "L" => CriticalTable.new(
          "脚部CT表",
          [
            [10, '爪先をぶつける:耐久値-1:「普通(+20)」の〈肉体抵抗〉テストを行い、失敗したなら次のターンの終了時まで【敏捷力】に関するテストに-10。'],
            [20, '足首の捻挫:耐久値-1:以降1d10ラウンドに渡って【敏捷力】に関連するテストに-10。'],
Severity: Major
Found in lib/bcdice/game_system/Warhammer4.rb and 3 other locations - About 1 hr to fix
lib/bcdice/game_system/Warhammer4.rb on lines 148..171
lib/bcdice/game_system/Warhammer4.rb on lines 173..196
lib/bcdice/game_system/Warhammer4.rb on lines 198..221

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

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 get_pb_normal_urge_table
        return [[
          '『怒り/20』突然強い怒りに駆られる。最も近い対象を罵倒し、そのターンの終了まで[行動不能]となる。',
          '『暗闇/20』視神経に悪影響が出て、24時間[暗闇]になる。',
          '『悲哀/10』突然の悲みに動きが止まる。そのターンの終了まで[行動不能]となる。',
Severity: Major
Found in lib/bcdice/game_system/ParasiteBlood.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/ParasiteBlood.rb on lines 153..227

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

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

      URGE_TABLE = [
        [
          '『怒り』突然強い怒りに駆られる。近くの対象に(非暴力の)怒りを全力でぶつける。このターンの終了まで「行動不能」となる。[経験値20点]',
          '『絶叫』寄生生物が体内で蠢く。その恐怖に絶叫。このターンの終了まで「行動不能」となる。[経験値10点]',
          '『悲哀』急に悲しいことを思い出して動きが止まる。このターンの終了まで「行動不能」となる。[経験値10点]',
Severity: Major
Found in lib/bcdice/game_system/DemonParasite.rb and 5 other locations - About 1 hr to fix
lib/bcdice/game_system/DemonParasite.rb on lines 170..236
lib/bcdice/game_system/DemonParasite.rb on lines 239..305
lib/bcdice/game_system/DemonParasite.rb on lines 308..374
lib/bcdice/game_system/DemonParasite.rb on lines 377..443
lib/bcdice/game_system/DemonParasite.rb on lines 446..512

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

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

      ONIMITAMA_BATTLE_TABLE = [
        [
          '『恐怖』効果が発生したターンの終了時まで「行動不能」状態となる。',
          '『落涙』1ターン(10秒)「通常」行動を行えない。回避行動に影響はない。',
          '『哄笑』効果が発生したターンの終了時まで「行動不能」となる。',
Severity: Major
Found in lib/bcdice/game_system/DemonParasite.rb and 5 other locations - About 1 hr to fix
lib/bcdice/game_system/DemonParasite.rb on lines 101..167
lib/bcdice/game_system/DemonParasite.rb on lines 170..236
lib/bcdice/game_system/DemonParasite.rb on lines 239..305
lib/bcdice/game_system/DemonParasite.rb on lines 308..374
lib/bcdice/game_system/DemonParasite.rb on lines 377..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 63.

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