Skip to content

Instantly share code, notes, and snippets.

@sgreenfield
Created November 9, 2012 00:49
Show Gist options
  • Save sgreenfield/4043009 to your computer and use it in GitHub Desktop.
Save sgreenfield/4043009 to your computer and use it in GitHub Desktop.
Geordi La Forge dialog generator
//requires sugar.js (because I spent like 30 seconds on it)
//dialog source: http://stuff.mit.edu/afs/athena/activity/h/humor/Incoming/laforge.dialogue.generator
descriptor = 'electro-magnetic disruptive destructive'.words();
verbs = 'reconfigure assemble bypass amplify re-route polarize'.words();
nouns = 'field transducer coil dispersion phase-disruptor anus resonance sub-space tachyon induction pulse matrix baryon conduit wave-guide lepton discriminator polarization electro-magnetic frequency bandwidth antimatter diagnostic mode plasma spectral emitter'.words();
enemies = 'klingons romulans herpes'.words();
var laforge = "Captain, we're going to have to {verb1} the {descriptor1} {nouns1}, and {verb2} the {descriptor2} {nouns2} in order to prevent the {enemy} from penetrating our shields".assign({
verb1: verbs.sample(),
verb2: verbs.sample(),
nouns1: nouns.sample(Number.random(2,3)).join(' '),
nouns2: nouns.sample(Number.random(2,3)).join(' '),
enemy: enemies.sample(),
descriptor1: descriptor.sample(),
descriptor2: descriptor.sample()
});
alert(laforge);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment