Showing 837 of 1,278 total issues
Method rollFullAuto
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def rollFullAuto(bullet_count, diff, broken_number, dice_num, stop_count, bullet_set_count_cap)
output = ""
loopCount = 0
counts = {
- Read upRead up
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 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
- Read upRead up
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 get_torg_eternity_damage_bonus_dice
has a Cognitive Complexity of 11 (exceeds 5 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
- Read upRead up
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 roll_general_skill
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def roll_general_skill(command)
m = /^GS([-+][-+\d]+)?(>([-+\d]+))?/.match(command)
return nil unless m
modify = ArithmeticEvaluator.eval(m[1])
- Read upRead up
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 getCrashWorldRoll
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def getCrashWorldRoll(target)
debug("target", target)
output = "("
isEnd = false
- Read upRead up
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 do_resistance_active_characteristic_roll
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def do_resistance_active_characteristic_roll(command)
m = %r{\A(RSA)(\d+)(M([+-/*\d]+))?$}.match(command)
unless m
return nil
end
- Read upRead up
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 parse
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def parse(command)
scanner = StringScanner.new(command)
scanner.skip(/\s+/)
secret = !scanner.scan(/S/i).nil?
- Read upRead up
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 ability_roll
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def ability_roll(command)
m = /^(\d+\.?\d*)?AD([+-](\d+))?(#(\d*))?(>=(\d+))?/.match(command)
unless m
return nil
end
- Read upRead up
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 consciousness_roll
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def consciousness_roll(damage)
unless (1..6).include?(damage)
return nil
end
Method eval_game_system_specific_command
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
result = roll_tables(command, TABLES)
return result if result
if (ppc_parse_result = ppc_parser.parse(command))
Method getHitResult
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def getHitResult(count, damageFunc, tail)
m = /\A([LCR][LU]?)?(\+\d+)?>=(\d+)/.match(tail)
return nil unless m
side = m[1] || 'C'
Method eval_game_system_specific_command
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
output =
case command.upcase
when /EMA(\d+)?$/i
Method action_roll
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def action_roll(command)
parser = Command::Parser.new("PP", round_type: round_type)
.restrict_cmp_op_to(:>=, nil)
.enable_critical
.enable_fumble
Method checkRoll
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def checkRoll(diceCount, modify, type, target)
diceArray = @randomizer.roll_barabara(diceCount, 6).sort
dice = diceArray.sum()
diceText = diceArray.join(",")
Method roll_wind_power_chart
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def roll_wind_power_chart
key = 0
total_bonus = 0
text = ""
Method eval_game_system_specific_command
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
debug('eval_game_system_specific_command begin')
unless command =~ /^R(\d+)(,(\d+))?([+\-\d]+)?(>=(\d+))?/
debug('unmatched!')
Method check_roll
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def check_roll(string)
string = replace_text(string)
return nil unless (m = /(^|\s)S?(3[rR]6([+\-\d]+)?(\[(\d+),(\d+)\])(([>=]+)(\d+))?)(\s|$)/i.match(string))
string = m[2]
Method abirity_roll
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def abirity_roll(command)
parser = Command::Parser.new("AB", round_type: round_type)
.enable_prefix_number()
.restrict_cmp_op_to(:>=, nil)
cmd = parser.parse(command)
Method mk_item_features_table
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def mk_item_features_table(num)
output = ""
dice = @randomizer.roll_sum(2, 6)
if num <= 2
Method getNewRates
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def getNewRates(rate_sw2_0)
rate_3 = []
rate_4 = []
rate_5 = []
rate_6 = []