| @@ -122,6 +122,8 @@ | |||||
| state.player.stats.stamina = { name: "Stamina", type: "meter", value: 100, min: 0, max: 100, color: "rgb(55,255,55)", hidden: true }; | state.player.stats.stamina = { name: "Stamina", type: "meter", value: 100, min: 0, max: 100, color: "rgb(55,255,55)", hidden: true }; | ||||
| state.player.stats.suspicion = { name: "Suspicion", type: "meter", value: 0, min: 0, max: 100, color: "rgb(100,100,100)" }; | state.player.stats.suspicion = { name: "Suspicion", type: "meter", value: 0, min: 0, max: 100, color: "rgb(100,100,100)" }; | ||||
| state.player.stats.mawPos = { "name": "Struggle", "type": "meter", "value": 0.5, "min": 0, "max": 1, "color": "rgb(0,255,0)", hidden: true } | state.player.stats.mawPos = { "name": "Struggle", "type": "meter", "value": 0.5, "min": 0, "max": 1, "color": "rgb(0,255,0)", hidden: true } | ||||
| state.player.stats.throatPos = { "name": "Descent", "type": "meter", "value": 0.25, "min": 0, "max": 1, "color": "rgb(155,0,0)", hidden: true } | |||||
| state.info.time.value = 60 * 60 * 7 + 60 * 17; | state.info.time.value = 60 * 60 * 7 + 60 * 17; | ||||
| state.player.limbs = {}; | state.player.limbs = {}; | ||||
| @@ -758,6 +760,8 @@ | |||||
| }, | }, | ||||
| "exit": (room) => { | "exit": (room) => { | ||||
| state.player.stats.stamina.hidden = true; | state.player.stats.stamina.hidden = true; | ||||
| state.player.stats.mawPos.hidden = true; | |||||
| stopClassTimers("maw-struggle"); | |||||
| }, | }, | ||||
| "actions": [ | "actions": [ | ||||
| { | { | ||||
| @@ -771,7 +775,7 @@ | |||||
| changeStat("stamina", -25); | changeStat("stamina", -25); | ||||
| statLerp("mawPos", 0.15 + Math.random() * 0.05, 250); | statLerp("mawPos", 0.15 + Math.random() * 0.05, 250); | ||||
| } | } | ||||
| }, | }, | ||||
| show: [ | show: [ | ||||
| @@ -842,34 +846,79 @@ | |||||
| playSfx("sfx/swallow.ogg"); | playSfx("sfx/swallow.ogg"); | ||||
| state.player.stats.mawPos.hidden = true; | |||||
| stopClassTimers("maw-struggle"); | |||||
| state.player.flags.throatSurrender = false; | |||||
| state.player.stats.stamina.hidden = false; | |||||
| state.player.stats.throatPos.hidden = false; | |||||
| startTimer({ | startTimer({ | ||||
| id: "throat-swallow", | |||||
| id: "throat-stamina", | |||||
| func: () => { | |||||
| changeStat("stamina", 0.03); | |||||
| return true; | |||||
| }, | |||||
| delay: 1000/60, | |||||
| loop: true, | |||||
| classes: [ | |||||
| "throat-struggle" | |||||
| ] | |||||
| }); | |||||
| startTimer({ | |||||
| id: "throat-descent", | |||||
| func: () => { | func: () => { | ||||
| print(["You slush down into Geta's stomach"]); | |||||
| goToRoom("stomach"); | |||||
| if (getStat("throatPos") <= 0.01) { | |||||
| print(["Geta swallows HARD, cramming you back down like the food you are."]); | |||||
| changeStat("throatPos", 0.1); | |||||
| statLerp("throatPos", 0.5, 1000); | |||||
| } | |||||
| if (getStat("throatPos") >= 0.99) { | |||||
| goToRoom("stomach"); | |||||
| return false; | |||||
| } | |||||
| changeStat("throatPos", state.player.flags.throatSurrender ? 0.0005 : 0.0001); | |||||
| return true; | return true; | ||||
| }, | }, | ||||
| delay: 7000, | |||||
| loop: false, | |||||
| delay: 1000 / 60, | |||||
| loop: true, | |||||
| classes: [ | classes: [ | ||||
| "throat-struggle" | |||||
| ] | |||||
| }); | |||||
| startTimer({ | |||||
| id: "throat-swallows", | |||||
| func: () => { | |||||
| print(["Geta's throat pumps you deeper"]); | |||||
| statLerp("throatPos", 0.1, 1250); | |||||
| return Math.random() * 2000 + 2000; | |||||
| }, | |||||
| delay: 2000, | |||||
| loop: true, | |||||
| classes: [ | |||||
| "throat-struggle" | |||||
| ] | ] | ||||
| }); | }); | ||||
| }, | }, | ||||
| "exit": (room) => { | "exit": (room) => { | ||||
| state.player.stats.stamina.hidden = true; | |||||
| state.player.stats.throatPos.hidden = true; | |||||
| print(["You slush down into Geta's stomach"]); | |||||
| stopClassTimers("throat-struggle"); | |||||
| }, | }, | ||||
| "actions": [ | "actions": [ | ||||
| { | { | ||||
| name: "Struggle", | name: "Struggle", | ||||
| desc: "Try to climb back out!", | desc: "Try to climb back out!", | ||||
| execute: (room) => { | execute: (room) => { | ||||
| print(["Nope"]); | |||||
| if (Math.random() * 50 > getStat("stamina")) { | |||||
| print(["You try your best, but your sore muscles are no match."]); | |||||
| } else { | |||||
| print(["Your valiant struggles drag you a little closer to freedom."]); | |||||
| statLerp("throatPos", -0.15, 1000); | |||||
| changeStat("stamina", -20); | |||||
| } | |||||
| }, | }, | ||||
| show: [ | show: [ | ||||
| @@ -883,11 +932,12 @@ | |||||
| desc: "Dive down into Geta's stomach", | desc: "Dive down into Geta's stomach", | ||||
| execute: (room) => { | execute: (room) => { | ||||
| print(["You submit to your predator."]); | print(["You submit to your predator."]); | ||||
| goToRoom("stomach"); | |||||
| stopTimer("throat-swallow"); | |||||
| state.player.flags.throatSurrender = true; | |||||
| }, | }, | ||||
| show: [ | show: [ | ||||
| (room) => { | |||||
| return !state.player.flags.throatSurrender; | |||||
| } | |||||
| ], | ], | ||||
| conditions: [ | conditions: [ | ||||
| @@ -915,7 +965,6 @@ | |||||
| }, | }, | ||||
| "enter": (room) => { | "enter": (room) => { | ||||
| playLoop("loop/stomach.ogg"); | playLoop("loop/stomach.ogg"); | ||||
| stopClassTimers("maw-struggle"); | |||||
| state.geta.digestionStage = 0; | state.geta.digestionStage = 0; | ||||
| state.geta.acidStrength = 1; | state.geta.acidStrength = 1; | ||||