Parcourir la source

Make the slurping/chewing/swallowing more predictable

Slurps now come before chews, and there is a limit to both
geta
Fen Dweller il y a 5 ans
Parent
révision
a0ce0114d0
1 fichiers modifiés avec 20 ajouts et 4 suppressions
  1. +20
    -4
      stories/geta-unaware.js

+ 20
- 4
stories/geta-unaware.js Voir le fichier

@@ -463,10 +463,12 @@

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

state.geta.slurps = 0;
state.geta.chews = 0;

startTimer({
id: "maw-struggle",
func: state => {
const choice = Math.random();

if (getStat("mawPos", state) <= 0) {
print(["Swallowed!"]);
@@ -479,7 +481,17 @@
return false;
}

if (choice < 0.3) {
let choice;

if (Math.random() > state.geta.slurps / 3) {
choice = "slurp";
} else if (state.geta.chews - Math.floor(Math.random()*3) < state.geta.slurps) {
choice = "chew";
} else {
choice = "swallow";
}

if (choice == "swallow") {
if (getStat("mawPos", state) < 0.3) {
print(["Swallowed!"]);
goToRoom("throat", state);
@@ -487,14 +499,17 @@
} else {
print(["Swallows"]);
changeStat("mawPos", -0.25, state);
state.geta.slurps = 0;
state.geta.chews = 0;
return Math.random() * 1500 + 2500;
}

} else if (choice < 0.7) {
} else if (choice == "slurp") {
changeStat("mawPos", -0.1, state);
print(["Slurps"]);
state.geta.slurps += 1;
return Math.random() * 1000 + 1500;
} else {
} else if (choice == "chew") {
if (getStat("mawPos", state) > 0.7) {
print(["Chewed!"]);
changeStat("health", -90, state);
@@ -502,6 +517,7 @@
return false;
} else {
print(["Chews"]);
state.geta.chews += 1;
return Math.random() * 500 + 1000;
}



Chargement…
Annuler
Enregistrer