| @@ -466,15 +466,28 @@ | |||
| state.geta.slurps = 0; | |||
| state.geta.chews = 0; | |||
| startTimer({ | |||
| id: "maw-random-movement", | |||
| func: state => { | |||
| changeStat("mawPos", Math.random()/50 - 0.01, state); | |||
| return true; | |||
| }, | |||
| delay: 100, | |||
| loop: true, | |||
| classes: [ | |||
| "maw-struggle" | |||
| ] | |||
| }, state); | |||
| startTimer({ | |||
| id: "maw-struggle", | |||
| func: state => { | |||
| if (getStat("mawPos", state) <= 0) { | |||
| if (getStat("mawPos", state) <= 0.05) { | |||
| print(["Swallowed!"]); | |||
| goToRoom("throat", state); | |||
| return false; | |||
| } else if (getStat("mawPos", state) >= 1) { | |||
| } else if (getStat("mawPos", state) >= 0.95) { | |||
| print(["Chewed!"]); | |||
| changeStat("health", -90, state); | |||
| goToRoom("stomach", state); | |||
| @@ -492,7 +505,7 @@ | |||
| } | |||
| if (choice == "swallow") { | |||
| if (getStat("mawPos", state) < 0.3) { | |||
| if (getStat("mawPos", state) < 0.15) { | |||
| print(["Swallowed!"]); | |||
| goToRoom("throat", state); | |||
| return false; | |||
| @@ -510,7 +523,7 @@ | |||
| state.geta.slurps += 1; | |||
| return Math.random() * 1000 + 1500; | |||
| } else if (choice == "chew") { | |||
| if (getStat("mawPos", state) > 0.7) { | |||
| if (getStat("mawPos", state) > 0.85) { | |||
| print(["Chewed!"]); | |||
| changeStat("health", -90, state); | |||
| goToRoom("stomach", state); | |||
| @@ -526,7 +539,7 @@ | |||
| delay: 0, | |||
| loop: true, | |||
| classes: [ | |||
| "maw-struggle" | |||
| ] | |||
| }, state); | |||
| @@ -588,6 +601,8 @@ | |||
| state.player.stats.mawPos.hidden = true; | |||
| stopClassTimers("maw-struggle", state); | |||
| startTimer({ | |||
| id: "throat-swallow", | |||
| func: state => { | |||
| @@ -657,6 +672,8 @@ | |||
| }, | |||
| "enter": (room, state) => { | |||
| playLoop("loop/stomach.ogg"); | |||
| stopClassTimers("maw-struggle", state); | |||
| startTimer({ | |||
| id: "digest", | |||
| func: state => { | |||