Class: BCDice::GameSystem::KemonoNoMori
- Defined in:
- lib/bcdice/game_system/KemonoNoMori.rb
Constant Summary collapse
- ID =
ゲームシステムの識別子
'KemonoNoMori'- NAME =
ゲームシステム名
'獸ノ森'- SORT_KEY =
ゲームシステム名の読みがな
'けもののもり'- HELP_MESSAGE =
ダイスボットの使い方
"\u30FB\u884C\u70BA\u5224\u5B9A(\u6210\u529F\u5EA6\u81EA\u52D5\u7B97\u51FA): KAx[\u00B1y]\n\u30FB\u7D99\u7D9A\u5224\u5B9A(\u6210\u529F\u5EA6+1\u56FA\u5B9A): KCx[\u00B1y]\n x=\u76EE\u6A19\u5024\n y=\u76EE\u6A19\u5024\u3078\u306E\u4FEE\u6B63(\u4EFB\u610F) x+y-z \u306E\u3088\u3046\u306B\u8907\u6570\u6307\u5B9A\u53EF\u80FD\n \u4F8B1\uFF09KA7+3 \u2192 \u76EE\u6A19\u50247\u306B\u30D7\u30E9\u30B93\u306E\u4FEE\u6B63\u3092\u52A0\u3048\u305F\u884C\u70BA\u5224\u5B9A\n \u4F8B2\uFF09KC6 \u2192 \u76EE\u6A19\u50246\u306E\u7D99\u7D9A\u5224\u5B9A\n\u30FB\u7F60\u52D5\u4F5C\u5224\u5B9A: CTR\n \u7F60\u3054\u3068\u306B1D12\u3092\u632F\u308B\u300212\u304C\u51FA\u305F\u5834\u5408\u306F\u7F60\u304C\u52D5\u4F5C\u3057\u3001\u7372\u7269\u304C\u305D\u306E\u52B9\u679C\u3092\u53D7\u3051\u308B\n\u30FB\u5404\u7A2E\u8868\n \u30FB\u5927\u5931\u6557\u8868: FT\n \u30FB\u80FD\u529B\u5024\u30E9\u30F3\u30C0\u30E0\u6C7A\u5B9A\u8868: RST\n \u30FB\u30E9\u30F3\u30C0\u30E0\u6240\u8981\u6642\u9593\u8868: RTT\n \u30FB\u30E9\u30F3\u30C0\u30E0\u6D88\u8017\u8868: RET\n \u30FB\u30E9\u30F3\u30C0\u30E0\u5929\u6C17\u8868: RWT\n \u30FB\u30E9\u30F3\u30C0\u30E0\u5929\u6C17\u6301\u7D9A\u8868: RWDT\n \u30FB\u30E9\u30F3\u30C0\u30E0\u906E\u853D\u7269\u8868\uFF08\u5C4B\u5916\uFF09: ROMT\n \u30FB\u30E9\u30F3\u30C0\u30E0\u906E\u853D\u7269\u8868\uFF08\u5C4B\u5185\uFF09: RIMT\n \u30FB\u9003\u8D70\u4F53\u9A13\u8868: EET\n \u30FB\u98DF\u6750\u63A1\u96C6\u8868: GFT\n \u30FB\u6C34\u63A1\u96C6\u8868: GWT\n \u30FB\u767D\u306E\u9B54\u77F3\u52B9\u679C\u8868: WST\n"- TABLES =
{ 'FT' => DiceTable::RangeTable.new( '大失敗表', '1D12', [ [1..3, '【余裕】が3点減少する(最低0まで)'], [4..5, 'ランダムな荷物1個が落ちて行方不明になる(大失敗したエリアのアイテム調査で見つけることが可能)'], [6..7, 'ランダムな荷物1個が破壊される'], [8..9, 'ランダム天気表を使用し、結果をターンの終了まで適用する'], [10, 'ランダムな準備している小道具1個が破壊される'], [11, '着想している防具が破壊される'], [12, '準備している武器が破壊される'], ] ), 'RST' => DiceTable::RangeTable.new( '能力値ランダム決定表', '1D12', [ [1..2, '【移動】'], [3..4, '【格闘】'], [5..6, '【射撃】'], [7..8, '【製作】'], [9..10, '【察知】'], [11..12, '【自制】'], ] ), 'RTT' => DiceTable::RangeTable.new( 'ランダム所要時間表', '1D12', [ [1..3, '2'], [4..6, '3'], [7..9, '4'], [10..12, '5'], ] ), 'RET' => DiceTable::RangeTable.new( 'ランダム消耗表', '1D12', [ [1..3, '0'], [4..6, '1'], [7..9, '2'], [10..12, '4'], ] ), 'RWT' => DiceTable::RangeTable.new( 'ランダム天気表', '1D12', [ [1..2, '濃霧'], [3..4, '大雨'], [5..6, '雷雨'], [7..8, '強風'], [9..10, '酷暑'], [11..12, '極寒'], ] ), 'RWDT' => DiceTable::RangeTable.new( 'ランダム天気持続表', '1D12', [ [1..2, '1ターン'], [3..4, '3ターン'], [5..6, '6ターン'], [7..8, '24ターン'], [9..10, '72ターン'], [11..12, '156ターン'], ] ), 'ROMT' => DiceTable::RangeTable.new( 'ランダム遮蔽物表(屋外)', '1D12', [ [1..2, '【藪】耐久度3,軽減値1,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-1の修正を付加'], [3..5, '【木】耐久度5,軽減値2,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-1の修正を付加'], [6..8, '【大木】耐久度7,軽減値3,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-2の修正を付加'], [9..10, '【岩】耐久度6,軽減値4,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-1の修正を付加/コンタクト内で行われる格闘攻撃のダメージ+1'], [11..12, '【岩壁】耐久度8,軽減値4,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-2の修正を付加/コンタクト内で行われる格闘攻撃のダメージ+2'], ] ), 'RIMT' => DiceTable::RangeTable.new( 'ランダム遮蔽物表(屋内)', '1D12', [ [1..4, '【木材の壁】耐久度4,軽減値2,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-1の修正を付加'], [5..8, '【木材の扉】耐久度4,軽減値2,特殊効果:コンタクト内のキャラクターに対する射撃攻撃判定に-1、接触判定と突撃判定に-2の修正を付加'], [9..12, '【木製家具】耐久度3,軽減値2,特殊効果:コンタクト内で行われる格闘攻撃のダメージ+1'], ] ), 'EET' => DiceTable::RangeTable.new( '逃走体験表', '1D12', [ [1..3, '【余裕】が0になる'], [4..6, '任意の【絆】を合計2点減少する'], [7..9, '全ての荷物を失う(逃走したエリアに配置され、調査で発見可能)'], [10..12, '全ての武器と防具と小道具と荷物を失う(逃走したエリアに配置され、調査で発見可能)'], ] ), 'GFT' => DiceTable::RangeTable.new( '食材採集表', '1D12', [ [1..2, '食べられる根(栄養価:2)'], [3..5, '食べられる草(栄養価:3)'], [6..8, '食べられる実(栄養価:5)'], [9..10, '小型動物(栄養価:10)'], [11, '大型動物(栄養価:40)'], [12, '気持ち悪い虫(栄養価:1)'], ] ), 'GWT' => DiceTable::RangeTable.new( '水採集表', '1D12', [ [1..6, '汚水'], [7..11, '飲料水'], [12, '毒水'], ] ), 'WST' => DiceTable::Table.new( '白の魔石効果表', '1D12', [ '役に立たないものの色を変える', '役に立たないものを大きくする', '役に立たないものを小さくする', '役に立たないものを保存する', '役に立たないものを復元する', '役に立たないものを召喚する', '役に立たないものを動かす', '役に立たないものを増やす', '役に立たないものを貼り付ける', '役に立たないものを作り出す', '小型動物を召喚する', '大型動物を召喚する', ] ), }.freeze
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
- #check_1D12(command, is_action_judge) ⇒ Object
- #eval_game_system_specific_command(command) ⇒ Object
- #getEscapeExperienceTableResult(command) ⇒ Object
- #getTrapResult ⇒ Object
Methods inherited from Base
#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, #eval, eval, #grich_text, #initialize, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?
Methods included from Translate
Constructor Details
This class inherits a constructor from BCDice::Base
Instance Method Details
#check_1D12(command, is_action_judge) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/bcdice/game_system/KemonoNoMori.rb', line 58 def check_1D12(command, is_action_judge) debug('獸ノ森の1d12判定') m = /K[AC](\d[-+\d]*)/.match(command) unless m return '' end # 修正込みの目標値を計算 target_total = ArithmeticEvaluator.eval(m[1]) debug('target_total', target_total) # 行為判定の成功度は [目標値の10の位の数+1] # 継続判定の成功度は固定で+1 success_degree = is_action_judge ? target_total / 10 + 1 : 1 dice_total = @randomizer.roll_once(12) debug('dice_total, target_total, success_degree = ', dice_total, target_total, success_degree) if dice_total == 12 return "(1D12<=#{target_total}) > #{dice_total} > 大失敗" elsif dice_total == 11 return "(1D12<=#{target_total}) > #{dice_total} > 大成功(成功度+#{success_degree}, 次の継続判定の目標値を10に変更)" elsif dice_total <= target_total return "(1D12<=#{target_total}) > #{dice_total} > 成功(成功度+#{success_degree})" else return "(1D12<=#{target_total}) > #{dice_total} > 失敗" end end |
#eval_game_system_specific_command(command) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/bcdice/game_system/KemonoNoMori.rb', line 43 def eval_game_system_specific_command(command) case command when /KA\d[-+\d]*/ return check_1D12(command, true) when /KC\d[-+\d]*/ return check_1D12(command, false) when 'CTR' return getTrapResult() when 'EET' return getEscapeExperienceTableResult(command) else return roll_tables(command, TABLES) end end |
#getEscapeExperienceTableResult(command) ⇒ Object
108 109 110 111 112 |
# File 'lib/bcdice/game_system/KemonoNoMori.rb', line 108 def getEscapeExperienceTableResult(command) escapeExperience = roll_tables(command, TABLES) escapeDuration = @randomizer.roll_once(12) return "#{escapeExperience} (再登場: #{escapeDuration}時間後)" end |
#getTrapResult ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/bcdice/game_system/KemonoNoMori.rb', line 87 def getTrapResult() trapCheckNumber = @randomizer.roll_once(12) # 12が出た場合のみ罠が動作する if trapCheckNumber == 12 chaseNumber = @randomizer.roll_once(12) chase = nil case chaseNumber when 1, 2, 3, 4 chase = '小型動物' when 5, 6, 7, 8 chase = '大型動物' when 9, 10, 11, 12 chase = '人間の放浪者' end return "罠動作チェック(1D12) > #{trapCheckNumber} > 罠が動作していた! > 獲物表(#{chaseNumber}) > #{chase}が罠にかかっていた" end return "罠動作チェック(1D12) > #{trapCheckNumber} > 罠は動作していなかった" end |