Sha256: b12a13bf06fef869b9415f80feb652f30b701f4211953620b575711156baaf9d

Contents?: true

Size: 910 Bytes

Versions: 1

Compression:

Stored size: 910 Bytes

Contents

module Medieval
  class Realm
    extend Attributes

    class << self
      def name
        FORMATS.rand.call.join(' ')
      end

    protected
      def main_name
        occupation[0..-rand(occupation.size/2)] + creature_name[0..-rand(occupation.size/2)].downcase + realm_suffix
      end

=begin
      def suffix
        %w(oin yar oyd aire atya uti aro yal iha).rand
      end
=end
      def realm_prefix
        %w(North East West South New Lake Port Far Lost Low High Middle).rand
      end

      def realm_suffix
        %w(county realm ton land ville berg burgh borough bury view port mouth stad furt chester mouth fort haven side shire).rand
      end


    end

    FORMATS = [
#      Proc.new {[ability, main_name, realm_suffix]},
      Proc.new {[main_name]},
#      Proc.new {[realm_prefix, ' ' , ability, main_name, realm_suffix]},
      Proc.new {[realm_prefix, main_name]}
    ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
medieval-0.5.0 lib/medieval/realm.rb