module Yharian

based on new-harizon.rb

Constants

VOICES

Public Class Methods

text() click to toggle source
# File lib/plugins/yhara.rb, line 111
def self.text
  if ( @@context.last && Yhara === @@context.last.speaker && rand < 0.25 ) || rand < 0.01
    speaker = Jenifer.new
  elsif @@context.last && @@context.last.words =~ /y hara/ and @@context.last.interrogative? and rand < 0.25
    speaker = Yhara.new
  else
    speaker = @@speakers[rand(2)]
  end

  remark = speaker.talk(@@context).first
  @@context.push remark
  remark.text
end