bcdice/BCDice

View on GitHub
lib/bcdice/game_system/ShinkuuGakuen.rb

Summary

Maintainability
F
4 days
Test Coverage
A
99%

File ShinkuuGakuen.rb has 431 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module BCDice
  module GameSystem
    class ShinkuuGakuen < Base
      # ゲームシステムの識別子
      ID = 'ShinkuuGakuen'
Severity: Minor
Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 6 hrs to fix

    Class ShinkuuGakuen has 29 methods (exceeds 20 allowed). Consider refactoring.
    Open

        class ShinkuuGakuen < Base
          # ゲームシステムの識別子
          ID = 'ShinkuuGakuen'
    
          # ゲームシステム名
    Severity: Minor
    Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 3 hrs to fix

      Method getWeaponTable has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def getWeaponTable(weaponCommand)
              debug('getWeaponTable weaponCommand', weaponCommand)
      
              case weaponCommand.upcase
              when 'SW'
      Severity: Minor
      Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 1 hr to fix

        Method getSuccessText has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

              def getSuccessText(allTotal, diff, diceList, isWeapon)
                first = diceList.first
                return '' if first.nil?
        
                return " > ファンブル" if first <= 9
        Severity: Minor
        Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method getWeaponSkillText has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

              def getWeaponSkillText(weaponTable, dice)
                debug('getWeaponSkillText', dice)
        
                return '' if weaponTable.nil?
        
        
        Severity: Minor
        Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Avoid too many return statements within this method.
        Open

                  return getWeaponTableShortSwordCounter
        Severity: Major
        Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                    return getWeaponTableSpearCounter
          Severity: Major
          Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                      return getWeaponTableAx
            Severity: Major
            Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                        return getWeaponTableBoxingCounter
              Severity: Major
              Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return {name: '判定', table: nil}
                Severity: Major
                Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                            return getWeaponTableBoxing
                  Severity: Major
                  Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                              return getWeaponTableStandCounter
                    Severity: Major
                    Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                return getWeaponTableShortSword
                      Severity: Major
                      Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                  return getWeaponTableBow
                        Severity: Major
                        Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                    return getWeaponTableMartialArt
                          Severity: Major
                          Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                      return getWeaponTableStand
                            Severity: Major
                            Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                        return getWeaponTableAxCounter
                              Severity: Major
                              Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                          return getWeaponTableClubCounter
                                Severity: Major
                                Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                            return getWeaponTableProWrestling
                                  Severity: Major
                                  Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                              return getWeaponTableProWrestlingCounter
                                    Severity: Major
                                    Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                return getWeaponTableClub
                                      Severity: Major
                                      Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                  return getWeaponTableMartialArtCounter
                                        Severity: Major
                                        Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                    return getWeaponTableSpear
                                          Severity: Major
                                          Found in lib/bcdice/game_system/ShinkuuGakuen.rb - About 30 mins to fix

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

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

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 47.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

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

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 47.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

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

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 47.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

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

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

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 47.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 47.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                  def 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

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

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

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 47.

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

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

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

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

                                            Refactorings

                                            Further Reading

                                            There are no issues that match your filters.

                                            Category
                                            Status