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 =

ダイスボットの使い方

<<~MESSAGETEXT
  ※「パラノイア」は完璧なゲームであるため特殊なダイスコマンドを必要としません。
  ※このダイスボットは部屋のシステム名表示用となります。
MESSAGETEXT

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