-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* カムズの追加 * カムズの脱i18n化と不要なinitalizeの削除
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
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,50 @@ | ||
# frozen_string_literal: true | ||
|
||
module BCDice | ||
module GameSystem | ||
class Comes < Base | ||
# ゲームシステムの識別子 | ||
ID = 'Comes' | ||
|
||
# ゲームシステム名 | ||
NAME = 'カムズ' | ||
|
||
# ゲームシステム名の読みがな | ||
SORT_KEY = 'かむす' | ||
|
||
# ダイスボットの使い方 | ||
HELP_MESSAGE = <<~INFO_MESSAGE_TEXT | ||
・各種表 | ||
判定ペナルティ表 PT | ||
INFO_MESSAGE_TEXT | ||
|
||
def initialize(command) | ||
super(command) | ||
|
||
@sort_add_dice = true | ||
@d66_sort_type = D66SortType::ASC | ||
end | ||
|
||
def eval_game_system_specific_command(command) | ||
return roll_tables(command, self.class::TABLES) | ||
end | ||
|
||
TABLES = { | ||
'PT' => DiceTable::Table.new( | ||
'判定ペナルティ表', | ||
'1D6', | ||
[ | ||
'恐ろしい目に合う。『恐怖』を与える。', | ||
'今見ているものを理解できない。『混乱』を与える。', | ||
'我を忘れて見とれてしまう。『魅了』を与える。', | ||
'思わぬ遠回りをしてしまう。『疲労』を与える。', | ||
'大きな失態を演じてしまう。『負傷』を与える。', | ||
'別の困難が立ちはだかる。新たに判定を行わせる。', | ||
] | ||
) | ||
}.freeze | ||
|
||
register_prefix(TABLES.keys) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[[ test ]] | ||
game_system = "Comes" | ||
input = "PT" | ||
output = "判定ペナルティ表(1) > 恐ろしい目に合う。『恐怖』を与える。" | ||
rands = [ | ||
{ sides = 6, value = 1 }, | ||
] | ||
|
||
[[ test ]] | ||
game_system = "Comes" | ||
input = "PT" | ||
output = "判定ペナルティ表(6) > 別の困難が立ちはだかる。新たに判定を行わせる。" | ||
rands = [ | ||
{ sides = 6, value = 6 }, | ||
] |