Class: BCDice::GameSystem::ShinobiGami
- Defined in:
- lib/bcdice/game_system/ShinobiGami.rb
Direct Known Subclasses
Defined Under Namespace
Classes: DemonSkillTableForMetamorphose
Constant Summary collapse
- ID =
ゲームシステムの識別子
'ShinobiGami'- NAME =
ゲームシステム名
'シノビガミ'- SORT_KEY =
ゲームシステム名の読みがな
'しのひかみ'- HELP_MESSAGE =
ダイスボットの使い方 25/01/17:書式成形(半角スペース×2に統一、同じ書籍のシーン表は改行なしで列挙)
<<~INFO_MESSAGE_TEXT ・行為判定 nSG@s#f>=x 2D6の行為判定を行う。ダイス数が指定された場合、大きい出目2個を採用する。 n: ダイス数 (省略時 2) s: スペシャル値 (省略時 12) f: ファンブル値 (省略時 2) x: 目標値 (省略可) 例)SG, SG@11, SG@11#3, SG#3>=7, 3SG>=7 ・行為判定以外の表 以下の表は「回数+コマンド」で複数回振れる 例)3RCT, 2WT ・ランダム特技決定表 RTTn (n:分野番号、省略可能) 1器術 2体術 3忍術 4謀術 5戦術 6妖術 ・ランダム分野表 RCT ・各種表:基本ルールブック以降 ファンブル表 FT、戦場表 BT、感情表 ET、変調表 WT、戦国変調表 GWT、プライズ効果表 PT 妖魔化(異形表、妖魔忍法表一括) MT、異形表 MTR、妖魔忍法表(x:A,B,C) DSx ・各種表:流派ブック以降 比良坂流派ブック パニック表 HRPT 鞍馬流派ブック 新戦場表 BNT 御斎流派ブック 覚醒表 OTAT 忍法授業シーン表(x:1-攻撃系 2-防御系 3-戦略系)NCTx 【数奇】OTS 隠忍流派ブック 妖術変調対応表(x:なし-現代/戦国、1-現代、2-戦国)YWTx 妖魔化(新異形表利用) NMT、新異形表 NMTR、妖魔忍法表(x:1-異霊 2-凶身 3-神化 4-攻激)DSNx 出物表 ONDT ・各種表:基本ルールブック改訂版以前 無印 旧ファンブル表 OFT 、旧変調表 OWT、旧戦場表 OBT、異形表 MT 怪 怪ファンブル表 KFT、怪変調表 KWT (基本ルールブックと同一) ・シーン表 基本ルールブック 通常 ST、出島 DST、都市 CST、館 MST、トラブル TST、回想 KST、日常 NST、学校 GAST、戦国 GST 忍秘伝 中忍試験 HC、滅びの塔 HT、影の街 HK、夜行列車 HY、病院 HO、龍動 HR、密室 HM、催眠 HS 正忍記 カジノ TC、ロードムービー TRM、マスカレイド・キャッスル TMC、月天に死の咲く TGS、恋人との日々 TKH、学校(黒星祭) TKG、魔都学園 TMG、魔都東京 TMT 流派ブック以降 御斎流派ブック 不良高校 OTFK 基本ルールブック改訂版以前 死 東京 TKST リプレイ戦1〜2巻 京都 KYST、神社仏閣 JBST その他 秋空に雪舞えば AKST、夏の終わり NTST、出島EX DXST、災厄 CLST、斜歯ラボ HLST、培養プラント PLST ・D66ダイスあり INFO_MESSAGE_TEXT
Instance Attribute Summary
Attributes inherited from Base
#d66_sort_type, #default_cmp_op, #default_target_number, #randomizer, #reroll_dice_reroll_threshold, #round_type, #sides_implicit_d, #upper_dice_reroll_threshold
Instance Method Summary collapse
- #eval_game_system_specific_command(command) ⇒ Object
-
#initialize(command) ⇒ ShinobiGami
constructor
A new instance of ShinobiGami.
- #repeat_table(command) ⇒ Object
- #result_2d6(total, dice_total, _dice_list, cmp_op, target) ⇒ Object
Methods inherited from Base
#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, eval, #eval, #grich_text, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?
Methods included from Translate
Constructor Details
#initialize(command) ⇒ ShinobiGami
Returns a new instance of ShinobiGami.
96 97 98 99 100 101 |
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 96 def initialize(command) super(command) @sort_add_dice = true @d66_sort_type = D66SortType::ASC end |
Instance Method Details
#eval_game_system_specific_command(command) ⇒ Object
121 122 123 |
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 121 def eval_game_system_specific_command(command) return action_roll(command) || repeat_table(command) end |
#repeat_table(command) ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 125 def repeat_table(command) times = command.start_with?(/\d/) ? command.to_i : 1 key = command.sub(/^\d+/, '') results = [*0...times].map do |_| roll_tables(key, self.class::TABLES) || roll_tables(key, self.class::SCENE_TABLES) || roll_tables(key, self.class::DEMON_SKILL_TABLES) || roll_tables(key, self.class::DEMON_SKILL_TABLES_NEW) || self.class::RTT.roll_command(@randomizer, key) end.compact return nil if results.empty? return results.join("\n") end |
#result_2d6(total, dice_total, _dice_list, cmp_op, target) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 103 def result_2d6(total, dice_total, _dice_list, cmp_op, target) return nil unless cmp_op == :>= if dice_total <= 2 Result.fumble(translate("fumble")) elsif dice_total >= 12 Result.critical(translate("ShinobiGami.special")) elsif target == "?" nil elsif total >= target Result.success(translate("success")) else Result.failure(translate("failure")) end end |