From 6b38a4b840c2ae98a256c7d61e7306b0b30cc293 Mon Sep 17 00:00:00 2001 From: MYAK*kkuru Date: Tue, 24 Feb 2026 05:47:17 +0900 Subject: [PATCH 1/3] =?UTF-8?q?SRS:=20=E9=9F=93=E5=9B=BD=E8=AA=9E=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bcdice/game_system.rb | 1 + lib/bcdice/game_system/SRS_Korean.rb | 297 +++++++++++ test/data/SRS_Korean.toml | 751 +++++++++++++++++++++++++++ 3 files changed, 1049 insertions(+) create mode 100644 lib/bcdice/game_system/SRS_Korean.rb create mode 100644 test/data/SRS_Korean.toml diff --git a/lib/bcdice/game_system.rb b/lib/bcdice/game_system.rb index 7bfaa1c16..1705b04b1 100644 --- a/lib/bcdice/game_system.rb +++ b/lib/bcdice/game_system.rb @@ -228,6 +228,7 @@ require "bcdice/game_system/SajinsenkiAGuS" require "bcdice/game_system/SajinsenkiAGuS2E" require "bcdice/game_system/SRS" +require "bcdice/game_system/SRS_Korean" require "bcdice/game_system/SamsaraBallad" require "bcdice/game_system/Satasupe" require "bcdice/game_system/ScreamHighSchool" diff --git a/lib/bcdice/game_system/SRS_Korean.rb b/lib/bcdice/game_system/SRS_Korean.rb new file mode 100644 index 000000000..90340826c --- /dev/null +++ b/lib/bcdice/game_system/SRS_Korean.rb @@ -0,0 +1,297 @@ +# frozen_string_literal: true + +require 'bcdice/arithmetic_evaluator' +require 'bcdice/game_system/SRS' + +module BCDice + module GameSystem + class SRS_Korean < SRS + # ゲームシステムの識別子 + ID = 'SRS:Korean' + + # ゲームシステム名 + NAME = '스탠다드 RPG 시스템(SRS)' + + # ゲームシステム名の読みがな + SORT_KEY = '国際化:Korean:스탠다드 RPG 시스템(SRS)' + + HELP_MESSAGE_1 = <<~HELP_MESSAGE + ・판정 +  ・일반판정: 2D6+m@c#f>=t 또는 2D6+m>=t[c,f] +   수정치 m, 목표치 t, 크리티컬치 c, 펌블치 f로 판정합니다. +   수정치, 크리티컬치, 펌블치는 생략 가능합니다([]째로 생략 가능, @c・#f 지정 순서는 상관없음). +   크리티컬치, 펌블치의 기본값은 각각 12, 2입니다. +   자동성공, 자동실패, 성공, 실패를 자동 표시합니다. + +   예) 2d6>=10     수정치 0, 목표치 10으로 판정 +   예) 2d6+2>=10    수정치 +2, 목표치 10으로 판정 +   예) 2d6+2>=10[11]  ↑를 크리티컬치 11로 판정 +   예) 2d6+2@11>=10   ↑를 크리티컬치 11로 판정 +   예) 2d6+2>=10[12,4] ↑를 크리티컬치 12, 펌블치 4로 판정 +   예) 2d6+2@12#4>=10  ↑를 크리티컬치 12, 펌블치 4로 판정 +   예) 2d6+2>=10[,4]  ↑를 크리티컬치 12, 펌블치 4로 판정 (크리티컬치 생략) +   예) 2d6+2#4>=10   ↑를 크리티컬치 12, 펌블치 4로 판정 (크리티컬치 생략) + HELP_MESSAGE + + HELP_MESSAGE_2 = <<~HELP_MESSAGE +  ・크리티컬 및 펌블만 판정: 2D6+m@c#f 또는 2D6+m[c,f] +   목표치를 지정하지 않고, 수정치 m, 크리티컬치 c, 펌블치 f로 판정합니다. +   수정치, 크리티컬치, 펌블치는 생략 가능합니다([]는 생략 불가, @c・#f 지정 순서는 상관없음). +   자동성공, 자동실패를 자동 표시합니다. + +   예) 2d6[]    수정치 0, 크리티컬치 12, 펌블치 2로 판정 +   예) 2d6+2[11]  수정치 +2, 크리티컬치 11, 펌블치 2로 판정 +   예) 2d6+2@11   수정치 +2, 크리티컬치 11, 펌블치 2로 판정 +   예) 2d6+2[12,4] 수정치 +2, 크리티컬치 12, 펌블치 4로 판정 +   예) 2d6+2@12#4  수정치 +2, 크리티컬치 12, 펌블치 4로 판정 + HELP_MESSAGE + + HELP_MESSAGE_3 = <<~HELP_MESSAGE + ・D66 주사위 있음 (순서 교체 없음) + HELP_MESSAGE + + # 既定のダイスボット説明文 + DEFAULT_HELP_MESSAGE = "#{HELP_MESSAGE_1}\n#{HELP_MESSAGE_2}\n#{HELP_MESSAGE_3}" + + HELP_MESSAGE = DEFAULT_HELP_MESSAGE + + # 成功判定のエイリアスコマンド定義用のクラスメソッドを提供するモジュール + module ClassMethods + # 成功判定のエイリアスコマンドの一覧 + # @return [Array] + attr_reader :aliases + + # ダイスボットの説明文を返す + # @return [String] + attr_reader :help_message + + # 成功判定のエイリアスコマンドを設定する + # @param [String] aliases エイリアスコマンド(可変長引数) + # @return [self] + # + # エイリアスコマンドとして指定した文字列がコマンドの先頭にあれば、 + # 実行時にそれが2D6に置換されるようになる。 + def set_aliases_for_srs_roll(*aliases) + aliases_upcase = aliases.map(&:upcase) + + @aliases = aliases_upcase.map { |a| Regexp.escape(a) } + @help_message = concatenate_help_messages(aliases_upcase) + return self + end + + # 成功判定のエイリアスコマンドを未設定にする + # @return [self] + def clear_aliases_for_srs_roll + @aliases = [] + @help_message = SRS::DEFAULT_HELP_MESSAGE + return self + end + + private + + # ダイスボットの説明文を結合する + # @param [Array] aliases エイリアスコマンドの配列 + # @return [String] 結合された説明文 + # @todo 現在は2文字のエイリアスコマンドに幅を合わせてある。 + # エイリアスコマンドの文字数が変わる場合があれば、位置を調整するコードが + # 必要。 + def concatenate_help_messages(aliases) + help_msg_for_aliases_for_target_value = + aliases + .map do |a| + "  例) #{a}+2>=10     2d6+2>=10と同じ(#{a}が2D6のショートカットコマンド)\n" + end + .join() + help_msg_for_aliases_for_without_target_value = + aliases + .map do |a| + "  例) #{a}      2d6[]と同じ(#{a}が2D6のショートカットコマンド)\n" \ + "  例) #{a}+2@12#4  2d6+2@12#4と同じ(#{a}が2D6のショートカットコマンド)\n" + end + .join() + + return "#{SRS::HELP_MESSAGE_1}" \ + "#{help_msg_for_aliases_for_target_value}\n" \ + "#{SRS::HELP_MESSAGE_2}" \ + "#{help_msg_for_aliases_for_without_target_value}\n" \ + "#{SRS::HELP_MESSAGE_3}" + end + end + + class << self + # クラスが継承されたときに行う処理 + # @return [void] + def inherited(subclass) + subclass + .extend(ClassMethods) + .clear_aliases_for_srs_roll + end + + # ダイスボットの説明文を返す + # @return [String] 既定のダイスボット説明文 + def help_message + DEFAULT_HELP_MESSAGE + end + + # 成功判定のエイリアスコマンドの一覧 + # @return [Array] + def aliases + [] + end + end + + # 固有のコマンドの接頭辞を設定する + register_prefix('2D6') + + # ダイスボットを初期化する + def initialize(command) + super(command) + + # 式、出目ともに送信する + + # バラバラロール(Bコマンド)でソートする + @sort_add_dice = true + # D66ダイスあり(出目をソートしない) + @d66_sort_type = D66SortType::NO_SORT + end + + # ダイスボットの説明文を返す + # @return [String] + def help_message + self.class.help_message + end + + # 成功判定のエイリアスコマンドの一覧 + # @return [Array] + def aliases + self.class.aliases + end + + # 既定のクリティカル値 + DEFAULT_CRITICAL_VALUE = 12 + # 既定のファンブル値 + DEFAULT_FUMBLE_VALUE = 2 + + # 成功判定コマンドのノード + SRSRollNode = Struct.new( + :modifier, :critical_value, :fumble_value, :target_value + ) do + # 成功判定の文字列表記を返す + # @return [String] + def to_s + lhs = "2D6#{Format.modifier(modifier)}" + expression = target_value ? "#{lhs}>=#{target_value}" : lhs + + return "#{expression}[#{critical_value},#{fumble_value}]" + end + end + + # 固有のダイスロールコマンドを実行する + # @param [String] command 入力されたコマンド + # @return [Result, nil] ダイスロールコマンドの実行結果 + def eval_game_system_specific_command(command) + legacy_c_f_match = /(.+)\[(.*)\]\z/.match(command) + node = + if legacy_c_f_match + parse_legacy(legacy_c_f_match[1], legacy_c_f_match[2]) + else + parse(command) + end + + if node + return execute_srs_roll(node) + end + + return nil + end + + private + + def parse(command) + prefix_re = Regexp.new(["2D6"].concat(aliases()).join('|'), Regexp::IGNORECASE) + parser = Command::Parser.new(prefix_re, round_type: @round_type) + .enable_critical + .enable_fumble + .restrict_cmp_op_to(nil, :>=) + cmd = parser.parse(command) + unless cmd + return nil + end + + if command.start_with?(/2D6/i) && cmd.critical.nil? && cmd.fumble.nil? && cmd.target_number.nil? + # fallback to default dice + return nil + end + + cmd.critical ||= DEFAULT_CRITICAL_VALUE + cmd.fumble ||= DEFAULT_FUMBLE_VALUE + + return SRSRollNode.new(cmd.modify_number, cmd.critical, cmd.fumble, cmd.target_number) + end + + def parse_legacy(command, c_f) + m = /^(-?\d+)?(?:,(-?\d+))?$/.match(c_f) + unless m + return nil + end + + critical = m[1]&.to_i || DEFAULT_CRITICAL_VALUE + fumble = m[2]&.to_i || DEFAULT_FUMBLE_VALUE + + prefix_re = Regexp.new(["2D6"].concat(aliases()).join('|'), Regexp::IGNORECASE) + parser = Command::Parser.new(prefix_re, round_type: @round_type) + .restrict_cmp_op_to(nil, :>=) + cmd = parser.parse(command) + unless cmd + return nil + end + + return SRSRollNode.new(cmd.modify_number, critical, fumble, cmd.target_number) + end + + # 成功判定を実行する + # @param [SRSRollNode] srs_roll 成功判定ノード + # @return [Result] 成功判定結果 + def execute_srs_roll(srs_roll) + dice_list = @randomizer.roll_barabara(2, 6) + dice_list.sort! if @sort_add_dice + + sum = dice_list.sum() + dice_str = dice_list.join(",") + + modified_sum = sum + srs_roll.modifier + + result = compare_result(srs_roll, sum, modified_sum) + + parts = [ + "(#{srs_roll})", + "#{sum}[#{dice_str}]#{Format.modifier(srs_roll.modifier)}", + modified_sum, + result.text + ] + + result.text = parts.compact.join(' > ') + result + end + + # ダイスロール結果を目標値、クリティカル値、ファンブル値と比較する + # @param [SRSRollNode] srs_roll 成功判定ノード + # @param [Integer] sum 出目の合計 + # @param [Integer] modified_sum 修正後の値 + # @return [Result] 比較結果 + def compare_result(srs_roll, sum, modified_sum) + if sum >= srs_roll.critical_value + Result.critical("자동성공") + elsif sum <= srs_roll.fumble_value + Result.fumble("자동실패") + elsif srs_roll.target_value.nil? + Result.new + elsif modified_sum >= srs_roll.target_value + Result.success("성공") + else + Result.failure("실패") + end + end + end + end +end diff --git a/test/data/SRS_Korean.toml b/test/data/SRS_Korean.toml new file mode 100644 index 000000000..a376d9ff6 --- /dev/null +++ b/test/data/SRS_Korean.toml @@ -0,0 +1,751 @@ +[[ test ]] +game_system = "SRS:Korean" +input = "2D6>=7" +output = "(2D6>=7[12,2]) > 7[2,5] > 7 > 성공" +success = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6>=7" +output = "(2D6>=7[12,2]) > 11[5,6] > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6>=7" +output = "(2D6>=7[12,2]) > 6[2,4] > 6 > 실패" +failure = true +rands = [ + { sides = 6, value = 4 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6>=7" +output = "(2D6>=7[12,2]) > 3[1,2] > 3 > 실패" +failure = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6>=13" +output = "(2D6>=13[12,2]) > 12[6,6] > 12 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6>=2" +output = "(2D6>=2[12,2]) > 2[1,1] > 2 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8" +output = "(2D6+1>=8[12,2]) > 7[2,5]+1 > 8 > 성공" +success = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8" +output = "(2D6+1>=8[12,2]) > 11[5,6]+1 > 12 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8" +output = "(2D6+1>=8[12,2]) > 6[2,4]+1 > 7 > 실패" +failure = true +rands = [ + { sides = 6, value = 4 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8" +output = "(2D6+1>=8[12,2]) > 3[1,2]+1 > 4 > 실패" +failure = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1>=12" +output = "(2D6-1>=12[12,2]) > 12[6,6]-1 > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=3" +output = "(2D6+1>=3[12,2]) > 2[1,1]+1 > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1-2+3-4>=8" +output = "(2D6-2>=8[12,2]) > 7[2,5]-2 > 5 > 실패" +failure = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8[11,3]" +output = "(2D6+1>=8[11,3]) > 10[4,6]+1 > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8[11,3]" +output = "(2D6+1>=8[11,3]) > 4[1,3]+1 > 5 > 실패" +failure = true +rands = [ + { sides = 6, value = 3 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1>=12[11,3]" +output = "(2D6-1>=12[11,3]) > 11[5,6]-1 > 10 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=3[11,3]" +output = "(2D6+1>=3[11,3]) > 3[1,2]+1 > 4 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8[11]" +output = "(2D6+1>=8[11,2]) > 10[4,6]+1 > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8[11]" +output = "(2D6+1>=8[11,2]) > 3[1,2]+1 > 4 > 실패" +failure = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1>=12[11]" +output = "(2D6-1>=12[11,2]) > 11[5,6]-1 > 10 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=3[11]" +output = "(2D6+1>=3[11,2]) > 2[1,1]+1 > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8[,3]" +output = "(2D6+1>=8[12,3]) > 10[4,6]+1 > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=8[,3]" +output = "(2D6+1>=8[12,3]) > 4[2,2]+1 > 5 > 실패" +failure = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1>=12[,3]" +output = "(2D6-1>=12[12,3]) > 12[6,6]-1 > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1>=3[,3]" +output = "(2D6+1>=3[12,3]) > 3[1,2]+1 > 4 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[]" +output = "(2D6[12,2]) > 11[5,6] > 11" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[]" +output = "(2D6[12,2]) > 3[1,2] > 3" +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[]" +output = "(2D6[12,2]) > 12[6,6] > 12 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[]" +output = "(2D6[12,2]) > 2[1,1] > 2 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11,3]" +output = "(2D6[11,3]) > 10[4,6] > 10" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11,3]" +output = "(2D6[11,3]) > 4[1,3] > 4" +rands = [ + { sides = 6, value = 3 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11,3]" +output = "(2D6[11,3]) > 11[5,6] > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11,3]" +output = "(2D6[11,3]) > 3[1,2] > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11,3]" +output = "(2D6[11,3]) > 10[4,6] > 10" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11,3]" +output = "(2D6+1[11,3]) > 4[1,3]+1 > 5" +rands = [ + { sides = 6, value = 3 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11,3]" +output = "(2D6+1[11,3]) > 11[5,6]+1 > 12 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11,3]" +output = "(2D6+1[11,3]) > 3[1,2]+1 > 4 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1-1[11,3]" +output = "(2D6[11,3]) > 6[2,4] > 6" +rands = [ + { sides = 6, value = 4 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11]" +output = "(2D6[11,2]) > 10[4,6] > 10" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11]" +output = "(2D6[11,2]) > 3[1,2] > 3" +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6[11]" +output = "(2D6[11,2]) > 11[5,6] > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11]" +output = "(2D6+1[11,2]) > 10[4,6]+1 > 11" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11]" +output = "(2D6+1[11,2]) > 3[1,2]+1 > 4" +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11]" +output = "(2D6+1[11,2]) > 11[5,6]+1 > 12 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1[11]" +output = "(2D6+1[11,2]) > 2[1,1]+1 > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6" +output = "(2D6) > 12[6,6] > 12" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6" +output = "(2D6) > 2[1,1] > 2" +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11#3>=8" +output = "(2D6+1>=8[11,3]) > 10[4,6]+1 > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11#3>=8" +output = "(2D6+1>=8[11,3]) > 4[1,3]+1 > 5 > 실패" +failure = true +rands = [ + { sides = 6, value = 3 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1@11#3>=12" +output = "(2D6-1>=12[11,3]) > 11[5,6]-1 > 10 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11#3>=3" +output = "(2D6+1>=3[11,3]) > 3[1,2]+1 > 4 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11>=8" +output = "(2D6+1>=8[11,2]) > 10[4,6]+1 > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11>=8" +output = "(2D6+1>=8[11,2]) > 3[1,2]+1 > 4 > 실패" +failure = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1@11>=12" +output = "(2D6-1>=12[11,2]) > 11[5,6]-1 > 10 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 5 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11>=3" +output = "(2D6+1>=3[11,2]) > 2[1,1]+1 > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11#3" +output = "(2D6[11,3]) > 4[1,3] > 4" +rands = [ + { sides = 6, value = 3 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11#3" +output = "(2D6[11,3]) > 11[5,6] > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11#3" +output = "(2D6[11,3]) > 3[1,2] > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11#3" +output = "(2D6[11,3]) > 10[4,6] > 10" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11#3" +output = "(2D6+1[11,3]) > 4[1,3]+1 > 5" +rands = [ + { sides = 6, value = 3 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11#3" +output = "(2D6+1[11,3]) > 11[5,6]+1 > 12 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11#3" +output = "(2D6+1[11,3]) > 3[1,2]+1 > 4 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1-1@11#3" +output = "(2D6[11,3]) > 6[2,4] > 6" +rands = [ + { sides = 6, value = 4 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11" +output = "(2D6[11,2]) > 10[4,6] > 10" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11" +output = "(2D6[11,2]) > 3[1,2] > 3" +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6@11" +output = "(2D6[11,2]) > 11[5,6] > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11" +output = "(2D6+1[11,2]) > 10[4,6]+1 > 11" +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11" +output = "(2D6+1[11,2]) > 3[1,2]+1 > 4" +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11" +output = "(2D6+1[11,2]) > 11[5,6]+1 > 12 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1@11" +output = "(2D6+1[11,2]) > 2[1,1]+1 > 3 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1#3>=8" +output = "(2D6+1>=8[12,3]) > 10[4,6]+1 > 11 > 성공" +success = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1#3>=8" +output = "(2D6+1>=8[12,3]) > 4[2,2]+1 > 5 > 실패" +failure = true +rands = [ + { sides = 6, value = 2 }, + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6-1#3>=12" +output = "(2D6-1>=12[12,3]) > 12[6,6]-1 > 11 > 자동성공" +success = true +critical = true +rands = [ + { sides = 6, value = 6 }, + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "SRS:Korean" +input = "2D6+1#3>=3" +output = "(2D6+1>=3[12,3]) > 3[1,2]+1 > 4 > 자동실패" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 2 }, +] + From ea538a6f0a1d805a7d4146c2ae6440ca4cd666c4 Mon Sep 17 00:00:00 2001 From: MYAK*kkuru Date: Wed, 25 Feb 2026 22:52:59 +0900 Subject: [PATCH 2/3] =?UTF-8?q?i18n=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/SRS/ja_jp.yml | 4 + i18n/SRS/ko_kr.yml | 4 + lib/bcdice/game_system/SRS.rb | 8 +- lib/bcdice/game_system/SRS_Korean.rb | 236 +-------------------------- 4 files changed, 15 insertions(+), 237 deletions(-) create mode 100644 i18n/SRS/ja_jp.yml create mode 100644 i18n/SRS/ko_kr.yml diff --git a/i18n/SRS/ja_jp.yml b/i18n/SRS/ja_jp.yml new file mode 100644 index 000000000..f92d62f01 --- /dev/null +++ b/i18n/SRS/ja_jp.yml @@ -0,0 +1,4 @@ +ja_jp: + SRS: + auto_success: "自動成功" + auto_failure: "自動失敗" diff --git a/i18n/SRS/ko_kr.yml b/i18n/SRS/ko_kr.yml new file mode 100644 index 000000000..0f035c5a9 --- /dev/null +++ b/i18n/SRS/ko_kr.yml @@ -0,0 +1,4 @@ +ko_kr: + SRS: + auto_success: "자동 성공" + auto_failure: "자동 실패" diff --git a/lib/bcdice/game_system/SRS.rb b/lib/bcdice/game_system/SRS.rb index a852e76ac..644dd475c 100644 --- a/lib/bcdice/game_system/SRS.rb +++ b/lib/bcdice/game_system/SRS.rb @@ -280,15 +280,15 @@ def execute_srs_roll(srs_roll) # @return [Result] 比較結果 def compare_result(srs_roll, sum, modified_sum) if sum >= srs_roll.critical_value - Result.critical("自動成功") + Result.critical(translate("SRS.auto_success")) elsif sum <= srs_roll.fumble_value - Result.fumble("自動失敗") + Result.fumble(translate("SRS.auto_failure")) elsif srs_roll.target_value.nil? Result.new elsif modified_sum >= srs_roll.target_value - Result.success("成功") + Result.success(translate("success")) else - Result.failure("失敗") + Result.failure(translate("failure")) end end end diff --git a/lib/bcdice/game_system/SRS_Korean.rb b/lib/bcdice/game_system/SRS_Korean.rb index 90340826c..4761571b7 100644 --- a/lib/bcdice/game_system/SRS_Korean.rb +++ b/lib/bcdice/game_system/SRS_Korean.rb @@ -55,242 +55,12 @@ class SRS_Korean < SRS HELP_MESSAGE = DEFAULT_HELP_MESSAGE - # 成功判定のエイリアスコマンド定義用のクラスメソッドを提供するモジュール - module ClassMethods - # 成功判定のエイリアスコマンドの一覧 - # @return [Array] - attr_reader :aliases + register_prefix_from_super_class() - # ダイスボットの説明文を返す - # @return [String] - attr_reader :help_message - - # 成功判定のエイリアスコマンドを設定する - # @param [String] aliases エイリアスコマンド(可変長引数) - # @return [self] - # - # エイリアスコマンドとして指定した文字列がコマンドの先頭にあれば、 - # 実行時にそれが2D6に置換されるようになる。 - def set_aliases_for_srs_roll(*aliases) - aliases_upcase = aliases.map(&:upcase) - - @aliases = aliases_upcase.map { |a| Regexp.escape(a) } - @help_message = concatenate_help_messages(aliases_upcase) - return self - end - - # 成功判定のエイリアスコマンドを未設定にする - # @return [self] - def clear_aliases_for_srs_roll - @aliases = [] - @help_message = SRS::DEFAULT_HELP_MESSAGE - return self - end - - private - - # ダイスボットの説明文を結合する - # @param [Array] aliases エイリアスコマンドの配列 - # @return [String] 結合された説明文 - # @todo 現在は2文字のエイリアスコマンドに幅を合わせてある。 - # エイリアスコマンドの文字数が変わる場合があれば、位置を調整するコードが - # 必要。 - def concatenate_help_messages(aliases) - help_msg_for_aliases_for_target_value = - aliases - .map do |a| - "  例) #{a}+2>=10     2d6+2>=10と同じ(#{a}が2D6のショートカットコマンド)\n" - end - .join() - help_msg_for_aliases_for_without_target_value = - aliases - .map do |a| - "  例) #{a}      2d6[]と同じ(#{a}が2D6のショートカットコマンド)\n" \ - "  例) #{a}+2@12#4  2d6+2@12#4と同じ(#{a}が2D6のショートカットコマンド)\n" - end - .join() - - return "#{SRS::HELP_MESSAGE_1}" \ - "#{help_msg_for_aliases_for_target_value}\n" \ - "#{SRS::HELP_MESSAGE_2}" \ - "#{help_msg_for_aliases_for_without_target_value}\n" \ - "#{SRS::HELP_MESSAGE_3}" - end - end - - class << self - # クラスが継承されたときに行う処理 - # @return [void] - def inherited(subclass) - subclass - .extend(ClassMethods) - .clear_aliases_for_srs_roll - end - - # ダイスボットの説明文を返す - # @return [String] 既定のダイスボット説明文 - def help_message - DEFAULT_HELP_MESSAGE - end - - # 成功判定のエイリアスコマンドの一覧 - # @return [Array] - def aliases - [] - end - end - - # 固有のコマンドの接頭辞を設定する - register_prefix('2D6') - - # ダイスボットを初期化する + # ダイスボットを初期化 def initialize(command) super(command) - - # 式、出目ともに送信する - - # バラバラロール(Bコマンド)でソートする - @sort_add_dice = true - # D66ダイスあり(出目をソートしない) - @d66_sort_type = D66SortType::NO_SORT - end - - # ダイスボットの説明文を返す - # @return [String] - def help_message - self.class.help_message - end - - # 成功判定のエイリアスコマンドの一覧 - # @return [Array] - def aliases - self.class.aliases - end - - # 既定のクリティカル値 - DEFAULT_CRITICAL_VALUE = 12 - # 既定のファンブル値 - DEFAULT_FUMBLE_VALUE = 2 - - # 成功判定コマンドのノード - SRSRollNode = Struct.new( - :modifier, :critical_value, :fumble_value, :target_value - ) do - # 成功判定の文字列表記を返す - # @return [String] - def to_s - lhs = "2D6#{Format.modifier(modifier)}" - expression = target_value ? "#{lhs}>=#{target_value}" : lhs - - return "#{expression}[#{critical_value},#{fumble_value}]" - end - end - - # 固有のダイスロールコマンドを実行する - # @param [String] command 入力されたコマンド - # @return [Result, nil] ダイスロールコマンドの実行結果 - def eval_game_system_specific_command(command) - legacy_c_f_match = /(.+)\[(.*)\]\z/.match(command) - node = - if legacy_c_f_match - parse_legacy(legacy_c_f_match[1], legacy_c_f_match[2]) - else - parse(command) - end - - if node - return execute_srs_roll(node) - end - - return nil - end - - private - - def parse(command) - prefix_re = Regexp.new(["2D6"].concat(aliases()).join('|'), Regexp::IGNORECASE) - parser = Command::Parser.new(prefix_re, round_type: @round_type) - .enable_critical - .enable_fumble - .restrict_cmp_op_to(nil, :>=) - cmd = parser.parse(command) - unless cmd - return nil - end - - if command.start_with?(/2D6/i) && cmd.critical.nil? && cmd.fumble.nil? && cmd.target_number.nil? - # fallback to default dice - return nil - end - - cmd.critical ||= DEFAULT_CRITICAL_VALUE - cmd.fumble ||= DEFAULT_FUMBLE_VALUE - - return SRSRollNode.new(cmd.modify_number, cmd.critical, cmd.fumble, cmd.target_number) - end - - def parse_legacy(command, c_f) - m = /^(-?\d+)?(?:,(-?\d+))?$/.match(c_f) - unless m - return nil - end - - critical = m[1]&.to_i || DEFAULT_CRITICAL_VALUE - fumble = m[2]&.to_i || DEFAULT_FUMBLE_VALUE - - prefix_re = Regexp.new(["2D6"].concat(aliases()).join('|'), Regexp::IGNORECASE) - parser = Command::Parser.new(prefix_re, round_type: @round_type) - .restrict_cmp_op_to(nil, :>=) - cmd = parser.parse(command) - unless cmd - return nil - end - - return SRSRollNode.new(cmd.modify_number, critical, fumble, cmd.target_number) - end - - # 成功判定を実行する - # @param [SRSRollNode] srs_roll 成功判定ノード - # @return [Result] 成功判定結果 - def execute_srs_roll(srs_roll) - dice_list = @randomizer.roll_barabara(2, 6) - dice_list.sort! if @sort_add_dice - - sum = dice_list.sum() - dice_str = dice_list.join(",") - - modified_sum = sum + srs_roll.modifier - - result = compare_result(srs_roll, sum, modified_sum) - - parts = [ - "(#{srs_roll})", - "#{sum}[#{dice_str}]#{Format.modifier(srs_roll.modifier)}", - modified_sum, - result.text - ] - - result.text = parts.compact.join(' > ') - result - end - - # ダイスロール結果を目標値、クリティカル値、ファンブル値と比較する - # @param [SRSRollNode] srs_roll 成功判定ノード - # @param [Integer] sum 出目の合計 - # @param [Integer] modified_sum 修正後の値 - # @return [Result] 比較結果 - def compare_result(srs_roll, sum, modified_sum) - if sum >= srs_roll.critical_value - Result.critical("자동성공") - elsif sum <= srs_roll.fumble_value - Result.fumble("자동실패") - elsif srs_roll.target_value.nil? - Result.new - elsif modified_sum >= srs_roll.target_value - Result.success("성공") - else - Result.failure("실패") - end + @locale = :ko_kr end end end From 962f41dec8095a905d9531742f2c6e8030374f46 Mon Sep 17 00:00:00 2001 From: MYAK*kkuru Date: Wed, 25 Feb 2026 23:21:25 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AA=A4=E5=AD=97=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/data/SRS_Korean.toml | 64 +++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/test/data/SRS_Korean.toml b/test/data/SRS_Korean.toml index a376d9ff6..d6f6958f2 100644 --- a/test/data/SRS_Korean.toml +++ b/test/data/SRS_Korean.toml @@ -41,7 +41,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6>=13" -output = "(2D6>=13[12,2]) > 12[6,6] > 12 > 자동성공" +output = "(2D6>=13[12,2]) > 12[6,6] > 12 > 자동 성공" success = true critical = true rands = [ @@ -52,7 +52,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6>=2" -output = "(2D6>=2[12,2]) > 2[1,1] > 2 > 자동실패" +output = "(2D6>=2[12,2]) > 2[1,1] > 2 > 자동 실패" failure = true fumble = true rands = [ @@ -103,7 +103,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1>=12" -output = "(2D6-1>=12[12,2]) > 12[6,6]-1 > 11 > 자동성공" +output = "(2D6-1>=12[12,2]) > 12[6,6]-1 > 11 > 자동 성공" success = true critical = true rands = [ @@ -114,7 +114,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1>=3" -output = "(2D6+1>=3[12,2]) > 2[1,1]+1 > 3 > 자동실패" +output = "(2D6+1>=3[12,2]) > 2[1,1]+1 > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -155,7 +155,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1>=12[11,3]" -output = "(2D6-1>=12[11,3]) > 11[5,6]-1 > 10 > 자동성공" +output = "(2D6-1>=12[11,3]) > 11[5,6]-1 > 10 > 자동 성공" success = true critical = true rands = [ @@ -166,7 +166,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1>=3[11,3]" -output = "(2D6+1>=3[11,3]) > 3[1,2]+1 > 4 > 자동실패" +output = "(2D6+1>=3[11,3]) > 3[1,2]+1 > 4 > 자동 실패" failure = true fumble = true rands = [ @@ -197,7 +197,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1>=12[11]" -output = "(2D6-1>=12[11,2]) > 11[5,6]-1 > 10 > 자동성공" +output = "(2D6-1>=12[11,2]) > 11[5,6]-1 > 10 > 자동 성공" success = true critical = true rands = [ @@ -208,7 +208,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1>=3[11]" -output = "(2D6+1>=3[11,2]) > 2[1,1]+1 > 3 > 자동실패" +output = "(2D6+1>=3[11,2]) > 2[1,1]+1 > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -239,7 +239,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1>=12[,3]" -output = "(2D6-1>=12[12,3]) > 12[6,6]-1 > 11 > 자동성공" +output = "(2D6-1>=12[12,3]) > 12[6,6]-1 > 11 > 자동 성공" success = true critical = true rands = [ @@ -250,7 +250,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1>=3[,3]" -output = "(2D6+1>=3[12,3]) > 3[1,2]+1 > 4 > 자동실패" +output = "(2D6+1>=3[12,3]) > 3[1,2]+1 > 4 > 자동 실패" failure = true fumble = true rands = [ @@ -279,7 +279,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6[]" -output = "(2D6[12,2]) > 12[6,6] > 12 > 자동성공" +output = "(2D6[12,2]) > 12[6,6] > 12 > 자동 성공" success = true critical = true rands = [ @@ -290,7 +290,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6[]" -output = "(2D6[12,2]) > 2[1,1] > 2 > 자동실패" +output = "(2D6[12,2]) > 2[1,1] > 2 > 자동 실패" failure = true fumble = true rands = [ @@ -319,7 +319,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6[11,3]" -output = "(2D6[11,3]) > 11[5,6] > 11 > 자동성공" +output = "(2D6[11,3]) > 11[5,6] > 11 > 자동 성공" success = true critical = true rands = [ @@ -330,7 +330,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6[11,3]" -output = "(2D6[11,3]) > 3[1,2] > 3 > 자동실패" +output = "(2D6[11,3]) > 3[1,2] > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -359,7 +359,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1[11,3]" -output = "(2D6+1[11,3]) > 11[5,6]+1 > 12 > 자동성공" +output = "(2D6+1[11,3]) > 11[5,6]+1 > 12 > 자동 성공" success = true critical = true rands = [ @@ -370,7 +370,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1[11,3]" -output = "(2D6+1[11,3]) > 3[1,2]+1 > 4 > 자동실패" +output = "(2D6+1[11,3]) > 3[1,2]+1 > 4 > 자동 실패" failure = true fumble = true rands = [ @@ -408,7 +408,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6[11]" -output = "(2D6[11,2]) > 11[5,6] > 11 > 자동성공" +output = "(2D6[11,2]) > 11[5,6] > 11 > 자동 성공" success = true critical = true rands = [ @@ -437,7 +437,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1[11]" -output = "(2D6+1[11,2]) > 11[5,6]+1 > 12 > 자동성공" +output = "(2D6+1[11,2]) > 11[5,6]+1 > 12 > 자동 성공" success = true critical = true rands = [ @@ -448,7 +448,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1[11]" -output = "(2D6+1[11,2]) > 2[1,1]+1 > 3 > 자동실패" +output = "(2D6+1[11,2]) > 2[1,1]+1 > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -497,7 +497,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1@11#3>=12" -output = "(2D6-1>=12[11,3]) > 11[5,6]-1 > 10 > 자동성공" +output = "(2D6-1>=12[11,3]) > 11[5,6]-1 > 10 > 자동 성공" success = true critical = true rands = [ @@ -508,7 +508,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1@11#3>=3" -output = "(2D6+1>=3[11,3]) > 3[1,2]+1 > 4 > 자동실패" +output = "(2D6+1>=3[11,3]) > 3[1,2]+1 > 4 > 자동 실패" failure = true fumble = true rands = [ @@ -539,7 +539,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1@11>=12" -output = "(2D6-1>=12[11,2]) > 11[5,6]-1 > 10 > 자동성공" +output = "(2D6-1>=12[11,2]) > 11[5,6]-1 > 10 > 자동 성공" success = true critical = true rands = [ @@ -550,7 +550,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1@11>=3" -output = "(2D6+1>=3[11,2]) > 2[1,1]+1 > 3 > 자동실패" +output = "(2D6+1>=3[11,2]) > 2[1,1]+1 > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -570,7 +570,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6@11#3" -output = "(2D6[11,3]) > 11[5,6] > 11 > 자동성공" +output = "(2D6[11,3]) > 11[5,6] > 11 > 자동 성공" success = true critical = true rands = [ @@ -581,7 +581,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6@11#3" -output = "(2D6[11,3]) > 3[1,2] > 3 > 자동실패" +output = "(2D6[11,3]) > 3[1,2] > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -610,7 +610,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1@11#3" -output = "(2D6+1[11,3]) > 11[5,6]+1 > 12 > 자동성공" +output = "(2D6+1[11,3]) > 11[5,6]+1 > 12 > 자동 성공" success = true critical = true rands = [ @@ -621,7 +621,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1@11#3" -output = "(2D6+1[11,3]) > 3[1,2]+1 > 4 > 자동실패" +output = "(2D6+1[11,3]) > 3[1,2]+1 > 4 > 자동 실패" failure = true fumble = true rands = [ @@ -659,7 +659,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6@11" -output = "(2D6[11,2]) > 11[5,6] > 11 > 자동성공" +output = "(2D6[11,2]) > 11[5,6] > 11 > 자동 성공" success = true critical = true rands = [ @@ -688,7 +688,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1@11" -output = "(2D6+1[11,2]) > 11[5,6]+1 > 12 > 자동성공" +output = "(2D6+1[11,2]) > 11[5,6]+1 > 12 > 자동 성공" success = true critical = true rands = [ @@ -699,7 +699,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1@11" -output = "(2D6+1[11,2]) > 2[1,1]+1 > 3 > 자동실패" +output = "(2D6+1[11,2]) > 2[1,1]+1 > 3 > 자동 실패" failure = true fumble = true rands = [ @@ -730,7 +730,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6-1#3>=12" -output = "(2D6-1>=12[12,3]) > 12[6,6]-1 > 11 > 자동성공" +output = "(2D6-1>=12[12,3]) > 12[6,6]-1 > 11 > 자동 성공" success = true critical = true rands = [ @@ -741,7 +741,7 @@ rands = [ [[ test ]] game_system = "SRS:Korean" input = "2D6+1#3>=3" -output = "(2D6+1>=3[12,3]) > 3[1,2]+1 > 4 > 자동실패" +output = "(2D6+1>=3[12,3]) > 3[1,2]+1 > 4 > 자동 실패" failure = true fumble = true rands = [