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

[DoubleCross]ハプニングチャートとRWプロローグチャートを振るためのコマンド(HC, PCP, PCN)を追加 #736

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

RYOSKATE
Copy link

@RYOSKATE RYOSKATE commented Aug 21, 2024

『DoubleCorss』に、フォーカスシステム(FS)判定のハプニングチャート用のコマンドが欲しく実装を試みました。

~/ghq/github.com/bcdice/BCDice$ bundle exec rubocop -a
Inspecting 400 files
................................................................................................................................................................................................................................................................................................................................................................................................................

400 files inspected, no offenses detected

Tip: Based on detected gems, the following RuboCop extension libraries might be helpful:
  * rubocop-rake (https://rubygems.org/gems/rubocop-rake)

You can opt out of this message by adding the following to your config (see https://docs.rubocop.org/rubocop/extensions.html#extension-suggestions for more options):
  AllCops:
    SuggestExtensions: false
~/ghq/github.com/bcdice/BCDice$ bundle exec rake test
Loaded suite /home/ryoskate/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/rake-13.1.0/lib/rake/rake_test_loader
Started
Finished in 51.36861476 seconds.
-------------------------------------------------------------------------------------------------------------------
18111 tests, 117945 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-------------------------------------------------------------------------------------------------------------------
352.57 tests/s, 2296.05 assertions/s
Warning: coverage data provided by Coverage [421] exceeds number of lines in /home/ryoskate/ghq/github.com/bcdice/BCDice/lib/bcdice/game_system/DoubleCross.rb [420]
Coverage report generated for fork-22356 to /home/ryoskate/ghq/github.com/bcdice/BCDice/coverage. 21994 / 22883 LOC (96.12%) covered.
Running RuboCop...
Inspecting 400 files
................................................................................................................................................................................................................................................................................................................................................................................................................

400 files inspected, no offenses detected

Tip: Based on detected gems, the following RuboCop extension libraries might be helpful:
  * rubocop-rake (https://rubygems.org/gems/rubocop-rake)

You can opt out of this message by adding the following to your config (see https://docs.rubocop.org/rubocop/extensions.html#extension-suggestions for more options):
  AllCops:
    SuggestExtensions: false

@RYOSKATE RYOSKATE changed the title [DoubleCross]ハプニングチャートの振るためのコマンド(HC)を追加 [DoubleCross]ハプニングチャートを振るためのコマンド(HC)を追加 Aug 21, 2024
Copy link
Contributor

@patchang86 patchang86 left a comment

Choose a reason for hiding this comment

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

ついでにRWチャートも一気に入れてしまったらどうでしょうか?

RYOSKATE and others added 10 commits December 29, 2024 07:37
feat: [DoubleCross]RWプロローグチャート追加(説明文)

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
feat: [DoubleCross]RWプロローグチャート追加(コマンド登録)

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
feat: [DoubleCross]RWプロローグチャート追加(コマンド実装)

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
feat: [DoubleCross]RWプロローグチャート追加(メッセージ)

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
feat: [DoubleCross]RWプロローグチャート追加(コマンド分岐)

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
feat: [DoubleCross]RWプロローグチャート追加(コマンド実装)

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
feat: [DoubleCross]RWプロローグチャート追加

Co-authored-by: patchang86 <61706371+patchang86@users.noreply.github.com>
@RYOSKATE
Copy link
Author

@patchang86 ありがとうございます。実装もほとんどいただいていたため、suggestion commitし、少し修正とテストまで追加いたしました。改めてご確認よろしくお願いいたします。

@RYOSKATE RYOSKATE requested a review from patchang86 December 28, 2024 23:14
@RYOSKATE RYOSKATE changed the title [DoubleCross]ハプニングチャートを振るためのコマンド(HC)を追加 [DoubleCross]ハプニングチャートとRWプロローグチャートを振るためのコマンド(HC, PCP, PCN)を追加 Dec 28, 2024
@patchang86
Copy link
Contributor

あ!迷惑じゃなかったら幸いです。 Githubが苦手でインデントとかで大変お手数をおかけしました。 テストまでありがとうございました! これで次のバージョンで一緒にアップデートされるといいですね~

@ysakasin ysakasin self-requested a review January 27, 2025 10:18
Copy link
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.

寄稿ありがとうございます。

今回追加されるいずれの表もクラスに内蔵された処理以上の特別な処理は指定はしていようなので、 以下を参考に roll_tables を使った方式に変更してください。

サンプル

TABLES = {
"TOOLS" => DiceTable::Table.new(
"オンセツール決定表",
"1D6",
[
"ココフォリア",
"ユドナリウム",
"TRPGスタジオ",
"Quoridorn",
"FoundryVTT",
"ゆとチャadv.",
]
),
}.freeze
register_prefix('\d+OT>=\d+', TABLES.keys)
def eval_game_system_specific_command(command)
return roll_ot(command) || roll_tables(command, TABLES)
end

@RYOSKATE
Copy link
Author

@ysakasin ありがとうございます。提案いただいたroll_tablesを使った方式に変更してみるようにいたしました。改めてご確認よろしくお願いいたします。

@RYOSKATE RYOSKATE requested a review from ysakasin January 29, 2025 23:28
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.

3 participants