Преглед на файлове

Make stomach events a bit more random. Add flavor text at different stages of digestion

geta
Fen Dweller преди 6 години
родител
ревизия
414bc7867a
променени са 1 файла, в които са добавени 38 реда и са изтрити 2 реда
  1. +38
    -2
      stories/geta-unaware.js

+ 38
- 2
stories/geta-unaware.js Целия файл

@@ -887,8 +887,40 @@
playLoop("loop/stomach.ogg");
stopClassTimers("maw-struggle");

state.geta.digestionStage = 0;
state.geta.acidStrength = 1;

startTimer({
id: "digest-stages",
func: () => {
if (100 - state.geta.digestionStage * 25 - 25> getStat("health")) {
state.geta.digestionStage = Math.floor((100 - getStat("health")) / 25);
console.log(state.geta.digestionStage);
switch (state.geta.digestionStage) {
case 1:
print(["Your skin begins to tingle."]);
break;
case 2:
print(["The stinging acids work their way into your tender body."]);
break;
case 3:
print(["You're starting to fall apart..."]);
break;
default:
break;
}
}

return true;
},
delay: 1000,
loop: true,
classes: [
"digestion"
]
});


startTimer({
id: "digest-random",
func: () => {
@@ -911,7 +943,7 @@
() => {
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);
statLerp("health", -10, 2000);
return true;
},
() => {
@@ -968,7 +1000,11 @@
}
];

return choices[Math.floor(Math.random() * choices.length)]();
if (choices[Math.floor(Math.random() * choices.length)]()) {
return Math.random() * 3000 + 3500;
} else {
return false;
}

},
delay: 5000,


Loading…
Отказ
Запис