Sfoglia il codice sorgente

Flesh out the maw text a bit. Fix head-tilting not resetting maw movement when over

geta
Fen Dweller 5 anni fa
parent
commit
18aa9839b5
1 ha cambiato i file con 29 aggiunte e 6 eliminazioni
  1. +29
    -6
      stories/geta-unaware.js

+ 29
- 6
stories/geta-unaware.js Vedi File

@@ -32,6 +32,16 @@
}).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) {
// pretty sure this'll be a random id...
const id = new Date().getTime() + Math.random();
@@ -595,11 +605,15 @@

if (choice == "swallow") {
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");
return false;
} 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);
state.geta.slurps = 0;
state.geta.chews = 0;
@@ -609,7 +623,11 @@

} else if (choice == "slurp") {
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;
return Math.random() * 1000 + 1500;
} else if (choice == "chew") {
@@ -619,17 +637,21 @@
const limbName = limbs[limb];

if (limb == "head") {
print(["He chewed your head :((("]);
print(["Geta's jaws crush down on your head. You die."]);
changeStat("health", -100);
goToRoom("stomach");
} else {
print(["He chewed your " + limbName + " :("]);
print(["You scream in pain as your " + limbName + " is shattered by the fox's jaws"]);
changeStat("health", -40);
return true;
}

} 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;
return Math.random() * 500 + 1000;
}
@@ -659,6 +681,7 @@
startTimer({
id: "maw-tilt-text",
func: () => {
state.geta.mawMovement = 1;
print(["The fox's muzzle tilts back down as he SWALLOWS hard."]);
statLerp("mawPos", -0.3, 500);
state.geta.swallowsLeft -= 1;


Loading…
Annulla
Salva