Skip to content

[ネオンアンダーレルム] 専用ダイスボット追加#829

Merged
ysakasin merged 9 commits intobcdice:masterfrom
starling888888:feature/add_neon_under_realm_dice_bot
Feb 15, 2026
Merged

[ネオンアンダーレルム] 専用ダイスボット追加#829
ysakasin merged 9 commits intobcdice:masterfrom
starling888888:feature/add_neon_under_realm_dice_bot

Conversation

@starling888888
Copy link
Copy Markdown
Contributor

@starling888888 starling888888 commented Jan 29, 2026

自作TRPG、ネオン・アンダーレルムの専用ダイスボットを実装いたしました。

レビューとマージのほどよろしくお願いいたします。

ものとしては、 Mb10<=N のダイスカウントロールに特定の閾値以下のダイス個数をカウントできる仕様です。
呼び出しコマンドが 数値式NU(nu許可) です。他システムと重複していたらお知らせください。

以上、よろしくお願いします。

@starling888888 starling888888 force-pushed the feature/add_neon_under_realm_dice_bot branch from 2384ff8 to 3cfba95 Compare January 29, 2026 06:18
@starling888888
Copy link
Copy Markdown
Contributor Author

@ysakasin 申し訳ありません。テストプレイヤーに確認したところ、修正値の位置を末尾指定可能にしてほしいとのことで、追加で仕様とコード追加を行いました。
お手数ですが再度レビューとAction Executeをお願いいたします。

Copy link
Copy Markdown
Member

@ysakasin ysakasin left a comment

Choose a reason for hiding this comment

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

寄稿ありがとうございます。いくつか気になった点があるので、修正をおねがいします。

Comment thread lib/bcdice/game_system/NeonUnderRealm.rb Outdated
Comment thread lib/bcdice/game_system/NeonUnderRealm.rb Outdated
Comment thread lib/bcdice/game_system/NeonUnderRealm.rb Outdated
Comment on lines +112 to +114
# 加減算のみの想定だが、念のため整数以外は弾く
i = v.to_i
return nil unless v == i
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.

BCDice::Arithmetic.eval() の内部では端数の丸め処理が実施されるため、必ず整数が返却されます。そのため、この判定は不要です。

また、整数かの判定をしたいのであれば、 Numeric#integer? を使うべきです。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

3150938 でArithmetic.evalを呼ぶように修正しました。

@starling888888
Copy link
Copy Markdown
Contributor Author

@ysakasin 指摘事項対応いたしました。 Suggestionを取り入れた上で同様のコードを直しています。
お手数ですが再度レビューお願いします。

@ysakasin ysakasin merged commit 0966f16 into bcdice:master Feb 15, 2026
8 checks passed
@ysakasin
Copy link
Copy Markdown
Member

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

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