Skip to content

[FutariSousa]フタリソウサの判定コマンドに目標値変更とスペシャル値追加の機能を追加#875

Merged
ysakasin merged 2 commits into
bcdice:masterfrom
Aimsot:Futarisousa_add_custom_options
May 12, 2026
Merged

[FutariSousa]フタリソウサの判定コマンドに目標値変更とスペシャル値追加の機能を追加#875
ysakasin merged 2 commits into
bcdice:masterfrom
Aimsot:Futarisousa_add_custom_options

Conversation

@Aimsot

@Aimsot Aimsot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

いつもお世話になってます。
今回はフタリソウサの一部アクションで目標値の変更や、スペシャル値の追加を行うものがあるので追加しました。

追加カスタムコマンド

  • DT/ASコマンドの末尾に >=n で目標値を変更
  • DT/ASコマンドの末尾に [n,m] でスペシャル値を指定できる機能

確認よろしくお願いします。

- DT/ASコマンドの末尾に >=n で目標値を変更
- [n,m] でスペシャル値を指定できる機能
@codecov

codecov Bot commented Apr 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.49%. Comparing base (8c8a0f5) to head (b7fe95c).
⚠️ Report is 229 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #875      +/-   ##
==========================================
+ Coverage   95.92%   96.49%   +0.57%     
==========================================
  Files         382      429      +47     
  Lines       22674    24931    +2257     
  Branches     6036     6699     +663     
==========================================
+ Hits        21749    24058    +2309     
+ Misses        925      873      -52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread lib/bcdice/game_system/FutariSousa.rb Outdated

def eval_game_system_specific_command(command)
if (m = /^(\d+)?DT(?:6)?$/i.match(command))
if (m = /^(\d+)?DT(?:6)?(?:>=(\d+))?(?:\[([0-9,]+)\])?$/i.match(command))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

追加された分のパースが厳密性に欠けるので、/\[\d+(,\d+)?\]/ のような正規表現にした方が良さそうです。

- スペシャル値 `[n,m...]` のパース処理(正規表現)が意図しない入力(カンマのみ、連続するカンマなど)にマッチしてしまう問題を修正
- 3つ以上のスペシャル値指定にも対応できるよう `(\d+(?:,\d+)*)` に変更
- 関連するテストケースを追加・修正
@Aimsot

Aimsot commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

ご指摘ありがとうございます。修正しました。

@ysakasin ysakasin merged commit e02bdb7 into bcdice:master May 12, 2026
8 checks passed
@ysakasin

Copy link
Copy Markdown
Member

@Aimsot ありがとうございます。マージしました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants