Class: BCDice::GameSystem::Cthulhu

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

Defined Under Namespace

Classes: CompareResult

Constant Summary collapse

ID =

ゲームシステムの識別子

'Cthulhu'
NAME =

ゲームシステム名

'クトゥルフ神話TRPG'
SORT_KEY =

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

'くとうるふしんわTRPG'
HELP_MESSAGE =

ダイスボットの使い方

"c=\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u5024 \uFF0F f=\u30D5\u30A1\u30F3\u30D6\u30EB\u5024 \uFF0F s=\u30B9\u30DA\u30B7\u30E3\u30EB\n\n1d100<=n    c\u30FBf\u30FBs\u3059\u3079\u3066\u30AA\u30D5\uFF08\u5358\u7D14\u306A\u6570\u5024\u6BD4\u8F03\u5224\u5B9A\u306E\u307F\u884C\u3044\u307E\u3059\uFF09\n\n\u30FBcfs\u5224\u5B9A\u4ED8\u304D\u5224\u5B9A\u30B3\u30DE\u30F3\u30C9\n\nCC   1d100\u30ED\u30FC\u30EB\u3092\u884C\u3046 c=1\u3001f=100\nCCB  \u540C\u4E0A\u3001c=5\u3001f=96\n\n\u4F8B\uFF1ACC<=80  \uFF08\u6280\u80FD\u502480\u3067\u884C\u70BA\u5224\u5B9A\u30021%\u30EB\u30FC\u30EB\u3067cf\u9069\u7528\uFF09\n\u4F8B\uFF1ACCB<=55 \uFF08\u6280\u80FD\u502455\u3067\u884C\u70BA\u5224\u5B9A\u30025%\u30EB\u30FC\u30EB\u3067cf\u9069\u7528\uFF09\n\n\u30FB\u7D44\u307F\u5408\u308F\u305B\u30ED\u30FC\u30EB\u306B\u3064\u3044\u3066\n\nCBR(x,y)  c=1\u3001f=100\nCBRB(x,y) c=5\u3001f=96\n\n\u30FB\u62B5\u6297\u8868\u30ED\u30FC\u30EB\u306B\u3064\u3044\u3066\nRES(x-y)  c=1\u3001f=100\nRESB(x-y) c=5\u3001f=96\n\n\u203B\u6545\u969C\u30CA\u30F3\u30D0\u30FC\u5224\u5B9A\n\n\u30FBCC(x) c=1\u3001f=100\nx=\u6545\u969C\u30CA\u30F3\u30D0\u30FC\u3002\u51FA\u76EEx\u4EE5\u4E0A\u304C\u51FA\u305F\u4E0A\u3067\u3001\u30D5\u30A1\u30F3\u30D6\u30EB\u304C\u540C\u6642\u306B\u767A\u751F\u3057\u305F\u5834\u5408\u3001\u5171\u306B\u51FA\u529B\u3059\u308B\uFF08\u30C6\u30AD\u30B9\u30C8\u300C\u30D5\u30A1\u30F3\u30D6\u30EB\uFF06\u6545\u969C\u300D\uFF09\n\u30D5\u30A1\u30F3\u30D6\u30EB\u3067\u306A\u3044\u5834\u5408\u3001\u6210\u529F\u30FB\u5931\u6557\u306B\u95A2\u308F\u3089\u305A\u30C6\u30AD\u30B9\u30C8\u300C\u6545\u969C\u300D\u306E\u307F\u3092\u51FA\u529B\u3059\u308B\uFF08\u6210\u529F\u30FB\u5931\u6557\u3092\u51FA\u529B\u305B\u305A\u3001\u4E0A\u66F8\u304D\u3057\u305F\u3082\u306E\u3092\u51FA\u529B\u3059\u308B\u5F62\uFF09\n\n\u30FBCCB(x) c=5\u3001f=96\n\u540C\u4E0A\n\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) ⇒ Cthulhu

Returns a new instance of Cthulhu.



53
54
55
56
57
58
# File 'lib/bcdice/game_system/Cthulhu.rb', line 53

def initialize(command)
  super(command)
  @special_percentage  = 20
  @critical_percentage = 1
  @fumble_percentage   = 1
end

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/Cthulhu.rb', line 60

def eval_game_system_specific_command(command)
  case command
  when /CCB/i
    # 5%
    @critical_percentage = 5
    @fumble_percentage   = 5
    return getCheckResult(command)
  when /CC/i
    # 1%
    @critical_percentage = 1
    @fumble_percentage   = 1
    return getCheckResult(command)
  when /RESB/i
    # 5%
    @critical_percentage = 5
    @fumble_percentage   = 5
    return getRegistResult(command)
  when /CBRB/i
    # 5%
    @critical_percentage = 5
    @fumble_percentage   = 5
    return getCombineRoll(command)
  when /RES/i
    # 1%
    @critical_percentage = 1
    @fumble_percentage   = 1
    return getRegistResult(command)
  when /CBR/i
    # 1%
    @critical_percentage = 1
    @fumble_percentage   = 1
    return getCombineRoll(command)
  end

  return nil
end