From 5a4e03f67ccf9deee1bb4d0966c5725657873b1c Mon Sep 17 00:00:00 2001 From: MY4k Date: Thu, 11 Jun 2026 23:29:34 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=82=A8=E3=83=A2=E3=82=AF=E3=83=AD?= =?UTF-8?q?=E3=82=A2:=E6=9C=80=E6=96=B0=E3=81=AE=E6=97=A5=E6=9C=AC?= =?UTF-8?q?=E8=AA=9E=E7=89=88=E3=81=AE=E6=A9=9F=E8=83=BD=E3=82=92=E9=9F=93?= =?UTF-8?q?=E5=9B=BD=E8=AA=9E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/Emoklore/ja_jp.yml | 1 + i18n/Emoklore/ko_kr.yml | 1 + lib/bcdice/game_system/Emoklore.rb | 4 +- lib/bcdice/game_system/Emoklore_Korean.rb | 10 +- test/data/Emoklore_Korean.toml | 110 ++++++++++++++++++++++ 5 files changed, 122 insertions(+), 4 deletions(-) diff --git a/i18n/Emoklore/ja_jp.yml b/i18n/Emoklore/ja_jp.yml index 25aa44fab..7613566cb 100644 --- a/i18n/Emoklore/ja_jp.yml +++ b/i18n/Emoklore/ja_jp.yml @@ -5,3 +5,4 @@ ja_jp: triple: トリプル miracle: ミラクル catastrophe: カタストロフ + dice_count_zero: "ダイス数が0以下 > 確定失敗" diff --git a/i18n/Emoklore/ko_kr.yml b/i18n/Emoklore/ko_kr.yml index 120a82c50..22833b25f 100644 --- a/i18n/Emoklore/ko_kr.yml +++ b/i18n/Emoklore/ko_kr.yml @@ -5,3 +5,4 @@ ko_kr: triple: 트리플 miracle: 미라클 catastrophe: 카타스트로프 + dice_count_zero: "주사위 개수가 0 이하 > 확정 실패" diff --git a/lib/bcdice/game_system/Emoklore.rb b/lib/bcdice/game_system/Emoklore.rb index 7f6157d08..192705d65 100644 --- a/lib/bcdice/game_system/Emoklore.rb +++ b/lib/bcdice/game_system/Emoklore.rb @@ -115,7 +115,7 @@ def roll_dm(command) # ダイス数が0以下の場合は確定失敗 if num_dice <= 0 - return Result.fumble("(#{command}) > ダイス数が0以下 > 確定失敗") + return Result.fumble("(#{command}) > #{translate('Emoklore.dice_count_zero')}") end # ダイスロール本体 @@ -146,7 +146,7 @@ def roll_da(command) success_threshold = m[1].to_i + m[2].to_i if num_dice <= 0 - return Result.fumble("(#{command}) > ダイス数が0以下 > 確定失敗") + return Result.fumble("(#{command}) > #{translate('Emoklore.dice_count_zero')}") end result = dice_roll(num_dice, success_threshold) diff --git a/lib/bcdice/game_system/Emoklore_Korean.rb b/lib/bcdice/game_system/Emoklore_Korean.rb index fffe3a308..8ebbdad35 100644 --- a/lib/bcdice/game_system/Emoklore_Korean.rb +++ b/lib/bcdice/game_system/Emoklore_Korean.rb @@ -19,10 +19,16 @@ class Emoklore_Korean < Emoklore # ダイスボットの使い方 HELP_MESSAGE = <<~MESSAGETEXT - ・기능치 판정(xDM<=y) + ・기능치 판정(xDM<=y / xDM<=yEz) "(개수)DM<=(판정치)"로 판정합니다. 주사위의 개수는 생략 가능하며, 생략 시 1개로 설정됩니다. - ex)2DM<=5 DM<=8 + 주사위 개수와 판정치에는 사칙연산(+-*/)을 사용할 수 있습니다. + 수식 끝에 Ez를 붙이면 주사위 수에 z를 더합니다. E-z로 빼기도 가능합니다. + ex)2DM<=5 DM<=8 2DM<=3+2 + 2+2DM<=5 → 주사위 4개로 판정치 5 + 2DM<=5E2 → 주사위 2+2 = 주사위 4개로 판정치 5 + 3DM<=5E-1 → 주사위 3-1 = 주사위 2개로 판정치 5 + ※주사위 수가 0 이하가 되는 경우 확정 실패 ・기능치 판정(sDAa+z) "(기능 레벨)DA(능력치)+(주사위 보너스)"로 판정합니다. diff --git a/test/data/Emoklore_Korean.toml b/test/data/Emoklore_Korean.toml index ee220595f..5e9a9d631 100644 --- a/test/data/Emoklore_Korean.toml +++ b/test/data/Emoklore_Korean.toml @@ -308,3 +308,113 @@ rands = [ { sides = 10, value = 10 }, { sides = 10, value = 10 }, ] + +# 산술식 테스트: 주사위 개수에 더하기 +[[ test ]] +game_system = "Emoklore:Korean" +input = "2+2DM<=5" +output = "(2+2DM<=5) > (4DM<=5) > [3, 4, 6, 7] > 2 > 성공 수 2, 더블" +success = true +critical = true +rands = [ + { sides = 10, value = 3 }, + { sides = 10, value = 4 }, + { sides = 10, value = 6 }, + { sides = 10, value = 7 }, +] + +# 산술식 테스트: 주사위 개수에 곱하기 +[[ test ]] +game_system = "Emoklore:Korean" +input = "2*3DM<=5" +output = "(2*3DM<=5) > (6DM<=5) > [1, 2, 3, 6, 7, 8] > 4 > 성공 수 4, 미라클" +success = true +critical = true +rands = [ + { sides = 10, value = 1 }, + { sides = 10, value = 2 }, + { sides = 10, value = 3 }, + { sides = 10, value = 6 }, + { sides = 10, value = 7 }, + { sides = 10, value = 8 }, +] + +# 산술식 테스트: 판정값에 산술식 +[[ test ]] +game_system = "Emoklore:Korean" +input = "2DM<=3+2" +output = "(2DM<=3+2) > (2DM<=5) > [3, 6] > 1 > 성공 수 1, 성공" +success = true +rands = [ + { sides = 10, value = 3 }, + { sides = 10, value = 6 }, +] + +# 산술식 테스트: 주사위 수와 판정값 모두에 산술식 +[[ test ]] +game_system = "Emoklore:Korean" +input = "1+2DM<=3+2" +output = "(1+2DM<=3+2) > (3DM<=5) > [3, 6, 7] > 1 > 성공 수 1, 성공" +success = true +rands = [ + { sides = 10, value = 3 }, + { sides = 10, value = 6 }, + { sides = 10, value = 7 }, +] + +# 산술식 테스트: 주사위 수가 0 이하일 경우 실패로 확정 +[[ test ]] +game_system = "Emoklore:Korean" +input = "3-5DM<=5" +output = "(3-5DM<=5) > 주사위 개수가 0 이하 > 확정 실패" +failure = true +fumble = true +rands = [] + +# 주사위 보너스: Ez로 합산 +[[ test ]] +game_system = "Emoklore:Korean" +input = "2DM<=5E2" +output = "(2DM<=5E2) > (4DM<=5) > [3, 4, 6, 7] > 2 > 성공 수 2, 더블" +success = true +critical = true +rands = [ + { sides = 10, value = 3 }, + { sides = 10, value = 4 }, + { sides = 10, value = 6 }, + { sides = 10, value = 7 }, +] + +# 주사위 패널티: E-z에서 차감 +[[ test ]] +game_system = "Emoklore:Korean" +input = "3DM<=5E-1" +output = "(3DM<=5E-1) > (2DM<=5) > [3, 6] > 1 > 성공 수 1, 성공" +success = true +rands = [ + { sides = 10, value = 3 }, + { sides = 10, value = 6 }, +] + +# 주사위 패널티: E-z에서 주사위 개수가 0개 이하일 경우 실패로 확정 +[[ test ]] +game_system = "Emoklore:Korean" +input = "1DM<=5E-2" +output = "(1DM<=5E-2) > 주사위 개수가 0 이하 > 확정 실패" +failure = true +fumble = true +rands = [] + +# 산술식과 주사위 보너스/패널티의 병행 사용 +[[ test ]] +game_system = "Emoklore:Korean" +input = "1+1DM<=5E2" +output = "(1+1DM<=5E2) > (4DM<=5) > [3, 4, 6, 7] > 2 > 성공 수 2 더블" +success = true +critical = true +rands = [ + { sides = 10, value = 3 }, + { sides = 10, value = 4 }, + { sides = 10, value = 6 }, + { sides = 10, value = 7 }, +] From fc89de6e6a54149e815d2d4dcc78fbeb7167ece7 Mon Sep 17 00:00:00 2001 From: MY4k Date: Thu, 11 Jun 2026 23:33:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE=E8=AA=A4=E5=AD=97=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/data/Emoklore_Korean.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/data/Emoklore_Korean.toml b/test/data/Emoklore_Korean.toml index 5e9a9d631..8ef4a419a 100644 --- a/test/data/Emoklore_Korean.toml +++ b/test/data/Emoklore_Korean.toml @@ -409,7 +409,7 @@ rands = [] [[ test ]] game_system = "Emoklore:Korean" input = "1+1DM<=5E2" -output = "(1+1DM<=5E2) > (4DM<=5) > [3, 4, 6, 7] > 2 > 성공 수 2 더블" +output = "(1+1DM<=5E2) > (4DM<=5) > [3, 4, 6, 7] > 2 > 성공 수 2, 더블" success = true critical = true rands = [