@@ -38,7 +38,7 @@
const iterations = duration / 1000 * 60;
const iterations = duration / 1000 * 60;
startTimer({
startTimer({
id: id,
id: id,
func: () =>{
func: () => {
changeStat(stat, change / iterations);
changeStat(stat, change / iterations);
return true;
return true;
},
},
@@ -51,7 +51,7 @@
startTimer({
startTimer({
id: id + "-stopper",
id: id + "-stopper",
func: () =>{
func: () => {
stopTimer(id);
stopTimer(id);
return false;
return false;
},
},
@@ -83,7 +83,7 @@
],
],
"intro": {
"intro": {
"start": "pepper-grinder",
"start": "pepper-grinder",
"setup": () =>{
"setup": () => {
state.info.awareness = {
state.info.awareness = {
id: "awareness",
id: "awareness",
@@ -113,11 +113,11 @@
state.player.limbs.leftArm = true;
state.player.limbs.leftArm = true;
state.player.limbs.rightArm = true;
state.player.limbs.rightArm = true;
state.player.limbs.leftLeg = true;
state.player.limbs.leftLeg = true;
state.player.limbs.rightLef = true;
state.player.limbs.rightLeg = true;
startTimer({
startTimer({
id: "clock",
id: "clock",
func: () =>{
func: () => {
state.info.time.value += 1;
state.info.time.value += 1;
state.info.time.value %= 86000;
state.info.time.value %= 86000;
return true;
return true;
@@ -131,7 +131,7 @@
startTimer({
startTimer({
id: "suspicion-decay",
id: "suspicion-decay",
func: () =>{
func: () => {
checkSuspicion(-0.1);
checkSuspicion(-0.1);
return true;
return true;
},
},
@@ -144,7 +144,7 @@
startTimer({
startTimer({
id: "timeout",
id: "timeout",
func: () =>{
func: () => {
if (state.info.time.value == 60 * 60 * 7 + 60 * 19) {
if (state.info.time.value == 60 * 60 * 7 + 60 * 19) {
print(["The fox is almost done with his breakfast..."]);
print(["The fox is almost done with his breakfast..."]);
}
}
@@ -165,7 +165,7 @@
startTimer({
startTimer({
id: "geta-action",
id: "geta-action",
func: () =>{
func: () => {
const random = Math.random();
const random = Math.random();
if (random < 0.7) {
if (random < 0.7) {
@@ -177,7 +177,7 @@
startTimer({
startTimer({
id: "yawn-end",
id: "yawn-end",
func: () =>{
func: () => {
print(["Geta finishes his stretch"]);
print(["Geta finishes his stretch"]);
state.info.awareness.value = 1;
state.info.awareness.value = 1;
return true;
return true;
@@ -196,7 +196,7 @@
startTimer({
startTimer({
id: "squint-end",
id: "squint-end",
func: () =>{
func: () => {
print(["He goes back to his breakfast."]);
print(["He goes back to his breakfast."]);
state.info.awareness.value = 1;
state.info.awareness.value = 1;
return true;
return true;
@@ -222,12 +222,14 @@
},
},
"intro": () =>{
"intro": () => {
print(["Game started", newline, "Exposition goes here later."]);
print(["Game started", newline, "Exposition goes here later."]);
}
}
},
},
"sounds": [
"sounds": [
"loop/stomach.ogg"
"loop/stomach.ogg",
"sfx/absorb.ogg",
"sfx/swallow.ogg"
],
],
"preload": [
"preload": [
@@ -260,7 +262,7 @@
startTimer({
startTimer({
id: "pepper-investigate",
id: "pepper-investigate",
func: () =>{
func: () => {
if (state.player.location == "pepper-grinder") {
if (state.player.location == "pepper-grinder") {
print(["He catches you.", newline, "You're tossed into the fox's jaws."]);
print(["He catches you.", newline, "You're tossed into the fox's jaws."]);
goToRoom("maw");
goToRoom("maw");
@@ -403,7 +405,7 @@
"enter": (room) => {
"enter": (room) => {
startTimer({
startTimer({
id: "table-suspicion",
id: "table-suspicion",
func: () =>{
func: () => {
checkSuspicion(1.5);
checkSuspicion(1.5);
return true;
return true;
},
},
@@ -457,7 +459,7 @@
startTimer({
startTimer({
id: "geta-eat",
id: "geta-eat",
func: () =>{
func: () => {
if (Math.random() < 0.6) {
if (Math.random() < 0.6) {
print(["Geta scoops up a spoonful of cereal; you narrowly avoid being caught."]);
print(["Geta scoops up a spoonful of cereal; you narrowly avoid being caught."]);
return true;
return true;
@@ -532,7 +534,7 @@
startTimer({
startTimer({
id: "maw-random-movement",
id: "maw-random-movement",
func: () =>{
func: () => {
const time = new Date().getTime();
const time = new Date().getTime();
const movementFactor = (state.geta.mawMovement + limbsLost());
const movementFactor = (state.geta.mawMovement + limbsLost());
const fastPart = Math.sin(time / 200) / 1600 / 3;
const fastPart = Math.sin(time / 200) / 1600 / 3;
@@ -561,10 +563,11 @@
startTimer({
startTimer({
id: "maw-struggle",
id: "maw-struggle",
func: () =>{
func: () => {
if (state.geta.swallowsLeft <= 0) {
if (state.geta.swallowsLeft <= 0) {
print(["Geta picks up his bowl of cereal and drinks it down, swallowing you in the process."]);
print(["Geta picks up his bowl of cereal and drinks it down, swallowing you in the process."]);
state.geta.swallowsLeft = -1;
goToRoom("throat");
goToRoom("throat");
return false;
return false;
}
}
@@ -630,7 +633,7 @@
state.geta.mawMovement = 3;
state.geta.mawMovement = 3;
startTimer({
startTimer({
id: "maw-slosh-end",
id: "maw-slosh-end",
func: () =>{
func: () => {
state.geta.mawMovement = 1;
state.geta.mawMovement = 1;
print(["The sloshing ends."]);
print(["The sloshing ends."]);
return true;
return true;
@@ -649,22 +652,22 @@
statLerp("mawPos", -1, 4000);
statLerp("mawPos", -1, 4000);
startTimer({
startTimer({
id: "maw-tilt-text",
func: () => {
print(["The fox's muzzle tilts back down as he SWALLOWS hard."]);
statLerp("mawPos", -0.3, 500);
state.geta.swallowsLeft -= 1;
state.geta.slurps = 0;
state.geta.chews = 0;
return true;
},
delay: 4000,
loop: false,
classes: [
]
id: "maw-tilt-text",
func: () => {
print(["The fox's muzzle tilts back down as he SWALLOWS hard."]);
statLerp("mawPos", -0.3, 500);
state.geta.swallowsLeft -= 1;
state.geta.slurps = 0;
state.geta.chews = 0;
return true;
},
delay: 4000,
loop: false,
classes: [
]
});
});
return 5000 + Math.random() * 1000;
return 5000 + Math.random() * 1000;
}
}
},
},
@@ -677,7 +680,7 @@
startTimer({
startTimer({
id: "maw-taunts",
id: "maw-taunts",
func: () =>{
func: () => {
printRandom([
printRandom([
["\"Did you really think I wouldn't notice you?\""],
["\"Did you really think I wouldn't notice you?\""],
["\"You're going to feel good dying in my guts.\""],
["\"You're going to feel good dying in my guts.\""],
@@ -717,14 +720,28 @@
name: "Slip Back",
name: "Slip Back",
desc: "Slide back towards Geta's gullet",
desc: "Slide back towards Geta's gullet",
execute: (room) => {
execute: (room) => {
if (Math.random() < 0.9){
if (Math.random() < 0.9) {
print(["You let yourself slip back."]);
print(["You let yourself slip back."]);
statLerp("mawPos", -0.2 - Math.random() * 0.1, 250);
statLerp("mawPos", -0.2 - Math.random() * 0.1, 250);
} else {
} else {
print(["You lose your grip, sliding back quite far!"]);
print(["You lose your grip, sliding back quite far!"]);
statLerp("mawPos", -0.3 - Math.random() * 0.15, 250);
statLerp("mawPos", -0.3 - Math.random() * 0.15, 250);
}
}
},
show: [
],
conditions: [
]
},
{
name: "Dive In",
desc: "Throw yourself towards the fox's throat",
execute: (room) => {
print(["Resigned to your fate, you toss yourself into Geta's throat. He seems surprised by your eagerness to submit, but swallows you all the same."]);
goToRoom("throat");
},
},
show: [
show: [
@@ -755,13 +772,15 @@
},
},
"enter": (room) => {
"enter": (room) => {
playSfx("sfx/swallow.ogg");
state.player.stats.mawPos.hidden = true;
state.player.stats.mawPos.hidden = true;
stopClassTimers("maw-struggle");
stopClassTimers("maw-struggle");
startTimer({
startTimer({
id: "throat-swallow",
id: "throat-swallow",
func: () =>{
func: () => {
print(["You slush down into Geta's stomach"]);
print(["You slush down into Geta's stomach"]);
goToRoom("stomach");
goToRoom("stomach");
return true;
return true;
@@ -834,7 +853,7 @@
startTimer({
startTimer({
id: "digest-random",
id: "digest-random",
func: () =>{
func: () => {
const choices = [
const choices = [
() => {
() => {
const crushed = randomBodyPart();
const crushed = randomBodyPart();
@@ -852,13 +871,57 @@
},
},
() => {
() => {
print(["Geta squeezes in on his gut with both hands, sloshing you around in the sickly stew of cereal, milk, and enzymatic slime."]);
printRandom([["Geta squeezes in on his gut with both hands, sloshing you around in the sickly stew of cereal, milk, and enzymatic slime."],
["Your organic prison snarls and churns, soaking you in fresh acids and hastening your wretched demise."]]);
changeStat("health", -10);
changeStat("health", -10);
return true;
return true;
},
},
() => {
() => {
print(["Your organic prison snarls and churns, soaking you in fresh acids and hastening your wretched demise."]);
state.geta.acidStretngth += 1;
if (state.geta.swallowsLeft == 0) {
print(["A deep series of *glurks* rattles your bones."]);
startTimer({
id: "stomach-milk",
func: () => {
print(["A torrent of cold milk pours into the fox's stomach."]);
return false;
},
delay: 3000,
loop: false,
classes: [
"digestion"
]
});
} else if (state.geta.swallowsLeft > 0) {
print(["Muffled chewing comes from far above. A moment later, you hear a wet *gluk*"]);
startTimer({
id: "stomach-cereal",
func: () => {
print(["A slimy heap of well-chewed corn flakes splatters down around you."]);
return false;
},
delay: 4000,
loop: false,
classes: [
]
});
} else if (state.geta.swallowsLeft < 0) {
print(["You hear a few light swallows."]);
startTimer({
id: "stomach-coffee",
func: () => {
print(["Gouts of hot, bitter coffee pour into the fox's guts."]);
return false;
},
delay: 3000,
loop: false,
classes: [
]
});
}
return true;
return true;
},
},
() => {
() => {
@@ -879,7 +942,7 @@
startTimer({
startTimer({
id: "digest",
id: "digest",
func: () =>{
func: () => {
changeStat("health", -0.3 * state.geta.acidStrength);
changeStat("health", -0.3 * state.geta.acidStrength);
if (getStat("health") <= 0) {
if (getStat("health") <= 0) {
@@ -942,6 +1005,8 @@
},
},
"enter": (room) => {
"enter": (room) => {
stopClassTimers("digestion");
stopClassTimers("digestion");
playSfx("sfx/absorb.ogg");
},
},
"exit": (room) => {
"exit": (room) => {