From a1f46b8cb068b178f21c803905d4e2716ec4bb85 Mon Sep 17 00:00:00 2001 From: SAKATA Sinji Date: Wed, 29 Nov 2023 01:11:20 +0900 Subject: [PATCH] =?UTF-8?q?=E7=A5=9E=E6=A4=BF=E5=B8=82=E5=BB=BA=E8=A8=AD?= =?UTF-8?q?=E4=B8=AD=E3=80=82NARRATIVE=20=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 + ...mitsubakiCityUnderConstructionNarrative.rb | 251 ++++ ...tsubakiCityUnderConstructionNarrative.toml | 1069 +++++++++++++++++ 3 files changed, 1321 insertions(+) create mode 100644 lib/bcdice/game_system/KamitsubakiCityUnderConstructionNarrative.rb create mode 100644 test/data/KamitsubakiCityUnderConstructionNarrative.toml diff --git a/lib/bcdice/game_system.rb b/lib/bcdice/game_system.rb index b6b1e7ab5..eea0c928a 100644 --- a/lib/bcdice/game_system.rb +++ b/lib/bcdice/game_system.rb @@ -120,6 +120,7 @@ require "bcdice/game_system/JuinKansen" require "bcdice/game_system/Kamigakari" require "bcdice/game_system/Kamigakari_Korean" +require "bcdice/game_system/KamitsubakiCityUnderConstructionNarrative" require "bcdice/game_system/KanColle" require "bcdice/game_system/Karukami" require "bcdice/game_system/KemonoNoMori" diff --git a/lib/bcdice/game_system/KamitsubakiCityUnderConstructionNarrative.rb b/lib/bcdice/game_system/KamitsubakiCityUnderConstructionNarrative.rb new file mode 100644 index 000000000..b2dccc46d --- /dev/null +++ b/lib/bcdice/game_system/KamitsubakiCityUnderConstructionNarrative.rb @@ -0,0 +1,251 @@ +# frozen_string_literal: true + +module BCDice + module GameSystem + class KamitsubakiCityUnderConstructionNarrative < Base + # ゲームシステムの識別子 + ID = 'KamitsubakiCityUnderConstructionNarrative' + + # ゲームシステム名 + NAME = '神椿市建設中。NARRATIVE' + + # ゲームシステム名の読みがな + SORT_KEY = 'かみつはきしけんせつちゆうならていふ' + + # ダイスボットの使い方 + HELP_MESSAGE = <<~INFO_MESSAGE_TEXT + ・可組(KA) +  KA6 行動判定 +  KA8 技能ロール +  KA10 特技ロール +  KA12 Aロール + + ・裏組(RI) +  RI6 行動判定 +  RI8 技能ロール +  RI10 特技ロール +  RI12 Aロール + + ・羽組(HA) +  HA6 行動判定 +  HA8 技能ロール +  HA10 特技ロール +  HA12 Aロール + + ・星組(SE) +  SE6 行動判定 +  SE8 技能ロール +  SE10 特技ロール +  SE12 Aロール + + ・狐組(CO) +  CO6 行動判定 +  CO8 技能ロール +  CO10 特技ロール +  CO12 Aロール + + ・GM用 +  GM6 (成否判定なし) +  GM8 技能ロール +  GM10 特技ロール +  Q12 Qロール + + ・存在証明 EXI<=x +  存在証明の判定を行う +  x: 存在値 + INFO_MESSAGE_TEXT + + def eval_game_system_specific_command(command) + roll_kumi(command) || roll_existence(command) + end + + private + + def roll_kumi(command) + table = TABLES[command] + unless table + return nil + end + + return table.roll(@randomizer) + end + + class KumiDice + def initialize(items) + @items = items.freeze + end + + CRITICAL = "M" + FUMBLE = "Q" + + def roll(randomizer) + dice = randomizer.roll_once(@items.length) + chosen = @items[dice - 1] + + fumble = chosen == FUMBLE + critical = chosen == CRITICAL + + result_tail = + if fumble + "ファンブル" + elsif critical + "マジック" + elsif !chosen.empty? + "成功" + else + "失敗" + end + + Result.new.tap do |r| + r.critical = critical + r.fumble = fumble + r.condition = !chosen.empty? && !r.fumble? + r.text = [ + "(D#{@items.length})", + dice, + chosen.empty? ? nil : chosen, + result_tail + ].compact.join(" > ") + end + end + end + + class KumiD6 + def initialize(success_symbol) + @success_symbol = success_symbol + end + + TABLE = ["裏", "羽", "星", "狐", "可", "Q"].freeze + + def roll(randomizer) + dice = randomizer.roll_once(6) + chosen = TABLE[dice - 1] + + Result.new.tap do |r| + unless @success_symbol.nil? + r.fumble = chosen == "Q" + r.condition = chosen == @success_symbol + end + + result_tail = + if r.fumble? + "ファンブル" + elsif r.success? + "成功" + elsif r.failure? + "失敗" + end + + r.text = [ + "(D6)", + dice, + chosen, + result_tail + ].compact.join(" > ") + end + end + end + + class QDice + def initialize(items) + @items = items.freeze + end + + CRITICAL = "M" + + def roll(randomizer) + dice = randomizer.roll_once(@items.length) + chosen = @items[dice - 1] + + critical = chosen == CRITICAL + + result_tail = + if critical + "マジック" + elsif !chosen.empty? + "成功" + else + "失敗" + end + + Result.new.tap do |r| + r.critical = critical + r.condition = !chosen.empty? + r.text = [ + "(D#{@items.length})", + dice.to_s, + chosen.empty? ? nil : chosen, + result_tail, + ].compact.join(" > ") + end + end + end + + def roll_existence(command) + m = /^EXI<=(\d+)$/.match(command) + unless m + return nil + end + + target = m[1].to_i + dice = @randomizer.roll_once(20) + Result.new.tap do |r| + r.critical = dice == 1 + r.fumble = dice == 20 + r.condition = (dice <= target && !r.fumble?) || r.critical? + + result_tail = + if r.critical? + "M > マジック" + elsif r.fumble? + "Q > ファンブル" + elsif r.success? + "成功" + else + "失敗" + end + + r.text = [ + "(D20<=#{target})", + dice, + result_tail + ].join(" > ") + end + end + + TABLES = { + "KA6" => KumiD6.new("可"), + "KA8" => KumiDice.new(["Q", "", "", "", "可", "可", "可", "M"]), + "KA10" => KumiDice.new(["Q", "", "", "可", "可", "可", "可", "可", "M", "M"]), + "KA12" => KumiDice.new(["Q", "", "", "可", "可", "可", "可", "可", "可", "可", "M", "M"]), + + "RI6" => KumiD6.new("裏"), + "RI8" => KumiDice.new(["Q", "", "", "", "裏", "裏", "裏", "M"]), + "RI10" => KumiDice.new(["Q", "", "", "裏", "裏", "裏", "裏", "裏", "M", "M"]), + "RI12" => KumiDice.new(["M", "M", "裏", "裏", "裏", "裏", "裏", "裏", "裏", "", "", "Q"]), + + "HA6" => KumiD6.new("羽"), + "HA8" => KumiDice.new(["Q", "", "", "", "羽", "羽", "羽", "M"]), + "HA10" => KumiDice.new(["Q", "", "", "羽", "羽", "羽", "羽", "羽", "M", "M"]), + "HA12" => KumiDice.new(["Q", "Q", "羽", "羽", "羽", "", "", "", "M", "M", "M", "M"]), + + "SE6" => KumiD6.new("星"), + "SE8" => KumiDice.new(["Q", "", "", "", "星", "星", "星", "M"]), + "SE10" => KumiDice.new(["Q", "", "", "星", "星", "星", "星", "星", "M", "M"]), + "SE12" => KumiDice.new(["星", "", "星", "星", "M", "Q", "M", "星", "星", "星", "", "星"]), + + "CO6" => KumiD6.new("狐"), + "CO8" => KumiDice.new(["Q", "", "", "", "狐", "狐", "狐", "M"]), + "CO10" => KumiDice.new(["Q", "", "", "狐", "狐", "狐", "狐", "狐", "M", "M"]), + "CO12" => KumiDice.new(["Q", "", "", "狐狐狐", "狐狐", "狐", "狐狐狐", "狐狐", "狐", "狐", "M", "M"]), + + "GM6" => KumiD6.new(nil), + "GM8" => KumiDice.new(["Q", "", "", "", "W", "W", "W", "M"]), + "GM10" => KumiDice.new(["Q", "", "", "W", "W", "W", "W", "W", "M", "M"]), + "Q12" => QDice.new(["", "", "", "Q", "Q", "Q", "Q", "Q", "Q", "Q", "M", "M"]) + }.freeze + + register_prefix("EXI", TABLES.keys) + end + end +end diff --git a/test/data/KamitsubakiCityUnderConstructionNarrative.toml b/test/data/KamitsubakiCityUnderConstructionNarrative.toml new file mode 100644 index 000000000..0fc8a1896 --- /dev/null +++ b/test/data/KamitsubakiCityUnderConstructionNarrative.toml @@ -0,0 +1,1069 @@ +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA6" +output = "(D6) > 6 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA6" +output = "(D6) > 1 > 裏 > 失敗" +failure = true +rands = [ + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA6" +output = "(D6) > 5 > 可 > 成功" +success = true +rands = [ + { sides = 6, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO6" +output = "(D6) > 4 > 狐 > 成功" +success = true +rands = [ + { sides = 6, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE6" +output = "(D6) > 3 > 星 > 成功" +success = true +rands = [ + { sides = 6, value = 3 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA6" +output = "(D6) > 2 > 羽 > 成功" +success = true +rands = [ + { sides = 6, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI6" +output = "(D6) > 1 > 裏 > 成功" +success = true +rands = [ + { sides = 6, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM6" +output = "(D6) > 6 > Q" +rands = [ + { sides = 6, value = 6 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA8" +output = "(D8) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 8, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA8" +output = "(D8) > 2 > 失敗" +failure = true +rands = [ + { sides = 8, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA8" +output = "(D8) > 5 > 可 > 成功" +success = true +rands = [ + { sides = 8, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA8" +output = "(D8) > 8 > M > マジック" +critical = true +success = true +rands = [ + { sides = 8, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA10" +output = "(D10) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 10, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA10" +output = "(D10) > 2 > 失敗" +failure = true +rands = [ + { sides = 10, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA10" +output = "(D10) > 4 > 可 > 成功" +success = true +rands = [ + { sides = 10, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA10" +output = "(D10) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA10" +output = "(D10) > 10 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI8" +output = "(D8) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 8, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI8" +output = "(D8) > 2 > 失敗" +failure = true +rands = [ + { sides = 8, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI8" +output = "(D8) > 5 > 裏 > 成功" +success = true +rands = [ + { sides = 8, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI8" +output = "(D8) > 8 > M > マジック" +critical = true +success = true +rands = [ + { sides = 8, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI10" +output = "(D10) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 10, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI10" +output = "(D10) > 2 > 失敗" +failure = true +rands = [ + { sides = 10, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI10" +output = "(D10) > 4 > 裏 > 成功" +success = true +rands = [ + { sides = 10, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI10" +output = "(D10) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI10" +output = "(D10) > 10 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA8" +output = "(D8) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 8, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA8" +output = "(D8) > 2 > 失敗" +failure = true +rands = [ + { sides = 8, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA8" +output = "(D8) > 5 > 羽 > 成功" +success = true +rands = [ + { sides = 8, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA8" +output = "(D8) > 8 > M > マジック" +critical = true +success = true +rands = [ + { sides = 8, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA10" +output = "(D10) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 10, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA10" +output = "(D10) > 2 > 失敗" +failure = true +rands = [ + { sides = 10, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA10" +output = "(D10) > 4 > 羽 > 成功" +success = true +rands = [ + { sides = 10, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA10" +output = "(D10) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA10" +output = "(D10) > 10 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE8" +output = "(D8) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 8, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE8" +output = "(D8) > 2 > 失敗" +failure = true +rands = [ + { sides = 8, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE8" +output = "(D8) > 5 > 星 > 成功" +success = true +rands = [ + { sides = 8, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE8" +output = "(D8) > 8 > M > マジック" +critical = true +success = true +rands = [ + { sides = 8, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE10" +output = "(D10) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 10, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE10" +output = "(D10) > 2 > 失敗" +failure = true +rands = [ + { sides = 10, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE10" +output = "(D10) > 4 > 星 > 成功" +success = true +rands = [ + { sides = 10, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE10" +output = "(D10) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE10" +output = "(D10) > 10 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO8" +output = "(D8) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 8, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO8" +output = "(D8) > 2 > 失敗" +failure = true +rands = [ + { sides = 8, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO8" +output = "(D8) > 5 > 狐 > 成功" +success = true +rands = [ + { sides = 8, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO8" +output = "(D8) > 8 > M > マジック" +critical = true +success = true +rands = [ + { sides = 8, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO10" +output = "(D10) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 10, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO10" +output = "(D10) > 2 > 失敗" +failure = true +rands = [ + { sides = 10, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO10" +output = "(D10) > 4 > 狐 > 成功" +success = true +rands = [ + { sides = 10, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO10" +output = "(D10) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO10" +output = "(D10) > 10 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 10 }, +] + + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM8" +output = "(D8) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 8, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM8" +output = "(D8) > 2 > 失敗" +failure = true +rands = [ + { sides = 8, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM8" +output = "(D8) > 5 > W > 成功" +success = true +rands = [ + { sides = 8, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM8" +output = "(D8) > 7 > W > 成功" +success = true +rands = [ + { sides = 8, value = 7 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM8" +output = "(D8) > 8 > M > マジック" +critical = true +success = true +rands = [ + { sides = 8, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM10" +output = "(D10) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 10, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM10" +output = "(D10) > 2 > 失敗" +failure = true +rands = [ + { sides = 10, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM10" +output = "(D10) > 4 > W > 成功" +success = true +rands = [ + { sides = 10, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM10" +output = "(D10) > 8 > W > 成功" +success = true +rands = [ + { sides = 10, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM10" +output = "(D10) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "GM10" +output = "(D10) > 10 > M > マジック" +critical = true +success = true +rands = [ + { sides = 10, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "Q12" +output = "(D12) > 1 > 失敗" +failure = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "Q12" +output = "(D12) > 4 > Q > 成功" +success = true +rands = [ + { sides = 12, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "Q12" +output = "(D12) > 10 > Q > 成功" +success = true +rands = [ + { sides = 12, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "Q12" +output = "(D12) > 11 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "Q12" +output = "(D12) > 12 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 12 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA12" +output = "(D12) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA12" +output = "(D12) > 4 > 可 > 成功" +success = true +rands = [ + { sides = 12, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA12" +output = "(D12) > 10 > 可 > 成功" +success = true +rands = [ + { sides = 12, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA12" +output = "(D12) > 11 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "KA12" +output = "(D12) > 12 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 12 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI12" +output = "(D12) > 1 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI12" +output = "(D12) > 2 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI12" +output = "(D12) > 3 > 裏 > 成功" +success = true +rands = [ + { sides = 12, value = 3 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI12" +output = "(D12) > 10 > 失敗" +failure = true +rands = [ + { sides = 12, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI12" +output = "(D12) > 11 > 失敗" +failure = true +rands = [ + { sides = 12, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "RI12" +output = "(D12) > 12 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 12 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 2 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 3 > 羽 > 成功" +success = true +rands = [ + { sides = 12, value = 3 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 5 > 羽 > 成功" +success = true +rands = [ + { sides = 12, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 6 > 失敗" +failure = true +rands = [ + { sides = 12, value = 6 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 8 > 失敗" +failure = true +rands = [ + { sides = 12, value = 8 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 9 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 9 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "HA12" +output = "(D12) > 12 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 12 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 6 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 6 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 2 > 失敗" +failure = true +rands = [ + { sides = 12, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 11 > 失敗" +failure = true +rands = [ + { sides = 12, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 1 > 星 > 成功" +success = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 12 > 星 > 成功" +success = true +rands = [ + { sides = 12, value = 12 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 5 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "SE12" +output = "(D12) > 7 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 7 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 1 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 12, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 2 > 失敗" +failure = true +rands = [ + { sides = 12, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 3 > 失敗" +failure = true +rands = [ + { sides = 12, value = 3 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 4 > 狐狐狐 > 成功" +success = true +rands = [ + { sides = 12, value = 4 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 5 > 狐狐 > 成功" +success = true +rands = [ + { sides = 12, value = 5 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 10 > 狐 > 成功" +success = true +rands = [ + { sides = 12, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 11 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "CO12" +output = "(D12) > 12 > M > マジック" +critical = true +success = true +rands = [ + { sides = 12, value = 12 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=10" +output = "(D20<=10) > 1 > M > マジック" +critical = true +success = true +rands = [ + { sides = 20, value = 1 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=10" +output = "(D20<=10) > 2 > 成功" +success = true +rands = [ + { sides = 20, value = 2 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=10" +output = "(D20<=10) > 10 > 成功" +success = true +rands = [ + { sides = 20, value = 10 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=10" +output = "(D20<=10) > 11 > 失敗" +failure = true +rands = [ + { sides = 20, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=10" +output = "(D20<=10) > 19 > 失敗" +failure = true +rands = [ + { sides = 20, value = 19 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=10" +output = "(D20<=10) > 20 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 20, value = 20 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=30" +output = "(D20<=30) > 20 > Q > ファンブル" +fumble = true +failure = true +rands = [ + { sides = 20, value = 20 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=11" +output = "(D20<=11) > 11 > 成功" +success = true +rands = [ + { sides = 20, value = 11 }, +] + +[[ test ]] +game_system = "KamitsubakiCityUnderConstructionNarrative" +input = "EXI<=11" +output = "(D20<=11) > 12 > 失敗" +failure = true +rands = [ + { sides = 20, value = 12 }, +]