Просмотр исходного кода

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

geta
Fen Dweller 6 лет назад
Родитель
Сommit
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"); playLoop("loop/stomach.ogg");
stopClassTimers("maw-struggle"); stopClassTimers("maw-struggle");


state.geta.digestionStage = 0;
state.geta.acidStrength = 1; 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({ startTimer({
id: "digest-random", id: "digest-random",
func: () => { 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."], 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."]]); ["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; 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, delay: 5000,


Загрузка…
Отмена
Сохранить