Class: BCDice::GameSystem::Paranoia

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

Constant Summary collapse

ID =

ゲームシステムの識別子

'Paranoia'
NAME =

ゲームシステム名

'パラノイア'
SORT_KEY =

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

'はらのいあ'
HELP_MESSAGE =

ダイスボットの使い方

"\u203B\u300C\u30D1\u30E9\u30CE\u30A4\u30A2\u300D\u306F\u5B8C\u74A7\u306A\u30B2\u30FC\u30E0\u3067\u3042\u308B\u305F\u3081\u7279\u6B8A\u306A\u30C0\u30A4\u30B9\u30B3\u30DE\u30F3\u30C9\u3092\u5FC5\u8981\u3068\u3057\u307E\u305B\u3093\u3002\n\u203B\u3053\u306E\u30C0\u30A4\u30B9\u30DC\u30C3\u30C8\u306F\u90E8\u5C4B\u306E\u30B7\u30B9\u30C6\u30E0\u540D\u8868\u793A\u7528\u3068\u306A\u308A\u307E\u3059\u3002\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) ⇒ Paranoia

Returns a new instance of Paranoia.



23
24
25
26
# File 'lib/bcdice/game_system/Paranoia.rb', line 23

def initialize(command)
  super(command)
  @enabled_upcase_input = false
end

Instance Method Details

#eval_game_system_specific_command(command) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/bcdice/game_system/Paranoia.rb', line 28

def eval_game_system_specific_command(command)
  debug('eval_game_system_specific_command command', command)

  result = ''

  case command
  when /geta/i
    result = getaRoll()
  end

  return nil if result.empty?

  return "#{command} > #{result}"
end

#getaRollObject



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

def getaRoll()
  result = ""

  dice = @randomizer.roll_once(2)

  result += "幸福ですか? > "

  getaString = ''
  case dice
  when 1
    getaString = '幸福です'
  when 2
    getaString = '幸福ではありません'
  end

  result += getaString

  return result
end