Class: BCDice::GameSystem::VampireTheMasquerade5th

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

Constant Summary collapse

ID =

ゲームシステムの識別子

'VampireTheMasquerade5th'
NAME =

ゲームシステム名

'Vampire: The Masquerade 5th Edition'
SORT_KEY =

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

'うあんはいあさますかれえと5'
HELP_MESSAGE =

ダイスボットの使い方

"\u30FB\u5224\u5B9A\u30B3\u30DE\u30F3\u30C9(nVMFx+x \u307E\u305F\u306F nVMIxHx)\n  VMF\u30B3\u30DE\u30F3\u30C9\u306FHunger\u30C0\u30A4\u30B9\u3068\u30C0\u30A4\u30B9\u30D7\u30FC\u30EB\u3092\u500B\u5225\u306B\u6307\u5B9A\u3059\u308B\u3002\n  VMI\u30B3\u30DE\u30F3\u30C9\u306FHunger\u30C0\u30A4\u30B9\u3092\u30C0\u30A4\u30B9\u30D7\u30FC\u30EB\u306E\u5185\u6570\u3068\u3057\u3066\u6307\u5B9A\u3059\u308B\u3002\n\n    \u4F8B\uFF1A\u96E3\u6613\u5EA62\u30019\u30C0\u30A4\u30B9\u30D7\u30FC\u30EB\u3067Hunger\u30C0\u30A4\u30B93\u500B\u306E\u5834\u5408\u3001\u305D\u308C\u305E\u308C\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u30B3\u30DE\u30F3\u30C9\u3068\u306A\u308B\u3002\n    2VMF6+3\n    2VMI9H3\n\n  \u96E3\u6613\u5EA6\u6307\u5B9A\uFF1A\u6210\u529F\u6570\u306E\u30AB\u30A6\u30F3\u30C8\u3001\u5224\u5B9A\u6210\u529F\u3068\u5931\u6557\u3001Critical\u51E6\u7406\u3001Critical Win\u3001Total Failure\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3046\n             \uFF08Hunger\u30C0\u30A4\u30B9\u304C\u3042\u308B\u5834\u5408\uFF09Messy Critical\u3068Bestial Failure\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3046\n  \u4F8B) (\u96E3\u6613\u5EA6)VMF(\u901A\u5E38\u30C0\u30A4\u30B9)+(Hunger\u30C0\u30A4\u30B9)\n      (\u96E3\u6613\u5EA6)VMF(\u901A\u5E38\u30C0\u30A4\u30B9)\n      (\u96E3\u6613\u5EA6)VMI(\u901A\u5E38\u30C0\u30A4\u30B9)H(Hunger\u30C0\u30A4\u30B9)\n      (\u96E3\u6613\u5EA6)VMI(\u901A\u5E38\u30C0\u30A4\u30B9)\n\n  \u96E3\u6613\u5EA6\u7701\u7565\uFF1A\u6210\u529F\u6570\u306E\u30AB\u30A6\u30F3\u30C8\u3001\u5224\u5B9A\u5931\u6557\u3001Critical\u51E6\u7406\u3001Total Failure\u3001\uFF08Hunger\u30C0\u30A4\u30B9\u304C\u3042\u308B\u5834\u5408\uFF09Bestial Failure\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3046\n              \u5224\u5B9A\u6210\u529F\u3001Messy Critical\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u308F\u306A\u3044\n              Critical Win\u3001\uFF08Hunger\u30C0\u30A4\u30B9\u304C\u3042\u308B\u5834\u5408\uFF09Bestial Failure\u3001Messy Critical\u306E\u30D2\u30F3\u30C8\u3092\u51FA\u529B\n  \u4F8B) VMF(\u901A\u5E38\u30C0\u30A4\u30B9)+(Hunger\u30C0\u30A4\u30B9)\n      VMF(\u901A\u5E38\u30C0\u30A4\u30B9)\n      VMI(\u901A\u5E38\u30C0\u30A4\u30B9)H(Hunger\u30C0\u30A4\u30B9)\n      VMI(\u901A\u5E38\u30C0\u30A4\u30B9)\n\n  \u96E3\u6613\u5EA60\u6307\u5B9A\uFF1ACritical\u51E6\u7406\u3068\u6210\u529F\u6570\u306E\u30AB\u30A6\u30F3\u30C8\u3092\u884C\u3044\u3001\u5168\u3066\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u308F\u306A\u3044\n  \u4F8B) 0VMF(\u901A\u5E38\u30C0\u30A4\u30B9)+(Hunger\u30C0\u30A4\u30B9)\n      0VMF(\u901A\u5E38\u30C0\u30A4\u30B9)\n      0VMI(\u901A\u5E38\u30C0\u30A4\u30B9)+(Hunger\u30C0\u30A4\u30B9)\n      0VMI(\u901A\u5E38\u30C0\u30A4\u30B9)\n\n"
DIFFICULTY_INDEX =
1
DICE_POOL_HUNGER_DICE_NO_INCLUDED_INDEX =
5
HUNGER_DICE_NO_INCLUDED_INDEX =
7
COMMAND_HUNGER_DICE_INCLUDED_INDEX =
9
DICE_POOL_HUNGER_DICE_INCLUDED_INDEX =
10
HUNGER_DICE_INCLUDED_INDEX =
12
NOT_CHECK_SUCCESS =

難易度に指定可能な特殊値

-1 # 判定成功にかかわるチェックを行わない(判定失敗に関わるチェックは行う)

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



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
86
87
88
89
90
91
92
93
94
95
# File 'lib/bcdice/game_system/VampireTheMasquerade5th.rb', line 60

def eval_game_system_specific_command(command)
  m = /\A(\d+)?(((VMF)(\d+)(\+(\d+))?)|((VMI)(\d+)(H(\d+))?))$/.match(command)
  unless m
    return ''
  end

  dice_pool, hunger_dice_pool = get_dice_pools(m)
  if dice_pool < 0
    return "ダイスプール0のときにHungerダイスは指定できません。"
  end
  if hunger_dice_pool > 5
    return "Hungerダイス指定は5ダイスが最大です。"
  end

  dice_text, success_dice, ten_dice, = make_dice_roll(dice_pool)
  result_text = "(#{dice_pool}D10"

  if hunger_dice_pool >= 0
    hunger_dice_text, hunger_success_dice, hunger_ten_dice, hunger_botch_dice = make_dice_roll(hunger_dice_pool)

    ten_dice += hunger_ten_dice
    success_dice += hunger_success_dice

    result_text = "#{result_text}+#{hunger_dice_pool}D10) > [#{dice_text}]+[#{hunger_dice_text}] "
  else
    hunger_ten_dice = 0
    hunger_botch_dice = 0
    result_text = "#{result_text}) > [#{dice_text}] "
  end

  success_dice += get_critical_success(ten_dice)

  difficulty = m[DIFFICULTY_INDEX] ? m[DIFFICULTY_INDEX].to_i : NOT_CHECK_SUCCESS

  return get_roll_result(result_text, success_dice, ten_dice, hunger_ten_dice, hunger_botch_dice, difficulty)
end