| @@ -31,15 +31,18 @@ | |||
| return !status; | |||
| }).length; | |||
| } | |||
| function pickRandom(list) { | |||
| return list[Math.floor(Math.random() * list.length)]; | |||
| } | |||
| function synonym(word) { | |||
| const choices = { | |||
| "slippery": ["slippery", "slimy", "slick", "glistening"], | |||
| "chews": ["chews", "crunches"], | |||
| "crushes": ["crushes", "pulverizes", "shatters", "smashes"] | |||
| } | |||
| return choices[word][Math.floor(Math.random() * choices[word].length)]; | |||
| const word = { | |||
| get swallow() { return pickRandom(["swallow", "gulp"]); }, | |||
| get slimy() { return pickRandom(["slimy", "sloppy", "slick", "glistening"])}, | |||
| get disgusting() { return pickRandom(["disgusting", "abhorrent", "rank", "horrific", "nauseating", "sickening", "wretched"])}, | |||
| get foul() { return pickRandom(["foul", "rank", "gross"])}, | |||
| get fatal() { return pickRandom(["fatal", "deadly"])}, | |||
| get painful() { return pickRandom(["painful", "agonizing", "unbearable"])} | |||
| } | |||
| function statLerp(stat, change, duration) { | |||
| @@ -541,7 +544,7 @@ | |||
| "maw": { | |||
| "id": "maw", | |||
| "name": "Geta's Maw", | |||
| "desc": "You've been slurped up into the fox's jaws", | |||
| "desc": "You've been slurped up into the fox's " + word.foul + " jaws", | |||
| "move": (room) => { | |||
| }, | |||
| @@ -557,7 +560,7 @@ | |||
| state.geta.swallowsLeft = 3 + Math.floor(Math.random() * 3); | |||
| state.geta.mawMovement = 1; | |||
| print(["You slip into Geta's maw. He'll swallow you like the snack you are if you slip too far back, but crawl too far forward, and you'll meet his fangs..."]) | |||
| print(["You slip into Geta's maw; the atmosphere is " + word.disgusting + ". He'll swallow you alive if you slip too far back, but crawl too far forward, and you'll meet his fangs..."]) | |||
| startTimer({ | |||
| id: "maw-stamina", | |||
| @@ -638,7 +641,7 @@ | |||
| return false; | |||
| } else { | |||
| printRandom([ | |||
| ["A light swallow drags a lump of chewed-up cereal into Geta's depths."], | |||
| ["A light swallow drags a lump of chewed-up cereal into Geta's " + word.fatal + " depths."], | |||
| ["Geta swallows, dragging you closer to your demise."], | |||
| ["Your captor's throat ripples as he gulps down his breakfast."] | |||
| ]); | |||
| @@ -652,7 +655,7 @@ | |||
| } else if (choice == "slurp") { | |||
| statLerp("mawPos", -0.1, 250); | |||
| printRandom([ | |||
| ["A spoonful of cereal slips into the fox's " + synonym("slippery") + " maw."], | |||
| ["A spoonful of cereal slips into the fox's sloppy maw."], | |||
| ["Geta slurps up some more of his breakfast."], | |||
| ["You're shoved back a bit as Geta slurps up more cereal."] | |||
| ]); | |||
| @@ -1101,7 +1104,7 @@ | |||
| changeStat("health", -0.3 * state.geta.acidStrength); | |||
| if (getStat("health") <= 0) { | |||
| print(["You're digested before too long."]); | |||
| print(["You're gradually digested, merciful oblivion ending your torment in the " + word.disgusting + " depths of your captor..."]); | |||
| goToRoom("digested"); | |||
| return false; | |||
| } | |||