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

ダークデイズドライブ拡張 #531

Merged
merged 4 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
117 changes: 76 additions & 41 deletions lib/bcdice/game_system/DarkDaysDrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ class DarkDaysDrive < Base
CT キャンプ表
KZT 関係属性表
IA イケメンアクション決定表
IAA 遠距離
IAB 移動
IAC 近距離
IAD 善人
IAE 悪人
IAF 幼い
IAG バカ
IAH 渋い
IAI 賢い
IAJ 超自然
・D66ダイスあり
IAA 遠距離 IAB 移動 IAC 近距離 IAD 善人 IAE 悪人
IAF 幼い IAG バカ IAH 渋い IAI 賢い IAJ 超自然
IAX イケメンアクション決定表 → IA表
■本格的な戦闘
CAC センターの行動決定
DDC 対話ダメージ表
・D66ダイス昇順 git remote
INFO_MESSAGE_TEXT

def initialize(command)
Expand All @@ -69,8 +65,23 @@ def result_2d6(total, dice_total, _dice_list, cmp_op, target)

def eval_game_system_specific_command(command)
roll_tables(command, TABLES) ||
command_iax(command) ||
RTT.roll_command(randomizer, command)
end

private

def command_iax(command)
return nil unless command == "IAX"

ia = TABLES["IA"].choice(@randomizer.roll_d66(D66SortType::ASC))
m = ia.body.match(/\((.+?)\)/)
GenKuzumochi marked this conversation as resolved.
Show resolved Hide resolved
return ia unless m

ia2 = TABLES[m[1]].choice(@randomizer.roll_once(6))
return "#{ia} > #{ia2}"
end

RTT = DiceTable::SaiFicSkillTable.new(
[
['背景', ['呪い', '絶望', '孤児', '死別', '一般人', '獲物', '憧れ', '友人', '挑戦者', '血縁', '永遠']],
Expand Down Expand Up @@ -277,31 +288,31 @@ def eval_game_system_specific_command(command)
"イケメンアクション決定表",
D66SortType::ASC,
{
11 => "遠距離",
12 => "遠距離",
13 => "移動",
14 => "移動",
15 => "近距離",
16 => "近距離",
22 => "善人",
23 => "善人",
24 => "悪人",
25 => "悪人",
26 => "幼い",
33 => "幼い",
34 => "バカ",
35 => "バカ",
36 => "渋い",
44 => "渋い",
45 => "賢い",
46 => "賢い",
55 => "超自然",
56 => "超自然",
11 => "遠距離(IAA)",
12 => "遠距離(IAA)",
13 => "移動(IAB)",
14 => "移動(IAB)",
15 => "近距離(IAC)",
16 => "近距離(IAC)",
22 => "善人(IAD)",
23 => "善人(IAD)",
24 => "悪人(IAE)",
25 => "悪人(IAE)",
26 => "幼い(IAF)",
33 => "幼い(IAF)",
34 => "バカ(IAG)",
35 => "バカ(IAG)",
36 => "渋い(IAH)",
44 => "渋い(IAH)",
45 => "賢い(IAI)",
46 => "賢い(IAI)",
55 => "超自然(IAJ)",
56 => "超自然(IAJ)",
66 => "振り直しor自由選択"
}
),
"IAA" => DiceTable::Table.new(
"イケメンアクション(遠距離)表",
"イケメンアクション(遠距離)表(P172)",
"1D6",
[
"目を合わせて微笑む(かっこよさ:4)",
Expand All @@ -313,7 +324,7 @@ def eval_game_system_specific_command(command)
]
),
"IAB" => DiceTable::Table.new(
"イケメンアクション(移動)表",
"イケメンアクション(移動)表(P172)",
"1D6",
[
"車道側を歩く(かっこよさ:4)",
Expand All @@ -325,7 +336,7 @@ def eval_game_system_specific_command(command)
]
),
"IAC" => DiceTable::Table.new(
"イケメンアクション(近距離)表",
"イケメンアクション(近距離)表(P173)",
"1D6",
[
"黙って見つめる(かっこよさ:3)",
Expand All @@ -337,7 +348,7 @@ def eval_game_system_specific_command(command)
]
),
"IAD" => DiceTable::Table.new(
"イケメンアクション(善人)表",
"イケメンアクション(善人)表(P173)",
"1D6",
[
"手を引いて逃げる(かっこよさ:4)",
Expand All @@ -349,7 +360,7 @@ def eval_game_system_specific_command(command)
]
),
"IAE" => DiceTable::Table.new(
"イケメンアクション(悪人)表",
"イケメンアクション(悪人)表(P174)",
"1D6",
[
"攻撃する(かっこよさ:4)",
Expand All @@ -361,7 +372,7 @@ def eval_game_system_specific_command(command)
]
),
"IAF" => DiceTable::Table.new(
"イケメンアクション(幼い)表",
"イケメンアクション(幼い)表(P174)",
"1D6",
[
"甘える(かっこよさ:3)",
Expand All @@ -373,7 +384,7 @@ def eval_game_system_specific_command(command)
]
),
"IAG" => DiceTable::Table.new(
"イケメンアクション(バカ)表",
"イケメンアクション(バカ)表(P175)",
"1D6",
[
"苦悩する(かっこよさ:4)",
Expand All @@ -385,7 +396,7 @@ def eval_game_system_specific_command(command)
]
),
"IAH" => DiceTable::Table.new(
"イケメンアクション(渋い)表",
"イケメンアクション(渋い)表(P175)",
"1D6",
[
"説教(かっこよさ:4)",
Expand All @@ -397,7 +408,7 @@ def eval_game_system_specific_command(command)
]
),
"IAI" => DiceTable::Table.new(
"イケメンアクション(賢い)表",
"イケメンアクション(賢い)表(P176)",
"1D6",
[
"難しい本を読む(かっこよさ:3)",
Expand All @@ -409,7 +420,7 @@ def eval_game_system_specific_command(command)
]
),
"IAJ" => DiceTable::Table.new(
"イケメンアクション(超自然)表",
"イケメンアクション(超自然)表(P176)",
"1D6",
[
"水に濡れる(かっこよさ:4)",
Expand All @@ -420,6 +431,30 @@ def eval_game_system_specific_command(command)
"光る(かっこよさ:6)"
]
),
"CAC" => DiceTable::Table.new(
"センターの行動決定表",
"1d6",
[
"逃走",
"不意打ち",
"連続行動",
"対話",
"威嚇",
"攻撃"
]
),
"DDC" => DiceTable::Table.new(
"対話ダメージ表",
"1d6",
[
"焦り",
"焦り",
"不調",
"不調",
"ショック",
"ショック",
]
)
}.freeze

register_prefix(RTT.prefixes, TABLES.keys)
Expand Down
45 changes: 32 additions & 13 deletions test/data/DarkDaysDrive.toml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ rands = [
[[ test ]]
game_system = "DarkDaysDrive"
input = "IA"
output = "イケメンアクション決定表(11) > 遠距離"
output = "イケメンアクション決定表(11) > 遠距離(IAA)"
rands = [
{ sides = 6, value = 1 },
{ sides = 6, value = 1 },
Expand All @@ -352,7 +352,7 @@ rands = [
[[ test ]]
game_system = "DarkDaysDrive"
input = "IA"
output = "イケメンアクション決定表(25) > 悪人"
output = "イケメンアクション決定表(25) > 悪人(IAE)"
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 5 },
Expand All @@ -361,7 +361,7 @@ rands = [
[[ test ]]
game_system = "DarkDaysDrive"
input = "IA"
output = "イケメンアクション決定表(56) > 超自然"
output = "イケメンアクション決定表(56) > 超自然(IAJ)"
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 6 },
Expand All @@ -379,83 +379,102 @@ rands = [
[[ test ]]
game_system = "DarkDaysDrive"
input = "IAA"
output = "イケメンアクション(遠距離)表(1) > 目を合わせて微笑む(かっこよさ:4)"
output = "イケメンアクション(遠距離)表(P172)(1) > 目を合わせて微笑む(かっこよさ:4)"
rands = [
{ sides = 6, value = 1 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAB"
output = "イケメンアクション(移動)表(1) > 車道側を歩く(かっこよさ:4)"
output = "イケメンアクション(移動)表(P172)(1) > 車道側を歩く(かっこよさ:4)"
rands = [
{ sides = 6, value = 1 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAC"
output = "イケメンアクション(近距離)表(1) > 黙って見つめる(かっこよさ:3)"
output = "イケメンアクション(近距離)表(P173)(1) > 黙って見つめる(かっこよさ:3)"
rands = [
{ sides = 6, value = 1 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAD"
output = "イケメンアクション(善人)表(6) > 悪堕ち(かっこよさ:6)"
output = "イケメンアクション(善人)表(P173)(6) > 悪堕ち(かっこよさ:6)"
rands = [
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAE"
output = "イケメンアクション(悪人)表(5) > 罠にかける(かっこよさ:6)"
output = "イケメンアクション(悪人)表(P174)(5) > 罠にかける(かっこよさ:6)"
rands = [
{ sides = 6, value = 5 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAF"
output = "イケメンアクション(幼い)表(2) > 疲れる(かっこよさ:3)"
output = "イケメンアクション(幼い)表(P174)(2) > 疲れる(かっこよさ:3)"
rands = [
{ sides = 6, value = 2 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAG"
output = "イケメンアクション(バカ)表(3) > 転ぶ(かっこよさ:4)"
output = "イケメンアクション(バカ)表(P175)(3) > 転ぶ(かっこよさ:4)"
rands = [
{ sides = 6, value = 3 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAH"
output = "イケメンアクション(渋い)表(4) > 残心(かっこよさ:5)"
output = "イケメンアクション(渋い)表(P175)(4) > 残心(かっこよさ:5)"
rands = [
{ sides = 6, value = 4 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAI"
output = "イケメンアクション(賢い)表(6) > 大丈夫だと言う(かっこよさ:7)"
output = "イケメンアクション(賢い)表(P176)(6) > 大丈夫だと言う(かっこよさ:7)"
rands = [
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAJ"
output = "イケメンアクション(超自然)表(5) > 闇を生み出す(かっこよさ:6)"
output = "イケメンアクション(超自然)表(P176)(5) > 闇を生み出す(かっこよさ:6)"
rands = [
{ sides = 6, value = 5 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAX"
output = "イケメンアクション決定表(23) > 善人(IAD) > イケメンアクション(善人)表(P173)(3) > 守る(かっこよさ:5)"
rands = [
{ sides = 6, value = 3 },
{ sides = 6, value = 2 },
{ sides = 6, value = 3 },
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "IAX"
output = "イケメンアクション決定表(66) > 振り直しor自由選択"
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 6 }
]

[[ test ]]
game_system = "DarkDaysDrive"
input = "2D6>=? 目標値?でバグらない"
Expand Down