Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

天下繚乱のシステムを追加 #604

Merged
merged 3 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/bcdice/game_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
require "bcdice/game_system/SwordWorld2_0_SimplifiedChinese"
require "bcdice/game_system/SwordWorld2_5_SimplifiedChinese"
require "bcdice/game_system/TalesFromTheLoop"
require "bcdice/game_system/TenkaRyouran"
require "bcdice/game_system/TherapieSein"
require "bcdice/game_system/TokumeiTenkousei"
require "bcdice/game_system/TokyoGhostResearch"
Expand Down
26 changes: 26 additions & 0 deletions lib/bcdice/game_system/TenkaRyouran.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

require 'bcdice/game_system/SRS'

module BCDice
module GameSystem
class TenkaRyouran < SRS
# ゲームシステムの識別子
ID = 'TenkaRyouran'

# ゲームシステム名
NAME = '天下繚乱'

# ゲームシステム名の読みがな
SORT_KEY = 'てんかりようらん'

# 固有のコマンドの接頭辞を設定する
register_prefix('2D6', 'TR')

# 成功判定のエイリアスコマンドを設定する
set_aliases_for_srs_roll('TR')

HELP_MESSAGE = help_message()
end
end
end
226 changes: 226 additions & 0 deletions test/data/TenkaRyouran.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
[[ test ]]
game_system = "TenkaRyouran"
input = "TR>=7"
output = "(2D6>=7[12,2]) > 7[2,5] > 7 > 成功"
success = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 2 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR-2>=10"
output = "(2D6-2>=10[12,2]) > 11[5,6]-2 > 9 > 失敗"
failure = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "STR+1>=5[11,3]"
output = "(2D6+1>=5[11,3]) > 11[5,6]+1 > 12 > 自動成功"
secret = true
success = true
critical = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "D66"
output = "(D66) > 64"
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 4 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR"
output = "(2D6[12,2]) > 12[6,6] > 12 > 自動成功"
success = true
critical = true
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR"
output = "(2D6[12,2]) > 2[1,1] > 2 > 自動失敗"
failure = true
fumble = true
rands = [
{ sides = 6, value = 1 },
{ sides = 6, value = 1 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+1"
output = "(2D6+1[12,2]) > 11[5,6]+1 > 12"
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR-1"
output = "(2D6-1[12,2]) > 3[1,2]-1 > 2"
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 1 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+1[11,3]"
output = "(2D6+1[11,3]) > 6[2,4]+1 > 7"
rands = [
{ sides = 6, value = 4 },
{ sides = 6, value = 2 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+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 = "TenkaRyouran"
input = "TR+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 = "TenkaRyouran"
input = "STR+1@11#3>=5"
output = "(2D6+1>=5[11,3]) > 11[5,6]+1 > 12 > 自動成功"
secret = true
success = true
critical = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+1@11#3"
output = "(2D6+1[11,3]) > 6[2,4]+1 > 7"
rands = [
{ sides = 6, value = 4 },
{ sides = 6, value = 2 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+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 = "TenkaRyouran"
input = "TR+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 = "TenkaRyouran"
input = "TR@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 = "TenkaRyouran"
input = "TR+1@11"
output = "(2D6+1[11,2]) > 10[4,6]+1 > 11"
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 4 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+1@11"
output = "(2D6+1[11,2]) > 3[1,2]+1 > 4"
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 1 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+1#3"
output = "(2D6+1[12,3]) > 3[1,2]+1 > 4 > 自動失敗"
failure = true
fumble = true
rands = [
{ sides = 6, value = 1 },
{ sides = 6, value = 2 },
]

[[ test ]]
game_system = "TenkaRyouran"
input = "TR+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 = "TenkaRyouran"
input = "TR-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 = "TenkaRyouran"
input = "TR+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 },
]