const DoMagic = (cast: (spell: string) => void) => {
const [spell, duration] = consult_wizard();
cast(spell);
setTimeout(() => {
DoMagic(cast);
}, duration * 259)
}
let line_index = 0;
let word_index = 0;
let a; a; const white_guy = 1;
const consult_wizard = () => {
if(word_index >= sources_of_pain[line_index].length) {
word_index = 0;
line_index++;
}
if(line_index >= sources_of_pain.length) line_index = 0;
const phrase = [...sources_of_pain[line_index]].splice(0, word_index + 1).join(' ').trim();
const time = times_of_pain[line_index][word_index];
word_index++;
return [phrase, time] as [string, number];
}
const JOINTS = {
VERSE_1: [
["We're", "no", "strangers", "to", "love"],
["You", "know", "the", "rules", "and", "so", "do", "I"],
["A", "full", "commitment's", "what", "I'm", "thinkin'", "of"],
["You", "wouldn't", "get", "this", "from", "any", "other", "guy"],
],
PRE_CHORUS_1: [
["I", "just", "wanna", "tell", "you", "how", "I'm", "feeling"],
["Gotta", "make", "you", "understand"],
],
CHORUS: [
["Never", "gonna", "give", "you", "up"],
["Never", "gonna", "let", "you", "down"],
["Never", "gonna", "run", "around", "and", "desert", "you"],
["Never", "gonna", "make", "you", "cry"],
["Never", "gonna", "say", "goodbye"],
["Never", "gonna", "tell", "a", "lie", "and", "hurt", "you"],
],
VERSE_2: [
["We've", "known", "each", "other", "for", "so", "long"],
["Your", "heart's", "been", "aching,", "but"],
["you're", "too", "shy", "to", "say", "it"],
["Inside,", "we", "both", "know", "what's", "been", "going", "on"],
["We", "know", "the", "game", "and", "we're", "gonna", "play", "it"],
],
PRE_CHORUS_2: [
["And", "if", "you", "ask", "me", "how", "I'm", "feeling"],
["Don't", "tell", "me", "you're", "too", "blind", "to", "see"],
],
OOH: [
["OOH"],
["GIVE", "YOU", "UP"],
],
NEVER_GONNA_GIVE_NEVER_GONNA_GIVE: [
["OOH"],
["NEVER GONNA GIVE", "NEVER GONNA GIVE"],
["GIVE", "YOU", "UP"],
],
END: [
[""]
]
}
const TIME_SLICES = {
VERSE_1: [
//We're no strangers to love
[ 1, 1, 2, 1, 11],
//You know the rules and so do I
[ 1, 1, 1, 3, 1, 2, 1, 7],
//A full commitment's what I'm thinkin' of
[ 1,1, 3, 1, 2, 2, 6],
//You wouldn't get this from any other guy
[ 1, 2, 1, 1, 2, 2, 2, 4],
],
PRE_CHORUS_1: [
//I just wanna tell you how I'm feeling
[5, 1, 2, 1, 1, 1, 1, 8],
//Gotta make you understand
[ 2, 1, 2, 5],
],
CHORUS: [
//Never gonna give you up
[ 1, 1, 1.5, 1.5,3],
//Never gonna let you down
[ 1, 1, 1.5,1.5,3],
//Never gonna run around and desert you
[ 1, 1, 1.5, 3.5, 2, 3, 4],
//Never gonna make you cry
[ 1, 1, 1.5, 1.5,3],
//Never gonna say goodbye
[ 1, 1, 1.5,4.5],
//Never gonna tell a lie and hurt you
[ 1, 1, 1.5,1.5,4, 1, 2, 8],
],
VERSE_2: [
//We've known each other for so long
[ 1, 1, 1, 5, 1, 1, 6],
//Your heart's been aching, but
[ 1, 1, 1, 2, 3],
//you're too shy to say it
[ 1, 1, 2, 1, 1, 2],
//Inside, we both know what's been going on
[ 2, 1, 1, 1, 1, 2, 2, 6],
//We know the game and we're gonna play it
[ 1, 1, 1, 1, 1, 3, 2, 2, 3],
],
PRE_CHORUS_2: [
//And if you ask me how I'm feeling
[ 5, 1, 1, 2, 1, 1, 1, 7],
//Don't tell me you're too blind to see
[ 1, 1, 1, 1, 2, 1, 1, 3],
],
OOH: [
//OOH
[ 8],
//GIVE YOU UP
[ 1.5, 1.5, 5],
],
NEVER_GONNA_GIVE_NEVER_GONNA_GIVE: [
//OOH
[ 1],
//NEVER GONNA GIVE, NEVER GONNA GIVE
[ 3, 4],
//GIVE YOU UP
[ 1.5, 1.5, 5],
],
END: [
//
[ 16]
]
}
const times_of_pain: number[][] = [];
const sources_of_pain: string[][] = [];
const PARTS: ((keyof typeof TIME_SLICES) & (keyof typeof JOINTS))[] = [
'VERSE_1',
'PRE_CHORUS_1',
'CHORUS',
'VERSE_2',
'PRE_CHORUS_2',
'CHORUS',
'CHORUS',
'OOH',
'OOH',
'NEVER_GONNA_GIVE_NEVER_GONNA_GIVE',
'NEVER_GONNA_GIVE_NEVER_GONNA_GIVE',
'VERSE_2',
'PRE_CHORUS_1',
'CHORUS',
'CHORUS',
'CHORUS',
'END',
];
let i = 0;
for(const part of PARTS) {
const next_part = PARTS[i+1];
const times = [...TIME_SLICES[part]];
if(part === 'CHORUS' && next_part === 'CHORUS') {
times[times.length-1][times[times.length-1].length-1] = 4;
}
if(part === 'CHORUS' && next_part === 'CHORUS') {
times[times.length-1][times[times.length-1].length-1] = 6;
}
if(part === 'NEVER_GONNA_GIVE_NEVER_GONNA_GIVE' && next_part === 'VERSE_2') {
times[times.length-1][times[times.length-1].length-1] = 6;
}
times_of_pain.push(...times);
sources_of_pain.push(...JOINTS[part]);
i++;
}
// all the girlies say I'm
pretty_fly: for(a = white_guy;;)
{ break pretty_fly }
setTimeout(() => {
DoMagic((how_long_is_a_piece_of: string) => {
if(globalThis.document.getElementById('garfield')) globalThis.document.getElementById('garfield')!.innerText = how_long_is_a_piece_of;
});
}, 1500);