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'
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'
File ShuumatsuKikou.rb
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
module BCDice
module GameSystem
class ShuumatsuKikou < Base
# ゲームシステムの識別子
ID = 'ShuumatsuKikou'
File Paradiso.rb
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
module BCDice
module GameSystem
class Paradiso < Base
# ゲームシステムの識別子
ID = 'Paradiso'
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)
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
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』突然の悲みに動きが止まる。そのターンの終了まで[行動不能]となる。',
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』駆動系に異常発生。このターンのターン終了まで[行動不能]となる。',
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
- 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 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
- 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 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
- 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 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
- 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
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"
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 = [
File Nuekagami.rb
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
module BCDice
module GameSystem
class Nuekagami < Base
# ゲームシステムの識別子
ID = 'Nuekagami'
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
- 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 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
- 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 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
- 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 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 = ""
- 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
File GranCrest.rb
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
module BCDice
module GameSystem
class GranCrest < Base
# ゲームシステムの識別子
ID = 'GranCrest'