-
Notifications
You must be signed in to change notification settings - Fork 185
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
[SwordWorld/SwordWorld2.0/SwordWorld2.5] Result対応 #424
[SwordWorld/SwordWorld2.0/SwordWorld2.5] Result対応 #424
Conversation
Codecov Report
@@ Coverage Diff @@
## master #424 +/- ##
=======================================
Coverage 95.14% 95.15%
=======================================
Files 286 286
Lines 18471 18485 +14
=======================================
+ Hits 17575 17589 +14
Misses 896 896
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます。何点かコメントしましたので修正お願いします。
NO_TARGET = 0 | ||
SUCCESS = 1 | ||
FAILURE = 2 | ||
SUPER_SUCCESS = 3 | ||
CRITICAL = 4 | ||
FUMBLE = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum的な利用をする場合、IntegerではなくSymbolを定数の値としてください。
lib/bcdice/game_system/SwordWorld.rb
Outdated
@@ -301,6 +309,7 @@ def rollDice(_command) | |||
# @param rateResults [Array<String>] | |||
# @param dice_total [Integer] | |||
# @param round [Integer] | |||
# @return [Array<String, Boolean>] output, critical, fumble |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# @return [Array<String, Boolean>] output, critical, fumble | |
# @return [Array(String, Boolean, Boolean)] output, critical, fumble |
YARDではArrayをTupleのように使う場合このように書きます。
def result_str(total_sum, n_value_groups, fumble, critical) | ||
return "自動的失敗" if fumble | ||
return "自動的成功" if critical | ||
# @return [Integer] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# @return [Integer] | |
# @return [Symbol] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
そこまでせずとも |
#423 の SwordWorld/SwordWorld2.0/SwordWorld2.5 対応です。
威力表のクリファン対応および、2.0の超越判定の成功失敗/クリファン対応となります
通常の2d6は既に対応済みでした。