class BCDice::GameSystem::GoldenSkyStories

Constants

HELP_MESSAGE

ダイスボットの使い方

ID

ゲームシステムの識別子

NAME

ゲームシステム名

SORT_KEY

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

Public Class Methods

new(command) click to toggle source
Calls superclass method BCDice::Base::new
# File lib/bcdice/game_system/GoldenSkyStories.rb, line 26
def initialize(command)
  super(command)
  @enabled_upcase_input = false
end

Public Instance Methods

eval_game_system_specific_command(command) click to toggle source
# 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
getaRoll() click to toggle source
# 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