-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ゲームシステム独自コマンドから利用する際に、出目と成功数を直接 取得できるようにする
- Loading branch information
1 parent
b0feed4
commit edbd54c
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
require "bcdice/result" | ||
|
||
module BCDice | ||
module CommonCommand | ||
module BarabaraDice | ||
# バラバラロールの結果を表すクラス | ||
class Result < ::BCDice::Result | ||
# @return [Integer] 成功数 | ||
attr_accessor :success_num | ||
|
||
# @param text [String, nil] 結果の文章 | ||
def initialize(text = nil) | ||
super(text) | ||
|
||
@success_num = 0 | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters