medieval 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/medieval/attributes.rb +16 -12
- data/lib/medieval/battalion.rb +15 -10
- data/lib/medieval/realm.rb +18 -17
- data/lib/medieval/soldier.rb +1 -1
- data/medieval.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/medieval/attributes.rb
CHANGED
@@ -4,33 +4,37 @@ require 'active_support/core_ext/integer/inflections'
|
|
4
4
|
|
5
5
|
module Medieval
|
6
6
|
module Attributes
|
7
|
-
|
8
|
-
protected
|
7
|
+
|
8
|
+
protected
|
9
9
|
def creature_name
|
10
10
|
%w(Dragon Cyclop Wyvern Stud Dwarf Aardvark Buffalo Ant Anteater Antelope Ape Armadillo Donkey Baboon Badger Bat Bear Beaver Bee Bison Boar Bush Butterfly Camel Cat Cattle Chamois Cheetah Chicken Chimpanzee Cobra Cockroach Cormorant Coyote Crab Crane Crocodile Crow Deer Dog Dogfish Dolphin Dove Dragonfly Duck Dugong Eagle Echidna Eel Eland Elephant Elk Falcon Ferret Finch Fly Fox Frog Gaur Gazelle Gerbil Giant Panda Giraffe Gnu Goat Goose Gorilla Guanaco Guinea Gull Hamster Hare Hawk Hedgehog Heron Hippopotamus Hornet Horse Hyena Jackal Jaguar Jellyfish Kangaroo Komodo Kouprey Kudu Lark Lemur Leopard Lion Llama Loris Louse Lobster Lyrebird Magpie Mallard Manatee Meerkat Mink Mole Monkey Moose Mouse Mosquito Mule Nightingale Okapi Oryx Ostrich Otter Owl Ox Oyster Panther Partridge Peafowl Pelican Pig Pigeon Pony Porcupine Quelea Rabbit Raccoon Rail Ram Rat Raven Redpanda Reindeer Rhinoceros Salamander Sealion Seal Seastar Shark Sheep Shrew Skunk Snail Snake Spider Squid Squirrel Swan Tapir Tarsier Tiger Toad Turkey Turtle Vicuna Walrus Wasp Waterbuffalo Weasel Whale Wolf Worm Yak Zebra).rand
|
11
|
-
end
|
12
|
-
|
11
|
+
end
|
12
|
+
|
13
13
|
def name_of_order
|
14
14
|
( rand(99) + 1 ).ordinalize
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def formation_name
|
18
18
|
%w(Battalion Legion Brigade Rank Pack Regiment Squadron Swarm Squad Division).rand
|
19
19
|
end
|
20
|
-
|
21
|
-
|
20
|
+
|
21
|
+
|
22
22
|
def ability
|
23
23
|
["Agreeable", "Amused", "Brave", "Calm", "Charming", "Cheerful", "Comfortable", "Cooperative", "Courageous", "Crazy" "Delightful", "Determined", "Eager", "Elated", "Enchanting", "Encouraging", "Energetic", "Enthusiastic", "Excited", "Exuberant", "Fair", "Faithful", "Fantastic", "Fast", "Fine", "Friendly", "Funny", "Gentle", "Glorious", "Good", "Great", "Happy", "Healthy", "Helpful", "Hilarious", "Jolly", "Joyous", "Kind", "Lively", "Lovely", "Lucky", "Nice", "Obedient", "Perfect", "Pleasant", "Poor", "Proud", "Relieved", "Silly", "Smiling", "Splendid", "Successful", "Thankful", "Thoughtful", "Victorious", "Vivacious", "Witty", "Wonderful", "Zealous", "Zany", "Glamorous", "Gleaming", "Gorgeous", "Graceful", "Grotesque", "Handsome", "Homely", "Light", "Long", "Magnificent", "Misty", "Motionless", "Muddy", "Old-fashioned", "Plain", "Poised", "Precious", "Quaint", "Shiny", "Smoggy", "Sparkling", "Spotless", "Stormy", "Strange", "Ugly", "Ugliest", "Unsightly", "Unusual", "Wide-eyed", "Adorable", "Adventurous", "Aggressive", "Alert", "Attractive", "Average", "Beautiful", "Blue-eyed", "Bloody", "Blushing", "Bright", "Clean", "Clear", "Cloudy", "Colorful", "Crowded", "Cute", "Dark", "Drab", "Distinct", "Dull", "Elegant", "Excited", "Fancy", "Filthy", "Big", "Colossal", "Fat", "Gigantic", "Great", "Huge", "Immense", "Large", "Little", "Mammoth", "Massive", "Miniature", "Petite", "Puny", "Scrawny", "Short", "Small", "Tall", "Teeny", "Teeny-tiny", "Tinybroad", "Chubby", "Crooked", "Curved", "Deep", "Flat", "High", "Hollow", "Low", "Narrow", "Round", "Shallow", "Skinny", "Square", "Steep", "Straight", "Wide"].rand
|
24
|
-
|
24
|
+
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
def colour
|
28
|
-
%w( White Yellow Red Green Blue Black Orange Purple).rand
|
28
|
+
%w( White Yellow Red Green Blue Black Orange Purple).rand
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def bravery_title
|
32
32
|
['the Brave' , 'the Great', 'the Dragon' , 'the Paesant' , 'the Saviour' , 'the Fraud' , 'be Moody', 'the Knight', 'the Archer' , 'the Soldier' , 'the Poor' , 'the Ambitious' , 'the Artist', 'the Cinic', 'the Enthusiast' , 'the Humble' , 'the Rude', 'the Lion Hearted' ].rand
|
33
|
-
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def occupation
|
36
|
+
%w(Acrobat Apothecarist Architect Armorer Artist Astrologer Baker Barrister Bookbinder Bowyer Brewer Bricklayer Candlemaker Carpenter Cartographer Clothier Cook Diplomat Dyer Engineer Engraver Farmer Fisherman Forester Fortune-Teller Furrier Gardener Glassblower Grain Merchant Gravedigger Herald Herbalist Hunter Innkeeper Interpreter Jester Jeweler Leatherworker Locksmith Messenger Miner Minstrel Moneylender Navigator Painter Peddler Physician Playwright Politician Potter Rat Catcher Sailor Scribe Servant Shipwright Shoemaker Spy Stonecarver Storyteller Weaver).rand
|
37
|
+
end
|
34
38
|
|
35
39
|
|
36
40
|
end
|
data/lib/medieval/battalion.rb
CHANGED
@@ -9,23 +9,28 @@ module Medieval
|
|
9
9
|
end
|
10
10
|
|
11
11
|
|
12
|
-
protected
|
12
|
+
protected
|
13
13
|
|
14
14
|
def creature_name
|
15
15
|
super.pluralize
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
|
19
|
+
|
20
|
+
end
|
21
|
+
|
20
22
|
FORMATS = [
|
21
|
-
Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, creature_name]},
|
22
|
-
Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, creature_name]},
|
23
|
-
Proc.new { ["The", name_of_order, formation_name, "of", ability, creature_name]},
|
24
|
-
Proc.new { ["The", name_of_order, formation_name, "of", colour, creature_name]},
|
25
|
-
|
23
|
+
Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, creature_name]},
|
24
|
+
Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, creature_name]},
|
25
|
+
Proc.new { ["The", name_of_order, formation_name, "of", ability, creature_name]},
|
26
|
+
Proc.new { ["The", name_of_order, formation_name, "of", colour, creature_name]},
|
27
|
+
Proc.new { ["The", name_of_order, formation_name, "of", colour, occupation.pluralize ]},
|
28
|
+
Proc.new { ["The", name_of_order, formation_name, "of", ability, occupation.pluralize]},
|
29
|
+
Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, occupation.pluralize]},
|
30
|
+
#Proc.new { ["The", ability, colour, creature_name]},
|
26
31
|
#Proc.new { ["The", colour, creature_name]},
|
27
|
-
#Proc.new { ["The", ability , creature_name]}
|
28
|
-
# removed some less interesting formats
|
32
|
+
#Proc.new { ["The", ability , creature_name]}
|
33
|
+
# removed some less interesting formats
|
29
34
|
]
|
30
35
|
|
31
36
|
end
|
data/lib/medieval/realm.rb
CHANGED
@@ -1,38 +1,39 @@
|
|
1
|
-
module Medieval
|
1
|
+
module Medieval
|
2
2
|
class Realm
|
3
3
|
extend Attributes
|
4
|
-
|
4
|
+
|
5
5
|
class << self
|
6
6
|
def name
|
7
7
|
FORMATS.rand.call.join(' ')
|
8
8
|
end
|
9
|
-
|
10
|
-
protected
|
9
|
+
|
10
|
+
protected
|
11
11
|
def main_name
|
12
|
-
creature_name + realm_suffix
|
12
|
+
occupation[0..-rand(occupation.size/2)] + creature_name[0..-rand(occupation.size/2)].downcase + realm_suffix
|
13
13
|
end
|
14
14
|
|
15
|
-
=begin
|
15
|
+
=begin
|
16
16
|
def suffix
|
17
17
|
%w(oin yar oyd aire atya uti aro yal iha).rand
|
18
|
-
end
|
19
|
-
=end
|
18
|
+
end
|
19
|
+
=end
|
20
20
|
def realm_prefix
|
21
|
-
%w(North East West South New Lake Port Far Lost).rand
|
22
|
-
end
|
23
|
-
|
21
|
+
%w(North East West South New Lake Port Far Lost Low High Middle).rand
|
22
|
+
end
|
23
|
+
|
24
24
|
def realm_suffix
|
25
|
-
%w(county realm ton land ville berg burgh borough bury view port mouth stad furt chester mouth fort haven side shire).rand
|
26
|
-
end
|
27
|
-
|
28
|
-
|
25
|
+
%w(county realm ton land ville berg burgh borough bury view port mouth stad furt chester mouth fort haven side shire).rand
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
FORMATS = [
|
32
32
|
# Proc.new {[ability, main_name, realm_suffix]},
|
33
33
|
Proc.new {[main_name]},
|
34
34
|
# Proc.new {[realm_prefix, ' ' , ability, main_name, realm_suffix]},
|
35
35
|
Proc.new {[realm_prefix, main_name]}
|
36
36
|
]
|
37
|
-
end
|
37
|
+
end
|
38
38
|
end
|
39
|
+
|
data/lib/medieval/soldier.rb
CHANGED
data/medieval.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{medieval}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["rdinca"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-10-19}
|
13
13
|
s.description = %q{This is a medieval names generator, inspired by faker gem. In the future it will be used for an medieval online strategy game.}
|
14
14
|
s.email = %q{radudinca@yahoo.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- rdinca
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-19 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|