Skip to content

Commit

Permalink
カムズの脱i18n化と不要なinitalizeの削除
Browse files Browse the repository at this point in the history
  • Loading branch information
raa0121 committed Nov 8, 2020
1 parent 20129fe commit b018f3c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
14 changes: 0 additions & 14 deletions i18n/Comes/ja_jp.yml

This file was deleted.

25 changes: 14 additions & 11 deletions lib/bcdice/game_system/Comes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,26 @@ class Comes < Base

def initialize(command)
super(command)

@sort_add_dice = true
@enabled_d66 = true
@d66_sort_type = D66SortType::ASC
end

def eval_game_system_specific_command(command)
return roll_tables(command, self.class::TABLES)
end

def self.translate_tables(locale)
{
"PT" => DiceTable::Table.from_i18n("Comes.table.PT", locale),
}
end

TABLES = translate_tables(:ja_jp)
TABLES = {
'PT' => DiceTable::Table.new(
'判定ペナルティ表',
'1D6',
[
'恐ろしい目に合う。『恐怖』を与える。',
'今見ているものを理解できない。『混乱』を与える。',
'我を忘れて見とれてしまう。『魅了』を与える。',
'思わぬ遠回りをしてしまう。『疲労』を与える。',
'大きな失態を演じてしまう。『負傷』を与える。',
'別の困難が立ちはだかる。新たに判定を行わせる。',
]
)
}

register_prefix(TABLES.keys)
end
Expand Down

0 comments on commit b018f3c

Please sign in to comment.