Class: BCDice::GameSystem::GoldenSkyStories

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

Constant Summary collapse

ID =

ゲームシステムの識別子

'GoldenSkyStories'
NAME =

ゲームシステム名

'ゆうやけこやけ'
SORT_KEY =

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

'ゆうやけこやけ'
HELP_MESSAGE =

ダイスボットの使い方

"\u203B\u300C\u3086\u3046\u3084\u3051\u3053\u3084\u3051\u300D\u306F\u30C0\u30A4\u30B9\u30ED\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u306A\u3044\u30B7\u30B9\u30C6\u30E0\u3067\u3059\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\n\u30FB\u4E0B\u99C4\u5360\u3044 (GETA)\n  \u3042\u30FC\u3057\u305F\u3066\u3093\u304D\u306B\u306A\u30FC\u308C\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) ⇒ GoldenSkyStories

Returns a new instance of GoldenSkyStories.



26
27
28
29
# File 'lib/bcdice/game_system/GoldenSkyStories.rb', line 26

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

Instance Method Details

#eval_game_system_specific_command(command) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/bcdice/game_system/GoldenSkyStories.rb', line 31

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



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/bcdice/game_system/GoldenSkyStories.rb', line 46

def getaRoll()
  result = ""
  dice = @randomizer.roll_once(7)

  # result << " あーしたてんきになーれっ > [#{diceList.join(',')}] > "
  result += "下駄占い > "

  getaString = ''
  case dice
  when 1
    getaString = '裏:あめ'
  when 2
    getaString = '表:はれ'
  when 3
    getaString = '裏:あめ'
  when 4
    getaString = '表:はれ'
  when 5
    getaString = '裏:あめ'
  when 6
    getaString = '表:はれ'
  when 7
    getaString = '横:くもり'
  end

  result += getaString

  return result
end