Class: BCDice::GameSystem::Emoklore

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

Direct Known Subclasses

Emoklore_Korean, GaiaCare

Constant Summary collapse

ID =

ゲームシステムの識別子

"Emoklore"
NAME =

ゲームシステム名

"エモクロアTRPG"
SORT_KEY =

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

「ゲームシステム名の読みがなの設定方法」(docs/dicebot_sort_key.md)を参考にして 設定してください

"えもくろあTRPG"
HELP_MESSAGE =

ダイスボットの使い方

"\u30FB\u6280\u80FD\u5024\u5224\u5B9A\uFF08xDM<=y / xDM<=yEz\uFF09\n  \"(\u500B\u6570)DM<=(\u5224\u5B9A\u5024)\"\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002\n  \u30C0\u30A4\u30B9\u306E\u500B\u6570\u306F\u7701\u7565\u53EF\u80FD\u3067\u3001\u7701\u7565\u3057\u305F\u5834\u54081\u500B\u306B\u306A\u308A\u307E\u3059\u3002\n  \u500B\u6570\u3084\u5224\u5B9A\u5024\u306B\u306F\u56DB\u5247\u6F14\u7B97\uFF08+-*/\uFF09\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n  \u672B\u5C3E\u306BEz\u3092\u4ED8\u3051\u308B\u3068\u30C0\u30A4\u30B9\u6570\u306Bz\u3092\u52A0\u7B97\u3057\u307E\u3059\u3002E-z\u3067\u6E1B\u7B97\u3082\u53EF\u80FD\u3067\u3059\u3002\n  \u4F8B\uFF092DM<=5 DM<=8 2+2DM<=5 \u2192 4\u500B\u3067\u5224\u5B9A\u50245\n      2DM<=5E2 \u2192 4\u500B\u3067\u5224\u5B9A\u50245 / 3DM<=5E-1 \u2192 2\u500B\u3067\u5224\u5B9A\u50245\n  \u203B\u30C0\u30A4\u30B9\u6570\u304C0\u4EE5\u4E0B\u306B\u306A\u308B\u5834\u5408\u306F\u78BA\u5B9A\u5931\u6557\n\n\u30FB\u6280\u80FD\u5024\u5224\u5B9A\uFF08sDAa+z)\n  \"(\u6280\u80FD\u30EC\u30D9\u30EB)DA(\u80FD\u529B\u5024)+(\u30C0\u30A4\u30B9\u30DC\u30FC\u30CA\u30B9)\"\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002\n  \u30C0\u30A4\u30B9\u30DC\u30FC\u30CA\u30B9\u306E\u500B\u6570\u306F\u7701\u7565\u53EF\u80FD\u3067\u3001\u7701\u7565\u3057\u305F\u5834\u54080\u306B\u306A\u308A\u307E\u3059\u3002\n  \u6280\u80FD\u30EC\u30D9\u30EB\u306F1\uFF5E3\u306E\u6570\u5024\u3001\u307E\u305F\u306F\u30D9\u30FC\u30B9\u6280\u80FD\u306E\u5834\u5408\"b\"\u304C\u5165\u308A\u307E\u3059\u3002\n  \u30C0\u30A4\u30B9\u306E\u500B\u6570\u306F\u6280\u80FD\u30EC\u30D9\u30EB\u3068\u30C0\u30A4\u30B9\u30DC\u30FC\u30CA\u30B9\u306E\u500B\u6570\u306B\u3088\u308A\u6C7A\u5B9A\u3057\u3001s+z\u500B\u306E\u30C0\u30A4\u30B9\u3092\u632F\u308A\u307E\u3059\u3002\uFF08s=\"b\"\u306E\u5834\u5408\u306Fs=1\uFF09\n  \u5224\u5B9A\u5024\u306Fs+a\u3068\u306A\u308A\u307E\u3059\u3002\uFF08s=\"b\"\u306E\u5834\u5408\u306Fs=0\uFF09\n"
CRITICAL_VALUE =
1
FUMBLE_VALUE =
10

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, #initialize, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?

Methods included from Translate

#translate

Constructor Details

This class inherits a constructor from BCDice::Base

Instance Method Details

#eval_game_system_specific_command(command) ⇒ String?

ダイスボット固有コマンドの処理を行う

Parameters:

  • command (String)

    コマンド

Returns:

  • (String)

    ダイスボット固有コマンドの結果

  • (nil)

    無効なコマンドだった場合



47
48
49
50
51
52
53
54
# File 'lib/bcdice/game_system/Emoklore.rb', line 47

def eval_game_system_specific_command(command)
  case command
  when %r{^[-+*/\d]*DM<=[-+*/\d]+}
    roll_dm(command)
  when /^(B|\d*)DA\d+(\+)?\d*/
    roll_da(command)
  end
end