| @@ -32,6 +32,16 @@ | |||||
| }).length; | }).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)]; | |||||
| } | |||||
| function statLerp(stat, change, duration) { | function statLerp(stat, change, duration) { | ||||
| // pretty sure this'll be a random id... | // pretty sure this'll be a random id... | ||||
| const id = new Date().getTime() + Math.random(); | const id = new Date().getTime() + Math.random(); | ||||
| @@ -595,11 +605,15 @@ | |||||
| if (choice == "swallow") { | if (choice == "swallow") { | ||||
| if (getStat("mawPos") < 0.15) { | if (getStat("mawPos") < 0.15) { | ||||
| print(["Swallowed!"]); | |||||
| print(["You're too far back. The fox swallows a mouthful of cereal, taking you with it."]); | |||||
| goToRoom("throat"); | goToRoom("throat"); | ||||
| return false; | return false; | ||||
| } else { | } else { | ||||
| print(["Swallows"]); | |||||
| printRandom([ | |||||
| ["A light swallow drags a lump of chewed-up cereal into Geta's depths."], | |||||
| ["Geta swallows, dragging you closer to your demise."], | |||||
| ["Your captor's throat ripples as he gulps down his breakfast."] | |||||
| ]); | |||||
| statLerp("mawPos", -0.25, 500); | statLerp("mawPos", -0.25, 500); | ||||
| state.geta.slurps = 0; | state.geta.slurps = 0; | ||||
| state.geta.chews = 0; | state.geta.chews = 0; | ||||
| @@ -609,7 +623,11 @@ | |||||
| } else if (choice == "slurp") { | } else if (choice == "slurp") { | ||||
| statLerp("mawPos", -0.1, 250); | statLerp("mawPos", -0.1, 250); | ||||
| print(["Slurps"]); | |||||
| printRandom([ | |||||
| ["A spoonful of cereal slips into the fox's " + synonym("slippery") + " maw."], | |||||
| ["Geta slurps up some more of his breakfast."], | |||||
| ["You're shoved back a bit as Geta slurps up more cereal."] | |||||
| ]); | |||||
| state.geta.slurps += 1; | state.geta.slurps += 1; | ||||
| return Math.random() * 1000 + 1500; | return Math.random() * 1000 + 1500; | ||||
| } else if (choice == "chew") { | } else if (choice == "chew") { | ||||
| @@ -619,17 +637,21 @@ | |||||
| const limbName = limbs[limb]; | const limbName = limbs[limb]; | ||||
| if (limb == "head") { | if (limb == "head") { | ||||
| print(["He chewed your head :((("]); | |||||
| print(["Geta's jaws crush down on your head. You die."]); | |||||
| changeStat("health", -100); | changeStat("health", -100); | ||||
| goToRoom("stomach"); | goToRoom("stomach"); | ||||
| } else { | } else { | ||||
| print(["He chewed your " + limbName + " :("]); | |||||
| print(["You scream in pain as your " + limbName + " is shattered by the fox's jaws"]); | |||||
| changeStat("health", -40); | changeStat("health", -40); | ||||
| return true; | return true; | ||||
| } | } | ||||
| } else { | } else { | ||||
| print(["Chews"]); | |||||
| printRandom([ | |||||
| ["Cruel fangs crush down on the food around you."], | |||||
| ["Geta chews on his breakfast."], | |||||
| ["The fox's fangs close with a crackle-crunch of cereal."] | |||||
| ]); | |||||
| state.geta.chews += 1; | state.geta.chews += 1; | ||||
| return Math.random() * 500 + 1000; | return Math.random() * 500 + 1000; | ||||
| } | } | ||||
| @@ -659,6 +681,7 @@ | |||||
| startTimer({ | startTimer({ | ||||
| id: "maw-tilt-text", | id: "maw-tilt-text", | ||||
| func: () => { | func: () => { | ||||
| state.geta.mawMovement = 1; | |||||
| print(["The fox's muzzle tilts back down as he SWALLOWS hard."]); | print(["The fox's muzzle tilts back down as he SWALLOWS hard."]); | ||||
| statLerp("mawPos", -0.3, 500); | statLerp("mawPos", -0.3, 500); | ||||
| state.geta.swallowsLeft -= 1; | state.geta.swallowsLeft -= 1; | ||||