From f94b4e1a653fd477b5bccda21c43eeec4e51e250 Mon Sep 17 00:00:00 2001 From: hoehoe-git Date: Wed, 29 Apr 2020 20:24:30 +0900 Subject: [PATCH] =?UTF-8?q?input=E5=86=85=E5=AE=B9=E3=81=A7=E8=A8=98?= =?UTF-8?q?=E8=BF=B0=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=9F[1...n]?= =?UTF-8?q?=E3=82=92=E3=80=81=E7=9B=B4=E6=8E=A5=E5=80=A4=E3=82=92=E8=A8=98?= =?UTF-8?q?=E8=BF=B0=E3=81=99=E3=82=8B=E5=BD=A2=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [1...n]の記述方式は、TORGダイスボットにならったものだったが、値域が問題となるものではないため、直接値を記述する方式とした。 また、直接値を記述することで不要になったrand:欄を空白に変更。 --- result.txt | 1774 ++++++++++++++++++++++ src/bcdiceCore.rb | 4 +- src/diceBot/ArsMagica.rb | 2 +- src/diceBot/GurpsFW.rb | 2 +- src/diceBot/MeikyuKingdom.rb | 18 +- src/diceBot/SRS.rb | 4 +- src/test/data/TorgEternity.txt | 140 +- src/test/data/TorgEternity_LocalTest.txt | 978 ++++++++++++ src/test/data/TorgEternity_old.txt | 576 +++++++ 9 files changed, 3413 insertions(+), 85 deletions(-) create mode 100644 result.txt create mode 100644 src/test/data/TorgEternity_LocalTest.txt create mode 100644 src/test/data/TorgEternity_old.txt diff --git a/result.txt b/result.txt new file mode 100644 index 000000000..d22d83328 --- /dev/null +++ b/result.txt @@ -0,0 +1,1774 @@ +Inspecting 222 files +CCCCCWCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.CCCCCCCCCCCCCCCCCCWCCCCCCCCCCCCCCCCCCCCWCCCCCCC + +Offenses: + +Gemfile:1:1: C: Layout/EndOfLine: Carriage return character detected. +source 'https://rubygems.org' ... +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Gemfile:17:5: C: Bundler/DuplicatedGem: Gem rake requirements already given on line 13 of the Gemfile. + gem 'rake' + ^^^^^^^^^^ +Gemfile:18:5: C: Bundler/DuplicatedGem: Gem test-unit requirements already given on line 14 of the Gemfile. + gem 'test-unit' + ^^^^^^^^^^^^^^^ +Rakefile:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/ArgsAnalizer.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!ruby -Ku ... +^^^^^^^^^^ +src/ArgsAnalizer.rb:74:5: C: Style/GlobalVars: Do not introduce global variables. + $server = data[0] + ^^^^^^^ +src/ArgsAnalizer.rb:75:5: C: Style/GlobalVars: Do not introduce global variables. + $port = data[1] if data[1] + ^^^^^ +src/ArgsAnalizer.rb:79:5: C: Style/GlobalVars: Do not introduce global variables. + $defaultLoginChannelsText = decode($ircCode, @param) + ^^^^^^^^^^^^^^^^^^^^^^^^^ +src/ArgsAnalizer.rb:79:40: C: Style/GlobalVars: Do not introduce global variables. + $defaultLoginChannelsText = decode($ircCode, @param) + ^^^^^^^^ +src/ArgsAnalizer.rb:83:5: C: Style/GlobalVars: Do not introduce global variables. + $nick = @param + ^^^^^ +src/ArgsAnalizer.rb:87:5: C: Style/GlobalVars: Do not introduce global variables. + $defaultGameType = @param + ^^^^^^^^^^^^^^^^ +src/ArgsAnalizer.rb:91:5: C: Style/GlobalVars: Do not introduce global variables. + $extraCardFileName = @param + ^^^^^^^^^^^^^^^^^^ +src/ArgsAnalizer.rb:95:5: C: Style/GlobalVars: Do not introduce global variables. + $ircCode = param + ^^^^^^^^ +src/bcdice.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!/bin/ruby -Ku ... +^^^^^^^^^^^^^^^ +src/bcdice.rb:46:7: C: Style/CaseEquality: Avoid the use of the case equality operator ===. +if $0 === __FILE__ + ^^^ +src/bcdiceCore.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!/bin/ruby -Ku ... +^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:45:1: C: Style/GlobalVars: Do not introduce global variables. +$RUBY18_WIN = RUBY_VERSION < '1.9' && +^^^^^^^^^^^ +src/bcdiceCore.rb:46:50: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + /mswin(?!ce)|mingw|cygwin|bccwin/i === RUBY_PLATFORM + ^^^ +src/bcdiceCore.rb:48:1: C: Style/GlobalVars: Do not introduce global variables. +$secretRollMembersHolder = {} +^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:49:1: C: Style/GlobalVars: Do not introduce global variables. +$secretDiceResultHolder = {} +^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:50:1: C: Style/GlobalVars: Do not introduce global variables. +$plotPrintChannels = {} +^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:51:1: C: Style/GlobalVars: Do not introduce global variables. +$point_counter = {} +^^^^^^^^^^^^^^ +src/bcdiceCore.rb:124:3: C: Style/TrivialAccessors: Use attr_writer to define trivial writer methods. + def isKeepSecretDice(b) + ^^^ +src/bcdiceCore.rb:152:30: C: Style/GlobalVars: Do not introduce global variables. + openPattern = /\A\s*(?:#{$OPEN_DICE}|#{$OPEN_PLOT})\s*\z/i + ^^^^^^^^^^ +src/bcdiceCore.rb:152:44: C: Style/GlobalVars: Do not introduce global variables. + openPattern = /\A\s*(?:#{$OPEN_DICE}|#{$OPEN_PLOT})\s*\z/i + ^^^^^^^^^^ +src/bcdiceCore.rb:214:10: C: Style/GlobalVars: Do not introduce global variables. + when $quitCommand + ^^^^^^^^^^^^ +src/bcdiceCore.rb:488:15: C: Style/GlobalVars: Do not introduce global variables. + unless /#{$ADD_PLOT}[::](.+)/i =~ arg + ^^^^^^^^^ +src/bcdiceCore.rb:510:12: C: Style/GlobalVars: Do not introduce global variables. + return $plotPrintChannels[nick] + ^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:530:25: C: Style/GlobalVars: Do not introduce global variables. + "・シークレットをオープンする(#{$OPEN_DICE})", + ^^^^^^^^^^ +src/bcdiceCore.rb:546:26: C: Style/GlobalVars: Do not introduce global variables. + "・プロット表示        (#{$OPEN_PLOT})", + ^^^^^^^^^^ +src/bcdiceCore.rb:547:32: C: Style/GlobalVars: Do not introduce global variables. + "・プロット記録        (Talkで #{$ADD_PLOT}:プロット)", + ^^^^^^^^^ +src/bcdiceCore.rb:566:26: C: Style/GlobalVars: Do not introduce global variables. + "・カウンタ表示チャンネル登録 (#{$READY_CMD})", + ^^^^^^^^^^ +src/bcdiceCore.rb:599:18: C: Style/GlobalVars: Do not introduce global variables. + if /(^|\s+)#{$OPEN_PLOT}(\s+|$)/i =~ @message + ^^^^^^^^^^ +src/bcdiceCore.rb:605:18: C: Style/GlobalVars: Do not introduce global variables. + if /(^|\s+)#{$OPEN_DICE}(\s+|$)/i =~ @message + ^^^^^^^^^^ +src/bcdiceCore.rb:666:12: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + !(/^#/ === @channel) + ^^^ +src/bcdiceCore.rb:683:12: C: Style/GlobalVars: Do not introduce global variables. + if /^#{$READY_CMD}(\s+|$)/i =~ @message + ^^^^^^^^^^ +src/bcdiceCore.rb:794:33: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + secret = (/S[-\d]+D[\d+-]+/ === arg) + ^^^ +src/bcdiceCore.rb:805:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + secret = (/S[\d]+B[\d]+/i === arg) + ^^^ +src/bcdiceCore.rb:813:42: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(S)?[\d]+R[\d]+/i === arg + ^^^ +src/bcdiceCore.rb:835:42: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(S)?[\d]+U[\d]+/i === arg + ^^^ +src/bcdiceCore.rb:849:69: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /((^|\s)(S)?choice\[[^,]+(,[^,]+)+\]($|\s))/i === arg + ^^^ +src/bcdiceCore.rb:873:45: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + key, message = table.find { |i| i.first === value } + ^^^ +src/bcdiceCore.rb:884:23: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)D(\d+)/i === dice + ^^^ +src/bcdiceCore.rb:945:25: C: Style/GlobalVars: Do not introduce global variables. + unless (dice_cnt <= $DICE_MAXCNT) && (dice_max <= $DICE_MAXNUM) + ^^^^^^^^^^^^ +src/bcdiceCore.rb:945:55: C: Style/GlobalVars: Do not introduce global variables. + unless (dice_cnt <= $DICE_MAXCNT) && (dice_max <= $DICE_MAXNUM) + ^^^^^^^^^^^^ +src/bcdiceCore.rb:1167:33: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^S?D66/i === string + ^^^ +src/bcdiceCore.rb:1201:60: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(^|\s)(S)?((\d+)?D66(N|S)?)(\s|$)/i === string + ^^^ +src/bcdiceCore.rb:1260:15: C: Style/GlobalVars: Do not introduce global variables. + members = $secretRollMembersHolder[memberKey] + ^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1271:20: C: Style/GlobalVars: Do not introduce global variables. + diceResult = $secretDiceResultHolder[diceResultKey] + ^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1276:9: C: Style/GlobalVars: Do not introduce global variables. + $secretDiceResultHolder.delete(diceResultKey) + ^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1282:7: C: Style/GlobalVars: Do not introduce global variables. + $secretRollMembersHolder.delete(channel) + ^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1316:5: C: Style/GlobalVars: Do not introduce global variables. + $secretRollMembersHolder[key] ||= [] + ^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1317:15: C: Style/GlobalVars: Do not introduce global variables. + members = $secretRollMembersHolder[key] + ^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1338:5: C: Style/GlobalVars: Do not introduce global variables. + $secretDiceResultHolder[key] = diceResult # 複数チャンネルも一応想定 + ^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1341:37: C: Style/GlobalVars: Do not introduce global variables. + debug("secretDiceResultHolder", $secretDiceResultHolder) + ^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceCore.rb:1351:5: C: Style/GlobalVars: Do not introduce global variables. + $plotPrintChannels[nick] = @channel + ^^^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!/bin/ruby -Ku ... +^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:17:1: C: Style/GlobalVars: Do not introduce global variables. +$isDebug = false +^^^^^^^^ +src/bcdiceGui.rb:28:1: C: Style/GlobalVars: Do not introduce global variables. +$debugText = nil +^^^^^^^^^^ +src/bcdiceGui.rb:32:6: C: Style/GlobalVars: Do not introduce global variables. + if $debugText + ^^^^^^^^^^ +src/bcdiceGui.rb:33:5: C: Style/GlobalVars: Do not introduce global variables. + $debugText.append_text($RUBY18_WIN ? text.tosjis : text) + ^^^^^^^^^^ +src/bcdiceGui.rb:33:28: C: Style/GlobalVars: Do not introduce global variables. + $debugText.append_text($RUBY18_WIN ? text.tosjis : text) + ^^^^^^^^^^^ +src/bcdiceGui.rb:39:6: C: Style/GlobalVars: Do not introduce global variables. + if $debugText + ^^^^^^^^^^ +src/bcdiceGui.rb:41:5: C: Style/GlobalVars: Do not introduce global variables. + $debugText.append_text($RUBY18_WIN ? text.tosjis : text) + ^^^^^^^^^^ +src/bcdiceGui.rb:41:28: C: Style/GlobalVars: Do not introduce global variables. + $debugText.append_text($RUBY18_WIN ? text.tosjis : text) + ^^^^^^^^^^^ +src/bcdiceGui.rb:49:28: C: Style/GlobalVars: Do not introduce global variables. + @iniFile = IniFile.new($iniFileName) + ^^^^^^^^^^^^ +src/bcdiceGui.rb:57:40: C: Style/GlobalVars: Do not introduce global variables. + @serverName = createAddedTextInput($server, "サーバ名") + ^^^^^^^ +src/bcdiceGui.rb:58:36: C: Style/GlobalVars: Do not introduce global variables. + @portNo = createAddedTextInput($port.to_s, "ポート番号") + ^^^^^ +src/bcdiceGui.rb:59:37: C: Style/GlobalVars: Do not introduce global variables. + @channel = createAddedTextInput($defaultLoginChannelsText, "ログインチャンネル") + ^^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:60:38: C: Style/GlobalVars: Do not introduce global variables. + @nickName = createAddedTextInput($nick, "ニックネーム") + ^^^^^ +src/bcdiceGui.rb:63:47: C: Style/GlobalVars: Do not introduce global variables. + @extraCardFileText = createAddedTextInput($extraCardFileName, "拡張カードファイル名") + ^^^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:130:38: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /#{SERVER_SERT_PREFIX}(.+)/ === name + ^^^ +src/bcdiceGui.rb:274:30: C: Style/GlobalVars: Do not introduce global variables. + setChoiseText(@gameType, $defaultGameType) + ^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:290:12: C: Style/GlobalVars: Do not introduce global variables. + return $allGameTypes.collect { |i| i.gsub(/_/, ' ') } + ^^^^^^^^^^^^^ +src/bcdiceGui.rb:319:63: C: Style/GlobalVars: Do not introduce global variables. + found = CHARACTER_CODE_INFO.find { |_key, value| value == $ircCode } + ^^^^^^^^ +src/bcdiceGui.rb:329:5: C: Style/GlobalVars: Do not introduce global variables. + $ircCode = getSelectedCharacterCode + ^^^^^^^^ +src/bcdiceGui.rb:409:5: C: Style/GlobalVars: Do not introduce global variables. + $debugText = Wx::TextCtrl.new(self, -1, "", + ^^^^^^^^^^ +src/bcdiceGui.rb:412:13: C: Style/GlobalVars: Do not introduce global variables. + addCtrl($debugText) + ^^^^^^^^^^ +src/bcdiceGui.rb:413:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = true + ^^^^^^^^ +src/bcdiceGui.rb:426:5: C: Style/GlobalVars: Do not introduce global variables. + $server = @serverName.get_value + ^^^^^^^ +src/bcdiceGui.rb:427:5: C: Style/GlobalVars: Do not introduce global variables. + $port = @portNo.get_value.to_i + ^^^^^ +src/bcdiceGui.rb:428:5: C: Style/GlobalVars: Do not introduce global variables. + $defaultLoginChannelsText = @channel.get_value + ^^^^^^^^^^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:429:5: C: Style/GlobalVars: Do not introduce global variables. + $nick = @nickName.get_value + ^^^^^ +src/bcdiceGui.rb:430:5: C: Style/GlobalVars: Do not introduce global variables. + $defaultGameType = @gameType.get_string_selection + ^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:431:5: C: Style/GlobalVars: Do not introduce global variables. + $ircCode = getSelectedCharacterCode + ^^^^^^^^ +src/bcdiceGui.rb:432:5: C: Style/GlobalVars: Do not introduce global variables. + $extraCardFileName = @extraCardFileText.get_value + ^^^^^^^^^^^^^^^^^^ +src/bcdiceGui.rb:452:7: W: Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError? + rescue Exception => e ... + ^^^^^^^^^^^^^^^^^^^^^ +src/CardTrader.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!/perl/bin/ruby -Ku ... +^^^^^^^^^^^^^^^^^^^^ +src/CardTrader.rb:6:1: C: Style/GlobalVars: Do not introduce global variables. +$ircNickRegExp = '[A-Za-z\d\-\[\]\\\'^{}_]+' +^^^^^^^^^^^^^^ +src/CardTrader.rb:263:24: C: Style/GlobalVars: Do not introduce global variables. + when /c-vhand\s*(#{$ircNickRegExp})($|\s)/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:289:67: C: Style/GlobalVars: Do not introduce global variables. + when /c-pass(\d)*(\[#{@cardRegExp}(,#{@cardRegExp})*\])?\s*(#{$ircNickRegExp})($|\s)/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:299:37: C: Style/GlobalVars: Do not introduce global variables. + when /c-deal(\[[\d]+\]|\s)\s*(#{$ircNickRegExp})($|\s)/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:304:38: C: Style/GlobalVars: Do not introduce global variables. + when /c-vdeal(\[[\d]+\]|\s)\s*(#{$ircNickRegExp})($|\s)/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:312:68: C: Style/GlobalVars: Do not introduce global variables. + when /c-place(\d)*(\[#{@cardRegExp}(,#{@cardRegExp})*\])?\s*(#{$ircNickRegExp})($|\s)/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:319:24: C: Style/GlobalVars: Do not introduce global variables. + when /c-spell(\[(#{$ircNickRegExp}[^\]]+?)\])?($|\s)/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:452:20: C: Style/GlobalVars: Do not introduce global variables. + if string == $okResult + ^^^^^^^^^ +src/CardTrader.rb:475:14: C: Style/GlobalVars: Do not introduce global variables. + return $okResult + ^^^^^^^^^ +src/CardTrader.rb:518:22: C: Style/GlobalVars: Do not introduce global variables. + if string == $okResult + ^^^^^^^^^ +src/CardTrader.rb:538:14: C: Style/GlobalVars: Do not introduce global variables. + return $okResult if string == $okResult + ^^^^^^^^^ +src/CardTrader.rb:538:37: C: Style/GlobalVars: Do not introduce global variables. + return $okResult if string == $okResult + ^^^^^^^^^ +src/CardTrader.rb:547:14: C: Style/GlobalVars: Do not introduce global variables. + return $okResult + ^^^^^^^^^ +src/CardTrader.rb:588:33: C: Style/GlobalVars: Do not introduce global variables. + cardText = getCardsText($card_ok) + ^^^^^^^^ +src/CardTrader.rb:608:48: C: Style/GlobalVars: Do not introduce global variables. + sendMessage(@channel, "[" + getCardsText($card_ok) + "]") unless @cardTitles.empty? + ^^^^^^^^ +src/CardTrader.rb:679:18: C: Style/GlobalVars: Do not introduce global variables. + if result == $okResult + ^^^^^^^^^ +src/CardTrader.rb:702:18: C: Style/GlobalVars: Do not introduce global variables. + if result == $okResult + ^^^^^^^^^ +src/CardTrader.rb:750:20: C: Style/GlobalVars: Do not introduce global variables. + if result == $okResult + ^^^^^^^^^ +src/CardTrader.rb:788:14: C: Style/GlobalVars: Do not introduce global variables. + return $okResult + ^^^^^^^^^ +src/CardTrader.rb:847:58: C: Style/GlobalVars: Do not introduce global variables. + if /(c-pass(\d*)(\[(((,)?#{@cardRegExp})*)\])?)\s*(#{$ircNickRegExp})/ =~ command + ^^^^^^^^^^^^^^ +src/CardTrader.rb:898:12: C: Style/GlobalVars: Do not introduce global variables. + when $ngResult + ^^^^^^^^^ +src/CardTrader.rb:900:12: C: Style/GlobalVars: Do not introduce global variables. + when $okResult + ^^^^^^^^^ +src/CardTrader.rb:954:14: C: Style/GlobalVars: Do not introduce global variables. + return $ngResult unless isSuccess + ^^^^^^^^^ +src/CardTrader.rb:960:12: C: Style/GlobalVars: Do not introduce global variables. + return $okResult + ^^^^^^^^^ +src/CardTrader.rb:1053:59: C: Style/GlobalVars: Do not introduce global variables. + if /(c-place(\d*)(\[(((,)?#{@cardRegExp})*)\])?)\s*(#{$ircNickRegExp})/ =~ commandText + ^^^^^^^^^^^^^^ +src/CardTrader.rb:1094:12: C: Style/GlobalVars: Do not introduce global variables. + when $ngResult + ^^^^^^^^^ +src/CardTrader.rb:1096:12: C: Style/GlobalVars: Do not introduce global variables. + when $okResult + ^^^^^^^^^ +src/CardTrader.rb:1196:18: C: Style/GlobalVars: Do not introduce global variables. + if result == $okResult + ^^^^^^^^^ +src/CardTrader.rb:1309:27: C: Style/GlobalVars: Do not introduce global variables. + if place =~ /^(\d+)(#{$ircNickRegExp})/ + ^^^^^^^^^^^^^^ +src/CardTrader.rb:1434:8: C: Style/GlobalVars: Do not introduce global variables. + if $isHandSort + ^^^^^^^^^^^ +src/cgiDiceBot.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/cgiDiceBot.rb:18:5: C: Style/GlobalVars: Do not introduce global variables. + $SEND_STR_MAX = 99999 # 最大送信文字数(本来は500byte上限) + ^^^^^^^^^^^^^ +src/cgiDiceBot.rb:172:7: C: Style/CaseEquality: Avoid the use of the case equality operator ===. +if $0 === __FILE__ + ^^^ +src/configBcDice.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/configBcDice.rb:6:1: C: Style/GlobalVars: Do not introduce global variables. +$isDebug = false +^^^^^^^^ +src/configBcDice.rb:8:1: C: Style/GlobalVars: Do not introduce global variables. +$bcDiceVersion = "2.03.05" +^^^^^^^^^^^^^^ +src/configBcDice.rb:10:1: C: Style/GlobalVars: Do not introduce global variables. +$SEND_STR_MAX = 405; # 最大送信文字数(本来は500byte上限) +^^^^^^^^^^^^^ +src/configBcDice.rb:11:1: C: Style/GlobalVars: Do not introduce global variables. +$isRollVoidDiceAtAnyRecive = true; # 発言の度に空ダイスを振るか? +^^^^^^^^^^^^^^^^^^^^^^^^^^ +src/configBcDice.rb:12:1: C: Style/GlobalVars: Do not introduce global variables. +$DICE_MAXCNT = 200; # ダイスが振れる最大個数 +^^^^^^^^^^^^ +src/configBcDice.rb:13:1: C: Style/GlobalVars: Do not introduce global variables. +$DICE_MAXNUM = 1000; # ダイスの最大面数 +^^^^^^^^^^^^ +src/configBcDice.rb:14:1: C: Style/GlobalVars: Do not introduce global variables. +$ircCode = Kconv::UTF8; # IRCサーバとの通信に使うコードをRuby::Kconv値で指定 +^^^^^^^^ +src/configBcDice.rb:15:1: C: Style/GlobalVars: Do not introduce global variables. +$isHandSort = true; # 手札をソートする必要があるか? +^^^^^^^^^^^ +src/configBcDice.rb:16:1: C: Style/GlobalVars: Do not introduce global variables. +$quitCommand = 'お疲れ様'; # 終了用のTalkコマンド +^^^^^^^^^^^^ +src/configBcDice.rb:17:1: C: Style/GlobalVars: Do not introduce global variables. +$quitMessage = 'さようなら'; # 終了時のメッセージ +^^^^^^^^^^^^ +src/configBcDice.rb:18:1: C: Style/GlobalVars: Do not introduce global variables. +$OPEN_DICE = 'Open Dice!'; # シークレットダイスの出目表示コマンド +^^^^^^^^^^ +src/configBcDice.rb:19:1: C: Style/GlobalVars: Do not introduce global variables. +$OPEN_PLOT = 'Open Plot!'; # プロットの表示コマンド +^^^^^^^^^^ +src/configBcDice.rb:20:1: C: Style/GlobalVars: Do not introduce global variables. +$ADD_PLOT = 'PLOT'; # プロットの入力コマンド +^^^^^^^^^ +src/configBcDice.rb:21:1: C: Style/GlobalVars: Do not introduce global variables. +$READY_CMD = '#HERE'; # 自分の居るチャンネルの宣言コマンド +^^^^^^^^^^ +src/configBcDice.rb:24:1: C: Style/GlobalVars: Do not introduce global variables. +$server = "irc.trpg.net"; # サーバー +^^^^^^^ +src/configBcDice.rb:25:1: C: Style/GlobalVars: Do not introduce global variables. +$port = 6667; # ポート番号 +^^^^^ +src/configBcDice.rb:26:1: C: Style/GlobalVars: Do not introduce global variables. +$defaultLoginChannelsText = "#Dice_Test"; # ボットが最初に参加するチャンネル名 +^^^^^^^^^^^^^^^^^^^^^^^^^ +src/configBcDice.rb:27:1: C: Style/GlobalVars: Do not introduce global variables. +$nick = "bcDICE" +^^^^^ +src/configBcDice.rb:28:1: C: Style/GlobalVars: Do not introduce global variables. +$userName = "v" + $bcDiceVersion # ユーザー名 +^^^^^^^^^ +src/configBcDice.rb:28:19: C: Style/GlobalVars: Do not introduce global variables. +$userName = "v" + $bcDiceVersion # ユーザー名 + ^^^^^^^^^^^^^^ +src/configBcDice.rb:29:1: C: Style/GlobalVars: Do not introduce global variables. +$ircName = "rubydice"; # IRCネーム +^^^^^^^^ +src/configBcDice.rb:30:1: C: Style/GlobalVars: Do not introduce global variables. +$defaultGameType = "" # デフォルトゲームタイプ +^^^^^^^^^^^^^^^^ +src/configBcDice.rb:31:1: C: Style/GlobalVars: Do not introduce global variables. +$extraCardFileName = "" # 拡張カードファイル名 +^^^^^^^^^^^^^^^^^^ +src/configBcDice.rb:33:1: C: Style/GlobalVars: Do not introduce global variables. +$iniFileName = 'bcdice.ini' +^^^^^^^^^^^^ +src/configBcDice.rb:35:1: C: Style/GlobalVars: Do not introduce global variables. +$allGameTypes = %w{ +^^^^^^^^^^^^^ +src/configBcDiceForSystem.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/configBcDiceForSystem.rb:4:1: C: Style/GlobalVars: Do not introduce global variables. +$okResult = '_OK_' +^^^^^^^^^ +src/configBcDiceForSystem.rb:5:1: C: Style/GlobalVars: Do not introduce global variables. +$ngResult = '_NG_' +^^^^^^^^^ +src/configBcDiceForSystem.rb:7:1: C: Style/GlobalVars: Do not introduce global variables. +$ircNickMaxLength = 9 +^^^^^^^^^^^^^^^^^ +src/CountHolder.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!/bin/ruby -Ku ... +^^^^^^^^^^^^^^^ +src/CountHolder.rb:72:29: C: Style/GlobalVars: Do not introduce global variables. + debug("$point_counter", $point_counter) + ^^^^^^^^^^^^^^ +src/CountHolder.rb:247:15: C: Style/GlobalVars: Do not introduce global variables. + pc_list = $point_counter[nick] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:252:21: C: Style/GlobalVars: Do not introduce global variables. + next unless $point_counter["#{nick},#{pc_o}"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:257:14: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{check_name},#{tag},0"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:258:35: C: Style/GlobalVars: Do not introduce global variables. + sort_pc[check_name] = $point_counter["#{check_name},#{tag},0"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:260:14: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{check_name},#{tag},1"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:261:35: C: Style/GlobalVars: Do not introduce global variables. + sort_pc[check_name] = $point_counter["#{check_name},#{tag},1"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:264:21: C: Style/GlobalVars: Do not introduce global variables. + tag_arr = $point_counter["#{nick},#{pc_o}"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:267:16: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{check_name},0"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:268:38: C: Style/GlobalVars: Do not introduce global variables. + tag_out += "$tag_o(" + $point_counter["#{check_name},0"] + ") " + ^^^^^^^^^^^^^^ +src/CountHolder.rb:270:16: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{check_name},1"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:271:40: C: Style/GlobalVars: Do not introduce global variables. + tag_out += "#{tag_o}[" + $point_counter["#{check_name},1"] + "] " + ^^^^^^^^^^^^^^ +src/CountHolder.rb:288:14: C: Style/GlobalVars: Do not introduce global variables. + if $pc_name[1] + ^^^^^^^^ +src/CountHolder.rb:289:16: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{pc_o},#{tag},0"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:290:51: C: Style/GlobalVars: Do not introduce global variables. + out_pc += "#{pc_name[1].upcase}(" + $point_counter["#{pc_o},#{tag},0"] + ")" + ^^^^^^^^^^^^^^ +src/CountHolder.rb:292:16: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{pc_o},#{tag},1"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:293:51: C: Style/GlobalVars: Do not introduce global variables. + out_pc += "#{pc_name[1].upcase}[" + $point_counter["#{pc_o},#{tag},1"] + "]" + ^^^^^^^^^^^^^^ +src/CountHolder.rb:296:16: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{pc_o},#{tag},0"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:297:51: C: Style/GlobalVars: Do not introduce global variables. + out_pc += "#{pc_name[0].upcase}(" + $point_counter["#{pc_o},#{tag},0"] + ")" + ^^^^^^^^^^^^^^ +src/CountHolder.rb:299:16: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{pc_o},#{tag},1"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:300:51: C: Style/GlobalVars: Do not introduce global variables. + out_pc += "#{pc_name[0].upcase}[" + $point_counter["#{pc_o},#{tag},1"] + "]" + ^^^^^^^^^^^^^^ +src/CountHolder.rb:307:7: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if $point_counter["$nick,"] + ^^ +src/CountHolder.rb:307:10: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["$nick,"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:308:19: C: Style/GlobalVars: Do not introduce global variables. + tag_arr = $point_counter["$nick,"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:312:14: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{check_name},0"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:313:38: C: Style/GlobalVars: Do not introduce global variables. + tag_out += "#{tag_o}(" + $point_counter["#{check_name},0"] + ") " + ^^^^^^^^^^^^^^ +src/CountHolder.rb:315:14: C: Style/GlobalVars: Do not introduce global variables. + if $point_counter["#{check_name},1"] + ^^^^^^^^^^^^^^ +src/CountHolder.rb:316:38: C: Style/GlobalVars: Do not introduce global variables. + tag_out += "#{tag_o}[" + $point_counter["#{check_name},1"] + "] " + ^^^^^^^^^^^^^^ +src/CountHolder.rb:404:12: C: Style/GlobalVars: Do not introduce global variables. + unless $point_counter.include?(key) + ^^^^^^^^^^^^^^ +src/CountHolder.rb:406:7: C: Style/GlobalVars: Do not introduce global variables. + $point_counter[key] = data + ^^^^^^^^^^^^^^ +src/CountHolder.rb:412:16: C: Style/GlobalVars: Do not introduce global variables. + cnt_list = $point_counter[key] + ^^^^^^^^^^^^^^ +src/createExe.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!/bin/ruby -Ku ... +^^^^^^^^^^^^^^^ +src/dice/AddDice.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/dice/AddDice.rb:161:43: C: Style/GlobalVars: Do not introduce global variables. + return emptyResult if dice_max > $DICE_MAXNUM + ^^^^^^^^^^^^ +src/dice/RerollDice.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/dice/RerollDice.rb:86:24: C: Style/GlobalVars: Do not introduce global variables. + if output.length > $SEND_STR_MAX # 長すぎたときの救済 + ^^^^^^^^^^^^^ +src/dice/UpperDice.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/dice/UpperDice.rb:74:24: C: Style/GlobalVars: Do not introduce global variables. + if output.length > $SEND_STR_MAX + ^^^^^^^^^^^^^ +src/diceBot/AceKillerGene.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/AFF2e.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Airgetlamh.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Airgetlamh.rb:54:64: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)?A(A|L)(\d+)?((x|\*)(\d+)(\+(\d+))?)?(C(\d+))?$/i === command + ^^^ +src/diceBot/Alsetto.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Alsetto.rb:49:46: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)AL(C|G)?(\d+)?((x|\*)(\d+))?$/i === command + ^^^ +src/diceBot/Alsetto.rb:55:9: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if Regexp.last_match(2) == "G" + ^^ +src/diceBot/Alshard.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Alter_raise.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Amadeus.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Amadeus_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Arianrhod.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ArsMagica.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ArsMagica.rb:153:26: C: Style/GlobalVars: Do not introduce global variables. + output += "#{die $bonus} > #{total}" + ^^^^^^ +src/diceBot/Avandner.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Avandner.rb:45:58: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)AV(\d+)((x|\*)(\d+))?(\+(\d+))?(C(\d+))?$/i === command + ^^^ +src/diceBot/BadLife.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BarnaKronika.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BattleTech.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BattleTech.rb:50:21: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /^(\d+)(.+)/ === command + ^^^ +src/diceBot/BattleTech.rb:122:35: C: Style/GlobalVars: Do not introduce global variables. + if totalResultText.length >= $SEND_STR_MAX + ^^^^^^^^^^^^^ +src/diceBot/BeastBindTrinity.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BeginningIdol.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BeginningIdol.rb:2257:55: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return text, skill unless /チャンスが(\d{1,2})以下ならオフ。/ === text + ^^^ +src/diceBot/BeginningIdol_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BeginningIdol_Korean.rb:2107:55: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return text, skill unless /チャンスが(\d{1,2})以下なら오프。/ === text + ^^^ +src/diceBot/BladeOfArcana.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BlindMythos.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BlindMythos.rb:255:35: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^RP(\d+)/i === command + ^^^ +src/diceBot/BloodCrusade.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/BloodMoon.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/CardRanker.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ChaosFlare.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Chill.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Chill3.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/CodeLayerd.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ColossalHunter.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ColossalHunter.rb:46:63: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(\d+)?CH([\+\-\d]*)(>=([\+\-\d]*))?$/i === command + ^^^ +src/diceBot/ColossalHunter.rb:106:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^B6T$/ === command + ^^^ +src/diceBot/ColossalHunter.rb:203:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^CNP$/ === command + ^^^ +src/diceBot/CrashWorld.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu.rb:152:11: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if total_n <= diff_special + ^^ +src/diceBot/Cthulhu7th.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu7th.rb:180:28: C: Style/IfInsideElse: Convert if nested inside else to elsif. + return fumble_text if fumbleable + ^^ +src/diceBot/Cthulhu7th_ChineseTraditional.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu7th_ChineseTraditional.rb:130:28: C: Style/IfInsideElse: Convert if nested inside else to elsif. + return fumble_text if fumbleable + ^^ +src/diceBot/Cthulhu7th_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu7th_Korean.rb:127:28: C: Style/IfInsideElse: Convert if nested inside else to elsif. + return fumble_text if fumbleable + ^^ +src/diceBot/CthulhuTech.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu_ChineseTraditional.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu_ChineseTraditional.rb:155:11: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if total_n <= diff_special + ^^ +src/diceBot/Cthulhu_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Cthulhu_Korean.rb:153:11: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if total_n <= diff_special + ^^ +src/diceBot/DarkBlaze.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DarkDaysDrive.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DarkDaysDrive.rb:131:47: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if item.is_a?(String) && (/^(\d+):(.*)/ === item) + ^^^ +src/diceBot/DarkSouls.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DeadlineHeroes.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DemonParasite.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DetatokoSaga.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DetatokoSaga_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DiceBot.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DiceBot.rb:64:3: C: Style/ClassVars: Replace class var @@bcdice with a class instance var. + @@bcdice = nil + ^^^^^^^^ +src/diceBot/DiceBot.rb:180:5: C: Style/ClassVars: Replace class var @@bcdice with a class instance var. + @@bcdice = b + ^^^^^^^^ +src/diceBot/DiceBot.rb:499:34: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + /^get.+DiceCommandResult$/ === method.to_s + ^^^ +src/diceBot/DiceBot.rb:569:47: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if item.is_a?(String) && (/^(\d+):(.*)/ === item) + ^^^ +src/diceBot/DiceBotLoader.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DiceBotLoader.rb:38:22: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + BOT_NAME_PATTERN === gameType && + ^^^ +src/diceBot/DiceBotLoader.rb:94:43: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + select { |botName| BOT_NAME_PATTERN === botName } + ^^^ +src/diceBot/DiceBotLoader.rb:227:25: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + @gameTitlePattern === gameTitle + ^^^ +src/diceBot/DiceBotLoaderList.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DiceOfTheDead.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DoubleCross.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/DoubleCross.rb:174:32: C: Style/GlobalVars: Do not introduce global variables. + return long_str.length > $SEND_STR_MAX ? to_s_short : long_str + ^^^^^^^^^^^^^ +src/diceBot/Dracurouge.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Dracurouge.rb:58:45: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^DR(\d*)(\+(\d+))?$/ === command + ^^^ +src/diceBot/Dracurouge.rb:119:36: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^DRR(\d+)$/ === command + ^^^ +src/diceBot/Dracurouge.rb:131:46: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^RT((\w\d*)(\w\d*))?/ === command + ^^^ +src/diceBot/Dracurouge.rb:142:47: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^HRT((\w\d*)(\w\d*))?/ === command + ^^^ +src/diceBot/Dracurouge.rb:1253:35: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^CT(\d+)$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1302:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^ST$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1310:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^PN$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1328:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^CO$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1338:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^CA$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1348:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^EP$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1358:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^OS$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1368:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^RS$/ === command + ^^^ +src/diceBot/Dracurouge.rb:1378:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^PP$/ === command + ^^^ +src/diceBot/Dracurouge_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Dracurouge_Korean.rb:60:45: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^DR(\d*)(\+(\d+))?$/ === command + ^^^ +src/diceBot/Dracurouge_Korean.rb:121:36: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^DRR(\d+)$/ === command + ^^^ +src/diceBot/Dracurouge_Korean.rb:132:40: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^RT((\w)(\w))?/ === command.upcase + ^^^ +src/diceBot/Dracurouge_Korean.rb:227:35: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^CT(\d+)$/ === command.upcase + ^^^ +src/diceBot/DungeonsAndDragons.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EarthDawn.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EarthDawn3.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EarthDawn4.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EclipsePhase.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Elric.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Elysion.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EmbryoMachine.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EndBreaker.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/EndBreaker.rb:32:19: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)EB/i === command + ^^^ +src/diceBot/EtrianOdysseySRS.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/FilledWith.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/FilledWith.rb:114:53: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d[\+\-\d]*)-(\d+)FW(\@(\d+))?(\#(\d+))?/i === command + ^^^ +src/diceBot/FilledWith.rb:119:58: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + elsif /(\d+)FW(\@(\d+))?(\#(\d+))?(<=([\+\-\d]*))?/i === command + ^^^ +src/diceBot/FilledWith.rb:429:45: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /TRS(\d+)([\+\-]\d)?/ === command + ^^^ +src/diceBot/FilledWith.rb:562:39: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /TRAP(E|N|H|L)/ === command + ^^^ +src/diceBot/FilledWith.rb:614:38: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /ROP(E|N|H|L)/ === command + ^^^ +src/diceBot/FilledWith.rb:692:32: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /RAND(E|N|H|L)([1-6])?/ === command + ^^^ +src/diceBot/FilledWith.rb:697:35: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + elsif /RENC(E|N|H|L)([1-6])?/ === command + ^^^ +src/diceBot/FilledWith.rb:1199:44: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /RED(E|N|H|L)(256|265|465|665|666)/ === command + ^^^ +src/diceBot/FilledWith.rb:1204:41: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + elsif /RED(E|N|H|L)([1-6])4([1-6])/ === command + ^^^ +src/diceBot/FullMetalPanic.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/FutariSousa.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/FutariSousa.rb:253:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return command if /^\s/ === command + ^^^ +src/diceBot/Garako.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GardenOrder.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GehennaAn.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GeishaGirlwithKatana.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GoldenSkyStories.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Gorilla.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GranCrest.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Gundog.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GundogRevised.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GundogZero.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Gurps.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Gurps.rb:102:57: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /([\d\+\-]+)\-3[dD]6?([\d\+\-]*)/ === command + ^^^ +src/diceBot/Gurps.rb:119:38: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /\w*(FMB|CRT)/ === command + ^^^ +src/diceBot/Gurps.rb:279:41: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /FEAR((\+)?\d+)?/ === command + ^^^ +src/diceBot/Gurps.rb:337:44: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /REACT((\+|\-)?\d*)/ === command + ^^^ +src/diceBot/Gurps.rb:367:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "HIT" === command + ^^^ +src/diceBot/GurpsFW.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/GurpsFW.rb:472:9: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if mode == "N" + ^^ +src/diceBot/HarnMaster.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/HarnMaster.rb:105:18: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless /^\*/ === part + ^^^ +src/diceBot/HarnMaster.rb:120:18: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless /\+$/ === part + ^^^ +src/diceBot/HatsuneMiku.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/HatsuneMiku.rb:79:43: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + diceCount = skillRank.to_i if /^\d+$/ === skillRank + ^^^ +src/diceBot/HatsuneMiku.rb:172:47: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if item.is_a?(String) && (/^(\d+):(.*)/ === item) + ^^^ +src/diceBot/Hieizan.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/HouraiGakuen.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/HouraiGakuen.rb:97:21: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return diceList === [6, 6, 6] + ^^^ +src/diceBot/HouraiGakuen.rb:101:21: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return diceList === [1, 2, 3] + ^^^ +src/diceBot/HuntersMoon.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Illusio.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Illusio.rb:39:73: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)?IL([1-6])?([1-6])?([1-6])?([1-6])?([1-6])?([1-6])?(P)?$/i === command + ^^^ +src/diceBot/InfiniteFantasia.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Insane.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Insane_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/IthaWenUa.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/JamesBond.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Kamigakari.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Kamigakari.rb:175:14: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /\+n/ === result + ^^^ +src/diceBot/Kamigakari.rb:208:15: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /\*\*/ === result + ^^^ +src/diceBot/Kamigakari_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Kamigakari_Korean.rb:343:14: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /\+n/ === result + ^^^ +src/diceBot/Kamigakari_Korean.rb:376:15: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /\*\*/ === result + ^^^ +src/diceBot/KanColle.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/KemonoNoMori.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/KillDeathBusiness.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/KillDeathBusiness.rb:83:27: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless JUDGE_DICE_REG === command + ^^^ +src/diceBot/KillDeathBusiness_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/KillDeathBusiness_Korean.rb:126:27: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless JUDGE_DICE_REG === command + ^^^ +src/diceBot/KurayamiCrying.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/LiveraDoll.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/LogHorizon.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/LogHorizon.rb:74:61: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(\d+)LH([\+\-\d]*)(>=([\+\-\d]*))?/i === command + ^^^ +src/diceBot/LogHorizon.rb:138:70: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(P|E|G|C|ES|CS)CT(\d+)?([\+\-\d]*)(\$(\d+))?/ === command + ^^^ +src/diceBot/LogHorizon.rb:1388:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "PTAG" === command + ^^^ +src/diceBot/LogHorizon.rb:1443:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "KOYU" === command + ^^^ +src/diceBot/LogHorizon.rb:1498:36: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /MGR([1-3])/ === command + ^^^ +src/diceBot/LogHorizon.rb:1657:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "HLOC" === command + ^^^ +src/diceBot/LogHorizon.rb:1709:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "PCNM" === command + ^^^ +src/diceBot/LogHorizon.rb:1763:40: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /IAT([ABMDLT]*)/ === command + ^^^ +src/diceBot/LogHorizon.rb:1821:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless command === "TIAS" + ^^^ +src/diceBot/LogHorizon.rb:1872:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless command === "ABDC" + ^^^ +src/diceBot/LogHorizon.rb:1939:34: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /MII(\d?)/ === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/LogHorizon_Korean.rb:73:61: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(\d+)LH([\+\-\d]*)(>=([\+\-\d]*))?/i === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:137:70: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /(P|E|G|C|ES|CS)CT(\d+)?([\+\-\d]*)(\$(\d+))?/ === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:743:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "PTAG" === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:798:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "KOYU" === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:853:36: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /MGR([1-3])/ === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:1012:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "HLOC" === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:1064:30: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless "PCNM" === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:1118:40: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /IAT([ABMDLT]*)/ === command + ^^^ +src/diceBot/LogHorizon_Korean.rb:1176:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless command === "TIAS" + ^^^ +src/diceBot/LogHorizon_Korean.rb:1227:31: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless command === "ABDC" + ^^^ +src/diceBot/LogHorizon_Korean.rb:1294:34: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /MII(\d?)/ === command + ^^^ +src/diceBot/LostRecord.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/LostRoyal.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MagicaLogia.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MeikyuDays.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MeikyuKingdom.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MeikyuKingdomBasic.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MetalHead.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MetalHeadExtream.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MetallicGuadian.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MonotoneMuseum.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/MonotoneMuseum_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Nechronica.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Nechronica_Korean.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/NightmareHunterDeep.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/NightWizard.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/NightWizard3rd.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/NinjaSlayer.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/NjslyrBattle.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Nuekagami.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/OneWayHeroics.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/OneWayHeroics.rb:85:59: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^(\d*)JD(\d*)(\+(\d*))?(,(\d+))?$/ === command + ^^^ +src/diceBot/OneWayHeroics.rb:168:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return command if /^\s/ === command + ^^^ +src/diceBot/OneWayHeroics.rb:204:36: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^RET(\d+)$/ === command + ^^^ +src/diceBot/OneWayHeroics.rb:227:37: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^RETP(\d+)$/ === command + ^^^ +src/diceBot/OneWayHeroics.rb:254:37: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^DNGN(\d+)$/ === command + ^^^ +src/diceBot/OneWayHeroics.rb:282:38: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^DNGNP(\d+)$/ === command + ^^^ +src/diceBot/OrgaRain.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/OrgaRain.rb:37:69: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(\d+)?OR([0-9])?([0-9])?([0-9])?([0-9])?([0-9])?([0-9])?$/i === command + ^^^ +src/diceBot/Oukahoushin3rd.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Paradiso.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Paranoia.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ParasiteBlood.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Pathfinder.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Peekaboo.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Pendragon.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/PhantasmAdventure.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Postman.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/PulpCthulhu.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Raisondetre.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Raisondetre.rb:46:40: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /(-)?(\d+)?RD(\d+)?(@(\d+))?$/i === command + ^^^ +src/diceBot/Raisondetre.rb:54:48: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + elsif /(-)?(\d+)?DD([1-9])?([\+\-]\d+)?$/i === command + ^^^ +src/diceBot/RecordOfSteam.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/RecordOfSteam.rb:54:24: C: Style/GlobalVars: Do not introduce global variables. + if output.length > $SEND_STR_MAX + ^^^^^^^^^^^^^ +src/diceBot/RokumonSekai2.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/RoleMaster.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/RuneQuest.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Ryutama.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Ryutama.rb:33:53: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless /^R(\d+)(,(\d+))?([\+\-\d]+)?(>=(\d+))?/ === command + ^^^ +src/diceBot/Satasupe.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Satasupe.rb:241:67: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return result unless /([A-Za-z]+)(\d+)?(([+]|[-]|[=])(\d+))?/ === command + ^^^ +src/diceBot/ScreamHighSchool.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SevenFortressMobius.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ShadowRun.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ShadowRun4.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ShadowRun5.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SharedFantasia.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SharedFantasia.rb:61:9: C: Style/IfInsideElse: Convert if nested inside else to elsif. + if critical + ^^ +src/diceBot/ShinkuuGakuen.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ShinkuuGakuen.rb:42:67: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless /(^|\s)(S)?(#{prefixesRegText})([\d\+\-]*)(>=(\d+))?/i === command + ^^^ +src/diceBot/ShinMegamiTenseiKakuseihen.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ShinobiGami.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ShoujoTenrankai.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Skynauts.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Skynauts.rb:249:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return text unless /成功/ === text + ^^^ +src/diceBot/Skynauts.rb:271:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return text unless /成功/ === text + ^^^ +src/diceBot/Skynauts.rb:306:47: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + next unless /[^\d]*(\d+),[^\d]*(\d+)/ === point + ^^^ +src/diceBot/SRS.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/StellarKnights.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SterileLife.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/StrangerOfSwordCity.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/StrangerOfSwordCity.rb:50:62: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return result unless /^(\d+)SR([\+\-]?\d+)?(>=(\d+))?$/i === command + ^^^ +src/diceBot/StratoShout.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Strave.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SwordWorld.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SwordWorld.rb:171:19: C: Style/GlobalVars: Do not introduce global variables. + limitLength = $SEND_STR_MAX - output.length + ^^^^^^^^^^^^^ +src/diceBot/SwordWorld2_0.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/SwordWorld2_0.rb:95:15: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if regexp === string + ^^^ +src/diceBot/SwordWorld2_0.rb:132:15: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if regexp === string + ^^^ +src/diceBot/SwordWorld2_0.rb:167:17: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if /@(\d+)/ === string + ^^^ +src/diceBot/SwordWorld2_5.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TherapieSein.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TokumeiTenkousei.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TokyoGhostResearch.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TokyoNova.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Torg.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Torg1_5.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TrinitySeven.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TunnelsAndTrolls.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/TwilightGunsmoke.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Utakaze.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Villaciel.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/WaresBlade.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/Warhammer.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/WARPS.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/WitchQuest.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/WorldOfDarkness.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/YankeeYogSothoth.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/YankeeYogSothoth.rb:217:47: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + if item.is_a?(String) && (/^(\d+):(.*)/ === item) + ^^^ +src/diceBot/YearZeroEngine.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ZettaiReido.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/ZettaiReido.rb:25:59: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + return nil unless /^(\d+)-2DR([\+\-\d]*)(>=(\d+))?$/i === command + ^^^ +src/diceBot/_InsaneScp.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/diceBot/_Template.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/IniFile.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/irc/encode.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/irc/encode.rb:77:5: C: Style/AccessModifierDeclarations: private should not be inlined in method definitions. + private :get_kconv_encoding + ^^^^^^^ +src/irc/ircBot.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!ruby -Ku ... +^^^^^^^^^^ +src/irc/ircBot.rb:15:25: C: Style/GlobalVars: Do not introduce global variables. + @loginChannelList = $defaultLoginChannelsText.split(',') + ^^^^^^^^^^^^^^^^^^^^^^^^^ +src/irc/ircBot.rb:46:27: C: Style/GlobalVars: Do not introduce global variables. + channelNames = encode($ircCode, channelNames) + ^^^^^^^^ +src/irc/ircBot.rb:57:23: C: Style/GlobalVars: Do not introduce global variables. + post(JOIN, encode($ircCode, @room)) + ^^^^^^^^ +src/irc/ircBot.rb:84:19: C: Style/GlobalVars: Do not introduce global variables. + mode(encode($ircCode, channel), "+o", nick_e); # matches hostmask. + ^^^^^^^^ +src/irc/ircBot.rb:95:17: C: Style/GlobalVars: Do not introduce global variables. + join(encode($ircCode, channel)) + ^^^^^^^^ +src/irc/ircBot.rb:96:18: C: Style/GlobalVars: Do not introduce global variables. + topic(encode($ircCode, channel)) + ^^^^^^^^ +src/irc/ircBot.rb:208:29: C: Style/GlobalVars: Do not introduce global variables. + diff = newNick.length - $ircNickMaxLength + ^^^^^^^^^^^^^^^^^ +src/irc/ircBot.rb:233:23: C: Style/GlobalVars: Do not introduce global variables. + post(QUIT, encode($ircCode, $quitMessage)) + ^^^^^^^^ +src/irc/ircBot.rb:233:33: C: Style/GlobalVars: Do not introduce global variables. + post(QUIT, encode($ircCode, $quitMessage)) + ^^^^^^^^^^^^ +src/irc/ircBot.rb:267:17: C: Style/GlobalVars: Do not introduce global variables. + to = encode($ircCode, to) + ^^^^^^^^ +src/irc/ircBot.rb:268:29: C: Style/GlobalVars: Do not introduce global variables. + encodedMessage = encode($ircCode, message) + ^^^^^^^^ +src/irc/ircBot.rb:278:26: C: Style/GlobalVars: Do not introduce global variables. + if message.length <= $SEND_STR_MAX + ^^^^^^^^^^^^^ +src/irc/ircBot.rb:288:27: C: Style/GlobalVars: Do not introduce global variables. + if result.length > ($SEND_STR_MAX * index) + ^^^^^^^^^^^^^ +src/irc/ircBot.rb:298:29: C: Style/GlobalVars: Do not introduce global variables. + post(NOTICE, to, encode($ircCode, message)) + ^^^^^^^^ +src/irc/ircBot.rb:302:30: C: Style/GlobalVars: Do not introduce global variables. + post(PRIVMSG, to, encode($ircCode, message)) + ^^^^^^^^ +src/irc/ircBot.rb:307:26: C: Style/GlobalVars: Do not introduce global variables. + ircBot = IrcClient.new($server, $port, { + ^^^^^^^ +src/irc/ircBot.rb:307:35: C: Style/GlobalVars: Do not introduce global variables. + ircBot = IrcClient.new($server, $port, { + ^^^^^ +src/irc/ircBot.rb:308:37: C: Style/GlobalVars: Do not introduce global variables. + :nick => $nick, :user => $userName, :real => $ircName + ^^^^^ +src/irc/ircBot.rb:308:53: C: Style/GlobalVars: Do not introduce global variables. + :nick => $nick, :user => $userName, :real => $ircName + ^^^^^^^^^ +src/irc/ircBot.rb:308:73: C: Style/GlobalVars: Do not introduce global variables. + :nick => $nick, :user => $userName, :real => $ircName + ^^^^^^^^ +src/irc/ircBot.rb:310:55: C: Style/GlobalVars: Do not introduce global variables. + debug("$server, $port, $nick, $userName, $ircName", $server, $port, $nick, $userName, $ircName) + ^^^^^^^ +src/irc/ircBot.rb:310:64: C: Style/GlobalVars: Do not introduce global variables. + debug("$server, $port, $nick, $userName, $ircName", $server, $port, $nick, $userName, $ircName) + ^^^^^ +src/irc/ircBot.rb:310:71: C: Style/GlobalVars: Do not introduce global variables. + debug("$server, $port, $nick, $userName, $ircName", $server, $port, $nick, $userName, $ircName) + ^^^^^ +src/irc/ircBot.rb:310:78: C: Style/GlobalVars: Do not introduce global variables. + debug("$server, $port, $nick, $userName, $ircName", $server, $port, $nick, $userName, $ircName) + ^^^^^^^^^ +src/irc/ircBot.rb:310:89: C: Style/GlobalVars: Do not introduce global variables. + debug("$server, $port, $nick, $userName, $ircName", $server, $port, $nick, $userName, $ircName) + ^^^^^^^^ +src/irc/ircBot.rb:312:10: C: Style/GlobalVars: Do not introduce global variables. + room = $defaultLoginChannelsText.split(',').first + ^^^^^^^^^^^^^^^^^^^^^^^^^ +src/irc/ircBot.rb:315:25: C: Style/GlobalVars: Do not introduce global variables. + ircBot.setGameByTitle($defaultGameType) + ^^^^^^^^^^^^^^^^ +src/irc/ircBot.rb:317:10: C: Style/GlobalVars: Do not introduce global variables. + unless $extraCardFileName.empty? + ^^^^^^^^^^^^^^^^^^ +src/irc/ircBot.rb:318:26: C: Style/GlobalVars: Do not introduce global variables. + ircBot.readExtraCard($extraCardFileName) + ^^^^^^^^^^^^^^^^^^ +src/irc/ircLib.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +#!ruby -Ks ... +^^^^^^^^^^ +src/irc/ircLib.rb:26:9: W: Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError? + rescue Exception => e ... + ^^^^^^^^^^^^^^^^^^^^^ +src/irc/ircLib.rb:45:21: W: Lint/AssignmentInCondition: Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. + while l = @socket.gets + ^ +src/irc/ircLib.rb:48:37: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + next if on_message(m) === true + ^^^ +src/irc/ircLib.rb:56:11: W: Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError? + rescue Exception => e ... + ^^^^^^^^^^^^^^^^^^^^^ +src/irc/ircLib.rb:63:7: W: Lint/HandleExceptions: Do not suppress exceptions. + rescue IOError + ^^^^^^^^^^^^^^ +src/irc/torgtaitaiIRC.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/log.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/log.rb:5:9: C: Style/GlobalVars: Do not introduce global variables. + print($RUBY18_WIN ? text.tosjis : text) + ^^^^^^^^^^^ +src/log.rb:11:8: C: Style/GlobalVars: Do not introduce global variables. + puts($RUBY18_WIN ? line.tosjis : line) + ^^^^^^^^^^^ +src/log.rb:18:17: C: Style/GlobalVars: Do not introduce global variables. + return unless $isDebug + ^^^^^^^^ +src/TableFileData.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/TableFileData.rb:147:50: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless /^[\s ]*([^::]+)[\s ]*[::][\s ]*(.+)/ === line + ^^^ +src/TableFileData.rb:168:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + next unless /.*_(.+)/ === fileName + ^^^ +src/TableFileData.rb:172:42: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + next unless /^(s|S)?#{key}(\s|$)/i === arg + ^^^ +src/TableFileData.rb:299:29: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + unless /^[a-zA-Z\d]+$/ === command + ^^^ +src/test/data/test.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +load(File.expand_path('../../test.rb', File.dirname(__FILE__))) ... +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +src/test/DiceBotTest.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/DiceBotTest.rb:23:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = !@dataIndex.nil? + ^^^^^^^^ +src/test/DiceBotTest.rb:45:18: C: Style/GlobalVars: Do not introduce global variables. + errorLog = $RUBY18_WIN ? @errorLog.map(&:tosjis) : @errorLog + ^^^^^^^^^^^ +src/test/DiceBotTest.rb:67:20: C: Style/CaseEquality: Avoid the use of the case equality operator ===. + next if /^_/ === File.basename(filename) + ^^^ +src/test/DiceBotTest.rb:105:3: C: Style/AccessModifierDeclarations: private should not be inlined in method definitions. + private :readTestDataSet + ^^^^^^^ +src/test/DiceBotTest.rb:170:3: C: Style/AccessModifierDeclarations: private should not be inlined in method definitions. + private :logTextForUnexpected + ^^^^^^^ +src/test/DiceBotTest.rb:189:3: C: Style/AccessModifierDeclarations: private should not be inlined in method definitions. + private :logTextForException + ^^^^^^^ +src/test/DiceBotTest.rb:204:3: C: Style/AccessModifierDeclarations: private should not be inlined in method definitions. + private :indent + ^^^^^^^ +src/test/DiceBotTestData.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testArgs.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testArgs.rb:12:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = false + ^^^^^^^^ +src/test/others/testArgs.rb:16:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = true + ^^^^^^^^ +src/test/others/testArgs.rb:23:18: C: Style/GlobalVars: Do not introduce global variables. + assert_equal($server, 'irc.trpg.net') + ^^^^^^^ +src/test/others/testArgs.rb:24:18: C: Style/GlobalVars: Do not introduce global variables. + assert_equal($port, '6667') + ^^^^^ +src/test/others/testArgs.rb:25:18: C: Style/GlobalVars: Do not introduce global variables. + assert_equal($defaultLoginChannelsText, '#OnlineTRPG') + ^^^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testArgs.rb:26:18: C: Style/GlobalVars: Do not introduce global variables. + assert_equal($defaultGameType, 'Cthulhu') + ^^^^^^^^^^^^^^^^ +src/test/others/testArgs.rb:27:18: C: Style/GlobalVars: Do not introduce global variables. + assert_equal($nick, 'fDICE_CoC') + ^^^^^ +src/test/others/testCard.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testCard.rb:10:1: C: Style/GlobalVars: Do not introduce global variables. +$isDebug = false +^^^^^^^^ +src/test/others/testCard.rb:14:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = false + ^^^^^^^^ +src/test/others/testCard.rb:483:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = true + ^^^^^^^^ +src/test/others/testIniFile.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testIniFile.rb:11:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = false + ^^^^^^^^ +src/test/others/testIniFile.rb:28:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = true + ^^^^^^^^ +src/test/others/testPointer.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testPointer.rb:9:1: C: Style/GlobalVars: Do not introduce global variables. +$isDebug = false +^^^^^^^^ +src/test/others/testPointer.rb:13:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = false + ^^^^^^^^ +src/test/others/testPointer.rb:14:5: C: Style/GlobalVars: Do not introduce global variables. + $isRollVoidDiceAtAnyRecive = false + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testPointer.rb:24:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = true + ^^^^^^^^ +src/test/others/testSecretDice.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/others/testSecretDice.rb:9:1: C: Style/GlobalVars: Do not introduce global variables. +$isDebug = false +^^^^^^^^ +src/test/others/testSecretDice.rb:13:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = false + ^^^^^^^^ +src/test/others/testSecretDice.rb:81:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = true + ^^^^^^^^ +src/test/range_table_test.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/setup.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +if RUBY_VERSION > '1.8.x' ... +^^^^^^^^^^^^^^^^^^^^^^^^^ +src/test/testDiceBotLoaders.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/testDiceBotLoaders.rb:24:5: C: Style/GlobalVars: Do not introduce global variables. + $isDebug = false + ^^^^^^^^ +src/test/testDiceBotPrefixesCompatibility.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/testDiceBots.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +if RUBY_VERSION < '1.9' ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/testDiceBots.rb:2:3: C: Style/GlobalVars: Do not introduce global variables. + $KCODE = 'u' + ^^^^^^ +src/test/test_d66_table.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/test_detailed_rand_results.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/test_dicebot_info_is_defined.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test/test_srs_help_messages.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/test.rb:13:3: C: Style/GlobalVars: Do not introduce global variables. + $KCODE = 'u' + ^^^^^^ +src/test.rb:47:1: W: Lint/EmptyWhen: Avoid when branches without a body. +when 0 +^^^^^^ +src/utils/ArithmeticEvaluator.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# ... +^ +src/utils/d66_grid_table.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/utils/d66_table.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/utils/modifier_formatter.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/utils/normalize.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +module Normalize ... +^^^^^^^^^^^^^^^^ +src/utils/range_table.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ +src/utils/table.rb:1:1: C: Layout/EndOfLine: Carriage return character detected. +# -*- coding: utf-8 -*- ... +^^^^^^^^^^^^^^^^^^^^^^^ + +222 files inspected, 589 offenses detected diff --git a/src/bcdiceCore.rb b/src/bcdiceCore.rb index a357a4d55..cbe28ccab 100755 --- a/src/bcdiceCore.rb +++ b/src/bcdiceCore.rb @@ -1231,8 +1231,8 @@ def getD66Value(mode = nil) def getD66(isSwap) output = 0 - dice_a = rand(6) + 1 - dice_b = rand(6) + 1 + dice_a = rand(1..6) + dice_b = rand(1..6) debug("dice_a", dice_a) debug("dice_b", dice_b) diff --git a/src/diceBot/ArsMagica.rb b/src/diceBot/ArsMagica.rb index ce0f2e580..5eb7cb2d4 100644 --- a/src/diceBot/ArsMagica.rb +++ b/src/diceBot/ArsMagica.rb @@ -130,7 +130,7 @@ def arsmagica_stress(string, _nick_e) crit_dice = "" while die == 1 crit_mul *= 2 - die = rand(10) + 1 + die = rand(1..10) crit_dice += "#{die}," end total = die * crit_mul diff --git a/src/diceBot/GurpsFW.rb b/src/diceBot/GurpsFW.rb index 431b60877..73b8ba6ea 100644 --- a/src/diceBot/GurpsFW.rb +++ b/src/diceBot/GurpsFW.rb @@ -960,7 +960,7 @@ def getTrapTable(diff) end table = [ - "トライディザスター:宝箱から広範囲に火炎・冷気・電撃が放たれる。PC全員に火炎により#{['3D', '4D', '5D', '7D'][d]}の「叩き」ダメージ、冷気により#{['3D', '4D', '5D', '7D'][d]}の「叩き」ダメージ、電撃により#{['2D', '3D', '4D', '6D']}の「叩き」ダメージを与える(電撃は金属鎧の防護点無視)", + "トライディザスター:宝箱から広範囲に火炎・冷気・電撃が放たれる。PC全員に火炎により#{['3D', '4D', '5D', '7D'][d]}の「叩き」ダメージ、冷気により#{['3D', '4D', '5D', '7D'][d]}の「叩き」ダメージ、電撃により['2D', '3D', '4D', '6D']の「叩き」ダメージを与える(電撃は金属鎧の防護点無視)", "ペトロブラスター:宝箱を開けたキャラクターに《肉を石》をかける。技能レベルは#{['20', '22', '24', '30'][d]}。", "クロスボウストーム:宝箱から矢の嵐が放たれる罠。PC全員に#{['2D', '3D', '5D', '8D'][d]}の「刺し」ダメージを与える。盾の受動防御を無視した「よけ#{['', '-2', '-4', '-8'][d]}」で回避が可能。", "フォーチュンイーター:PC全員の幸運を食らい、フォーチュンを#{['1', '2', '3', '5'][d]}減少させる。フォーチュンが0の場合#{['3D', '6D', '9D', '15D'][d]}の防護点無視ダメージを受ける。", diff --git a/src/diceBot/MeikyuKingdom.rb b/src/diceBot/MeikyuKingdom.rb index f81861e1c..6b09215a7 100644 --- a/src/diceBot/MeikyuKingdom.rb +++ b/src/diceBot/MeikyuKingdom.rb @@ -926,7 +926,7 @@ def mk_name_table debug("mk_name_table begin") output = '1' # 名前表 - name_n = (rand(6) + 1) + name_n = rand(1..6) debug("name_n", name_n) d1 = d66(2) @@ -986,7 +986,7 @@ def mk_nick_a_table(output, num) if num < 66 output = get_table_by_number(num, table) + output else - output = "#{output}#{(rand(6) + 1)}世" + output = "#{output}#{rand(1..6)}世" end return output @@ -1137,7 +1137,7 @@ def mk_name_fa_table(num) # デバイスファクトリー(1D6) def mk_device_factory_table() - output = mk_item_decide_table(rand(6) + 1) + output = mk_item_decide_table(rand(1..6)) dice, = roll(2, 6) output = output + ' / ' + mk_item_features_table(dice) @@ -1367,7 +1367,7 @@ def mk_item_features_table(num) dice, = roll(2, 6) if num <= 2 - output = '「' + mk_item_power_table(rand(6) + 1) + '」の神力を宿す' + output = '「' + mk_item_power_table(rand(1..6)) + '」の神力を宿す' elsif num <= 3 output = '寿命を持つ。寿命の値を決定する。' + "\n" output += 'さらに、' + mk_item_features_table(dice) @@ -1376,22 +1376,22 @@ def mk_item_features_table(num) elsif num <= 5 output = '銘を持つ。銘を決定する。' elsif num <= 6 - output = '合成具である。もう1つの機能は「' + mk_item_decide_table(rand(6) + 1) + '」である。' + output = '合成具である。もう1つの機能は「' + mk_item_decide_table(rand(1..6)) + '」である。' elsif num <= 7 output = 'そのアイテムにレベルがあれば、レベルを1点上昇する。' + "\n" output += 'レベルが設定されていなければ、' + mk_item_features_table(dice) elsif num <= 8 output = '「' + mk_item_jyumon_table(dice) + '」の呪紋を持つ。' elsif num <= 9 - output = '「' + mk_item_jyuka_table(rand(6) + 1) + '」の呪禍を持つ。' + "\n" + output = '「' + mk_item_jyuka_table(rand(1..6)) + '」の呪禍を持つ。' + "\n" output += 'さらに、' + mk_item_features_table(dice) elsif num <= 10 output = '高価だ。価格を設定する。' elsif num <= 11 - output = '「条件:' + mk_item_aptitude_table(rand(6) + 1) + '」の適性を持つ。' + "\n" + output = '「条件:' + mk_item_aptitude_table(rand(1..6)) + '」の適性を持つ。' + "\n" output += 'さらに、' + mk_item_features_table(dice) else - output = '「' + mk_item_attribute_table(rand(6) + 1) + '」の属性を持つ。' + output = '「' + mk_item_attribute_table(rand(1..6)) + '」の属性を持つ。' end return '特性[' + num.to_s + ']:' + output @@ -1810,7 +1810,7 @@ def mk_artifact_placename_table(num) def mk_ls_decide_table(num) output = '' num.times do |_i| - output += "「" + mk_landscape_table(rand(6) + 1) + "」" + output += "「" + mk_landscape_table(rand(1..6)) + "」" end return output end diff --git a/src/diceBot/SRS.rb b/src/diceBot/SRS.rb index 1e6f8a69d..d518d65ec 100644 --- a/src/diceBot/SRS.rb +++ b/src/diceBot/SRS.rb @@ -124,10 +124,10 @@ def prepare_help_msg_for_aliases_for_srs_roll(aliases) @help_msg_for_aliases_for_srs_roll_without_target_value = aliases. - map { |a| + map do |a| "  例) #{a}      2d6[]と同じ(#{a}が2D6のショートカットコマンド)\n" \ "  例) #{a}+2[12,4]  2d6+2[12,4]と同じ(#{a}が2D6のショートカットコマンド)\n" - }. + end. join() return self diff --git a/src/test/data/TorgEternity.txt b/src/test/data/TorgEternity.txt index 48bdefe09..888f55f20 100644 --- a/src/test/data/TorgEternity.txt +++ b/src/test/data/TorgEternity.txt @@ -143,214 +143,214 @@ TorgEternity : (1R20) > 15[20,20,10,9]0 > 15(技能無7) rand:20/20,20/20,10/20,9/20 ============================ input: -RT[1...20] +RT0 output: TorgEternity : 成功レベル表[0] > Success - Standard. -rand:0/20 +rand: ============================ input: -Result[1...20] +Result4 output: TorgEternity : 成功レベル表[4] > Success - Standard. -rand:4/20 +rand: ============================ input: -Result[1...20] +Result5 output: TorgEternity : 成功レベル表[5] > Success - Good! -rand:5/20 +rand: ============================ input: -RT[1...20] +RT9 output: TorgEternity : 成功レベル表[9] > Success - Good! -rand:9/20 +rand: ============================ input: -RT[1...20] +RT10 output: TorgEternity : 成功レベル表[10] > Success - Outstanding!! -rand:10/20 +rand: ============================ input: -Result[1...20]-2 +Result1-2 output: TorgEternity : 成功レベル表[-1] > Failure. -rand:1/20 +rand: ============================ input: -RT[1...20]-2+4 +RT9-2+4 output: TorgEternity : 成功レベル表[11] > Success - Outstanding!! -rand:9/20 +rand: ============================ input: -DT[1...50]-8 +DT2-8 output: TorgEternity : ダメージ結果表[-6] > ノーダメージ -rand:2/50 +rand: ============================ input: -Damage[1...50]-8 +Damage3-8 output: TorgEternity : ダメージ結果表[-5] > 1ショック -rand:3/50 +rand: ============================ input: -Damage[1...50]-8 +Damage7-8 output: TorgEternity : ダメージ結果表[-1] > 1ショック -rand:7/50 +rand: ============================ input: -DT[1...50]-8 +DT8-8 output: TorgEternity : ダメージ結果表[0] > 2ショック -rand:8/50 +rand: ============================ input: -Damage[1...50] +Damage4 output: TorgEternity : ダメージ結果表[4] > 2ショック -rand:4/50 +rand: ============================ input: -Damage[1...50] +Damage5 output: TorgEternity : ダメージ結果表[5] > 1レベル負傷 + 2ショック -rand:5/50 +rand: ============================ input: -Damage[1...50] +Damage9 output: TorgEternity : ダメージ結果表[9] > 1レベル負傷 + 2ショック -rand:9/50 +rand: ============================ input: -DT[1...50] +DT10 output: TorgEternity : ダメージ結果表[10] > 2レベル負傷 + 4ショック -rand:10/50 +rand: ============================ input: -DT[1...50] +DT14 output: TorgEternity : ダメージ結果表[14] > 2レベル負傷 + 4ショック -rand:14/50 +rand: ============================ input: -Damage[1...50] +Damage15 output: TorgEternity : ダメージ結果表[15] > 3レベル負傷 + 6ショック -rand:15/50 +rand: ============================ input: -Damage[1...50] +Damage19 output: TorgEternity : ダメージ結果表[19] > 3レベル負傷 + 6ショック -rand:19/50 +rand: ============================ input: -DT[1...50] +DT20 output: TorgEternity : ダメージ結果表[20] > 4レベル負傷 + 8ショック -rand:20/50 +rand: ============================ input: -DT[1...50] +DT24 output: TorgEternity : ダメージ結果表[24] > 4レベル負傷 + 8ショック -rand:24/50 +rand: ============================ input: -Damage[1...50] +Damage25 output: TorgEternity : ダメージ結果表[25] > 5レベル負傷 + 10ショック -rand:25/50 +rand: ============================ input: -Damage[1...50] +Damage29 output: TorgEternity : ダメージ結果表[29] > 5レベル負傷 + 10ショック -rand:29/50 +rand: ============================ input: -DT[1...50] +DT30 output: TorgEternity : ダメージ結果表[30] > 6レベル負傷 + 12ショック -rand:30/50 +rand: ============================ input: -DT[1...50] +DT34 output: TorgEternity : ダメージ結果表[34] > 6レベル負傷 + 12ショック -rand:34/50 +rand: ============================ input: -Damage[1...50] +Damage35 output: TorgEternity : ダメージ結果表[35] > 7レベル負傷 + 14ショック -rand:35/50 +rand: ============================ input: -Damage[1...50] +Damage39 output: TorgEternity : ダメージ結果表[39] > 7レベル負傷 + 14ショック -rand:39/50 +rand: ============================ input: -DT[1...50] +DT40 output: TorgEternity : ダメージ結果表[40] > 8レベル負傷 + 16ショック -rand:40/50 +rand: ============================ input: -DT[1...50] +DT44 output: TorgEternity : ダメージ結果表[44] > 8レベル負傷 + 16ショック -rand:44/50 +rand: ============================ input: -Damage[1...50] +Damage45 output: TorgEternity : ダメージ結果表[45] > 9レベル負傷 + 18ショック -rand:45/50 +rand: ============================ input: -Damage[1...50] +Damage49 output: TorgEternity : ダメージ結果表[49] > 9レベル負傷 + 18ショック -rand:49/50 +rand: ============================ input: -DT[1...50] +DT50 output: TorgEternity : ダメージ結果表[50] > 10レベル負傷 + 20ショック -rand:50/50 +rand: ============================ input: -BT[1...80] +BT1 output: TorgEternity : ロールボーナス表[1] > Mishap!! -rand:1/80 +rand: ============================ input: -Bonus[1...80] +Bonus62 output: TorgEternity : ロールボーナス表[62] > 16 -rand:62/80 +rand: ============================ input: -Bonus[1...80]+2-4 +Bonus1+2-4 output: TorgEternity : ロールボーナス表[1] > Mishap!! -rand:1/80 +rand: ============================ input: -BT[1...80]+2-4 +BT21+2-4 output: TorgEternity : ロールボーナス表[21]-2 > 8[21]-2 > 6 -rand:21/80 +rand: ============================ input: 3BD+10 diff --git a/src/test/data/TorgEternity_LocalTest.txt b/src/test/data/TorgEternity_LocalTest.txt new file mode 100644 index 000000000..8ad533ec1 --- /dev/null +++ b/src/test/data/TorgEternity_LocalTest.txt @@ -0,0 +1,978 @@ +input: +TG14 +output: +TorgEternity : (1R20+14) > -4[6]+14 > 10 +rand:6/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -10[1]+14 > 4 +rand:1/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 2[15]+14 > 16 +rand:15/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 8[20,2]+14 > 22(技能無21) +rand:20/20,2/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 1[14]+14 > 15 +rand:14/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -6[3]+14 > 8 +rand:3/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 5[18]+14 > 19 +rand:18/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 0[12]+14 > 14 +rand:12/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -1[9]+14 > 13 +rand:9/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -4[5]+14 > 10 +rand:5/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > 6[19]+5 > 11 +rand:19/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -4[5]+5 > 1 +rand:5/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -6[4]+5 > -1 +rand:4/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -4[5]+5 > 1 +rand:5/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -6[4]+5 > -1 +rand:4/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > 10[20,13]+5 > 15(技能無12) +rand:20/20,13/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > 10[20,13]+5 > 15(技能無12) +rand:20/20,13/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -8[2]+5 > -3 +rand:2/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > 3[16]+5 > 8 +rand:16/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -2[8]+5 > 3 +rand:8/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[2] > Success - Standard. +rand:2/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[0] > Success - Standard. +rand:0/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[4] > Success - Standard. +rand:4/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[5] > Success - Good! +rand:5/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[7] > Success - Good! +rand:7/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[9] > Success - Good! +rand:9/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[10] > Success - Outstanding!! +rand:10/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[13] > Success - Outstanding!! +rand:13/20 +============================ +input: +RT[1...20]-2 +output: +TorgEternity : 成功レベル表[-1] > Failure. +rand:1/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[2] > Success - Standard. +rand:2/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[0] > Success - Standard. +rand:0/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[4] > Success - Standard. +rand:4/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[5] > Success - Good! +rand:5/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[7] > Success - Good! +rand:7/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[9] > Success - Good! +rand:9/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[10] > Success - Outstanding!! +rand:10/20 +============================ +input: +Result[1...20]-2+4 +output: +TorgEternity : 成功レベル表[11] > Success - Outstanding!! +rand:9/20 +============================ +input: +Result[1...20]-4 +output: +TorgEternity : 成功レベル表[-2] > Failure. +rand:2/20 +============================ +input: +DT[1...50]-11 +output: +TorgEternity : ダメージ結果表[-10] > ノーダメージ +rand:1/50 +============================ +input: +DT[1...50]-8 +output: +TorgEternity : ダメージ結果表[-6] > ノーダメージ +rand:2/50 +============================ +input: +DT[1...50]-8 +output: +TorgEternity : ダメージ結果表[-5] > 1ショック +rand:3/50 +============================ +input: +DT[1...50]-8 +output: +TorgEternity : ダメージ結果表[-1] > 1ショック +rand:7/50 +============================ +input: +DT[1...50]-8 +output: +TorgEternity : ダメージ結果表[0] > 2ショック +rand:8/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[4] > 2ショック +rand:4/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[5] > 1レベル負傷 + 2ショック +rand:5/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[9] > 1レベル負傷 + 2ショック +rand:9/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[10] > 2レベル負傷 + 4ショック +rand:10/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[14] > 2レベル負傷 + 4ショック +rand:14/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[15] > 3レベル負傷 + 6ショック +rand:15/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[19] > 3レベル負傷 + 6ショック +rand:19/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[20] > 4レベル負傷 + 8ショック +rand:20/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[24] > 4レベル負傷 + 8ショック +rand:24/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[25] > 5レベル負傷 + 10ショック +rand:25/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[29] > 5レベル負傷 + 10ショック +rand:29/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[30] > 6レベル負傷 + 12ショック +rand:30/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[34] > 6レベル負傷 + 12ショック +rand:34/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[35] > 7レベル負傷 + 14ショック +rand:35/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[39] > 7レベル負傷 + 14ショック +rand:39/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[40] > 8レベル負傷 + 16ショック +rand:40/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[44] > 8レベル負傷 + 16ショック +rand:44/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[45] > 9レベル負傷 + 18ショック +rand:45/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[49] > 9レベル負傷 + 18ショック +rand:49/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[50] > 10レベル負傷 + 20ショック +rand:50/50 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[1] > Mishap!! +rand:1/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[2] > -8 +rand:2/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[3] > -6 +rand:3/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[4] > -6 +rand:4/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[5] > -4 +rand:5/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[6] > -4 +rand:6/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[7] > -2 +rand:7/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[8] > -2 +rand:8/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[9] > -1 +rand:9/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[10] > -1 +rand:10/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[11] > 0 +rand:11/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[12] > 0 +rand:12/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[13] > 1 +rand:13/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[14] > 1 +rand:14/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[15] > 2 +rand:15/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[16] > 3 +rand:16/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[17] > 4 +rand:17/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[18] > 5 +rand:18/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[19] > 6 +rand:19/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[20] > 7 +rand:20/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[21] > 8 +rand:21/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[23] > 8 +rand:23/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[25] > 8 +rand:25/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[26] > 9 +rand:26/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[28] > 9 +rand:28/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[30] > 9 +rand:30/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[31] > 10 +rand:31/80 +============================ +input: +BT19 +output: +TorgEternity : ロールボーナス表[19] > 6 +rand: +============================ +input: +BT20 +output: +TorgEternity : ロールボーナス表[20] > 7 +rand: +============================ +input: +BT21 +output: +TorgEternity : ロールボーナス表[21] > 8 +rand: +============================ +input: +BT24 +output: +TorgEternity : ロールボーナス表[24] > 8 +rand: +============================ +input: +BT25 +output: +TorgEternity : ロールボーナス表[25] > 8 +rand: +============================ +input: +BT26 +output: +TorgEternity : ロールボーナス表[26] > 9 +rand: +============================ +input: +BT30 +output: +TorgEternity : ロールボーナス表[30] > 9 +rand: +============================ +input: +BT31 +output: +TorgEternity : ロールボーナス表[31] > 10 +rand: +============================ +input: +BT60 +output: +TorgEternity : ロールボーナス表[60] > 15 +rand: +============================ +input: +BT61 +output: +TorgEternity : ロールボーナス表[61] > 16 +rand: +============================ +input: +BT100 +output: +TorgEternity : ロールボーナス表[100] > 23 +rand: +============================ +input: +BT101 +output: +TorgEternity : ロールボーナス表[101] > 24 +rand: +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[53] > 14 +rand:53/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[27] > 9 +rand:27/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[44] > 12 +rand:44/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[58] > 15 +rand:58/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[50] > 13 +rand:50/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[34] > 10 +rand:34/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[48] > 13 +rand:48/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[54] > 14 +rand:54/80 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[71] > 18 +rand:71/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[4]+1 > -6[4]+1 > -5 +rand:4/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[4]+1 > -6[4]+1 > -5 +rand:4/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[21]+1 > 8[21]+1 > 9 +rand:21/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[13]+1 > 1[13]+1 > 2 +rand:13/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[39]+1 > 11[39]+1 > 12 +rand:39/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[56]+1 > 15[56]+1 > 16 +rand:56/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[40]+1 > 11[40]+1 > 12 +rand:40/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[12]+1 > 0[12]+1 > 1 +rand:12/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[44]+1 > 12[44]+1 > 13 +rand:44/80 +============================ +input: +BT[1...80]+1 +output: +TorgEternity : ロールボーナス表[17]+1 > 4[17]+1 > 5 +rand:17/80 +============================ +input: +BT[1...80]+2-4 +output: +TorgEternity : ロールボーナス表[15]-2 > 2[15]-2 > 0 +rand:15/80 +============================ +input: +BT[1...80]+2-4 +output: +TorgEternity : ロールボーナス表[1] > Mishap!! +rand:1/80 +============================ +input: +3BD+10 +output: +TorgEternity : ボーナスダメージロール(3BD+10) > 19[5,1,5∞,5∞,3]+10 > 29ダメージ +rand:5/6, 1/6, 6/6, 6/6, 3/6 +============================ +input: +3BD+2-4 +output: +TorgEternity : ボーナスダメージロール(3BD-2) > 9[2,3,4]-2 > 7ダメージ +rand:2/6, 3/6, 4/6 +============================ +input: +3BD +output: +TorgEternity : ボーナスダメージロール(3BD) > 19[5,1,5∞,5∞,3] > 19ダメージ +rand:5/6, 1/6, 6/6, 6/6, 3/6 +============================ +input: +3BD +output: +TorgEternity : ボーナスダメージロール(3BD) > 9[2,3,4] > 9ダメージ +rand:2/6, 3/6, 4/6 +============================ +input: +0BD +output: +TorgEternity : エラーです。xBD (x≧1) として下さい +rand: +============================ +input: +-5BD +output: + +rand: +============================ +input: +TE7 +output: + +rand: +============================ +input: +TE-2 +output: + +rand: +============================ +input: +TE1+2+3 +output: + +rand: +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[1] > Mishap! 絶対失敗! +rand:1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[15] > +2[15] +rand:15/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,20,11] > +12[41](技能有) / +9[30](技能無) +rand:10/20,20/20,11/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,1] > +0[11] +rand:10/20,1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,8] > +5[18] +rand:10/20,8/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,10,1] > +8[21] +rand:10/20,10/20,1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,20,5] > +10[35](技能有) / +9[30](技能無) +rand:10/20,20/20,5/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,1] > +8[21](技能有) / +7[20](技能無) +rand:20/20,1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,11] > +10[31](技能有) / +7[20](技能無) +rand:20/20,11/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,10,1] > +10[31](技能有) / +7[20](技能無) +rand:20/20,10/20,1/20 +============================ + input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,20,20,1] > +16[61](技能有) / +7[20](技能無) +rand:20/20,20/20,20/20,1/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[1] > Mishap! 絶対失敗! +rand:1/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[5] + 1d20[10,20,11] > +13[46](技能有) / +10[35](技能無) +rand:5/20,10/20,20/20,11/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[5] + 1d20[20,1] > +9[26](技能有) / +8[25](技能無) +rand:5/20,20/20,1/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[17] + 1d20[1] > +5[18] +rand:17/20,1/20 +============================ +input: +POS +output: + +rand: +============================ +input: +POS+10 +output: + +rand: +============================ +input: +POS-5 +output: + +rand: +============================ +input: +POS0 +output: +TorgEternity : d20ロール(ポシビリティ) > 0+1d20[1→10] > -1[10] +rand:1/20 +============================ +input: +POS8 +output: +TorgEternity : d20ロール(ポシビリティ) > 8+1d20[5→10] > +5[18] +rand:5/20 +============================ +input: +POS12 +output: +TorgEternity : d20ロール(ポシビリティ) > 12+1d20[15] > +9[27] +rand:15/20 +============================ +input: +POS11 +output: +TorgEternity : d20ロール(ポシビリティ) > 11+1d20[10,1] > +8[22] +rand:10/20,1/20 +============================ +input: +POS6 +output: +TorgEternity : d20ロール(ポシビリティ) > 6+1d20[10,15] > +10[31] +rand:10/20,15/20 +============================ +input: +POS13 +output: +TorgEternity : d20ロール(ポシビリティ) > 13+1d20[10,10,13] > +13[46] +rand:10/20,10/20,13/20 +============================ +input: +POS3 +output: +TorgEternity : d20ロール(ポシビリティ) > 3+1d20[10,20,3] > +11[36](技能有) / +10[33](技能無) +rand:10/20,20/20,3/20 +============================ +input: +POS5 +output: +TorgEternity : d20ロール(ポシビリティ) > 5+1d20[20,1] > +9[26](技能有) / +8[25](技能無) +rand:20/20,1/20 +============================ +input: +POS4 +output: +TorgEternity : d20ロール(ポシビリティ) > 4+1d20[20,18] > +12[42](技能有) / +8[24](技能無) +rand:20/20,18/20 +============================ +input: +POS15 +output: +TorgEternity : d20ロール(ポシビリティ) > 15+1d20[20,10,1] > +13[46](技能有) / +10[35](技能無) +rand:20/20,10/20,1/20 +============================ +input: +POS2 +output: +TorgEternity : d20ロール(ポシビリティ) > 2+1d20[20,20,10,11] > +16[63](技能有) / +8[22](技能無) +rand:20/20,20/20,10/20,11/20 +============================ +input: +POS6+12 +output: +TorgEternity : d20ロール(ポシビリティ) > 18+1d20[5→10] > +9[28] +rand:5/20 +============================ +input: +POS12-2 +output: + +rand: +============================ diff --git a/src/test/data/TorgEternity_old.txt b/src/test/data/TorgEternity_old.txt new file mode 100644 index 000000000..b961c69b5 --- /dev/null +++ b/src/test/data/TorgEternity_old.txt @@ -0,0 +1,576 @@ +input: +TG14 +output: +TorgEternity : (1R20+14) > -10[1]+14 > 4 +rand:1/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -8[2]+14 > 6 +rand:2/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -6[3]+14 > 8 +rand:3/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -6[4]+14 > 8 +rand:4/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -4[5]+14 > 10 +rand:5/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -4[6]+14 > 10 +rand:6/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -2[7]+14 > 12 +rand:7/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -2[8]+14 > 12 +rand:8/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > -1[9]+14 > 13 +rand:9/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 0[11]+14 > 14 +rand:11/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 0[12]+14 > 14 +rand:12/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 1[13]+14 > 15 +rand:13/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 1[14]+14 > 15 +rand:14/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 2[15]+14 > 16 +rand:15/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 3[16]+14 > 17 +rand:16/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 4[17]+14 > 18 +rand:17/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 5[18]+14 > 19 +rand:18/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 6[19]+14 > 20 +rand:19/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 0[10,2]+14 > 14 +rand:10/20,2/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 10[10,10,15]+14 > 24 +rand:10/20,10/20,15/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 11[10,20,6]+14 > 25(技能無23) +rand:10/20,20/20,6/20 +============================ +input: +TG14 +output: +TorgEternity : (1R20+14) > 12[20,10,11]+14 > 26(技能無21) +rand:20/20,10/20,11/20 +============================ +input: +TG12+5 +output: +TorgEternity : (1R20+12+5) > -4[5]+5 > 1 +rand:5/20 +============================ +input: +TG +output: +TorgEternity : (1R20) > 15[20,20,10,9]0 > 15(技能無7) +rand:20/20,20/20,10/20,9/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[0] > Success - Standard. +rand:0/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[4] > Success - Standard. +rand:4/20 +============================ +input: +Result[1...20] +output: +TorgEternity : 成功レベル表[5] > Success - Good! +rand:5/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[9] > Success - Good! +rand:9/20 +============================ +input: +RT[1...20] +output: +TorgEternity : 成功レベル表[10] > Success - Outstanding!! +rand:10/20 +============================ +input: +Result[1...20]-2 +output: +TorgEternity : 成功レベル表[-1] > Failure. +rand:1/20 +============================ +input: +RT[1...20]-2+4 +output: +TorgEternity : 成功レベル表[11] > Success - Outstanding!! +rand:9/20 +============================ +input: +DT[1...50]-8 +output: +TorgEternity : ダメージ結果表[-6] > ノーダメージ +rand:2/50 +============================ +input: +Damage[1...50]-8 +output: +TorgEternity : ダメージ結果表[-5] > 1ショック +rand:3/50 +============================ +input: +Damage[1...50]-8 +output: +TorgEternity : ダメージ結果表[-1] > 1ショック +rand:7/50 +============================ +input: +DT[1...50]-8 +output: +TorgEternity : ダメージ結果表[0] > 2ショック +rand:8/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[4] > 2ショック +rand:4/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[5] > 1レベル負傷 + 2ショック +rand:5/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[9] > 1レベル負傷 + 2ショック +rand:9/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[10] > 2レベル負傷 + 4ショック +rand:10/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[14] > 2レベル負傷 + 4ショック +rand:14/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[15] > 3レベル負傷 + 6ショック +rand:15/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[19] > 3レベル負傷 + 6ショック +rand:19/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[20] > 4レベル負傷 + 8ショック +rand:20/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[24] > 4レベル負傷 + 8ショック +rand:24/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[25] > 5レベル負傷 + 10ショック +rand:25/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[29] > 5レベル負傷 + 10ショック +rand:29/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[30] > 6レベル負傷 + 12ショック +rand:30/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[34] > 6レベル負傷 + 12ショック +rand:34/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[35] > 7レベル負傷 + 14ショック +rand:35/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[39] > 7レベル負傷 + 14ショック +rand:39/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[40] > 8レベル負傷 + 16ショック +rand:40/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[44] > 8レベル負傷 + 16ショック +rand:44/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[45] > 9レベル負傷 + 18ショック +rand:45/50 +============================ +input: +Damage[1...50] +output: +TorgEternity : ダメージ結果表[49] > 9レベル負傷 + 18ショック +rand:49/50 +============================ +input: +DT[1...50] +output: +TorgEternity : ダメージ結果表[50] > 10レベル負傷 + 20ショック +rand:50/50 +============================ +input: +BT[1...80] +output: +TorgEternity : ロールボーナス表[1] > Mishap!! +rand:1/80 +============================ +input: +Bonus[1...80] +output: +TorgEternity : ロールボーナス表[62] > 16 +rand:62/80 +============================ +input: +Bonus[1...80]+2-4 +output: +TorgEternity : ロールボーナス表[1] > Mishap!! +rand:1/80 +============================ +input: +BT[1...80]+2-4 +output: +TorgEternity : ロールボーナス表[21]-2 > 8[21]-2 > 6 +rand:21/80 +============================ +input: +3BD+10 +output: +TorgEternity : ボーナスダメージロール(3BD+10) > 19[5,1,5∞,5∞,3]+10 > 29ダメージ +rand:5/6, 1/6, 6/6, 6/6, 3/6 +============================ +input: +3BD+2-4 +output: +TorgEternity : ボーナスダメージロール(3BD-2) > 9[2,3,4]-2 > 7ダメージ +rand:2/6, 3/6, 4/6 +============================ +input: +3BD +output: +TorgEternity : ボーナスダメージロール(3BD) > 19[5,1,5∞,5∞,3] > 19ダメージ +rand:5/6, 1/6, 6/6, 6/6, 3/6 +============================ +input: +3BD +output: +TorgEternity : ボーナスダメージロール(3BD) > 9[2,3,4] > 9ダメージ +rand:2/6, 3/6, 4/6 +============================ +input: +0BD +output: +TorgEternity : エラーです。xBD (x≧1) として下さい +rand: +============================ +input: +-5BD +output: + +rand: +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[1] > Mishap! 絶対失敗! +rand:1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[15] > +2[15] +rand:15/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,20,11] > +12[41](技能有) / +9[30](技能無) +rand:10/20,20/20,11/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,1] > +0[11] +rand:10/20,1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,8] > +5[18] +rand:10/20,8/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,10,1] > +8[21] +rand:10/20,10/20,1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[10,20,5] > +10[35](技能有) / +9[30](技能無) +rand:10/20,20/20,5/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,1] > +8[21](技能有) / +7[20](技能無) +rand:20/20,1/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,11] > +10[31](技能有) / +7[20](技能無) +rand:20/20,11/20 +============================ +input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,10,1] > +10[31](技能有) / +7[20](技能無) +rand:20/20,10/20,1/20 +============================ + input: +TE +output: +TorgEternity : d20ロール(通常) > 1d20[20,20,20,1] > +16[61](技能有) / +7[20](技能無) +rand:20/20,20/20,20/20,1/20 +============================ +input: +TE1+2+3 +output: + +rand: +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[1] > Mishap! 絶対失敗! +rand:1/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[5] + 1d20[10,20,11] > +13[46](技能有) / +10[35](技能無) +rand:5/20,10/20,20/20,11/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[5] + 1d20[20,1] > +9[26](技能有) / +8[25](技能無) +rand:5/20,20/20,1/20 +============================ +input: +UP +output: +TorgEternity : d20ロール(高揚) > 1d20[17] + 1d20[1] > +5[18] +rand:17/20,1/20 +============================ +input: +UP1+2+3 +output: + +rand: +============================ +input: +POS0 +output: +TorgEternity : d20ロール(ポシビリティ) > 0+1d20[1→10] > -1[10] +rand:1/20 +============================ +input: +POS8 +output: +TorgEternity : d20ロール(ポシビリティ) > 8+1d20[5→10] > +5[18] +rand:5/20 +============================ +input: +POS12 +output: +TorgEternity : d20ロール(ポシビリティ) > 12+1d20[15] > +9[27] +rand:15/20 +============================ +input: +POS11 +output: +TorgEternity : d20ロール(ポシビリティ) > 11+1d20[10,1] > +8[22] +rand:10/20,1/20 +============================ +input: +POS6 +output: +TorgEternity : d20ロール(ポシビリティ) > 6+1d20[10,15] > +10[31] +rand:10/20,15/20 +============================ +input: +POS13 +output: +TorgEternity : d20ロール(ポシビリティ) > 13+1d20[10,10,13] > +13[46] +rand:10/20,10/20,13/20 +============================ +input: +POS3 +output: +TorgEternity : d20ロール(ポシビリティ) > 3+1d20[10,20,3] > +11[36](技能有) / +10[33](技能無) +rand:10/20,20/20,3/20 +============================ +input: +POS5 +output: +TorgEternity : d20ロール(ポシビリティ) > 5+1d20[20,1] > +9[26](技能有) / +8[25](技能無) +rand:20/20,1/20 +============================ +input: +POS4 +output: +TorgEternity : d20ロール(ポシビリティ) > 4+1d20[20,18] > +12[42](技能有) / +8[24](技能無) +rand:20/20,18/20 +============================ +input: +POS15 +output: +TorgEternity : d20ロール(ポシビリティ) > 15+1d20[20,10,1] > +13[46](技能有) / +10[35](技能無) +rand:20/20,10/20,1/20 +============================ +input: +POS2 +output: +TorgEternity : d20ロール(ポシビリティ) > 2+1d20[20,20,10,11] > +16[63](技能有) / +8[22](技能無) +rand:20/20,20/20,10/20,11/20 +============================ +input: +POS6+12 +output: +TorgEternity : d20ロール(ポシビリティ) > 18+1d20[5→10] > +9[28] +rand:5/20 +============================ +input: +POS +output: + +rand: +============================ +input: +POS12-2 +output: + +rand: +============================