bcdice/BCDice

View on GitHub

Showing 837 of 1,278 total issues

Method origin_omnipotent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def origin_omnipotent(order)
        natural_result = @randomizer.roll_barabara(3, 12)

        case order[1]
        when "G"
Severity: Minor
Found in lib/bcdice/game_system/HeroScale.rb - About 1 hr to fix

    Method torg_check has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          def torg_check(string)
            string = replace_text(string)
    
            m = /^1R20(([+-]\d+)*)$/i.match(string)
            unless m
    Severity: Minor
    Found in lib/bcdice/game_system/TorgEternity.rb - About 1 hr to fix

      Method get_torg_eternity_damage_bonus_dice has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def get_torg_eternity_damage_bonus_dice(number)
              debug("bonus dice roll : #{number}")
              value_roll = 0
              output_roll = ""
              if number > 0
      Severity: Minor
      Found in lib/bcdice/game_system/TorgEternity.rb - About 1 hr to fix

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

                def translate_tables(locale)
                  {
                    "ST" => DiceTable::Table.from_i18n("Insane.table.ST", locale),
                    "HJST" => DiceTable::Table.from_i18n("Insane.table.HJST", locale),
                    "MTST" => DiceTable::Table.from_i18n("Insane.table.MTST", locale),
        Severity: Minor
        Found in lib/bcdice/game_system/Insane.rb - About 1 hr to fix

          Method getBulletResults has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                def getBulletResults(bullet_count, hit_type, diff)
                  bullet_set_count = getSetOfBullet(diff)
                  hit_bullet_count_base = getHitBulletCountBase(diff, bullet_set_count)
                  impale_bullet_count_base = (bullet_set_count / 2.to_f)
          
          
          Severity: Minor
          Found in lib/bcdice/game_system/Cthulhu7th_ChineseTraditional.rb - About 1 hr to fix

            Method get_weather_table has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def get_weather_table(roc)
                    name = "天候チェック"
                    table = [
                      [2, '大雨と強風。探索判定の難易度に+4。'],
                      [3, '風が強い1日になりそう。探索判定の難易度に+2。'],
            Severity: Minor
            Found in lib/bcdice/game_system/Postman.rb - About 1 hr to fix

              Method resolute_guarding has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    def resolute_guarding(command)
                      m = /^([-+]\d+)?AG=(\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 action_result has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      def action_result(action)
                        output = action.text
                        dice = action.dice
                        target = action.target
                
                
                Severity: Minor
                Found in lib/bcdice/game_system/DivineCharger.rb - About 1 hr to fix

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

                            def eval(game_system, randomizer)
                              dice = @notation.to_dice(game_system.round_type)
                              unless dice.valid?
                                return nil
                              end
                  Severity: Minor
                  Found in lib/bcdice/common_command/tally_dice/node.rb - About 1 hr to fix

                    Method roll_df has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          def roll_df(command)
                            parser = Command::Parser.new("DF", round_type: @round_type)
                                                    .enable_prefix_number()
                                                    .restrict_cmp_op_to(:>=, nil)
                    
                    
                    Severity: Minor
                    Found in lib/bcdice/game_system/FateCoreSystem.rb - About 1 hr to fix

                      Method rollZombie has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            def rollZombie(value)
                              d1 = @randomizer.roll_once(6)
                              d2 = @randomizer.roll_once(6)
                      
                              diceTotal = d1 + d2 + value
                      Severity: Minor
                      Found in lib/bcdice/game_system/DiceOfTheDead.rb - About 1 hr to fix

                        Method eval_game_system_specific_command has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              def eval_game_system_specific_command(command)
                                debug('eval_game_system_specific_command command', command)
                        
                                result = ''
                                case command
                        Severity: Minor
                        Found in lib/bcdice/game_system/Elysion.rb - About 1 hr to fix

                          Method check_roll has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                def check_roll(string)
                                  parser = Command::Parser.new(/RC\d+/, round_type: round_type)
                                                          .restrict_cmp_op_to(nil)
                                  cmd = parser.parse(string)
                                  return nil unless cmd
                          Severity: Minor
                          Found in lib/bcdice/game_system/DesperateRun.rb - About 1 hr to fix

                            Method torg_check has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  def torg_check(string)
                                    unless /(^|\s)S?(1R20([+-]\d+)*)(\s|$)/i =~ string
                                      return nil
                                    end
                            
                            
                            Severity: Minor
                            Found in lib/bcdice/game_system/Torg.rb - About 1 hr to fix

                              Method rollTableCommand has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    def rollTableCommand(command)
                                      command = ALIAS[command] || command
                                      result = roll_tables(command, self.class::TABLES) || self.class::RTT.roll_command(@randomizer, command)
                                      return result if result
                              
                              
                              Severity: Minor
                              Found in lib/bcdice/game_system/KillDeathBusiness.rb - About 1 hr to fix

                                Method roll_existence has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      def roll_existence(command)
                                        m = /^EXI<=(\d+)$/.match(command)
                                        unless m
                                          return nil
                                        end
                                Severity: Minor
                                Found in lib/bcdice/game_system/KamitsubakiCityUnderConstructionNarrative.rb - About 1 hr to fix

                                  Method roll_sp has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        def roll_sp(command)
                                          m = /^SP(\d+)(?:>=(\d+))?$/i.match(command)
                                          unless m
                                            return nil
                                          end
                                  Severity: Minor
                                  Found in lib/bcdice/game_system/SteamPunkers.rb - About 1 hr to fix

                                    Method positive_emotion_table has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            def positive_emotion_table(locale)
                                              DiceTable::RangeTable.new(
                                                I18n.translate("DoubleCross.ET.positive.name", locale: locale),
                                                "1D100",
                                                [
                                    Severity: Minor
                                    Found in lib/bcdice/game_system/DoubleCross.rb - About 1 hr to fix

                                      Method getInventionAttributeTextDiceCommandResult has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            def getInventionAttributeTextDiceCommandResult(command)
                                              return nil unless command =~ /IAT([ABMDLT]*)/
                                      
                                              tableName = translate("LogHorizon.IAT.name")
                                      
                                      
                                      Severity: Minor
                                      Found in lib/bcdice/game_system/LogHorizon.rb - About 1 hr to fix

                                        Method negative_emotion_table has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                def negative_emotion_table(locale)
                                                  DiceTable::RangeTable.new(
                                                    I18n.translate("DoubleCross.ET.negative.name", locale: locale),
                                                    "1D100",
                                                    [
                                        Severity: Minor
                                        Found in lib/bcdice/game_system/DoubleCross.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language