Class: BCDice::GameSystem::ChroniclesOfDarkness2e

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

Constant Summary collapse

ID =

ゲームシステムの識別子

'ChroniclesOfDarkness2e'
NAME =

ゲームシステム名

'Chronicles of Darkness 2nd Edtion'
SORT_KEY =

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

'くろにくるすおふたあくねす2'
HELP_MESSAGE =

ダイスボットの使い方

<<~MESSAGETEXT
  ・判定コマンド(CDx@cWdAs)
      x:ダイスプール(0以下でChance Roll)
      c:振り足し値(省略可、省略時は10)。8-10の値を取る。Chance Rollには適用されない。
      d:武器ダメージ修正(省略可)。判定による成功数が1以上のときにダメージとして修正値を加算。
      s:自動成功数(省略可)。成功数に加算される。

      例1:6ダイスプール、10 again
      CD6
      CD6@10

      例2:9ダイスプール、9の振り足し(9 again)、自動成功1
      CD9@9A1

      例3:0ダイスプール(Chance Roll)、8の振り足し(8 again, 適用されない)、自動成功1、武器修正+2
      CD0@8W2A1

      例4:-1ダイスプール(Chance Roll)
      CD(4-5)

MESSAGETEXT
DICE_POOL_INDEX =
2
AGAIN_NUMBER_INDEX =
4
WEAPON_MODIFIER_INDEX =
6
AUTO_SUCCESS_INDEX =
8
EXCEPTIONAL_SUCCESS_THRESHOLD =

Exceptional Successの閾値

5

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



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/bcdice/game_system/ChroniclesOfDarkness2e.rb', line 47

def eval_game_system_specific_command(command)
  m = /\A(CD)(-?\d+)(@([8-9]|10))?(W(\d+))?(A(\d+))?$/.match(command)
  unless m
    return ''
  end

  # 引数分解
  dice_pool, again_number, weapon_modifier, auto_success = get_arguments(m)

  # ダイスロール
  success_number, dice_text, dramatic_failure = make_dice_roll(dice_pool, again_number)

  # 結果判定
  get_roll_result(dice_pool, dice_text, success_number, weapon_modifier, auto_success, dramatic_failure)
end