Class: BCDice::GameSystem::StellarKnights

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

Direct Known Subclasses

StellarKnights_Korean

Constant Summary collapse

ID =

ゲームシステムの識別子

'StellarKnights'
NAME =

ゲームシステム名

'銀剣のステラナイツ'
SORT_KEY =

ゲームシステム名の読みがな

'きんけんのすてらないつ'
HELP_MESSAGE =

ダイスボットの使い方

"\u30FB\u30A2\u30BF\u30C3\u30AF\u5224\u5B9A\u3000nSK[d][,k>l,...]\n[]\u5185\u306F\u7701\u7565\u53EF\u80FD\u3002\nn: \u30C0\u30A4\u30B9\u6570\u3001d: \u30A2\u30BF\u30C3\u30AF\u5224\u5B9A\u306B\u304A\u3051\u308B\u5BFE\u8C61\u306E\u9632\u5FA1\u529B\u3001k, l: \u30C0\u30A4\u30B9\u306E\u51FA\u76EE\u304Ck\u306A\u3089\u3070l\u306B\u5909\u66F4\uFF08\u30A2\u30DE\u30E9\u30F3\u30B5\u30B9\u306E\u30B9\u30AD\u30EB\u300C\u59CB\u307E\u308A\u306E\u90E8\u5C4B\u300D\u7528\uFF09\nd\u7701\u7565\u6642\u306F\u30C0\u30A4\u30B9\u3092\u632F\u3063\u305F\u7D50\u679C\u306E\u307F\u8868\u793A\u3002\uFF08nSK\u306FnB6\u3068\u540C\u3058\uFF09\n\n4SK: \u30C0\u30A4\u30B9\u30924\u500B\u632F\u3063\u3066\u3001\u305D\u306E\u7D50\u679C\u3092\u8868\u793A\n4+2SK: \u30C0\u30A4\u30B9\u30924+2 (=6) \u500B\u632F\u3063\u3066\u3001\u305D\u306E\u7D50\u679C\u3092\u8868\u793A\n5/2SK: \u30C0\u30A4\u30B9\u30925\u500B\u306E\u534A\u5206 (=2) \u500B\u632F\u3063\u3066\u3001\u305D\u306E\u7D50\u679C\u3092\u8868\u793A\n(5+3)/2SK: \u30C0\u30A4\u30B9\u3092(5+3)\u500B\u306E\u534A\u5206 (=4) \u500B\u632F\u3063\u3066\u3001\u305D\u306E\u7D50\u679C\u3092\u8868\u793A\n5SK3: \u3010\u30A2\u30BF\u30C3\u30AF\u5224\u5B9A\uFF1A5\u30C0\u30A4\u30B9\u3011\u3001\u5BFE\u8C61\u306E\u9632\u5FA1\u529B\u30923\u3068\u3057\u3066\u6210\u529F\u6570\u3092\u8868\u793A\n3SK,1>6: \u30C0\u30A4\u30B9\u30923\u500B\u632F\u308A\u3001\u51FA\u76EE\u304C1\u306E\u30C0\u30A4\u30B9\u3092\u5168\u30666\u306B\u5909\u66F4\u3057\u3001\u305D\u306E\u7D50\u679C\u3092\u8868\u793A\n6SK4,1>6,2>6: \u3010\u30A2\u30BF\u30C3\u30AF\u5224\u5B9A\uFF1A6\u30C0\u30A4\u30B9\u3011\u3001\u51FA\u76EE\u304C1\u30682\u306E\u30C0\u30A4\u30B9\u3092\u5168\u30666\u306B\u5909\u66F4\u3001\u5BFE\u8C61\u306E\u9632\u5FA1\u529B\u30924\u3068\u3057\u3066\u6210\u529F\u6570\u3092\u8868\u793A\n\n\u30FB\u57FA\u672C\nTT\uFF1A\u304A\u984C\u8868\nSTA    \uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868A\uFF1A\u6642\u9593 (Situation Table A)\nSTB    \uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868B\uFF1A\u5834\u6240 (ST B)\nSTB2[n]\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868B \u305D\u306E2\uFF1A\u5B66\u5712\u7DE8 (ST B 2)\n\u3000n: 1(\u30A2\u30FC\u30BB\u30EB\u30C8\u30EC\u30A4), 2(\u30A4\u30C7\u30A2\u30B0\u30ED\u30EA\u30A2), 3(\u30B7\u30C8\u30E9), 4(\u30D5\u30A3\u30ED\u30BD\u30D5\u30A3\u30A2), 5(\u8056\u30A2\u30FC\u30B8\u30A7\u30C6\u30A3\u30A2), 6(SoA)\nSTC    \uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868C\uFF1A\u8A71\u984C (ST C)\nALLS   \uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868\u5168\u3066\u3092\u4E00\u62EC\u3067\uFF08\u5B66\u5712\u7DE8\u9664\u304F\uFF09\nGAT\uFF1A\u6240\u5C5E\u7D44\u7E54\u6C7A\u5B9A (Gakuen Table)\nHOT\uFF1A\u5E0C\u671B\u8868 (Hope Table)\nDET\uFF1A\u7D76\u671B\u8868 (Despair Table)\nWIT\uFF1A\u9858\u3044\u4E8B\u8868 (Wish Table)\nYST\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868 (Your Story Table)\nYSTA\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868\uFF1A\u7570\u4E16\u754C (YST Another World)\nPET\uFF1A\u6027\u683C\u8868 (Personality Table)\n    \u6027\u683C\u8868\u30922\u56DE\u632F\u308A\u3001\u6027\u683C\u3092\u6C7A\u5B9A\u3059\u308B\n\n\u30FB\u9727\u3068\u685C\u306E\u30DE\u30EB\u30B8\u30CA\u30EA\u30A2\nYSTM\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868\uFF1A\u30DE\u30EB\u30B8\u30CA\u30EA\u30A2\u4E16\u754C (YST Marginalia)\nSTM\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868\uFF1A\u30DE\u30EB\u30B8\u30CA\u30EA\u30A2\u4E16\u754C (ST Marginalia)\nYSTL\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868\uFF1A\u624B\u7D19\u4E16\u754C (YST Letter)\nYSTR\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868\uFF1A\u30EA\u30B3\u30EC\u30AF\u30C8\u30FB\u30C9\u30FC\u30EB (YST Recollect-doll)\nSTBR\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868B\uFF1A\u5834\u6240\uFF08\u30EA\u30B3\u30EC\u30AF\u30C8\u30FB\u30C9\u30FC\u30EB\uFF09 (ST B Recollect-doll)\nSTCR\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868C\uFF1A\u30EA\u30B3\u30EC\u30AF\u30C8 (ST C Recollect)\nSTBS\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868B\uFF1A\u30B7\u30C8\u30E9\u30BB\u30C3\u30C6\u30A3\u30F3\u30B0 (ST B Sut Tu Real)\nSTE\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868\uFF1A\u30A8\u30AF\u30EA\u30D7\u30B9\u5C02\u7528 (ST Eclipse)\n\n\u30FB\u7D2B\u5F3E\u306E\u30AA\u30EB\u30C8\u30EA\u30F4\u30FC\u30C8\nFT\uFF1A\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8868 (Fragment Table)\n    \u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8868\u3092\uFF15\u56DE\u632F\u308B\nFTx\uFF1A\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8868\u3092x\u56DE\u632F\u308B\nYSTB\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868\uFF1A\u30D6\u30EA\u30F3\u30AC\u30FC (YST Bringer)\nYSTF\uFF1A\u3042\u306A\u305F\u306E\u7269\u8A9E\u8868\uFF1A\u30D5\u30A9\u30FC\u30B8 (YST Forge)\nSTAL\uFF1A\u30B7\u30C1\u30E5\u30A8\u30FC\u30B7\u30E7\u30F3\u8868\uFF1A\u30AA\u30EB\u30C8\u30EA\u30F4\u30FC\u30C8 (ST Alt-Levoot)\n"

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) ⇒ StellarKnights

Returns a new instance of StellarKnights.



69
70
71
72
73
74
# File 'lib/bcdice/game_system/StellarKnights.rb', line 69

def initialize(command)
  super(command)

  @sort_barabara_dice = true # バラバラロール(Bコマンド)でソート有
  @d66_sort_type = D66SortType::NO_SORT
end

Instance Method Details

#eval_game_system_specific_command(command) ⇒ Object



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/bcdice/game_system/StellarKnights.rb', line 76

def eval_game_system_specific_command(command)
  command = command.upcase

  if (table = self.class::TABLES[command])
    table.roll(@randomizer)
  elsif (m = %r{([()+/\d]+)SK(\d)?((,\d>\d)+)?}.match(command))
    num_dices = Arithmetic.eval(m[1], RoundType::FLOOR)

    unless num_dices.nil?
      resolute_action(num_dices, m[2] && m[2].to_i, m[3])
    end
  elsif command == 'STB2'
    roll_all_situation_b2_tables
  elsif command == 'ALLS'
    roll_all_situation_tables
  elsif command == "PET"
    roll_personality_table
  elsif (m = /FT(\d+)?/.match(command))
    num = (m[1] || 5).to_i
    roll_fragment_table(num)
  end
end