bcdice 3.1.3 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -2
  3. data/i18n/StellarKnights/ja_jp.yml +496 -0
  4. data/lib/bcdice/common_command/add_dice.rb +1 -1
  5. data/lib/bcdice/common_command/calc.rb +1 -1
  6. data/lib/bcdice/dice_table.rb +2 -0
  7. data/lib/bcdice/dice_table/d66_half_grid_table.rb +33 -0
  8. data/lib/bcdice/dice_table/d66_one_third_table.rb +34 -0
  9. data/lib/bcdice/game_system.rb +3 -0
  10. data/lib/bcdice/game_system/AceKillerGene.rb +1 -1
  11. data/lib/bcdice/game_system/Ainecadette.rb +68 -0
  12. data/lib/bcdice/game_system/Airgetlamh.rb +1 -1
  13. data/lib/bcdice/game_system/Alsetto.rb +1 -1
  14. data/lib/bcdice/game_system/AlterRaise.rb +2 -2
  15. data/lib/bcdice/game_system/AngelGear.rb +1 -1
  16. data/lib/bcdice/game_system/AnimaAnimus.rb +1 -1
  17. data/lib/bcdice/game_system/Arianrhod.rb +6 -8
  18. data/lib/bcdice/game_system/Avandner.rb +1 -1
  19. data/lib/bcdice/game_system/BarnaKronika.rb +1 -1
  20. data/lib/bcdice/game_system/BattleTech.rb +1 -1
  21. data/lib/bcdice/game_system/BeginningIdol.rb +5 -5
  22. data/lib/bcdice/game_system/BeginningIdol_Korean.rb +5 -5
  23. data/lib/bcdice/game_system/BladeOfArcana.rb +1 -1
  24. data/lib/bcdice/game_system/BlindMythos.rb +1 -1
  25. data/lib/bcdice/game_system/BloodCrusade.rb +6 -7
  26. data/lib/bcdice/game_system/BloodMoon.rb +9 -8
  27. data/lib/bcdice/game_system/CardRanker.rb +8 -7
  28. data/lib/bcdice/game_system/ChaosFlare.rb +21 -15
  29. data/lib/bcdice/game_system/Chill.rb +10 -10
  30. data/lib/bcdice/game_system/Chill3.rb +9 -9
  31. data/lib/bcdice/game_system/CrashWorld.rb +1 -1
  32. data/lib/bcdice/game_system/Cthulhu.rb +1 -1
  33. data/lib/bcdice/game_system/Cthulhu7th.rb +48 -10
  34. data/lib/bcdice/game_system/Cthulhu7th_ChineseTraditional.rb +1 -1
  35. data/lib/bcdice/game_system/Cthulhu7th_Korean.rb +1 -1
  36. data/lib/bcdice/game_system/DarkBlaze.rb +0 -11
  37. data/lib/bcdice/game_system/DarkDaysDrive.rb +8 -7
  38. data/lib/bcdice/game_system/DeadlineHeroes.rb +2 -2
  39. data/lib/bcdice/game_system/DemonParasite.rb +5 -13
  40. data/lib/bcdice/game_system/DesperateRun.rb +1 -1
  41. data/lib/bcdice/game_system/DoubleCross.rb +1 -1
  42. data/lib/bcdice/game_system/Dracurouge.rb +1 -1
  43. data/lib/bcdice/game_system/EclipsePhase.rb +14 -14
  44. data/lib/bcdice/game_system/Elric.rb +18 -14
  45. data/lib/bcdice/game_system/Elysion.rb +1 -1
  46. data/lib/bcdice/game_system/EmbryoMachine.rb +9 -8
  47. data/lib/bcdice/game_system/Emoklore.rb +3 -3
  48. data/lib/bcdice/game_system/Fiasco.rb +1 -1
  49. data/lib/bcdice/game_system/FilledWith.rb +4 -0
  50. data/lib/bcdice/game_system/GURPS.rb +17 -28
  51. data/lib/bcdice/game_system/Garako.rb +1 -1
  52. data/lib/bcdice/game_system/GardenOrder.rb +1 -1
  53. data/lib/bcdice/game_system/GeishaGirlwithKatana.rb +1 -1
  54. data/lib/bcdice/game_system/GoblinSlayer.rb +1 -1
  55. data/lib/bcdice/game_system/Gorilla.rb +2 -8
  56. data/lib/bcdice/game_system/GranCrest.rb +18 -11
  57. data/lib/bcdice/game_system/Gundog.rb +9 -8
  58. data/lib/bcdice/game_system/GundogRevised.rb +10 -9
  59. data/lib/bcdice/game_system/GundogZero.rb +1 -1
  60. data/lib/bcdice/game_system/GurpsFW.rb +16 -16
  61. data/lib/bcdice/game_system/HarnMaster.rb +19 -26
  62. data/lib/bcdice/game_system/HatsuneMiku.rb +1 -1
  63. data/lib/bcdice/game_system/Hieizan.rb +12 -21
  64. data/lib/bcdice/game_system/HouraiGakuen.rb +1 -1
  65. data/lib/bcdice/game_system/HuntersMoon.rb +5 -10
  66. data/lib/bcdice/game_system/InfiniteFantasia.rb +19 -17
  67. data/lib/bcdice/game_system/Insane.rb +13 -20
  68. data/lib/bcdice/game_system/IthaWenUa.rb +8 -15
  69. data/lib/bcdice/game_system/JamesBond.rb +10 -10
  70. data/lib/bcdice/game_system/JekyllAndHyde.rb +1 -1
  71. data/lib/bcdice/game_system/Kamigakari.rb +1 -1
  72. data/lib/bcdice/game_system/KanColle.rb +4 -9
  73. data/lib/bcdice/game_system/KemonoNoMori.rb +1 -1
  74. data/lib/bcdice/game_system/KillDeathBusiness.rb +7 -15
  75. data/lib/bcdice/game_system/KurayamiCrying.rb +55 -2
  76. data/lib/bcdice/game_system/MeikyuDays.rb +10 -8
  77. data/lib/bcdice/game_system/MeikyuKingdom.rb +26 -26
  78. data/lib/bcdice/game_system/MeikyuKingdomBasic.rb +3 -3
  79. data/lib/bcdice/game_system/MetalHead.rb +12 -22
  80. data/lib/bcdice/game_system/MetalHeadExtream.rb +5 -5
  81. data/lib/bcdice/game_system/MonotoneMuseum.rb +8 -6
  82. data/lib/bcdice/game_system/Nechronica.rb +28 -21
  83. data/lib/bcdice/game_system/NinjaSlayer.rb +4 -4
  84. data/lib/bcdice/game_system/NjslyrBattle.rb +8 -11
  85. data/lib/bcdice/game_system/OneWayHeroics.rb +1 -1
  86. data/lib/bcdice/game_system/Paradiso.rb +1 -1
  87. data/lib/bcdice/game_system/ParasiteBlood.rb +1 -1
  88. data/lib/bcdice/game_system/Peekaboo.rb +4 -9
  89. data/lib/bcdice/game_system/Pendragon.rb +7 -7
  90. data/lib/bcdice/game_system/PhantasmAdventure.rb +8 -8
  91. data/lib/bcdice/game_system/Postman.rb +1 -1
  92. data/lib/bcdice/game_system/PulpCthulhu.rb +1 -1
  93. data/lib/bcdice/game_system/Raisondetre.rb +2 -2
  94. data/lib/bcdice/game_system/Revulture.rb +123 -0
  95. data/lib/bcdice/game_system/RuneQuest.rb +8 -8
  96. data/lib/bcdice/game_system/Ryutama.rb +1 -1
  97. data/lib/bcdice/game_system/Satasupe.rb +1 -1
  98. data/lib/bcdice/game_system/ScreamHighSchool.rb +2 -2
  99. data/lib/bcdice/game_system/SharedFantasia.rb +19 -23
  100. data/lib/bcdice/game_system/ShinobiGami.rb +14 -6
  101. data/lib/bcdice/game_system/Skynauts.rb +2 -2
  102. data/lib/bcdice/game_system/SkynautsBouken.rb +228 -0
  103. data/lib/bcdice/game_system/StellarKnights.rb +59 -696
  104. data/lib/bcdice/game_system/SterileLife.rb +1 -1
  105. data/lib/bcdice/game_system/StratoShout.rb +8 -16
  106. data/lib/bcdice/game_system/Strave.rb +1 -1
  107. data/lib/bcdice/game_system/SwordWorld.rb +16 -7
  108. data/lib/bcdice/game_system/SwordWorld2_0.rb +2 -2
  109. data/lib/bcdice/game_system/SwordWorld2_5.rb +2 -2
  110. data/lib/bcdice/game_system/TherapieSein.rb +1 -1
  111. data/lib/bcdice/game_system/TokyoGhostResearch.rb +1 -1
  112. data/lib/bcdice/game_system/TrinitySeven.rb +4 -4
  113. data/lib/bcdice/game_system/TunnelsAndTrolls.rb +1 -1
  114. data/lib/bcdice/game_system/Utakaze.rb +1 -1
  115. data/lib/bcdice/game_system/Villaciel.rb +1 -1
  116. data/lib/bcdice/game_system/WARPS.rb +11 -9
  117. data/lib/bcdice/game_system/WaresBlade.rb +4 -9
  118. data/lib/bcdice/game_system/Warhammer.rb +15 -6
  119. data/lib/bcdice/game_system/Warhammer4.rb +15 -11
  120. data/lib/bcdice/game_system/WitchQuest.rb +1 -1
  121. data/lib/bcdice/game_system/YankeeYogSothoth.rb +4 -9
  122. data/lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb +1 -1
  123. data/lib/bcdice/game_system/sword_world/rating_parsed.rb +4 -4
  124. data/lib/bcdice/game_system/sword_world/rating_parser.rb +1 -1
  125. data/lib/bcdice/game_system/sword_world/transcendent_test.rb +26 -8
  126. data/lib/bcdice/repl.rb +1 -1
  127. data/lib/bcdice/result.rb +26 -0
  128. data/lib/bcdice/version.rb +1 -1
  129. metadata +9 -4
@@ -26,7 +26,7 @@ module BCDice
26
26
   修正を後ろに書くことも出来ます。
27
27
  INFO_MESSAGE_TEXT
28
28
 
29
- register_prefix('(.DPT|.FT)\d*')
29
+ register_prefix('.DPT', '.FT')
30
30
 
31
31
  def eval_game_system_specific_command(command)
32
32
  string = command.upcase
@@ -55,18 +55,18 @@ module BCDice
55
55
  'FMB',
56
56
  'MFMB',
57
57
  'HIT',
58
- 'FEAR((\+)?\d*)',
59
- 'REACT((\+|\-)?\d*)',
60
- 'TRAP(E|N|H|L)',
61
- 'TRS((E|N|H|L)\d+)((\+|\-)?\d*)',
62
- 'RAND(E|N|H|L)[1-6]?',
63
- 'RENC(E|N|H|L)[1-6]?',
58
+ 'FEAR',
59
+ 'REACT',
60
+ 'TRAP[ENHL]',
61
+ 'TRS[ENHL]',
62
+ 'RAND[ENHL]',
63
+ 'RENC[ENHL]',
64
64
  'AREA',
65
- 'DROP(N)?((\+)?\d)?',
65
+ 'DROPN?',
66
66
  'HST',
67
67
  'KHST',
68
68
  'RANDOP',
69
- 'LOT(N|P)'
69
+ 'LOT[NP]'
70
70
  )
71
71
 
72
72
  def initialize(command)
@@ -75,14 +75,14 @@ module BCDice
75
75
  @d66_sort_type = D66SortType::NO_SORT
76
76
  end
77
77
 
78
- def check_nD6(total, dice_total, dice_list, cmp_op, target)
79
- return '' if target == '?'
80
- return "" unless dice_list.size == 3 && cmp_op == :<=
78
+ def result_nd6(total, dice_total, dice_list, cmp_op, target)
79
+ return Result.nothing if target == '?'
80
+ return nil unless dice_list.size == 3 && cmp_op == :<=
81
81
 
82
82
  success = target - total # 成功度
83
- crt_string = "クリティカル(成功度:#{success})"
84
- fmb_string = "ファンブル(失敗度:#{success})"
85
- fail_string = "自動失敗(失敗度:#{success})"
83
+ crt_string = Result.critical("クリティカル(成功度:#{success})")
84
+ fmb_string = Result.fumble("ファンブル(失敗度:#{success})")
85
+ fail_string = Result.failure("自動失敗(失敗度:#{success})")
86
86
 
87
87
  # クリティカル
88
88
  if (dice_total <= 6) && (target >= 16)
@@ -105,9 +105,9 @@ module BCDice
105
105
  end
106
106
 
107
107
  if total <= target
108
- return "成功(成功度:#{success})"
108
+ return Result.success("成功(成功度:#{success})")
109
109
  else
110
- return "失敗(失敗度:#{success})"
110
+ return Result.failure("失敗(失敗度:#{success})")
111
111
  end
112
112
  end
113
113
 
@@ -21,32 +21,25 @@ module BCDice
21
21
  ・人型用 中段命中部位表 (SLH)/上段命中部位 (SLHU)/上段命中部位 (SLHD)
22
22
  MESSAGETEXT
23
23
 
24
- register_prefix('SHK\d+', 'SLH', 'SLHU', 'SLHD')
25
-
26
- def check_1D100(total, _dice_total, cmp_op, target)
27
- return '' if target == '?'
28
- return '' unless cmp_op == :<=
29
-
30
- result = getCheckResult(total, target)
31
- return " #{result}"
32
- end
33
-
34
- def getCheckResult(total, diff)
35
- return getFailResult(total) if total > diff
36
-
37
- return getSuccessResult(total)
38
- end
39
-
40
- def getFailResult(total)
41
- return "致命的失敗" if (total % 5) == 0
42
-
43
- return "失敗"
44
- end
45
-
46
- def getSuccessResult(total)
47
- return "決定的成功" if (total % 5) == 0
48
-
49
- return "成功"
24
+ register_prefix('SHK', 'SLH', 'SLHU', 'SLHD')
25
+
26
+ def result_1d100(total, _dice_total, cmp_op, target)
27
+ return Result.nothing if target == '?'
28
+ return nil unless cmp_op == :<=
29
+
30
+ if total <= target
31
+ if total % 5 == 0
32
+ Result.critical("決定的成功")
33
+ else
34
+ Result.success("成功")
35
+ end
36
+ else
37
+ if total % 5 == 0
38
+ Result.fumble("致命的失敗")
39
+ else
40
+ Result.failure("失敗")
41
+ end
42
+ end
50
43
  end
51
44
 
52
45
  def eval_game_system_specific_command(command)
@@ -699,7 +699,7 @@ module BCDice
699
699
  ),
700
700
  }.freeze
701
701
 
702
- register_prefix('R([A-DS]|\d+)', TABLES.keys)
702
+ register_prefix('R[A-DS]?', TABLES.keys)
703
703
  end
704
704
  end
705
705
  end
@@ -16,31 +16,22 @@ module BCDice
16
16
  HELP_MESSAGE = "大成功、自動成功、失敗、自動失敗、大失敗の自動判定を行います。\n"
17
17
 
18
18
  # ゲーム別成功度判定(1d100)
19
- def check_1D100(total, _dice_total, _cmp_op, target)
20
- return '' if target == '?'
19
+ def result_1d100(total, _dice_total, cmp_op, target)
20
+ return Result.nothing if target == '?'
21
+ return nil unless cmp_op == :<=
21
22
 
22
- if total <= 1
23
- # 1は自動成功
24
- if total <= (target / 5)
25
- " > 大成功"
26
- else
27
- " > 自動成功"
28
- end
29
- elsif total >= 100
30
- # 00は大失敗(大失敗は自動失敗でもある)
31
- " > 大失敗"
23
+ if total >= 100
24
+ Result.fumble("大失敗")
32
25
  elsif total >= 96
33
- # 96-00は自動失敗
34
- " 自動失敗"
26
+ Result.failure("自動失敗")
27
+ elsif total <= (target / 5)
28
+ Result.critical("大成功")
29
+ elsif total <= 1
30
+ Result.success("自動成功")
35
31
  elsif total <= target
36
- if total <= (target / 5)
37
- # 目標値の1/5以下は大成功
38
- " > 大成功"
39
- else
40
- " > 成功"
41
- end
32
+ Result.success("成功")
42
33
  else
43
- "失敗"
34
+ Result.failure("失敗")
44
35
  end
45
36
  end
46
37
  end
@@ -31,7 +31,7 @@ module BCDice
31
31
  例)Hourai : 仁義八徳は、【義】(奇数、奇数、偶数)
32
32
  INFO_MESSAGE_TEXT
33
33
 
34
- register_prefix('ROL', 'MED\(\d+,\d+\)', 'RES\(\d+,\d+\)', 'INY', 'HTK', 'GOG')
34
+ register_prefix('ROL', 'MED', 'RES', 'INY', 'HTK', 'GOG')
35
35
 
36
36
  # ゲームの名前
37
37
  # チャット欄表示名
@@ -47,18 +47,13 @@ module BCDice
47
47
  end
48
48
 
49
49
  # ゲーム別成功度判定(2D6)
50
- def check_2D6(total, dice_total, _dice_list, cmp_op, target)
51
- return '' if target == '?'
52
- return '' unless cmp_op == :>=
50
+ def result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
51
+ return nil unless cmp_op == :>=
53
52
 
54
53
  if dice_total <= 2
55
- "ファンブル(モノビースト追加行動+1)"
54
+ Result.fumble("ファンブル(モノビースト追加行動+1)")
56
55
  elsif dice_total >= 12
57
- "スペシャル(変調1つ回復orダメージ+1D6)"
58
- elsif total >= target
59
- " > 成功"
60
- else
61
- " > 失敗"
56
+ Result.critical("スペシャル(変調1つ回復orダメージ+1D6)")
62
57
  end
63
58
  end
64
59
 
@@ -403,7 +398,7 @@ module BCDice
403
398
  ),
404
399
  }.freeze
405
400
 
406
- register_prefix(RTT.prefixes, 'SA2?T\d*', TABLES.keys)
401
+ register_prefix(RTT.prefixes, 'SA', TABLES.keys)
407
402
  end
408
403
  end
409
404
  end
@@ -13,38 +13,40 @@ module BCDice
13
13
  SORT_KEY = 'むけんのふあんたしあ'
14
14
 
15
15
  # ダイスボットの使い方
16
- HELP_MESSAGE = "失敗、成功レベルの自動判定を行います。\n"
16
+ HELP_MESSAGE = "失敗、成功レベルの自動判定を行います。"
17
17
 
18
18
  # ゲーム別成功度判定(1d20)
19
- def check_1D20(total, _dice_total, cmp_op, target)
20
- return '' if target == '?'
19
+ def result_1d20(total, _dice_total, cmp_op, target)
20
+ return Result.nothing if target == '?'
21
+ return nil unless cmp_op == :<=
21
22
 
22
- if cmp_op != :<=
23
- return ''
24
- elsif total > target
25
- return " > 失敗"
23
+ if total > target
24
+ return Result.failure("失敗")
26
25
  end
27
26
 
28
27
  output =
29
28
  if total <= (target / 32)
30
- "32レベル成功(32Lv+)"
29
+ "32レベル成功(32Lv+)"
31
30
  elsif total <= (target / 16)
32
- "16レベル成功(16LV+)"
31
+ "16レベル成功(16Lv+)"
33
32
  elsif total <= (target / 8)
34
- "8レベル成功"
33
+ "8レベル成功"
35
34
  elsif total <= (target / 4)
36
- "4レベル成功"
35
+ "4レベル成功"
37
36
  elsif total <= (target / 2)
38
- "2レベル成功"
37
+ "2レベル成功"
39
38
  else
40
- "1レベル成功"
39
+ "1レベル成功"
41
40
  end
42
41
 
43
- if total <= 1
44
- output += "/クリティカル"
42
+ Result.new.tap do |r|
43
+ r.text = output
44
+ r.success = true
45
+ if total <= 1
46
+ r.critical = true
47
+ r.text += "/クリティカル"
48
+ end
45
49
  end
46
-
47
- output
48
50
  end
49
51
  end
50
52
  end
@@ -46,27 +46,20 @@ module BCDice
46
46
  end
47
47
 
48
48
  # ゲーム別成功度判定(2D6)
49
- def check_2D6(total, dice_total, _dice_list, cmp_op, target)
50
- return '' unless cmp_op == :>=
51
-
52
- result =
53
- if dice_total <= 2
54
- translate("Insane.fumble")
55
- elsif dice_total >= 12
56
- translate("Insane.special")
57
- elsif target == "?"
58
- ""
59
- elsif total >= target
60
- translate("success")
61
- else
62
- translate("failure")
63
- end
64
-
65
- if result.empty?
66
- return ""
49
+ def result_2d6(total, dice_total, _dice_list, cmp_op, target)
50
+ return nil unless cmp_op == :>=
51
+
52
+ if dice_total <= 2
53
+ Result.fumble(translate("Insane.fumble"))
54
+ elsif dice_total >= 12
55
+ Result.critical(translate("Insane.special"))
56
+ elsif target == "?"
57
+ Result.nothing
58
+ elsif total >= target
59
+ Result.success(translate("success"))
60
+ else
61
+ Result.failure(translate("failure"))
67
62
  end
68
-
69
- return " > #{result}"
70
63
  end
71
64
 
72
65
  def eval_game_system_specific_command(command)
@@ -15,22 +15,15 @@ module BCDice
15
15
  # ダイスボットの使い方
16
16
  HELP_MESSAGE = "1D100<=m 方式の判定で成否、クリティカル(01)・ファンブル(00)を自動判定します。\n"
17
17
 
18
- def check_1D100(total, _dice_total, cmp_op, target)
19
- return '' if target == '?'
20
- return '' unless cmp_op == :<=
18
+ def result_1d100(total, _dice_total, cmp_op, target)
19
+ return nil unless cmp_op == :<=
21
20
 
22
- diceValue = total % 100
23
- dice0 = diceValue / 10 # 10の位を代入
24
- dice1 = diceValue % 10 # 1の位を代入
25
-
26
- if (dice0 == 0) && (dice1 == 1)
27
- ' > 01 > クリティカル'
28
- elsif (dice0 == 0) && (dice1 == 0)
29
- ' > 00 > ファンブル'
30
- elsif total <= target
31
- ' > 成功'
32
- else
33
- ' > 失敗'
21
+ if total % 100 == 1
22
+ Result.critical("01 クリティカル")
23
+ elsif total % 100 == 0
24
+ Result.fumble("00 > ファンブル")
25
+ elsif target == "?"
26
+ Result.nothing
34
27
  end
35
28
  end
36
29
  end
@@ -16,28 +16,28 @@ module BCDice
16
16
  HELP_MESSAGE = <<~INFO_MESSAGE_TEXT
17
17
  ・1D100の目標値判定で、効果レーティングを1~4で自動判定。
18
18
   例)1D100<=50
19
-    JamesBond : (1D100<=50) 20 効果3(良)
19
+    JamesBond : (1D100<=50) 20 効果3(良)
20
20
  INFO_MESSAGE_TEXT
21
21
 
22
- def check_1D100(total, _dice_total, cmp_op, target) # ゲーム別成功度判定(1d100)
23
- return '' if target == '?'
24
- return '' unless cmp_op == :<=
22
+ def result_1d100(total, _dice_total, cmp_op, target) # ゲーム別成功度判定(1d100)
23
+ return Result.nothing if target == '?'
24
+ return nil unless cmp_op == :<=
25
25
 
26
26
  base = ((target + 9) / 10).floor
27
27
 
28
28
  if total >= 100
29
29
  # 100は常に失敗
30
- "失敗"
30
+ Result.failure("失敗")
31
31
  elsif total <= base
32
- "効果1(完璧)"
32
+ Result.success("効果1(完璧)")
33
33
  elsif total <= base * 2
34
- "効果2(かなり良い)"
34
+ Result.success("効果2(かなり良い)")
35
35
  elsif total <= base * 5
36
- "効果3(良)"
36
+ Result.success("効果3(良)")
37
37
  elsif total <= target
38
- "効果4(まあまあ)"
38
+ Result.success("効果4(まあまあ)")
39
39
  else
40
- "失敗"
40
+ Result.failure("失敗")
41
41
  end
42
42
  end
43
43
  end
@@ -36,7 +36,7 @@ module BCDice
36
36
  )
37
37
  }.freeze
38
38
 
39
- register_prefix('RC\d+', 'DDC', TABLES.keys)
39
+ register_prefix('RC', 'DDC', TABLES.keys)
40
40
  end
41
41
  end
42
42
  end
@@ -193,7 +193,7 @@ module BCDice
193
193
 
194
194
  TABLES = translate_tables(:ja_jp)
195
195
 
196
- register_prefix('MT(\d*)', TABLES.keys)
196
+ register_prefix('MT', TABLES.keys)
197
197
  end
198
198
  end
199
199
  end
@@ -53,18 +53,13 @@ module BCDice
53
53
  @d66_sort_type = D66SortType::ASC
54
54
  end
55
55
 
56
- def check_2D6(total, dice_total, _dice_list, cmp_op, target)
57
- return '' if target == '?'
58
- return '' unless cmp_op == :>=
56
+ def result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
57
+ return nil unless cmp_op == :>=
59
58
 
60
59
  if dice_total <= 2
61
- "ファンブル(判定失敗。アクシデント表を自分のPCに適用)"
60
+ Result.fumble("ファンブル(判定失敗。アクシデント表を自分のPCに適用)")
62
61
  elsif dice_total >= 12
63
- "スペシャル(判定成功。【行動力】が1D6点回復)"
64
- elsif total >= target
65
- " > 成功"
66
- else
67
- " > 失敗"
62
+ Result.critical("スペシャル(判定成功。【行動力】が1D6点回復)")
68
63
  end
69
64
  end
70
65
 
@@ -252,7 +252,7 @@ module BCDice
252
252
  ),
253
253
  }.freeze
254
254
 
255
- register_prefix('K[AC]\d[-+\d]*', 'CTR', TABLES.keys)
255
+ register_prefix('K[AC]', 'CTR', TABLES.keys)
256
256
  end
257
257
  end
258
258
  end
@@ -49,22 +49,14 @@ module BCDice
49
49
  end
50
50
 
51
51
  # ゲーム別成功度判定(2D6)
52
- def check_2D6(total, dice_total, _dice_list, cmp_op, target)
53
- return '' if target == '?'
54
- return '' unless cmp_op == :>=
55
-
56
- result =
57
- if dice_total <= 2
58
- translate("KillDeathBusiness.fumble")
59
- elsif dice_total >= 12
60
- translate("KillDeathBusiness.special")
61
- elsif total >= target
62
- translate("success")
63
- else
64
- translate("failure")
65
- end
52
+ def result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
53
+ return nil unless cmp_op == :>=
66
54
 
67
- return " #{result}"
55
+ if dice_total <= 2
56
+ Result.fumble(translate("KillDeathBusiness.fumble"))
57
+ elsif dice_total >= 12
58
+ Result.critical(translate("KillDeathBusiness.special"))
59
+ end
68
60
  end
69
61
 
70
62
  def eval_game_system_specific_command(command)