bcdice/BCDice

View on GitHub

Showing 367 of 1,233 total issues

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

      def eval_game_system_specific_command(command)
        case command
        when %r{(AK|AKG)(-?\d+)(/(\d+))?(@(\d+))?}i
          success_rate = Regexp.last_match(2).to_i
          repeat_count = (Regexp.last_match(4) || 1).to_i
Severity: Major
Found in lib/bcdice/game_system/AceKillerGene.rb and 1 other location - About 1 hr to fix
lib/bcdice/game_system/GardenOrder.rb on lines 33..49

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

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

        "BUDT" => DiceTable::D66Table.new(
          "武勇伝表",
          :asc,
          {
            11 => "バッドヤンキーのチームに自分が所属する学校を破壊されたが、最後まで戦った。/テンションが1段階上昇",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 231..255
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 258..282
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 312..336
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 349..373
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 376..400
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 403..427

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

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

        "GUDT" => DiceTable::D66Table.new(
          "ガイヤンキー武勇伝表",
          :asc,
          {
            11 => "アザトースが突然接触してきたので、殴って追い返した。/テンションが1段階上昇",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 231..255
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 258..282
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 285..309
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 349..373
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 376..400
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 403..427

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

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

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

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

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

Refactorings

Further Reading

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

      NORMAL_RARE_ITEM_TABLE = DiceTable::D66GridTable.new(
        "基本レア一般アイテム表",
        [
          ["愚者の冠", "香水", "煙玉", "悪名", "藁人形", "王妃の鏡"],
          ["星籠", "転ばぬ先の杖", "悟りの書", "鉛の兵隊", "黄金の林檎", "百年茸"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 141..150
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 166..175
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 178..187
lib/bcdice/game_system/satasupe/tables.rb on lines 6..15

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

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

        "GSST" => DiceTable::D66Table.new(
          "現実世界生活表",
          :asc,
          {
            11 => "喧嘩に明け暮れた",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 231..255
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 258..282
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 285..309
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 312..336
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 376..400
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 403..427

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

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

        "TKT" => DiceTable::D66Table.new(
          "戦う理由表",
          :asc,
          {
            11 => "「なんとなく」",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 231..255
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 285..309
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 312..336
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 349..373
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 376..400
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 403..427

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

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

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

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

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

Refactorings

Further Reading

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

      TAG_TABLE = DiceTable::D66GridTable.new(
        "タグ決定表",
        [
          ["情報イベント", "エクストリーム(サ)", "カワイイ(サ)", "トンデモ(サ)", "マニア(サ)", "ヲタク(サ)"],
          ["音楽(ア)", "好きなタグ", "トレンド(ア)", "読書(ア)", "パフォーマンス(ア)", "美術(ア)"],
Severity: Major
Found in lib/bcdice/game_system/satasupe/tables.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 129..138
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 141..150
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 166..175
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 178..187

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

      NORMAL_RARE_WEAPON_ITEM_TABLE = DiceTable::D66GridTable.new(
        "基本レア武具アイテム表",
        [
          ["蛍矢", "小麦粉", "喇叭銃", "まわし", "しゃべる剣", "大盾"],
          ["王笏", "ぬいぐるみ", "魔杖", "獣の毛皮", "バカには見えない鎧", "ビキニアーマー"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 129..138
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 141..150
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 178..187
lib/bcdice/game_system/satasupe/tables.rb on lines 6..15

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

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

        "DBRT" => DiceTable::D66Table.new(
          "他愛のない会話表",
          :asc,
          {
            11 => "「政治の話」",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 258..282
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 285..309
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 312..336
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 349..373
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 376..400
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 403..427

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

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

        "GYST" => DiceTable::D66Table.new(
          "ガイヤンキー生活表",
          :asc,
          {
            11 => "ツレと生活をした",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 231..255
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 258..282
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 285..309
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 312..336
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 349..373
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 403..427

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

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

        "HPST" => DiceTable::D66Table.new(
          "病院生活表",
          :asc,
          {
            11 => "治療に専念した",
Severity: Major
Found in lib/bcdice/game_system/YankeeYogSothoth.rb and 6 other locations - About 1 hr to fix
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 231..255
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 258..282
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 285..309
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 312..336
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 349..373
lib/bcdice/game_system/YankeeYogSothoth.rb on lines 376..400

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

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

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

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

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

Refactorings

Further Reading

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

      ADVANCED_RARE_ITEM_TABLE = DiceTable::D66GridTable.new(
        "上級レア一般アイテム表",
        [
          ["砂時計週報", "兵糧丸", "遊星葉書", "百科辞典", "夢枕", "蓄音機"],
          ["砂時計週報", "兵糧丸", "遊星葉書", "百科辞典", "夢枕", "蓄音機"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 129..138
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 166..175
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 178..187
lib/bcdice/game_system/satasupe/tables.rb on lines 6..15

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

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

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

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

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

Refactorings

Further Reading

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

      ADVANCED_RARE_WEAPON_ITEM_TABLE = DiceTable::D66GridTable.new(
        "上級レア武具アイテム表",
        [
          ["虚弾", "小鬼の襟巻", "眼弾", "釣竿", "虹柱", "服従の鞭"],
          ["虚弾", "小鬼の襟巻", "眼弾", "釣竿", "虹柱", "服従の鞭"],
Severity: Major
Found in lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 129..138
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 141..150
lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb on lines 166..175
lib/bcdice/game_system/satasupe/tables.rb on lines 6..15

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

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

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

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

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

Refactorings

Further Reading

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

      def getWeaponTableShortSword
        {name: '小剣',
         table: [[11, '乱れ突き', '2連続攻撃'],
                 [22, 'フェイクタング', 'スタン効果「注意力」5'],
                 [33, 'マインドステア', '麻痺効果「注意力」0'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

      def getWeaponTableSword
        {name: '剣',
         table: [[11, '失礼剣', '成功度+5'],
                 [22, '隼斬り', '回避不可'],
                 [33, 'みじん斬り', '攻撃量2倍'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

      def getWeaponTableBoxing
        {name: 'ボクシング',
         table: [[11, 'ワン・ツー', '2連続攻撃・2攻撃目盾受け、回避不可'],
                 [22, 'リバーブロー', '麻痺効果「根性」5'],
                 [33, 'フリッカー', '2連続攻撃・全て盾受け、カウンター不可'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

      def get_delight_table(roc)
        name = "喜び・経験表"
        table = [
          [13, '勝利'],
          [16, '優勝'],
Severity: Major
Found in lib/bcdice/game_system/AlterRaise.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/AlterRaise.rb on lines 127..143
lib/bcdice/game_system/AlterRaise.rb on lines 146..162
lib/bcdice/game_system/AlterRaise.rb on lines 184..200
lib/bcdice/game_system/AlterRaise.rb on lines 229..245

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

      def get_quiet_table(roc)
        name = "平穏・経験表"
        table = [
          [13, '友達'],
          [16, '幼馴染み'],
Severity: Major
Found in lib/bcdice/game_system/AlterRaise.rb and 4 other locations - About 1 hr to fix
lib/bcdice/game_system/AlterRaise.rb on lines 127..143
lib/bcdice/game_system/AlterRaise.rb on lines 165..181
lib/bcdice/game_system/AlterRaise.rb on lines 184..200
lib/bcdice/game_system/AlterRaise.rb on lines 229..245

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

      def getWeaponTableLongSword
        {name: '大剣',
         table: [[11, 'スマッシュ', '敵防御半分'],
                 [22, '峰打ち', '麻痺硬化「根性」0'],
                 [33, '水鳥剣', '敵防御判定ー50'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 317..328
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

      def getWeaponTableClub
        {name: '棍棒',
         table: [[11, 'ハードヒット', '防御力無視'],
                 [22, 'ダブルヒット', '2連続攻撃'],
                 [33, '回転撃', '防御判定ー100'],
Severity: Major
Found in lib/bcdice/game_system/ShinkuuGakuen.rb and 10 other locations - About 1 hr to fix
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 187..198
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 213..224
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 240..251
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 268..279
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 292..303
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 345..356
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 359..370
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 401..412
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 429..440
lib/bcdice/game_system/ShinkuuGakuen.rb on lines 454..465

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language