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 =

ダイスボットの使い方

<<~MESSAGETEXT
  ・技能値判定(xDM<=y / xDM<=yEz)
    "(個数)DM<=(判定値)"で指定します。
    ダイスの個数は省略可能で、省略した場合1個になります。
    個数や判定値には四則演算(+-*/)を使用できます。
    末尾にEzを付けるとダイス数にzを加算します。E-zで減算も可能です。
    例)2DM<=5 DM<=8 2+2DM<=5 → 4個で判定値5
        2DM<=5E2 → 4個で判定値5 / 3DM<=5E-1 → 2個で判定値5
    ※ダイス数が0以下になる場合は確定失敗

  ・技能値判定(sDAa+z)
    "(技能レベル)DA(能力値)+(ダイスボーナス)"で指定します。
    ダイスボーナスの個数は省略可能で、省略した場合0になります。
    技能レベルは1~3の数値、またはベース技能の場合"b"が入ります。
    ダイスの個数は技能レベルとダイスボーナスの個数により決定し、s+z個のダイスを振ります。(s="b"の場合はs=1)
    判定値はs+aとなります。(s="b"の場合はs=0)
MESSAGETEXT
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