bcdice/BCDice

View on GitHub

Showing 837 of 1,278 total issues

File Cthulhu7th_ChineseTraditional.rb has 279 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    File Cthulhu7th_Korean.rb has 277 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      File ShuumatsuKikou.rb has 277 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        File Paradiso.rb has 275 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

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

          Method translate_tables has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  def translate_tables(locale, skill_table)
                    inveterate_enemy_table = SkillExpandTable.from_i18n("MagicaLogia.inveterate_enemy_table", locale, skill_table)
                    conspiracy_table = DiceTable::Table.from_i18n("MagicaLogia.conspiracy_table", locale)
                    fate_table = DiceTable::Table.from_i18n("MagicaLogia.fate_table", locale)
                    cueball_table = DiceTable::Table.from_i18n("MagicaLogia.cueball_table", locale)
          Severity: Major
          Found in lib/bcdice/game_system/MagicaLogia.rb - About 2 hrs to fix

            Method resolute_action has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def resolute_action(command)
                    m = /^(\d*)([+\d]+)*FF<=(\d)(,(\d))?(&(\d))?$/.match(command)
                    return nil unless m
            
                    heat_level = m[1].to_i
            Severity: Major
            Found in lib/bcdice/game_system/FullFace.rb - About 2 hrs to fix

              Method get_pb_normal_urge_table has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method get_pb_aas_urge_table has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      def get_pb_aas_urge_table
                        return [[
                          # **第1段階
                          '『緊急停止/20』機能異常の警報と共に、機能が緊急停止。次のターンのターン終了時まで[行動不能]となる。',
                          '『動作不調/10』駆動系に異常発生。このターンのターン終了まで[行動不能]となる。',
                Severity: Major
                Found in lib/bcdice/game_system/ParasiteBlood.rb - About 2 hrs to fix

                  Method torg_eternity_dice has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def torg_eternity_dice(check_pos, check_mishap)
                          isSkilledCritical = true
                          isCritical = true
                          skilled = 0
                          unskilled = 0
                  Severity: Minor
                  Found in lib/bcdice/game_system/TorgEternity.rb - About 2 hrs 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 checkRoll has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def checkRoll(diceCount, choiceCount, target)
                          if diceCount <= 0
                            correction = 1 + diceCount * -1
                            rollCount = 1
                          else
                  Severity: Minor
                  Found in lib/bcdice/game_system/Raisondetre.rb - About 2 hrs 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 eval_game_system_specific_command has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def eval_game_system_specific_command(string)
                          string = replace_text(string)
                  
                          unless /(^|\s)S?((\d+)[rR]6([+\-\d]+)?([>=]+(\d+))(\[(\d)\]))(\s|$)/i =~ string
                            return nil
                  Severity: Minor
                  Found in lib/bcdice/game_system/GehennaAn.rb - About 2 hrs 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 getDiceRollResult has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def getDiceRollResult(diceCount, targetNumber, criticalValue, specialValue)
                          successCount = 0
                          roundCount = 0
                          rollResult = ""
                          specialCount = 0
                  Severity: Minor
                  Found in lib/bcdice/game_system/RecordOfSteam.rb - About 2 hrs 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

                  File game_system.rb has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require "bcdice/game_system/AFF2e"
                  require "bcdice/game_system/AceKillerGene"
                  require "bcdice/game_system/Agnostos"
                  require "bcdice/game_system/Ainecadette"
                  require "bcdice/game_system/Airgetlamh"
                  Severity: Minor
                  Found in lib/bcdice/game_system.rb - About 2 hrs to fix

                    Method get_accident_table has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          def get_accident_table(damageType, roc)
                            case damageType
                            when 'G'
                              name = '格闘アクシデント表'
                              table = [
                    Severity: Major
                    Found in lib/bcdice/game_system/MetalHeadExtream.rb - About 2 hrs to fix

                      File Nuekagami.rb has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

                        Method result_1d100 has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def result_1d100(total, dice_total, cmp_op, target)
                                return nil if target == '?'
                                return nil unless cmp_op == :<=
                        
                                # ゾロ目ならC-ResultかBotch
                        Severity: Minor
                        Found in lib/bcdice/game_system/Chill3.rb - About 2 hrs 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 getJudgeResult has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def getJudgeResult(command)
                                case command
                                when /(\d+)?DA([\d+*-]*\d)?\[(\d+),(\d+)(,(\d+))?\]/i
                                  number = (Regexp.last_match(1) || 1).to_i
                                  correction = (Regexp.last_match(2) || 0).to_i
                        Severity: Minor
                        Found in lib/bcdice/game_system/StellarLife.rb - About 2 hrs 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 eval_game_system_specific_command has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def eval_game_system_specific_command(command)
                                if command =~ /(-)?(\d+)?RD(\d+)?(@(\d+))?$/i
                                  diceCount = (Regexp.last_match(2) || 1).to_i
                                  diceCount *= -1 unless Regexp.last_match(1).nil?
                                  choiceCount = (Regexp.last_match(3) || 1).to_i
                        Severity: Minor
                        Found in lib/bcdice/game_system/Raisondetre.rb - About 2 hrs 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 getTotalResult has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def getTotalResult(bitList, successList, countOneList, targetNumber, isStop, canReRoll)
                                success = successList.inject { |sum, i| sum + i }
                                countOne = countOneList.inject { |sum, i| sum + i }
                        
                                result = ""
                        Severity: Minor
                        Found in lib/bcdice/game_system/BlindMythos.rb - About 2 hrs 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

                        File GranCrest.rb has 267 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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