Class: BCDice::GameSystem::ShinobiGami

Inherits:
Base
  • Object
show all
Defined in:
lib/bcdice/game_system/ShinobiGami.rb

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
SPECIAL =
"スペシャル(【生命力】1点か変調一つを回復)"
RTT =
DiceTable::SaiFicSkillTable.new(
  [
    ['器術', ['絡繰術', '火術', '水術', '針術', '仕込み', '衣装術', '縄術', '登術', '拷問術', '壊器術', '掘削術']],
    ['体術', ['騎乗術', '砲術', '手裏剣術', '手練', '身体操術', '歩法', '走法', '飛術', '骨法術', '刀術', '怪力']],
    ['忍術', ['生存術', '潜伏術', '遁走術', '盗聴術', '腹話術', '隠形術', '変装術', '香術', '分身の術', '隠蔽術', '第六感']],
    ['謀術', ['医術', '毒術', '罠術', '調査術', '詐術', '対人術', '遊芸', '九ノ一の術', '傀儡の術', '流言の術', '経済力']],
    ['戦術', ['兵糧術', '鳥獣術', '野戦術', '地の利', '意気', '用兵術', '記憶術', '見敵術', '暗号術', '伝達術', '人脈']],
    ['妖術', ['異形化', '召喚術', '死霊術', '結界術', '封術', '言霊術', '幻術', '瞳術', '千里眼の術', '憑依術', '呪術']],
  ],
  s_format: "『%<category_name>s』%<skill_name>s",
  rtt_format: "ランダム指定特技表(%<category_dice>d,%<row_dice>d) > %<text>s"
)

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

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

#translate

Constructor Details

#initialize(command) ⇒ ShinobiGami

Returns a new instance of ShinobiGami.



93
94
95
96
97
98
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 93

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



120
121
122
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 120

def eval_game_system_specific_command(command)
  return action_roll(command) || repeat_table(command)
end

#repeat_table(command) ⇒ Object



124
125
126
127
128
129
130
131
132
133
134
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 124

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, TABLES) || roll_tables(key, SCENE_TABLES) ||
      roll_tables(key, DEMON_SKILL_TABLES) || roll_tables(key, DEMON_SKILL_TABLES_NEW) || 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



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/bcdice/game_system/ShinobiGami.rb', line 102

def result_2d6(total, dice_total, _dice_list, cmp_op, target)
  return nil unless cmp_op == :>=

  if dice_total <= 2
    Result.fumble("ファンブル")
  elsif dice_total >= 12
    Result.critical(SPECIAL)
  elsif target == "?"
    nil
  elsif total >= target
    Result.success("成功")
  else
    Result.failure("失敗")
  end
end