fix quote generation
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 2m0s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 2m0s
This commit is contained in:
23
script.js
23
script.js
@@ -5,12 +5,12 @@
|
|||||||
'I have never met a yinglet with such presence.',
|
'I have never met a yinglet with such presence.',
|
||||||
'Zeppo is a force of nature wrapped in fur.',
|
'Zeppo is a force of nature wrapped in fur.',
|
||||||
'He once stared down a baxxid and the baxxid blinked first (even though it doesn\'t have eyelids).',
|
'He once stared down a baxxid and the baxxid blinked first (even though it doesn\'t have eyelids).',
|
||||||
'Legend.',
|
'Legend. Not the kind you hear about in stories \u2014 the kind that shows up, eats your snacks, and redefines what\u2019s possible before breakfast.',
|
||||||
'I asked him to tone it down and he toned it UP.',
|
'I asked him to tone it down and he toned it UP.',
|
||||||
'Respect.',
|
'Respect. Not the kind that\u2019s demanded \u2014 the kind that fills the room like smoke before anyone realizes they\u2019re breathing it in.',
|
||||||
'Zeppo doesn\'t walk into a room \u2014 he arrives.',
|
'Zeppo doesn\'t walk into a room \u2014 he arrives.',
|
||||||
'Whiskers perfectly groomed, tail held high and shelltooth sharp.',
|
'Whiskers perfectly groomed, tail held high and shelltooth sharp.',
|
||||||
'He knows he\'s him.',
|
'He knows he\u2019s him. Not in an arrogant way \u2014 in the way a river knows it flows, a fire knows it burns. Just fundamental self-awareness of greatness.',
|
||||||
'Wits sharper than a creystone blade.',
|
'Wits sharper than a creystone blade.',
|
||||||
'Zeppo could scheme his way out of any jam and still have time to steal your lunch.',
|
'Zeppo could scheme his way out of any jam and still have time to steal your lunch.',
|
||||||
'Despite being a tiny rodent-person, his heart is the size of a melon.',
|
'Despite being a tiny rodent-person, his heart is the size of a melon.',
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
'The universe literally cannot ignore him.',
|
'The universe literally cannot ignore him.',
|
||||||
'No throne needed. Zeppo rules through sheer force of personality.',
|
'No throne needed. Zeppo rules through sheer force of personality.',
|
||||||
'Say his name three times and he appears to judge you.',
|
'Say his name three times and he appears to judge you.',
|
||||||
'He once convinced a baxxid to pay \">him</i> protection money.',
|
'He once convinced a baxxid to pay him protection money.',
|
||||||
'Zeppo\'s tail has its own gravitational pull.',
|
'Zeppo\'s tail has its own gravitational pull.',
|
||||||
'He once won a staring contest with a sunrise.',
|
'He once won a staring contest with a sunrise.',
|
||||||
'Scholars study his whisker patterns. None can replicate them.',
|
'Scholars study his whisker patterns. None can replicate them.',
|
||||||
@@ -981,20 +981,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function generateQuote() {
|
function generateQuote() {
|
||||||
var count = Math.random() > 0.5 ? 2 : 1;
|
var text = randomItem(fragments);
|
||||||
var selected = [];
|
|
||||||
var available = fragments.slice();
|
|
||||||
for (var i = 0; i < count && available.length > 0; i++) {
|
|
||||||
var idx = Math.floor(Math.random() * available.length);
|
|
||||||
selected.push(available.splice(idx, 1)[0]);
|
|
||||||
}
|
|
||||||
var text = selected.join(' ');
|
|
||||||
if (Math.random() > 0.3) {
|
|
||||||
var extra = randomItem(fragments);
|
|
||||||
if (selected.indexOf(extra) === -1) {
|
|
||||||
text += ' ' + extra;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var source = randomItem(sources);
|
var source = randomItem(sources);
|
||||||
return { text: text, source: source };
|
return { text: text, source: source };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user