Code: Select all
import random
print "Welcome to Random Fairykind Generator 1.0\nPlease press enter to re-roll your fairy.\n"
while True:
#Name group
#biased lists for name groups
class NameGroup():
def __init__(self, name_list, descriptor_list):
self.name_list = name_list
self.descriptor_list = descriptor_list
if random.random() > 0.8:
self.descriptor_list = ["Flight", "Sensory"] #mundane powers
group1 = NameGroup(["Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet", "Pink", "White", "Black", "Gray", "Brown", "Purple", "Gold", "Silver", "Rainbow", "Opal", "Opalescent", "Iridescent", "Dark", "Stripped"], ["Color", "Illusion", "Light"])
group2 = NameGroup(["Stone", "Earth", "Rock", "Crystal", "Gem", "Underground", "Cave", "Diamond", "Quartz"], ["Stone", "Earth", "Crystal", "Digging"])
group3 = NameGroup(["Pearl", "Shell", "Sea", "Creek", "River", "Stream", "Wave", "Tide", "Lake", "Spring", "Shore", "Dew", "Brook"], ["Water", "Swimming"])
group4 = NameGroup(["Meadow", "Forest", "Woods", "Berry", "Nut", "Thorn", "Leaf"], ["Plant", "Fertility", "Harvest"])
group5 = NameGroup(["Sand", "Desert", "Dune", "Oasis", "Waste"], ["Earth", "Sand", "Wind", "Heat"])
group6 = NameGroup(["Snow", "Ice", "Cold", "Chill", "Frost", "Snowflake", "Glacier", "Iceberg", "Icecap", "Icetop", "Floe"], ["Snow", "Ice", "Cold"])
group7 = NameGroup(["Wind", "Storm", "Cloud", "Rain", "Dew"], ["Wind", "Weather", "Lighting", "Rain", "Cold"])
group8 = NameGroup(["Pretty", "Little", "Big", "Swift"], ["Luck"])
group9 = NameGroup(["Day", "Dawn", "Light", "Sunshine"], ["Light"])
group10 = NameGroup(["Moon", "Moonlight", "Star", "Stardust", "Starlight", "Starry", "Sky"], ["Light"])
group11 = NameGroup(["Twilight", "Dusk", "Midnight", "Darkness", "Shade", "Night"], ["Dark", "Evil"])
group12 = NameGroup(["Silk", "Sweet", "Bitter", "Rough"], ["Sensory", "Flight"])
#unbiased lists for name groups
'''
class NameGroup():
def __init__(self, name_list, descriptor_list):
self.name_list = name_list
self.descriptor_list = descriptor_list
group1 = NameGroup(["Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet", "Pink", "White", "Black", "Gray", "Brown", "Purple", "Gold", "Silver", "Rainbow", "Opal", "Opalescent", "Iridescent", "Dark", "Stripped"], ["Color", "Illusion", "Light", "Flight"])
group2 = NameGroup(["Stone", "Earth", "Rock", "Crystal", "Gem", "Underground", "Cave", "Diamond", "Quartz"], ["Stone", "Earth", "Crystal", "Digging", "Sensory", "Flight"])
group3 = NameGroup(["Pearl", "Shell", "Sea", "Creek", "River", "Stream", "Wave", "Tide", "Lake", "Spring", "Shore", "Dew", "Brook"], ["Water", "Swimming", "Sensory", "Flight"])
group4 = NameGroup(["Meadow", "Forest", "Woods", "Berry", "Nut", "Thorn", "Leaf"], ["Plant", "Fertility", "Harvest", "Sensory", "Flight"])
group5 = NameGroup(["Sand", "Desert", "Dune", "Oasis", "Waste"], ["Earth", "Sand", "Wind", "Heat", "Sensory", "Flight"])
group6 = NameGroup(["Snow", "Ice", "Cold", "Chill", "Frost", "Snowflake", "Glacier", "Iceberg", "Icecap", "Icetop", "Floe"], ["Snow", "Ice", "Cold", "Sensory", "Flight"])
group7 = NameGroup(["Wind", "Storm", "Cloud", "Rain", "Dew"], ["Wind", "Weather", "Lighting", "Rain", "Cold", "Sensory", "Flight"])
group8 = NameGroup(["Pretty", "Little", "Big", "Swift"], ["Luck", "Sensory", "Flight"])
group9 = NameGroup(["Day", "Dawn", "Light", "Sunshine"], ["Light", "Sensory", "Flight"])
group10 = NameGroup(["Moon", "Moonlight", "Star", "Stardust", "Starlight", "Starry", "Sky"], ["Light", "Sensory", "Flight"])
group11 = NameGroup(["Twilight", "Dusk", "Midnight", "Darkness", "Shade", "Night"], ["Dark", "Evil", "Sensory", "Flight"])
group12 = NameGroup(["Silk", "Sweet", "Bitter", "Rough"], ["Sensory", "Flight"])
'''
group_list = [group1, group2, group3, group4, group5, group6, group7, group8, group9, group10, group11, group12]
name1_group = random.choice(group_list)
name2 = [" Crusher", " Gardner", " Stalker", " Dancer", " Traveler", " Singer", " Speaker", " Seer", " Listener", "flower", " Orchid", " Rose", " Lily", " Daisy", " Flower", " Petal", " Clover", " Daisy", " Jasmine", " Veil", "let", "wing", " Wing", " Broadwing", " Littlewing", " Tailwing", " Beetlewing"]
#Kind
class Kind():
def __init__(self, name, magic_list):
self.name = name
self.magic_list = magic_list
Breeder = Kind("a Breeder", ["", " Minor", " Specific", " Lesser", " Medium", " Precise", " Sensory"])
Starter = Kind("a Starter", ["", " Minor", " Medium", " Major", " Greater", " Idiosyncratic", " Sensory"])
Unique = Kind("a Unique", [" Major", " Greater", " Wide-ranged"])
kind_list = [Breeder, Starter, Unique]
kind = random.choice(kind_list)
magic1 = random.choice(kind.magic_list)
magic2 = random.choice(name1_group.descriptor_list)
while magic1.strip() == magic2:
magic1 = random.choice(kind.magic_list)
magic2 = random.choice(name1_group.descriptor_list)
#height, linear distribution
height = random.randint(1, 66)
if height/12 == 1:
feet = "1 foot and "
else:
feet = str(height/12) + " feet and "
if height%12 == 1:
inches = "1 inch"
else:
inches = str(height%12) + " inches"
#wings
wing_adjective = ["pretty", " sparkly", "delicate", "sturdy", "ethereal", "folded", "transparent", "patterned", "quick", "broad", "little", "big", "small", "butterfly-like", "beetle-like", "bee-like"]
wing_color = ["colorless", "red", "orange", "yellow", "green", "blue", "indigo", "violet", "pink", "white", "black", "gray", "brown", "purple", "gold", "silver", "rainbow", "opalescent", "iridescent", "dark"]
print "This Fairykind is called " + random.choice(name1_group.name_list) + random.choice(name2) + " and they stand " + feet + inches + " tall with " + random.choice(wing_adjective) + " wings that are " + random.choice(wing_color) + ". It is " + kind.name + " fairy with" + magic1 + " " + magic2 + " powers."
answer = raw_input('')
Here's version 1.0, explanation on how it works:
The output is "This Fairykind is called [name part 1][name part 2] and they stand [x] feet and [y] inches tall with [wing adjective] wings that are [wing color]. It is [kind] fairy with [magic part 1] [magic part 2] powers."
Groups determine name part 1 and magic part 2 thusly:
group 1:
name part 1 = Red, Orange, Yellow, Green, Blue, Indigo, Violet, Pink, White, Black, Gray, Brown, Purple, Gold, Silver, Rainbow, Opal, Opalescent, Iridescent, Dark, Stripped
magic part 2 = Color, Illusion, Light
group 2:
name part 1 = Stone, Earth, Rock, Crystal, Gem, Underground, Cave, Diamond, Quartz,
magic part 2 = Stone, Earth, Crystal, Digging
group 3:
name part 1 = Pearl, Shell, Sea, Creek, River, Stream, Wave, Tide, Lake, Spring, Shore, Dew, Brook,
magic part 2 = Water, Swimming
group 4:
name part 1 = Meadow, Forest, Woods, Berry, Nut, Thorn, Leaf,
magic part 2 = Plant, Fertility, Harvest
group 5:
name part 1 = Sand, Desert, Dune, Oasis, Waste,
magic part 2 = Earth, Sand, Wind, Heat
group 6:
name part 1 = Snow, Ice, Cold, Chill, Frost, Snowflake, Glacier, Iceberg, Icecap, Icetop, Floe,
magic part 2 = Snow, Ice, Cold
group 7:
name part 1 = Wind, Storm, Cloud, Rain, Dew,
magic part 2 = Wind, Weather, Lighting, Rain, Cold
group 8:
name part 1 = Pretty, Little, Big, Swift,
magic part 2 = Luck
group 9:
name part 1 = Day, Dawn, Light, Sunshine,
magic part 2 = Light
group 10:
name part 1 = Moon, Moonlight, Star, Stardust, Starlight, Starry, Sky,
magic part 2 = Light
group 11:
name part 1 = Twilight, Dusk, Midnight, Darkness, Shade, Night,
magic part 2 = Dark, Evil
group 12:
name part 1 = Silk, Sweet, Bitter, Rough,
magic part 2 = Sensory, Flight
There is also a 20% chance to get a "mundane" magic, that is Sensory or Flight except for group 12 which always gets the mundane magic.
Name part 2 is from the following list: Crusher, Gardner, Stalker, Dancer, Traveler, Singer, Speaker, Seer, Listener, -flower, Orchid, Rose, Lily, Daisy, Flower, Petal, Clover, Daisy, Jasmine, Veil, -let, -wing, Wing, Broadwing, Littlewing, Tailwing, Beetlewing
(-name means there's no space between the two parts)
Magic part 1 is dependent on the kind like this:
Breeder: [empty], Minor, Specific, Lesser, Medium, Precise, Sensory
Starter: [empty], Minor, Medium, Major, Greater, Idiosyncratic, Sensory
Unique: Major, Greater, Wide-ranged
(Sensory Sensory has been manually blocked due to ridiculousness.)
Height is just a linearly distributed random height between 1 inch and 5 inches 5 feet.
Wing colors are from the following list: colorless, red, orange, yellow, green, blue, indigo, violet, pink, white, black, gray, brown, purple, gold, silver, rainbow, opalescent, iridescent, dark
And adjectives from this list: pretty, sparkly, delicate, sturdy, ethereal, folded, transparent, patterned, quick, broad, little, big, small, butterfly-like, beetle-like, bee-like