Pārlūkot izejas kodu

Add some sounds. Add eating whilst in the stomach. Fix misspelled limb name

geta
Fen Dweller pirms 5 gadiem
vecāks
revīzija
e872188940
3 mainītis faili ar 113 papildinājumiem un 42 dzēšanām
  1. Binārs
      media/geta-unaware/audio/sfx/absorb.ogg
  2. Binārs
      media/geta-unaware/audio/sfx/swallow.ogg
  3. +107
    -42
      stories/geta-unaware.js

Binārs
media/geta-unaware/audio/sfx/absorb.ogg (Saglabāts Git LFS) Parādīt failu

oid sha256:9ad8052a00709266aa58e03b43cceb48113156873223eff86436c56538854ec1
size 192004

Binārs
media/geta-unaware/audio/sfx/swallow.ogg (Saglabāts Git LFS) Parādīt failu

oid sha256:a4b98e43afe3029cda4561e4855db85fb17ba11e905da2927cfffb352ab89150
size 50078

+ 107
- 42
stories/geta-unaware.js Parādīt failu

@@ -38,7 +38,7 @@
const iterations = duration / 1000 * 60;
startTimer({
id: id,
func: () =>{
func: () => {
changeStat(stat, change / iterations);
return true;
},
@@ -51,7 +51,7 @@

startTimer({
id: id + "-stopper",
func: () =>{
func: () => {
stopTimer(id);
return false;
},
@@ -83,7 +83,7 @@
],
"intro": {
"start": "pepper-grinder",
"setup": () =>{
"setup": () => {

state.info.awareness = {
id: "awareness",
@@ -113,11 +113,11 @@
state.player.limbs.leftArm = true;
state.player.limbs.rightArm = true;
state.player.limbs.leftLeg = true;
state.player.limbs.rightLef = true;
state.player.limbs.rightLeg = true;

startTimer({
id: "clock",
func: () =>{
func: () => {
state.info.time.value += 1;
state.info.time.value %= 86000;
return true;
@@ -131,7 +131,7 @@

startTimer({
id: "suspicion-decay",
func: () =>{
func: () => {
checkSuspicion(-0.1);
return true;
},
@@ -144,7 +144,7 @@

startTimer({
id: "timeout",
func: () =>{
func: () => {
if (state.info.time.value == 60 * 60 * 7 + 60 * 19) {
print(["The fox is almost done with his breakfast..."]);
}
@@ -165,7 +165,7 @@

startTimer({
id: "geta-action",
func: () =>{
func: () => {
const random = Math.random();

if (random < 0.7) {
@@ -177,7 +177,7 @@

startTimer({
id: "yawn-end",
func: () =>{
func: () => {
print(["Geta finishes his stretch"]);
state.info.awareness.value = 1;
return true;
@@ -196,7 +196,7 @@

startTimer({
id: "squint-end",
func: () =>{
func: () => {
print(["He goes back to his breakfast."]);
state.info.awareness.value = 1;
return true;
@@ -222,12 +222,14 @@


},
"intro": () =>{
"intro": () => {
print(["Game started", newline, "Exposition goes here later."]);
}
},
"sounds": [
"loop/stomach.ogg"
"loop/stomach.ogg",
"sfx/absorb.ogg",
"sfx/swallow.ogg"
],
"preload": [

@@ -260,7 +262,7 @@

startTimer({
id: "pepper-investigate",
func: () =>{
func: () => {
if (state.player.location == "pepper-grinder") {
print(["He catches you.", newline, "You're tossed into the fox's jaws."]);
goToRoom("maw");
@@ -403,7 +405,7 @@
"enter": (room) => {
startTimer({
id: "table-suspicion",
func: () =>{
func: () => {
checkSuspicion(1.5);
return true;
},
@@ -457,7 +459,7 @@

startTimer({
id: "geta-eat",
func: () =>{
func: () => {
if (Math.random() < 0.6) {
print(["Geta scoops up a spoonful of cereal; you narrowly avoid being caught."]);
return true;
@@ -532,7 +534,7 @@

startTimer({
id: "maw-random-movement",
func: () =>{
func: () => {
const time = new Date().getTime();
const movementFactor = (state.geta.mawMovement + limbsLost());
const fastPart = Math.sin(time / 200) / 1600 / 3;
@@ -561,10 +563,11 @@

startTimer({
id: "maw-struggle",
func: () =>{
func: () => {

if (state.geta.swallowsLeft <= 0) {
print(["Geta picks up his bowl of cereal and drinks it down, swallowing you in the process."]);
state.geta.swallowsLeft = -1;
goToRoom("throat");
return false;
}
@@ -630,7 +633,7 @@
state.geta.mawMovement = 3;
startTimer({
id: "maw-slosh-end",
func: () =>{
func: () => {
state.geta.mawMovement = 1;
print(["The sloshing ends."]);
return true;
@@ -649,22 +652,22 @@
statLerp("mawPos", -1, 4000);

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;
}
},
@@ -677,7 +680,7 @@

startTimer({
id: "maw-taunts",
func: () =>{
func: () => {
printRandom([
["\"Did you really think I wouldn't notice you?\""],
["\"You're going to feel good dying in my guts.\""],
@@ -717,14 +720,28 @@
name: "Slip Back",
desc: "Slide back towards Geta's gullet",
execute: (room) => {
if (Math.random() < 0.9){
if (Math.random() < 0.9) {
print(["You let yourself slip back."]);
statLerp("mawPos", -0.2 - Math.random() * 0.1, 250);
} else {
print(["You lose your grip, sliding back quite far!"]);
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: [

@@ -755,13 +772,15 @@
},
"enter": (room) => {

playSfx("sfx/swallow.ogg");

state.player.stats.mawPos.hidden = true;

stopClassTimers("maw-struggle");

startTimer({
id: "throat-swallow",
func: () =>{
func: () => {
print(["You slush down into Geta's stomach"]);
goToRoom("stomach");
return true;
@@ -834,7 +853,7 @@

startTimer({
id: "digest-random",
func: () =>{
func: () => {
const choices = [
() => {
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);
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;
},
() => {
@@ -879,7 +942,7 @@

startTimer({
id: "digest",
func: () =>{
func: () => {
changeStat("health", -0.3 * state.geta.acidStrength);

if (getStat("health") <= 0) {
@@ -942,6 +1005,8 @@
},
"enter": (room) => {
stopClassTimers("digestion");

playSfx("sfx/absorb.ogg");
},
"exit": (room) => {



Notiek ielāde…
Atcelt
Saglabāt