bcdice/BCDice

View on GitHub

Showing 837 of 1,278 total issues

Method get_supplementary has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def get_supplementary(command_type, result)
        title = ''
        supplementary = ''
        case command_type
        when 'EM'
Severity: Minor
Found in lib/bcdice/game_system/ScreamHighSchool.rb - About 1 hr to fix

    Method eval has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              def eval(game_system, randomizer)
                round_type = game_system.round_type
                cmp_op = @cmp_op || game_system.default_cmp_op
                reroll_cmp_op = @reroll_cmp_op || cmp_op || :>=
    
    
    Severity: Minor
    Found in lib/bcdice/common_command/reroll_dice/node.rb - About 1 hr to fix

      Method getLifeAndDeathUnknownResult has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def getLifeAndDeathUnknownResult()
              table = [
                ' 1日:生還!',
                ' 1日:生還!',
                ' 1日:生還!',
      Severity: Minor
      Found in lib/bcdice/game_system/EndBreaker.rb - About 1 hr to fix

        Method getJudgeResult has 38 lines of code (exceeds 25 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 1 hr to fix

          Method get_SUV_table has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                def get_SUV_table(armorGrade, damage)
                  name = '戦闘結果表'
                  table = [
                    [0, 1, 6, 16, 26, 36],
                    [0, 1, 6, 26, 36, 46],
          Severity: Minor
          Found in lib/bcdice/game_system/MetalHeadExtream.rb - About 1 hr to fix

            Method get_interim_reference_number has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def get_interim_reference_number
                    table = [
                      [11, '1'],
                      [12, '2'],
                      [13, '3'],
            Severity: Minor
            Found in lib/bcdice/game_system/Insane.rb - About 1 hr to fix

              Method cf_roll has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    def cf_roll(command)
                      parser = Command::Parser.new(/\d*CF/, round_type: round_type)
                                              .enable_critical
                                              .enable_fumble
              
              
              Severity: Minor
              Found in lib/bcdice/game_system/ChaosFlare.rb - About 1 hr to fix

                Method rollAct has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      def rollAct(counts, judgment = 0, critical = 0, fumble = 0)
                        if critical < 1
                          critical = 1
                        end
                        if judgment <= 0
                Severity: Minor
                Found in lib/bcdice/game_system/BladeOfArcana.rb - About 1 hr to fix

                  Method getTotalResult has 38 lines of code (exceeds 25 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 1 hr to fix

                    Method resolute_attacking has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          def resolute_attacking(command)
                            m = /^([-+]\d+)?AA<=(\d+)$/.match(command)
                            return nil unless m
                    
                            num_bonus = m[1].to_i
                    Severity: Minor
                    Found in lib/bcdice/game_system/AniMalus.rb - About 1 hr to fix

                      Method ability_roll has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            def ability_roll(command)
                              m = /^(\d+\.?\d*)?AD([+-](\d+))?(#(\d*))?(>=(\d+))?/.match(command)
                              unless m
                                return nil
                              end
                      Severity: Minor
                      Found in lib/bcdice/game_system/TheUnofficialHollowKnightRPG.rb - About 1 hr to fix

                        Method action_roll has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              def action_roll(command)
                                parser = Command::Parser.new("D6", round_type: round_type)
                                                        .has_prefix_number
                                                        .restrict_cmp_op_to(:>=)
                                                        .enable_critical
                        Severity: Minor
                        Found in lib/bcdice/game_system/StarryDolls.rb - About 1 hr to fix

                          Method checkRoll has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                def checkRoll(string)
                                  string = replace_text(string)
                          
                                  debug("checkRoll string", string)
                                  unless (m = /(^|\s)S?((\d+)[rR]6([+\-\d]*)(([>=]+)(\d+))?)(\s|$)/i.match(string))
                          Severity: Minor
                          Found in lib/bcdice/game_system/MeikyuDays.rb - About 1 hr to fix

                            Method mayokin_check has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  def mayokin_check(string)
                                    debug("mayokin_check string", string)
                            
                                    string = replace_text(string)
                            
                            
                            Severity: Minor
                            Found in lib/bcdice/game_system/MeikyuKingdom.rb - About 1 hr to fix

                              Method roll_nr has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    def roll_nr(command)
                                      m = /^(\d+)?NR(6|8|10|12)$/.match(command)
                                      return nil unless m
                              
                                      times = m[1]&.to_i || 1
                              Severity: Minor
                              Found in lib/bcdice/game_system/NRR.rb - About 1 hr to fix

                                Method roll_check has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      def roll_check(command)
                                        m = /^KS(?:\(([-+\d]+),([-+\d]+)?\)|(\d+))([AD]?)(?:>=([-+\d]+))?$/.match(command)
                                        return nil unless m
                                
                                        dice_size = m[1] ? Arithmetic.eval(m[1], @round_type) : Arithmetic.eval(m[3], @round_type).to_i
                                Severity: Minor
                                Found in lib/bcdice/game_system/KyokoShinshoku.rb - About 1 hr to fix

                                  Method roll has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          def roll(randomizer)
                                            if @parse_error
                                              return nil
                                            end
                                  
                                  
                                  Severity: Minor
                                  Found in lib/bcdice/game_system/BeastBindTrinity.rb - About 1 hr to fix

                                    Method roll_performance_check has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          def roll_performance_check(command)
                                            m = /^PD(\d+)([+-]\d+)?$/.match(command)
                                            unless m
                                              return nil
                                            end
                                    Severity: Minor
                                    Found in lib/bcdice/game_system/BeginningIdol2022.rb - About 1 hr to fix

                                      Method get_flightsupply_table has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            def get_flightsupply_table
                                              dice = @randomizer.roll_once(20)
                                              case dice
                                              when 1
                                                text = "……えっ?! キミの【物資点】は0点となる。"
                                      Severity: Minor
                                      Found in lib/bcdice/game_system/Paradiso.rb - About 1 hr to fix

                                        Method action_roll has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              def action_roll(command)
                                                parser = Command::Parser.new(/\d*SG/, round_type: round_type)
                                                                        .restrict_cmp_op_to(:>=, nil)
                                                                        .enable_critical
                                                                        .enable_fumble
                                        Severity: Minor
                                        Found in lib/bcdice/game_system/ShinobiGami.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language