package main import "math/rand" //go:generate stringer -type=Attr var Spells = []string{ `Slime Finger`, `Rabbit Punch`, `Hastiness`, `Good Move`, `Sadness`, `Seasick`, `Gyp`, `Shoelaces`, `Innoculate`, `Cone of Annoyance`, `Magnetic Orb`, `Invisible Hands`, `Revolting Cloud`, `Aqueous Humor`, `Spectral Miasma`, `Clever Fellow`, `Lockjaw`, `History Lesson`, `Hydrophobia`, `Big Sister`, `Cone of Paste`, `Mulligan`, `Nestor's Bright Idea`, `Holy Batpole`, `Tumor (Benign)`, `Braingate`, `Nonplus`, `Animate Nightstand`, `Eye of the Troglodyte`, `Curse Name`, `Dropsy`, `Vitreous Humor`, `Roger's Grand Illusion`, `Covet`, `Astral Miasma`, `Spectral Oyster`, `Acrid Hands`, `Angioplasty`, `Grognor's Big Day Off`, `Tumor (Malignant)`, `Animate Tunic`, `Ursine Armor`, `Holy Roller`, `Tonsilectomy`, `Curse Family`, `Infinite Confusion`, } type Attrib struct { Name string Level int } var OffenseAttrib = []Attrib{ {`Polished`, 1}, {`Serrated`, 1}, {`Heavy`, 1}, {`Pronged`, 2}, {`Steely`, 2}, {`Vicious`, 3}, {`Venomed`, 4}, {`Stabbity`, 4}, {`Dancing`, 5}, {`Invisible`, 6}, {`Vorpal`, 7}, } var DefenseAttrib = []Attrib{ {`Studded`, 1}, {`Banded`, 2}, {`Gilded`, 2}, {`Festooned`, 3}, {`Holy`, 4}, {`Cambric`, 1}, {`Fine`, 4}, {`Impressive`, 5}, {`Custom`, 3}, } var Shields = []Attrib{ {`Parasol`, 0}, {`Pie Plate`, 1}, {`Garbage Can Lid`, 2}, {`Buckler`, 3}, {`Plexiglass`, 4}, {`Fender`, 4}, {`Round Shield`, 5}, {`Carapace`, 5}, {`Scutum`, 6}, {`Propugner`, 6}, {`Kite Shield`, 7}, {`Pavise`, 8}, {`Tower Shield`, 9}, {`Baroque Shield`, 11}, {`Aegis`, 12}, {`Magnetic Field`, 18}, } var Armors = []Attrib{ {`Lace`, 1}, {`Macrame`, 2}, {`Burlap`, 3}, {`Canvas`, 4}, {`Flannel`, 5}, {`Chamois`, 6}, {`Pleathers`, 7}, {`Leathers`, 8}, {`Bearskin`, 9}, {`Ringmail`, 10}, {`Scale Mail`, 12}, {`Chainmail`, 14}, {`Splint Mail`, 15}, {`Platemail`, 16}, {`ABS`, 17}, {`Kevlar`, 18}, {`Titanium`, 19}, {`Mithril Mail`, 20}, {`Diamond Mail`, 25}, {`Plasma`, 30}, } var Weapons = []Attrib{ {`Stick`, 0}, {`Broken Bottle`, 1}, {`Shiv`, 1}, {`Sprig`, 1}, {`Oxgoad`, 1}, {`Eelspear`, 2}, {`Bowie Knife`, 2}, {`Claw Hammer`, 2}, {`Handpeen`, 2}, {`Andiron`, 3}, {`Hatchet`, 3}, {`Tomahawk`, 3}, {`Hackbarm`, 3}, {`Crowbar`, 4}, {`Mace`, 4}, {`Battleadze`, 4}, {`Leafmace`, 5}, {`Shortsword`, 5}, {`Longiron`, 5}, {`Poachard`, 5}, {`Baselard`, 5}, {`Whinyard`, 6}, {`Blunderbuss`, 6}, {`Longsword`, 6}, {`Crankbow`, 6}, {`Blibo`, 7}, {`Broadsword`, 7}, {`Kreen`, 7}, {`Morning Star`, 8}, {`Pole-adze`, 8}, {`Spontoon`, 8}, {`Bastard Sword`, 9}, {`Peen-arm`, 9}, {`Culverin`, 10}, {`Lance`, 10}, {`Halberd`, 11}, {`Poleax`, 12}, {`Bandyclef`, 15}, } var Specials = []string{ `Diadem`, `Festoon`, `Gemstone`, `Phial`, `Tiara`, `Scabbard`, `Arrow`, `Lens`, `Lamp`, `Hymnal`, `Fleece`, `Laurel`, `Brooch`, `Gimlet`, `Cobble`, `Albatross`, `Brazier`, `Bandolier`, `Tome`, `Garnet`, `Amethyst`, `Candelabra`, `Corset`, `Sphere`, `Sceptre`, `Ankh`, `Talisman`, `Orb`, `Gammel`, `Ornament`, `Brocade`, `Galoon`, `Bijou`, `Spangle`, `Gimcrack`, `Hood`, `Vulpeculum`, } var ItemAttrib = []string{ `Golden`, `Gilded`, `Spectral`, `Astral`, `Garlanded`, `Precious`, `Crafted`, `Dual`, `Filigreed`, `Cruciate`, `Arcane`, `Blessed`, `Reverential`, `Lucky`, `Enchanted`, `Gleaming`, `Grandiose`, `Sacred`, `Legendary`, `Mythic`, `Crystalline`, `Austere`, `Ostentatious`, `One True`, `Proverbial`, `Fearsome`, `Deadly`, `Benevolent`, `Unearthly`, `Magnificent`, `Iron`, `Ormolu`, `Puissant`, } var ItemOfs = []string{ `Foreboding`, `Foreshadowing`, `Nervousness`, `Happiness`, `Torpor`, `Danger`, `Craft`, `Silence`, `Invisibility`, `Rapidity`, `Pleasure`, `Practicality`, `Hurting`, `Joy`, `Petulance`, `Intrusion`, `Chaos`, `Suffering`, `Extroversion`, `Frenzy`, `Solitude`, `Punctuality`, `Efficiency`, `Comfort`, `Patience`, `Internment`, `Incarceration`, `Misapprehension`, `Loyalty`, `Envy`, `Acrimony`, `Worry`, `Fear`, `Awe`, `Guile`, `Prurience`, `Fortune`, `Perspicacity`, `Domination`, `Submission`, `Fealty`, `Hunger`, `Despair`, `Cruelty`, `Grob`, `Dignard`, `Ra`, `the Bone`, `Diamonique`, `Electrum`, `Hydragyrum`, } var BoringItems = []string{ `nail`, `lunchpail`, `sock`, `I.O.U.`, `cookie`, `pint`, `toothpick`, `writ`, `newspaper`, `letter`, `plank`, `hat`, `egg`, `coin`, `needle`, `bucket`, `ladder`, `chicken`, `twig`, `dirtclod`, `counterpane`, `vest`, `teratoma`, `bunny`, `rock`, `pole`, `carrot`, `canoe`, `inkwell`, `hoe`, `bandage`, `trowel`, `towel`, `planter box`, `anvil`, `axle`, `tuppence`, `casket`, `nosegay`, `trinket`, `credenza`, `writ`, } type Monster struct { Name string Level int Swag string } var Monsters = []Monster{ {`Anhkheg`, 6, `chitin`}, {`Ant`, 0, `antenna`}, {`Ape`, 4, `ass`}, {`Baluchitherium`, 14, `ear`}, {`Beholder`, 10, `eyestalk`}, {`Black Pudding`, 10, `saliva`}, {`Blink Dog`, 4, `eyelid`}, {`Cub Scout`, 1, `neckercheif`}, {`Girl Scout`, 2, `cookie`}, {`Boy Scout`, 3, `merit badge`}, {`Eagle Scout`, 4, `merit badge`}, {`Bugbear`, 3, `skin`}, {`Bugboar`, 3, `tusk`}, {`Boogie`, 3, `slime`}, {`Camel`, 2, `hump`}, {`Carrion Crawler`, 3, `egg`}, {`Catoblepas`, 6, `neck`}, {`Centaur`, 4, `rib`}, {`Centipede`, 0, `leg`}, {`Cockatrice`, 5, `wattle`}, {`Couatl`, 9, `wing`}, {`Crayfish`, 0, `antenna`}, {`Demogorgon`, 53, `tentacle`}, {`Jubilex`, 17, `gel`}, {`Manes`, 1, `tooth`}, {`Orcus`, 27, `wand`}, {`Succubus`, 6, `bra`}, {`Vrock`, 8, `neck`}, {`Hezrou`, 9, `leg`}, {`Glabrezu`, 10, `collar`}, {`Nalfeshnee`, 11, `tusk`}, {`Marilith`, 7, `arm`}, {`Balor`, 8, `whip`}, {`Yeenoghu`, 25, `flail`}, {`Asmodeus`, 52, `leathers`}, {`Baalzebul`, 43, `pants`}, {`Barbed Devil`, 8, `flame`}, {`Bone Devil`, 9, `hook`}, {`Dispater`, 30, `matches`}, {`Erinyes`, 6, `thong`}, {`Geryon`, 30, `cornucopia`}, {`Malebranche`, 5, `fork`}, {`Ice Devil`, 11, `snow`}, {`Lemure`, 3, `blob`}, {`Pit Fiend`, 13, `seed`}, {`Anklyosaurus`, 9, `tail`}, {`Brontosaurus`, 30, `brain`}, {`Diplodocus`, 24, `fin`}, {`Elasmosaurus`, 15, `neck`}, {`Gorgosaurus`, 13, `arm`}, {`Iguanadon`, 6, `thumb`}, {`Megalosaurus`, 12, `jaw`}, {`Monoclonius`, 8, `horn`}, {`Pentasaurus`, 12, `head`}, {`Stegosaurus`, 18, `plate`}, {`Triceratops`, 16, `horn`}, {`Tyranosauraus Rex`, 18, `forearm`}, {`Djinn`, 7, `lamp`}, {`Doppleganger`, 4, `face`}, {`Black Dragon`, 7, `*`}, {`Plaid Dragon`, 7, `sporrin`}, {`Blue Dragon`, 9, `*`}, {`Beige Dragon`, 9, `*`}, {`Brass Dragon`, 7, `pole`}, {`Tin Dragon`, 8, `*`}, {`Bronze Dragon`, 9, `medal`}, {`Chromatic Dragon`, 16, `scale`}, {`Copper Dragon`, 8, `loafer`}, {`Gold Dragon`, 8, `filling`}, {`Green Dragon`, 8, `*`}, {`Platinum Dragon`, 21, `*`}, {`Red Dragon`, 10, `cocktail`}, {`Silver Dragon`, 10, `*`}, {`White Dragon`, 6, `tooth`}, {`Dragon Turtle`, 13, `shell`}, {`Dryad`, 2, `acorn`}, {`Dwarf`, 1, `drawers`}, {`Eel`, 2, `sashimi`}, {`Efreet`, 10, `cinder`}, {`Sand Elemental`, 8, `glass`}, {`Bacon Elemental`, 10, `bit`}, {`Porn Elemental`, 12, `lube`}, {`Cheese Elemental`, 14, `curd`}, {`Hair Elemental`, 16, `follicle`}, {`Swamp Elf`, 1, `lilypad`}, {`Brown Elf`, 1, `tusk`}, {`Sea Elf`, 1, `jerkin`}, {`Ettin`, 10, `fur`}, {`Frog`, 0, `leg`}, {`Violet Fungi`, 3, `spore`}, {`Gargoyle`, 4, `gravel`}, {`Gelatinous Cube`, 4, `jam`}, {`Ghast`, 4, `vomit`}, {`Ghost`, 10, `*`}, {`Ghoul`, 2, `muscle`}, {`Humidity Giant`, 12, `drops`}, {`Beef Giant`, 11, `steak`}, {`Quartz Giant`, 10, `crystal`}, {`Porcelain Giant`, 9, `fixture`}, {`Rice Giant`, 8, `grain`}, {`Cloud Giant`, 12, `condensation`}, {`Fire Giant`, 11, `cigarettes`}, {`Frost Giant`, 10, `snowman`}, {`Hill Giant`, 8, `corpse`}, {`Stone Giant`, 9, `hatchling`}, {`Storm Giant`, 15, `barometer`}, {`Mini Giant`, 4, `pompadour`}, {`Gnoll`, 2, `collar`}, {`Gnome`, 1, `hat`}, {`Goblin`, 1, `ear`}, {`Grid Bug`, 1, `carapace`}, {`Jellyrock`, 9, `seedling`}, {`Beer Golem`, 15, `foam`}, {`Oxygen Golem`, 17, `platelet`}, {`Cardboard Golem`, 14, `recycling`}, {`Rubber Golem`, 16, `ball`}, {`Leather Golem`, 15, `fob`}, {`Gorgon`, 8, `testicle`}, {`Gray Ooze`, 3, `gravy`}, {`Green Slime`, 2, `sample`}, {`Griffon`, 7, `nest`}, {`Banshee`, 7, `larynx`}, {`Harpy`, 3, `mascara`}, {`Hell Hound`, 5, `tongue`}, {`Hippocampus`, 4, `mane`}, {`Hippogriff`, 3, `egg`}, {`Hobgoblin`, 1, `patella`}, {`Homonculus`, 2, `fluid`}, {`Hydra`, 8, `gyrum`}, {`Imp`, 2, `tail`}, {`Invisible Stalker`, 8, `*`}, {`Iron Peasant`, 3, `chaff`}, {`Jumpskin`, 3, `shin`}, {`Kobold`, 1, `penis`}, {`Leprechaun`, 1, `wallet`}, {`Leucrotta`, 6, `hoof`}, {`Lich`, 11, `crown`}, {`Lizard Man`, 2, `tail`}, {`Lurker`, 10, `sac`}, {`Manticore`, 6, `spike`}, {`Mastodon`, 12, `tusk`}, {`Medusa`, 6, `eye`}, {`Multicell`, 2, `dendrite`}, {`Pirate`, 1, `booty`}, {`Berserker`, 1, `shirt`}, {`Caveman`, 2, `club`}, {`Dervish`, 1, `robe`}, {`Merman`, 1, `trident`}, {`Mermaid`, 1, `gills`}, {`Mimic`, 9, `hinge`}, {`Mind Flayer`, 8, `tentacle`}, {`Minotaur`, 6, `map`}, {`Yellow Mold`, 1, `spore`}, {`Morkoth`, 7, `teeth`}, {`Mummy`, 6, `gauze`}, {`Naga`, 9, `rattle`}, {`Nebbish`, 1, `belly`}, {`Neo-Otyugh`, 11, `organ `}, {`Nixie`, 1, `webbing`}, {`Nymph`, 3, `hanky`}, {`Ochre Jelly`, 6, `nucleus`}, {`Octopus`, 2, `beak`}, {`Ogre`, 4, `talon`}, {`Ogre Mage`, 5, `apparel`}, {`Orc`, 1, `snout`}, {`Otyugh`, 7, `organ`}, {`Owlbear`, 5, `feather`}, {`Pegasus`, 4, `aileron`}, {`Peryton`, 4, `antler`}, {`Piercer`, 3, `tip`}, {`Pixie`, 1, `dust`}, {`Man-o-war`, 3, `tentacle`}, {`Purple Worm`, 15, `dung`}, {`Quasit`, 3, `tail`}, {`Rakshasa`, 7, `pajamas`}, {`Rat`, 0, `tail`}, {`Remorhaz`, 11, `protrusion`}, {`Roc`, 18, `wing`}, {`Roper`, 11, `twine`}, {`Rot Grub`, 1, `eggsac`}, {`Rust Monster`, 5, `shavings`}, {`Satyr`, 5, `hoof`}, {`Sea Hag`, 3, `wart`}, {`Silkie`, 3, `fur`}, {`Shadow`, 3, `silhouette`}, {`Shambling Mound`, 10, `mulch`}, {`Shedu`, 9, `hoof`}, {`Shrieker`, 3, `stalk`}, {`Skeleton`, 1, `clavicle`}, {`Spectre`, 7, `vestige`}, {`Sphinx`, 10, `paw`}, {`Spider`, 0, `web`}, {`Sprite`, 1, `can`}, {`Stirge`, 1, `proboscis`}, {`Stun Bear`, 5, `tooth`}, {`Stun Worm`, 2, `trode`}, {`Su-monster`, 5, `tail`}, {`Sylph`, 3, `thigh`}, {`Titan`, 20, `sandal`}, {`Trapper`, 12, `shag`}, {`Treant`, 10, `acorn`}, {`Triton`, 3, `scale`}, {`Troglodyte`, 2, `tail`}, {`Troll`, 6, `hide`}, {`Umber Hulk`, 8, `claw`}, {`Unicorn`, 4, `blood`}, {`Vampire`, 8, `pancreas`}, {`Wight`, 4, `lung`}, {`Will-o-the-Wisp`, 9, `wisp`}, {`Wraith`, 5, `finger`}, {`Wyvern`, 7, `wing`}, {`Xorn`, 7, `jaw`}, {`Yeti`, 4, `fur`}, {`Zombie`, 2, `forehead`}, {`Wasp`, 0, `stinger`}, {`Rat`, 1, `tail`}, {`Bunny`, 0, `ear`}, {`Moth`, 0, `dust`}, {`Beagle`, 0, `collar`}, {`Midge`, 0, `corpse`}, {`Ostrich`, 1, `beak`}, {`Billy Goat`, 1, `beard`}, {`Bat`, 1, `wing`}, {`Koala`, 2, `heart`}, {`Wolf`, 2, `paw`}, {`Whippet`, 2, `collar`}, {`Uruk`, 2, `boot`}, {`Poroid`, 4, `node`}, {`Moakum`, 8, `frenum`}, {`Fly`, 0, `*`}, {`Hogbird`, 3, `curl`}, } var MonMods = []string{ `-4 fœtal %v`, `-4 dying %v`, `-3 crippled %v`, `-3 baby %v`, `-2 adolescent`, `-2 very sick %v`, `-1 lesser %v`, `-1 undernourished %v`, `+1 greater %v`, `+1 %v Elder`, `+2 war %v`, `+2 Battle-%v`, `+3 Were-%v`, `+3 undead %v`, `+4 giant %v`, `+4 %v Rex`, } var OffenseBad = []Attrib{ {`Dull`, -2}, {`Tarnished`, -1}, {`Rusty`, -3}, {`Padded`, -5}, {`Bent`, -4}, {`Mini`, -4}, {`Rubber`, -6}, {`Nerf`, -7}, {`Unbalanced`, -2}, } var DefenseBad = []Attrib{ {`Holey`, -1}, {`Patched`, -1}, {`Threadbare`, -2}, {`Faded`, -1}, {`Rusty`, -3}, {`Motheaten`, -3}, {`Mildewed`, -2}, {`Torn`, -3}, {`Dented`, -3}, {`Cursed`, -5}, {`Plastic`, -4}, {`Cracked`, -4}, {`Warped`, -3}, {`Corroded`, -3}, } type Attr int const ( CHA Attr = iota CON DEX HPMax INT MPMax STR WIS Nattr ) type Character struct { Name string Attr []Attr } type Characters []Character func (c Characters) Pick() Character { return c[rand.Intn(len(c))] } var Races = Characters{ {`Half Orc`, []Attr{HPMax}}, {`Half Man`, []Attr{CHA}}, {`Half Halfling`, []Attr{DEX}}, {`Double Hobbit`, []Attr{STR}}, {`Hob-Hobbit`, []Attr{DEX, CON}}, {`Low Elf`, []Attr{CON}}, {`Dung Elf`, []Attr{WIS}}, {`Talking Pony`, []Attr{MPMax, INT}}, {`Gyrognome`, []Attr{DEX}}, {`Lesser Dwarf`, []Attr{CON}}, {`Crested Dwarf`, []Attr{CHA}}, {`Eel Man`, []Attr{DEX}}, {`Panda Man`, []Attr{CON, STR}}, {`Trans-Kobold`, []Attr{WIS}}, {`Enchanted Motorcycle`, []Attr{MPMax}}, {`Will o' the Wisp`, []Attr{WIS}}, {`Battle-Finch`, []Attr{DEX, INT}}, {`Double Wookiee`, []Attr{STR}}, {`Skraeling`, []Attr{WIS}}, {`Demicanadian`, []Attr{CON}}, {`Land Squid`, []Attr{STR, HPMax}}, } var Klasses = Characters{ {`Ur-Paladin`, []Attr{WIS, CON}}, {`Voodoo Princess`, []Attr{INT, CHA}}, {`Robot Monk`, []Attr{STR}}, {`Mu-Fu Monk`, []Attr{DEX}}, {`Mage Illusioner`, []Attr{INT, MPMax}}, {`Shiv-Knight`, []Attr{DEX}}, {`Inner Mason`, []Attr{CON}}, {`Fighter/Organist`, []Attr{CHA, STR}}, {`Puma Burgular`, []Attr{DEX}}, {`Runeloremaster`, []Attr{WIS}}, {`Hunter Strangler`, []Attr{DEX, INT}}, {`Battle-Felon`, []Attr{STR}}, {`Tickle-Mimic`, []Attr{WIS, INT}}, {`Slow Poisoner`, []Attr{CON}}, {`Bastard Lunatic`, []Attr{CON}}, {`Jungle Clown`, []Attr{DEX, CHA}}, {`Birdrider`, []Attr{WIS}}, {`Vermineer`, []Attr{INT}}, } var Titles = []string{ `Mr.`, `Mrs.`, `Sir`, `Sgt.`, `Ms.`, `Captain`, `Chief`, `Admiral`, `Saint`, } var ImpressiveTitles = []string{ `King`, `Queen`, `Lord`, `Lady`, `Viceroy`, `Mayor`, `Prince`, `Princess`, `Chief`, `Boss`, `Archbishop`, }