THE RITUALIZATION COMMENCES BY THE WILL OF LORD ASMODEUS

typescript
Drake 2 years ago
parent 39e24bc9ba
commit 22ef454eb3

4
dist/build.js vendored

File diff suppressed because one or more lines are too long

@ -0,0 +1,121 @@
import webpack from "./webpack.js"
const sins = {
"Lust": null,
"Pride": null,
"Greed": null,
"Wrath": null,
"Envy": null,
"Gluttony": null,
"Sloth": null
}
const rulers = {
"Asmodeus": "Lust",
"Lucifer": "Pride",
"Mammon": "Greed",
"Satan": "Wrath",
"Leviathan": "Envy",
"Beelzebub": "Gluttony",
"Belphegor": "Sloth"
}
function ritualFail(sin) {
if (Math.random() > 0.5) {
//use generic failstates
//TODO: add nerd moxxie image and make it play the MLG clip on top of the screen and also make it patch sendMessage and replace every message with something funny idk i'll figure it out later
throw `Illegal Invocation of a sin!\nTODO: PUNISH THE MORTAL FOOL FOR HIS AFFRONT TO THE DEMONIC REALM!`
} else {
if (sin in sins) {
if (!sins[sin]) {
throw `Illegal Invocation of a sin!\nTODO: PUNISH THE MORTAL FOOL FOR HIS AFFRONT TO THE DEMONIC REALM!`
} else {
sins[sin]()
}
} else {
console.log("WTF did you do")
console.log(sin)
//window.location.reload()
}
}
}
function findByRitual(incantation) {
// I call upon the ___ of ___, ___, to ___ the ___ ___ with a ___ of name ___!
// I call upon the embodiment of lust, Asmodeus, to bring forth the imposing object with a property of name FluxDispatcher!
//TODO: should we do "I call upon the [great/almighty/etc].." instead of just "the"?
const args = incantation.split(" ")
if (args.shift() !== "I" || args.shift() !== "call" || args.shift() !== "upon" || args.shift() !== "the") {
ritualFail(sins[Math.floor(Math.random() * sins.length)])
return
}
const embodiment = args.shift()
if (!(embodiment === "embodiment" || (embodiment === "king" && args.shift() === "sin"))) { //absolutely no clue where i heard them referred to as "king sin of X" before, but i think it sounds cool so i'll keep it
//how did you even fuck this one up
ritualFail(sins[Math.floor(Math.random() * sins.length)])
return
}
if (args.shift() !== "of") {
ritualFail(sin)
}
const sin = args.shift().replace(",", "")
if (!(sin in sins)) {
//invalid sin, so we can't use it
ritualFail(sins[Math.floor(Math.random() * sins.length)])
return
}
const ruler = args.shift().replace(",", "")
if (!(ruler in rulers)) {
//invalid ruler, so we still can't use it
//use the sin punishment
ritualFail(sin)
}
if (rulers[ruler] !== sin) {
//sin/ruler mismatch
//i feel it's more fitting to call the sin of the demon, instead of the sin you provided, as you would've angered the ruler for calling them for the wrong sin
ritualFail(rulers[ruler])
}
if (args.shift() !== "to") {
ritualFail(sin)
}
if (args.shift() !== "summon") { //TODO: we want to accept either "summon" or "bring forth" here but i cbf rn
ritualFail(sin)
}
if (args.shift() !== "the") {
ritualFail(sin)
}
const adjective = args.shift()
if (adjective !== "imposing" && adjective !== "foreboding") { //TODO: sin-specific adjectives
ritualFail(sin)
}
const descriptor = args.shift()
if (descriptor !== "object" && descriptor !== "element") { //TODO: typecheck this shit
ritualFail(sin)
}
if (args.shift() !== "with" || args.shift() !== "a") {
ritualFail(sin)
}
const filter = args.shift()
if (filter !== "display" && filter !== "property") {
ritualFail(sin)
}
if (args.shift() !== "of" || args.shift() !== "name") {
ritualFail(sin)
}
//TODO: HOW THE FUCK ARE WE SUPPOSED TO DO MULTIPLE PROPS?
const prop = args.shift().slice(0,-1)
switch (filter) {
case "display":
return webpack.findByDisplayName(prop)
break
case "property":
return webpack.findByProps(prop)
break
default:
//the only way you can get here is with cosmic rays or divine intervention
ritualFail(sin)
break
}
}
export default findByRitual

@ -70,7 +70,8 @@ let webpack = {
reloadModules: () => {
//NOTE: i have no idea why this could even feasibly need to be used, but i'm adding it anyways
webpack.modules = getModules();
}
},
findByRitual: () => {}
};
export default webpack;

@ -4,7 +4,12 @@ import utils from "./api/utils/index.js";
import plugins from "./api/plugin.js";
import settings from "./api/ui/settings/settings.js";
import css from "./api/css.js";
import patcher from "./api/patcher";
import patcher from "./api/patcher.js";
import findByRitual from "./api/ritual.js";
Object.assign(webpack, {
findByRitual
})
const demon = {
modules: {

Loading…
Cancel
Save