medieval 0.3.8 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.8
1
+ 0.4.0
@@ -0,0 +1,38 @@
1
+ require 'rubygems'
2
+ require 'active_support/inflector'
3
+ require 'active_support/core_ext/integer/inflections'
4
+
5
+ module Medieval
6
+ module Attributes
7
+
8
+ protected
9
+ def creature_name
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 RedDeer 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
+
13
+ def name_of_order
14
+ rand(100).ordinalize
15
+ end
16
+
17
+ def formation_name
18
+ %w(Battalion Legion Brigade Rank Pack Regiment Squadron Swarm Squad Division).rand
19
+ end
20
+
21
+
22
+ def ability
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
+
25
+ end
26
+
27
+ def colour
28
+ %w( White Yellow Red Green Blue Black Orange Purple).rand
29
+ end
30
+
31
+ def bravery_title
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
34
+
35
+
36
+ end
37
+ end
38
+
@@ -1,39 +1,20 @@
1
- require 'rubygems'
2
- require 'active_support/inflector'
3
- require 'active_support/core_ext/integer/inflections'
1
+ require 'medieval/attributes'
4
2
 
5
3
  module Medieval
6
4
  class Battalion
5
+ extend Attributes
7
6
  class << self
8
7
  def name
9
8
  FORMATS.rand.call.join(' ')
10
9
  end
11
10
 
11
+
12
12
  protected
13
+
13
14
  def creature_name
14
- %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 RedDeer 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.pluralize
15
- end
16
-
17
- def name_of_order
18
- rand(100).ordinalize
19
- end
20
-
21
- def formation_name
22
- %w(Battalion Legion Brigade Rank Pack Regiment Squadron Swarm Squad Division).rand
23
- end
24
-
25
-
26
- def ability
27
- ["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
28
-
29
- end
30
-
31
- def colour
32
- %w( White Yellow Red Green Blue Black Orange Purple).rand
15
+ super.pluralize
33
16
  end
34
17
 
35
-
36
-
37
18
  end
38
19
 
39
20
  FORMATS = [
@@ -45,8 +26,7 @@ protected
45
26
  Proc.new { ["The", colour, creature_name]},
46
27
  Proc.new { ["The", ability , creature_name]}
47
28
  ]
48
-
49
-
29
+
50
30
  end
51
31
  end
52
32
 
@@ -1,25 +1,28 @@
1
1
  module Medieval
2
-
3
2
  class Realm
3
+ extend Attributes
4
4
  class << self
5
5
  def name
6
- main_name + suffix + land_name
6
+ FORMATS.rand.call.join('')
7
7
  end
8
8
 
9
9
  protected
10
- def main_name
11
- %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 RedDeer 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.slice(0..-(rand(2)+1))
12
- end
10
+ alias main_name creature_name
13
11
 
14
12
  def suffix
15
13
  %w(oin yar oyd aire atya uti aro yal iha).rand
16
14
  end
17
15
 
18
16
  def land_name
19
- %w(land county shire realm).rand
17
+ %w(Land County Shire Realm).rand
20
18
  end
21
19
 
22
20
  end
23
- end
21
+
22
+ FORMATS = [
23
+ Proc.new {[ability, main_name, land_name]},
24
+ Proc.new {[main_name, land_name]}
25
+ ]
26
+ end
24
27
 
25
28
  end
@@ -1,6 +1,8 @@
1
+ require 'medieval/attributes'
2
+
1
3
  module Medieval
2
4
  class Soldier
3
-
5
+ extend Attributes
4
6
  class << self
5
7
 
6
8
  def name
@@ -15,15 +17,15 @@ protected
15
17
  def last_name
16
18
  %w(Abbott Abernathy Abshire Adams Altenwerth Anderson Ankunding Armstrong Auer Aufderhar Bahringer Bailey Balistreri Barrows Bartell Bartoletti Barton Bashirian Batz Bauch Baumbach Bayer Beahan Beatty Bechtelar Becker Bednar Beer Beier Berge Bergnaum Bergstrom Bernhard Bernier Bins Blanda Blick Block Bode Boehm Bogan Bogisich Borer Bosco Botsford Boyer Boyle Bradtke Brakus Braun Breitenberg Brekke Brown Bruen Buckridge Carroll Carter Cartwright Casper Cassin Champlin Christiansen Cole Collier Collins Conn Connelly Conroy Considine Corkery Cormier Corwin Cremin Crist Crona Cronin Crooks Cruickshank Cummerata Cummings Dach D'Amore Daniel Dare Daugherty Davis Deckow Denesik Dibbert Dickens Dicki Dickinson Dietrich Donnelly Dooley Douglas Doyle DuBuque Durgan Ebert Effertz Eichmann Emard Emmerich Erdman Ernser Fadel Fahey Farrell Fay Feeney Feest Feil Ferry Fisher Flatley Frami Franecki Friesen Fritsch Funk Gaylord Gerhold Gerlach Gibson Gislason Gleason Gleichner Glover Goldner Goodwin Gorczany Gottlieb Goyette Grady Graham Grant Green Greenfelder Greenholt Grimes Gulgowski Gusikowski Gutkowski Gutmann Haag Hackett Hagenes Hahn Haley Halvorson Hamill Hammes Hand Hane Hansen Harber Harris Hartmann Harvey Hauck Hayes Heaney Heathcote Hegmann Heidenreich Heller Herman Hermann Hermiston Herzog Hessel Hettinger Hickle Hilll Hills Hilpert Hintz Hirthe Hodkiewicz Hoeger Homenick Hoppe Howe Howell Hudson Huel Huels Hyatt Jacobi Jacobs Jacobson Jakubowski Jaskolski Jast Jenkins Jerde Jewess Johns Johnson Johnston Jones Kassulke Kautzer Keebler Keeling Kemmer Kerluke Kertzmann Kessler Kiehn Kihn Kilback King Kirlin Klein Kling Klocko Koch Koelpin Koepp Kohler Konopelski Koss Kovacek Kozey Krajcik Kreiger Kris Kshlerin Kub Kuhic Kuhlman Kuhn Kulas Kunde Kunze Kuphal Kutch Kuvalis Labadie Lakin Lang Langosh Langworth Larkin Larson Leannon Lebsack Ledner Leffler Legros Lehner Lemke Lesch Leuschke Lind Lindgren Littel Little Lockman Lowe Lubowitz Lueilwitz Luettgen Lynch Macejkovic Maggio Mann Mante Marks Marquardt Marvin Mayer Mayert McClure McCullough McDermott McGlynn McKenzie McLaughlin Medhurst Mertz Metz Miller Mills Mitchell Moen Mohr Monahan Moore Morar Morissette Mosciski Mraz Mueller Muller Murazik Murphy Murray Nader Nicolas Nienow Nikolaus Nitzsche Nolan Oberbrunner O'Connell O'Conner O'Hara O'Keefe O'Kon Okuneva Olson Ondricka O'Reilly Orn Ortiz Osinski Pacocha Padberg Pagac Parisian Parker Paucek Pfannerstill Pfeffer Pollich Pouros Powlowski Predovic Price Prohaska Prosacco Purdy Quigley Quitzon Rath Ratke Rau Raynor Reichel Reichert Reilly Reinger Rempel Renner Reynolds Rice Rippin Ritchie Robel Roberts Rodriguez Rogahn Rohan Rolfson Romaguera Roob Rosenbaum Rowe Ruecker Runolfsdottir Runolfsson Runte Russel Rutherford Ryan Sanford Satterfield Sauer Sawayn Schaden Schaefer Schamberger Schiller Schimmel Schinner Schmeler Schmidt Schmitt Schneider Schoen Schowalter Schroeder Schulist Schultz Schumm Schuppe Schuster Senger Shanahan Shields Simonis Sipes Skiles Smith Smitham Spencer Spinka Sporer Stamm Stanton Stark Stehr Steuber Stiedemann Stokes Stoltenberg Stracke Streich Stroman Strosin Swaniawski Swift Terry Thiel Thompson Tillman Torp Torphy Towne Toy Trantow Tremblay Treutel Tromp Turcotte Turner Ullrich Upton Vandervort Veum Volkman Von VonRueden Waelchi Walker Walsh Walter Ward Waters Watsica Weber Wehner Weimann Weissnat Welch West White Wiegand Wilderman Wilkinson Will Williamson Willms Windler Wintheiser Wisoky Wisozk Witting Wiza Wolf Wolff Wuckert Wunsch Wyman Yost Yundt Zboncak Zemlak Ziemann Zieme Zulauf).rand
17
19
  end
18
-
19
- def bravery_title
20
- ['the Brave' , 'the Great', 'the Dragon' , 'the Paesant' , 'el Salvatore' , 'the Fraud' , 'be Moody', 'the Knight', 'the Archer' , 'the Soldier' , 'the Poor' , 'the Ambitious' , 'el Artistico', 'el Cinico', 'el Entusiasta' , 'el Humilde' , 'el Maleducado', 'the Lion Hearted' ].rand
21
- end
22
-
20
+
23
21
  def origins_title
24
22
  ['von Muchensen' , 'of Glenshire', 'of Brandenburg', 'of Canterbury', 'of Warwick' ,"D'Agincourt"].rand
25
23
  end
26
24
 
25
+ def nickname
26
+ "the " << [creature_name, ability, colour].rand
27
+ end
28
+
27
29
  def suffix
28
30
  %w(I II III IV V).rand
29
31
  end
@@ -40,9 +42,9 @@ protected
40
42
  Proc.new { [first_name, last_name, suffix, bravery_title] },
41
43
  Proc.new { [first_name, last_name, bravery_title] },
42
44
  Proc.new { [first_name, last_name, suffix] },
43
- Proc.new { [first_name, last_name]},
44
- Proc.new { [first_name, last_name]}
45
-
45
+ Proc.new { [first_name, nickname, last_name, origins_title]},
46
+ Proc.new { [first_name, nickname, last_name]},
47
+ Proc.new { [first_name, nickname, last_name, suffix]}
46
48
  ]
47
49
 
48
50
  end
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.3.8"
8
+ s.version = "0.4.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{2010-09-03}
12
+ s.date = %q{2010-10-01}
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 = [
@@ -25,10 +25,19 @@ Gem::Specification.new do |s|
25
25
  "VERSION",
26
26
  "lib/extras/array.rb",
27
27
  "lib/medieval.rb",
28
+ "lib/medieval/attributes.rb",
28
29
  "lib/medieval/battalion.rb",
29
30
  "lib/medieval/realm.rb",
30
31
  "lib/medieval/soldier.rb",
31
32
  "medieval.gemspec",
33
+ "rdoc/classes/Medieval/Battalion.html",
34
+ "rdoc/classes/Medieval/Realm.html",
35
+ "rdoc/classes/Medieval/Soldier.html",
36
+ "rdoc/files/lib/extras/array_rb.html",
37
+ "rdoc/files/lib/medieval/battalion_rb.html",
38
+ "rdoc/files/lib/medieval/realm_rb.html",
39
+ "rdoc/files/lib/medieval/soldier_rb.html",
40
+ "rdoc/files/lib/medieval_rb.html",
32
41
  "test/helper.rb",
33
42
  "test/test_medieval.rb"
34
43
  ]
@@ -0,0 +1,282 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Medieval::Battalion</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Medieval::Battalion</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/medieval/battalion_rb.html">
59
+ lib/medieval/battalion.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000007">ability</a>&nbsp;&nbsp;
90
+ <a href="#M000008">colour</a>&nbsp;&nbsp;
91
+ <a href="#M000004">creature_name</a>&nbsp;&nbsp;
92
+ <a href="#M000006">formation_name</a>&nbsp;&nbsp;
93
+ <a href="#M000003">name</a>&nbsp;&nbsp;
94
+ <a href="#M000005">name_of_order</a>&nbsp;&nbsp;
95
+ </div>
96
+ </div>
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+
103
+ <div id="section">
104
+
105
+
106
+ <div id="constants-list">
107
+ <h3 class="section-bar">Constants</h3>
108
+
109
+ <div class="name-list">
110
+ <table summary="Constants">
111
+ <tr class="top-aligned-row context-row">
112
+ <td class="context-item-name">FORMATS</td>
113
+ <td>=</td>
114
+ <td class="context-item-value">[ Proc.new { [&quot;The&quot;, name_of_order, formation_name, &quot;of&quot;, ability, colour, creature_name]}, Proc.new { [&quot;The&quot;, name_of_order, formation_name, &quot;of&quot;, ability, colour, creature_name]}, Proc.new { [&quot;The&quot;, ability, colour, creature_name]}, Proc.new { [&quot;The&quot;, name_of_order, formation_name, &quot;of&quot;, ability, creature_name]}, Proc.new { [&quot;The&quot;, name_of_order, formation_name, &quot;of&quot;, colour, creature_name]}, Proc.new { [&quot;The&quot;, colour, creature_name]}, Proc.new { [&quot;The&quot;, ability , creature_name]}</td>
115
+ </tr>
116
+ </table>
117
+ </div>
118
+ </div>
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <!-- if method_list -->
126
+ <div id="methods">
127
+ <h3 class="section-bar">Public Class methods</h3>
128
+
129
+ <div id="method-M000003" class="method-detail">
130
+ <a name="M000003"></a>
131
+
132
+ <div class="method-heading">
133
+ <a href="#M000003" class="method-signature">
134
+ <span class="method-name">name</span><span class="method-args">()</span>
135
+ </a>
136
+ </div>
137
+
138
+ <div class="method-description">
139
+ <p><a class="source-toggle" href="#"
140
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000003-source">
142
+ <pre>
143
+ <span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 8</span>
144
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
145
+ <span class="ruby-constant">FORMATS</span>.<span class="ruby-identifier">rand</span>.<span class="ruby-identifier">call</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
146
+ <span class="ruby-keyword kw">end</span>
147
+ </pre>
148
+ </div>
149
+ </div>
150
+ </div>
151
+
152
+ <h3 class="section-bar">Protected Class methods</h3>
153
+
154
+ <div id="method-M000007" class="method-detail">
155
+ <a name="M000007"></a>
156
+
157
+ <div class="method-heading">
158
+ <a href="#M000007" class="method-signature">
159
+ <span class="method-name">ability</span><span class="method-args">()</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ <p><a class="source-toggle" href="#"
165
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
166
+ <div class="method-source-code" id="M000007-source">
167
+ <pre>
168
+ <span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 26</span>
169
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ability</span>
170
+ [<span class="ruby-value str">&quot;Agreeable&quot;</span>, <span class="ruby-value str">&quot;Amused&quot;</span>, <span class="ruby-value str">&quot;Brave&quot;</span>, <span class="ruby-value str">&quot;Calm&quot;</span>, <span class="ruby-value str">&quot;Charming&quot;</span>, <span class="ruby-value str">&quot;Cheerful&quot;</span>, <span class="ruby-value str">&quot;Comfortable&quot;</span>, <span class="ruby-value str">&quot;Cooperative&quot;</span>, <span class="ruby-value str">&quot;Courageous&quot;</span>, <span class="ruby-value str">&quot;Crazy&quot;</span> <span class="ruby-value str">&quot;Delightful&quot;</span>, <span class="ruby-value str">&quot;Determined&quot;</span>, <span class="ruby-value str">&quot;Eager&quot;</span>, <span class="ruby-value str">&quot;Elated&quot;</span>, <span class="ruby-value str">&quot;Enchanting&quot;</span>, <span class="ruby-value str">&quot;Encouraging&quot;</span>, <span class="ruby-value str">&quot;Energetic&quot;</span>, <span class="ruby-value str">&quot;Enthusiastic&quot;</span>, <span class="ruby-value str">&quot;Excited&quot;</span>, <span class="ruby-value str">&quot;Exuberant&quot;</span>, <span class="ruby-value str">&quot;Fair&quot;</span>, <span class="ruby-value str">&quot;Faithful&quot;</span>, <span class="ruby-value str">&quot;Fantastic&quot;</span>, <span class="ruby-value str">&quot;Fast&quot;</span>, <span class="ruby-value str">&quot;Fine&quot;</span>, <span class="ruby-value str">&quot;Friendly&quot;</span>, <span class="ruby-value str">&quot;Funny&quot;</span>, <span class="ruby-value str">&quot;Gentle&quot;</span>, <span class="ruby-value str">&quot;Glorious&quot;</span>, <span class="ruby-value str">&quot;Good&quot;</span>, <span class="ruby-value str">&quot;Great&quot;</span> <span class="ruby-value str">&quot;Happy&quot;</span>, <span class="ruby-value str">&quot;Healthy&quot;</span>, <span class="ruby-value str">&quot;Helpful&quot;</span>, <span class="ruby-value str">&quot;Hilarious&quot;</span>, <span class="ruby-value str">&quot;Jolly&quot;</span>, <span class="ruby-value str">&quot;Joyous&quot;</span>, <span class="ruby-value str">&quot;Kind&quot;</span>, <span class="ruby-value str">&quot;Lively&quot;</span>, <span class="ruby-value str">&quot;Lovely&quot;</span>, <span class="ruby-value str">&quot;Lucky&quot;</span>, <span class="ruby-value str">&quot;Nice&quot;</span>, <span class="ruby-value str">&quot;Obedient&quot;</span>, <span class="ruby-value str">&quot;Perfect&quot;</span>, <span class="ruby-value str">&quot;Pleasant&quot;</span>, <span class="ruby-value str">&quot;Poor&quot;</span>, <span class="ruby-value str">&quot;Proud&quot;</span>, <span class="ruby-value str">&quot;Relieved&quot;</span>, <span class="ruby-value str">&quot;Silly&quot;</span>, <span class="ruby-value str">&quot;Smiling&quot;</span>, <span class="ruby-value str">&quot;Splendid&quot;</span>, <span class="ruby-value str">&quot;Successful&quot;</span>, <span class="ruby-value str">&quot;Thankful&quot;</span>, <span class="ruby-value str">&quot;Thoughtful&quot;</span>, <span class="ruby-value str">&quot;Victorious&quot;</span>, <span class="ruby-value str">&quot;Vivacious&quot;</span>, <span class="ruby-value str">&quot;Witty&quot;</span>, <span class="ruby-value str">&quot;Wonderful&quot;</span>, <span class="ruby-value str">&quot;Zealous&quot;</span>, <span class="ruby-value str">&quot;Zany&quot;</span>, <span class="ruby-value str">&quot;Glamorous&quot;</span>, <span class="ruby-value str">&quot;Gleaming&quot;</span>, <span class="ruby-value str">&quot;Gorgeous&quot;</span>, <span class="ruby-value str">&quot;Graceful&quot;</span>, <span class="ruby-value str">&quot;Grotesque&quot;</span>, <span class="ruby-value str">&quot;Handsome&quot;</span>, <span class="ruby-value str">&quot;Homely&quot;</span>, <span class="ruby-value str">&quot;Light&quot;</span>, <span class="ruby-value str">&quot;Long&quot;</span>, <span class="ruby-value str">&quot;Magnificent&quot;</span>, <span class="ruby-value str">&quot;Misty&quot;</span>, <span class="ruby-value str">&quot;Motionless&quot;</span>, <span class="ruby-value str">&quot;Muddy&quot;</span>, <span class="ruby-value str">&quot;Old-fashioned&quot;</span>, <span class="ruby-value str">&quot;Plain&quot;</span>, <span class="ruby-value str">&quot;Poised&quot;</span>, <span class="ruby-value str">&quot;Precious&quot;</span>, <span class="ruby-value str">&quot;Quaint&quot;</span>, <span class="ruby-value str">&quot;Shiny&quot;</span>, <span class="ruby-value str">&quot;Smoggy&quot;</span>, <span class="ruby-value str">&quot;Sparkling&quot;</span>, <span class="ruby-value str">&quot;Spotless&quot;</span>, <span class="ruby-value str">&quot;Stormy&quot;</span>, <span class="ruby-value str">&quot;Strange&quot;</span>, <span class="ruby-value str">&quot;Ugly&quot;</span>, <span class="ruby-value str">&quot;Ugliest&quot;</span>, <span class="ruby-value str">&quot;Unsightly&quot;</span>, <span class="ruby-value str">&quot;Unusual&quot;</span>, <span class="ruby-value str">&quot;Wide-eyed&quot;</span>, <span class="ruby-value str">&quot;Adorable&quot;</span>, <span class="ruby-value str">&quot;Adventurous&quot;</span>, <span class="ruby-value str">&quot;Aggressive&quot;</span>, <span class="ruby-value str">&quot;Alert&quot;</span>, <span class="ruby-value str">&quot;Attractive&quot;</span>, <span class="ruby-value str">&quot;Average&quot;</span>, <span class="ruby-value str">&quot;Beautiful&quot;</span>, <span class="ruby-value str">&quot;Blue-eyed&quot;</span>, <span class="ruby-value str">&quot;Bloody&quot;</span>, <span class="ruby-value str">&quot;Blushing&quot;</span>, <span class="ruby-value str">&quot;Bright&quot;</span>, <span class="ruby-value str">&quot;Clean&quot;</span>, <span class="ruby-value str">&quot;Clear&quot;</span>, <span class="ruby-value str">&quot;Cloudy&quot;</span>, <span class="ruby-value str">&quot;Colorful&quot;</span>, <span class="ruby-value str">&quot;Crowded&quot;</span>, <span class="ruby-value str">&quot;Cute&quot;</span>, <span class="ruby-value str">&quot;Dark&quot;</span>, <span class="ruby-value str">&quot;Drab&quot;</span>, <span class="ruby-value str">&quot;Distinct&quot;</span>, <span class="ruby-value str">&quot;Dull&quot;</span>, <span class="ruby-value str">&quot;Elegant&quot;</span>, <span class="ruby-value str">&quot;Excited&quot;</span>, <span class="ruby-value str">&quot;Fancy&quot;</span>, <span class="ruby-value str">&quot;Filthy&quot;</span>, <span class="ruby-value str">&quot;Big&quot;</span>, <span class="ruby-value str">&quot;Colossal&quot;</span>, <span class="ruby-value str">&quot;Fat&quot;</span>, <span class="ruby-value str">&quot;Gigantic&quot;</span>, <span class="ruby-value str">&quot;Great&quot;</span>, <span class="ruby-value str">&quot;Huge&quot;</span>, <span class="ruby-value str">&quot;Immense&quot;</span>, <span class="ruby-value str">&quot;Large&quot;</span>, <span class="ruby-value str">&quot;Little&quot;</span>, <span class="ruby-value str">&quot;Mammoth&quot;</span>, <span class="ruby-value str">&quot;Massive&quot;</span>, <span class="ruby-value str">&quot;Miniature&quot;</span>, <span class="ruby-value str">&quot;Petite&quot;</span>, <span class="ruby-value str">&quot;Puny&quot;</span>, <span class="ruby-value str">&quot;Scrawny&quot;</span>, <span class="ruby-value str">&quot;Short&quot;</span>, <span class="ruby-value str">&quot;Small&quot;</span>, <span class="ruby-value str">&quot;Tall&quot;</span>, <span class="ruby-value str">&quot;Teeny&quot;</span>, <span class="ruby-value str">&quot;Teeny-tiny&quot;</span>, <span class="ruby-value str">&quot;Tinybroad&quot;</span>, <span class="ruby-value str">&quot;Chubby&quot;</span>, <span class="ruby-value str">&quot;Crooked&quot;</span>, <span class="ruby-value str">&quot;Curved&quot;</span>, <span class="ruby-value str">&quot;Deep&quot;</span>, <span class="ruby-value str">&quot;Flat&quot;</span>, <span class="ruby-value str">&quot;High&quot;</span>, <span class="ruby-value str">&quot;Hollow&quot;</span>, <span class="ruby-value str">&quot;Low&quot;</span>, <span class="ruby-value str">&quot;Narrow&quot;</span>, <span class="ruby-value str">&quot;Round&quot;</span>, <span class="ruby-value str">&quot;Shallow&quot;</span>, <span class="ruby-value str">&quot;Skinny&quot;</span>, <span class="ruby-value str">&quot;Square&quot;</span>, <span class="ruby-value str">&quot;Steep&quot;</span>, <span class="ruby-value str">&quot;Straight&quot;</span>, <span class="ruby-value str">&quot;Wide&quot;</span>].<span class="ruby-identifier">rand</span>
171
+
172
+ <span class="ruby-keyword kw">end</span>
173
+ </pre>
174
+ </div>
175
+ </div>
176
+ </div>
177
+
178
+ <div id="method-M000008" class="method-detail">
179
+ <a name="M000008"></a>
180
+
181
+ <div class="method-heading">
182
+ <a href="#M000008" class="method-signature">
183
+ <span class="method-name">colour</span><span class="method-args">()</span>
184
+ </a>
185
+ </div>
186
+
187
+ <div class="method-description">
188
+ <p><a class="source-toggle" href="#"
189
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
190
+ <div class="method-source-code" id="M000008-source">
191
+ <pre>
192
+ <span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 31</span>
193
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour</span>
194
+ <span class="ruby-node">%w( White Yellow Red Green Blue Black Orange Purple)</span>.<span class="ruby-identifier">rand</span>
195
+ <span class="ruby-keyword kw">end</span>
196
+ </pre>
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+ <div id="method-M000004" class="method-detail">
202
+ <a name="M000004"></a>
203
+
204
+ <div class="method-heading">
205
+ <a href="#M000004" class="method-signature">
206
+ <span class="method-name">creature_name</span><span class="method-args">()</span>
207
+ </a>
208
+ </div>
209
+
210
+ <div class="method-description">
211
+ <p><a class="source-toggle" href="#"
212
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
213
+ <div class="method-source-code" id="M000004-source">
214
+ <pre>
215
+ <span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 13</span>
216
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">creature_name</span>
217
+ <span class="ruby-node">%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 RedDeer 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)</span>.<span class="ruby-identifier">rand</span>.<span class="ruby-identifier">pluralize</span>
218
+ <span class="ruby-keyword kw">end</span>
219
+ </pre>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <div id="method-M000006" class="method-detail">
225
+ <a name="M000006"></a>
226
+
227
+ <div class="method-heading">
228
+ <a href="#M000006" class="method-signature">
229
+ <span class="method-name">formation_name</span><span class="method-args">()</span>
230
+ </a>
231
+ </div>
232
+
233
+ <div class="method-description">
234
+ <p><a class="source-toggle" href="#"
235
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
236
+ <div class="method-source-code" id="M000006-source">
237
+ <pre>
238
+ <span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 21</span>
239
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">formation_name</span>
240
+ <span class="ruby-node">%w(Battalion Legion Brigade Rank Pack Regiment Squadron Swarm Squad Division)</span>.<span class="ruby-identifier">rand</span>
241
+ <span class="ruby-keyword kw">end</span>
242
+ </pre>
243
+ </div>
244
+ </div>
245
+ </div>
246
+
247
+ <div id="method-M000005" class="method-detail">
248
+ <a name="M000005"></a>
249
+
250
+ <div class="method-heading">
251
+ <a href="#M000005" class="method-signature">
252
+ <span class="method-name">name_of_order</span><span class="method-args">()</span>
253
+ </a>
254
+ </div>
255
+
256
+ <div class="method-description">
257
+ <p><a class="source-toggle" href="#"
258
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
259
+ <div class="method-source-code" id="M000005-source">
260
+ <pre>
261
+ <span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 17</span>
262
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name_of_order</span>
263
+ <span class="ruby-identifier">rand</span>(<span class="ruby-value">100</span>).<span class="ruby-identifier">ordinalize</span>
264
+ <span class="ruby-keyword kw">end</span>
265
+ </pre>
266
+ </div>
267
+ </div>
268
+ </div>
269
+
270
+
271
+ </div>
272
+
273
+
274
+ </div>
275
+
276
+
277
+ <div id="validator-badges">
278
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
279
+ </div>
280
+
281
+ </body>
282
+ </html>