From 5d9e8153659522b1c4c6ee55044f017c073f7dec Mon Sep 17 00:00:00 2001 From: SAKATA Sinji Date: Sat, 27 Feb 2021 16:25:45 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=98=E3=83=AB=E3=83=97=E3=83=A1=E3=83=83?= =?UTF-8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AETypo=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #390 --- lib/bcdice/game_system/CardRanker.rb | 2 +- lib/bcdice/game_system/Garako.rb | 2 +- lib/bcdice/game_system/LostRoyal.rb | 2 +- lib/bcdice/game_system/Skynauts.rb | 2 +- lib/bcdice/game_system/Torg.rb | 2 +- lib/bcdice/game_system/TorgEternity.rb | 4 ++-- lib/bcdice/game_system/Warhammer4.rb | 2 +- test/data/Torg.toml | 18 ++++++++++++------ test/data/TorgEternity.toml | 6 ++++++ 9 files changed, 26 insertions(+), 14 deletions(-) diff --git a/lib/bcdice/game_system/CardRanker.rb b/lib/bcdice/game_system/CardRanker.rb index 7e3a1d916..1338a9380 100644 --- a/lib/bcdice/game_system/CardRanker.rb +++ b/lib/bcdice/game_system/CardRanker.rb @@ -18,7 +18,7 @@ class CardRanker < Base ランダム分野表 RCT 特定のモンスターカードを選ぶ (CMxy x:色、y:番号)  白:W、青:U、緑:V、金:G、赤:R、黒:B -  例)CMW1→白の2:白竜 CMG12→金の12:土精霊 +  例)CMW2→白の2:白竜 CMG12→金の12:土精霊 場所表 (ST) 街中場所表 (CST) 郊外場所表 (OST) diff --git a/lib/bcdice/game_system/Garako.rb b/lib/bcdice/game_system/Garako.rb index 1ac22a51e..e1ffc2ac2 100644 --- a/lib/bcdice/game_system/Garako.rb +++ b/lib/bcdice/game_system/Garako.rb @@ -20,7 +20,7 @@ class Garako < Base HELP_MESSAGE = <<~MESSAGETEXT ・判定 GR+n#f>=X (+n:判定値、#f:不安定による自動失敗基準値、X:目標値、それぞれ省略可能) ・部位決定チャート:HIT - ・ダメージ+部位決定:GAHn(n:火力) + ・ダメージ+部位決定:GHAn(n:火力) ・ダメージチャート:xDCy(CDC/EDC/FDC/ADC/LDC ) ・ダメージチャートver2:xDTy(CDT/EDT/FDT/ADT/LDT)  xは C:コックピット、E:エンジン、F:フレーム、A:アーム、L:レッグ diff --git a/lib/bcdice/game_system/LostRoyal.rb b/lib/bcdice/game_system/LostRoyal.rb index fa6c18a3f..9181fbf04 100644 --- a/lib/bcdice/game_system/LostRoyal.rb +++ b/lib/bcdice/game_system/LostRoyal.rb @@ -19,7 +19,7 @@ class LostRoyal < Base 行為判定  LR[x,x,x,x,x,x]   x の並びには【判定表】の数値を順番に入力する。 -   (例: LR[1,3,0,1,2] ) +   (例: LR[1,3,0,1,2,3] ) ファンブル表  FC diff --git a/lib/bcdice/game_system/Skynauts.rb b/lib/bcdice/game_system/Skynauts.rb index 055c2610b..31142fa3c 100644 --- a/lib/bcdice/game_system/Skynauts.rb +++ b/lib/bcdice/game_system/Skynauts.rb @@ -25,7 +25,7 @@ class Skynauts < Base ◆砲撃判定+ダメージチェック (BOMn/Dx/y@m) n:目標値(省略時:7)  x:ダメージ左側の値、y:ダメージ右側の値  m:《弾道学》(省略可)上:8、下:2、左:4、右:6 -  例) BOM/D/4 BOM9/D19@4 +  例) BOM/D/4 BOM9/D19/2@4 ◆《回避運動》 (AVOn@mXX) n:目標値(省略時:7)  m:回避方向。上:8、下:2、左:4、右:6、XX:ダメージチェック結果  例) diff --git a/lib/bcdice/game_system/Torg.rb b/lib/bcdice/game_system/Torg.rb index ac9854c9c..f4d3e9101 100644 --- a/lib/bcdice/game_system/Torg.rb +++ b/lib/bcdice/game_system/Torg.rb @@ -28,7 +28,7 @@ class Torg < Base  ・ボーナス表「BTx+y or BONUSx+y or TOTALx+y」 xは数値, yは技能基本値 INFO_MESSAGE_TEXT - register_prefix('TG.*', '1R20.*', 'RT.*', 'Result.*', 'IT.*', 'Initimidate.*', 'TT.*', 'Taunt.*', 'Trick.*', 'CT.*', 'MT.*', 'Maneuver.*', 'ODT.*', 'ords.*', 'odamage.*', 'DT.*', 'damage.*', 'BT.*', 'bonus.*', 'total.*') + register_prefix('TG', '1R20', 'RT', 'Result', 'IT', 'Intimidate', 'Test', 'TT', 'Taunt', 'Trick', 'CT', 'MT', 'Maneuver', 'ODT', 'ords', 'odamage', 'DT', 'damage', 'BT', 'bonus', 'total') def replace_text(string) string = string.gsub(/Result/i, 'RT') diff --git a/lib/bcdice/game_system/TorgEternity.rb b/lib/bcdice/game_system/TorgEternity.rb index 5d2ccc790..5fd7e4532 100644 --- a/lib/bcdice/game_system/TorgEternity.rb +++ b/lib/bcdice/game_system/TorgEternity.rb @@ -41,7 +41,7 @@ class TorgEternity < Base  ・ダメージ結果表「DTx or DAMAGEx」  ・ロールボーナス表「BTx+y or BONUSx+y or TOTALx+y」 xは数値, yは技能基本値 INFO_MESSAGE_TEXT - register_prefix('TE.*', 'UP.*', 'POS.*', '\d+BD.*', 'TG.*', 'RT.*', 'Result.*', 'DT.*', 'damage.*', 'BT.*', 'bonus.*', 'total.*', '1R20.*') + register_prefix('TE', 'UP', 'POS', '\d+BD', 'TG', 'RT', 'Result', 'DT', 'damage', 'BT', 'bonus', 'total', '1R20') def eval_game_system_specific_command(command) torg_check(command) || @@ -229,7 +229,7 @@ def getDamageResultDiceCommandResult(command) # ロールボーナス表コマンド def getRollBonusDiceCommandResult(command) debug("TorgEternity Roll Bonus Table Command ? ", command) - m = /(BT|Bonus)(\d+)(([+\-]\d+)*)/i.match(command) + m = /(BT|Bonus|Total)(\d+)(([+\-]\d+)*)/i.match(command) unless m return nil end diff --git a/lib/bcdice/game_system/Warhammer4.rb b/lib/bcdice/game_system/Warhammer4.rb index adea0c4d4..50045a99d 100644 --- a/lib/bcdice/game_system/Warhammer4.rb +++ b/lib/bcdice/game_system/Warhammer4.rb @@ -18,7 +18,7 @@ class Warhammer4 < Base "WH部位 頑健ボーナス以下フラグ"の形で指定します。 部位は「H(頭部)」「A(腕)」「B(胴体)」「L(足)」の4カ所です。 頑健ボーナスフラグは頑健ボーナス以下のダメージの時にUをつけます。 - 例)whH whAU WHL + 例)whctH whctAU WHCTL ■ 命中部位表 (WHLT) 命中部位をランダムに決定します。(クリティカル用) diff --git a/test/data/Torg.toml b/test/data/Torg.toml index edeafd251..2280d3585 100644 --- a/test/data/Torg.toml +++ b/test/data/Torg.toml @@ -227,12 +227,6 @@ input = "IT16" output = "威圧/威嚇表[16] > モラル崩壊" rands = [] -[[ test ]] -game_system = "Torg" -input = "IT17" -output = "威圧/威嚇表[17] > プレイヤーズコール" -rands = [] - [[ test ]] game_system = "Torg" input = "IT14" @@ -275,6 +269,18 @@ input = "IT1" output = "威圧/威嚇表[1] > 技能なし" rands = [] +[[ test ]] +game_system = "Torg" +input = "Test1" +output = "威圧/威嚇表[1] > 技能なし" +rands = [] + +[[ test ]] +game_system = "Torg" +input = "Intimidate1" +output = "威圧/威嚇表[1] > 技能なし" +rands = [] + [[ test ]] game_system = "Torg" input = "IT5" diff --git a/test/data/TorgEternity.toml b/test/data/TorgEternity.toml index 878a328e3..96941318c 100644 --- a/test/data/TorgEternity.toml +++ b/test/data/TorgEternity.toml @@ -424,6 +424,12 @@ input = "BT21+2-4" output = "ロールボーナス表[21]-2 > 8[21]-2 > 6" rands = [] +[[ test ]] +game_system = "TorgEternity" +input = "Total62" +output = "ロールボーナス表[62] > 16" +rands = [] + [[ test ]] game_system = "TorgEternity" input = "3BD+10"