| @@ -127,6 +127,7 @@ | |||||
| state.player.stats.mawPos = { "name": "Struggle", "type": "meter", "value": 0.5, "min": 0, "max": 1, get color() { | state.player.stats.mawPos = { "name": "Struggle", "type": "meter", "value": 0.5, "min": 0, "max": 1, get color() { | ||||
| return (this.value <= 0.15 || this.value >= 0.85) ? "rgb(255,100,0)" : "rgb(0,255,0)"}, hidden: true } | return (this.value <= 0.15 || this.value >= 0.85) ? "rgb(255,100,0)" : "rgb(0,255,0)"}, hidden: true } | ||||
| state.player.stats.throatPos = { "name": "Descent", "type": "meter", "value": 0.25, "min": 0, "max": 1, get color() { return "rgb(" + (100+155*this.value) + ",0,0)"}, hidden: true } | state.player.stats.throatPos = { "name": "Descent", "type": "meter", "value": 0.25, "min": 0, "max": 1, get color() { return "rgb(" + (100+155*this.value) + ",0,0)"}, hidden: true } | ||||
| state.player.stats.absorption = { "name": "Absorption", "type": "meter", "value": 0, "min": 0, "max": 1, get color() { return "rgb(" + (100+155*this.value) + ",0,0)"}, hidden: true } | |||||
| state.info.time.value = 60 * 60 * 7 + 60 * 17; | state.info.time.value = 60 * 60 * 7 + 60 * 17; | ||||
| @@ -1290,27 +1291,69 @@ | |||||
| stopClassTimers("digestion"); | stopClassTimers("digestion"); | ||||
| stopTimer("clock"); | stopTimer("clock"); | ||||
| state.player.flags.digestTime = state.info.time.value; | |||||
| state.player.stats.health.hidden = true; | |||||
| state.player.stats.absorption.hidden = false; | |||||
| startTimer({ | startTimer({ | ||||
| id: "absorb-clock", | |||||
| id: "clock", | |||||
| func: () => { | func: () => { | ||||
| state.info.time.value += 1; | |||||
| state.info.time.value += 2; | |||||
| state.info.time.value %= 86000; | state.info.time.value %= 86000; | ||||
| if (state.info.time.value - state.player.flags.digestTime > 5 * 60) { | |||||
| print(["Your molten remains drain into the fox's depths..."]); | |||||
| goToRoom("absorbed"); | |||||
| return false; | |||||
| } | |||||
| return true; | return true; | ||||
| }, | }, | ||||
| delay: 1000 / 15, | |||||
| delay: 1000/60, | |||||
| loop: true, | loop: true, | ||||
| classes: [ | classes: [ | ||||
| ] | ] | ||||
| }); | }); | ||||
| startTimer({ | |||||
| id: "passive-absorb", | |||||
| func: () => { | |||||
| changeStat("absorption", 0.0004); | |||||
| if (getStat("absorption") >= 1) { | |||||
| goToRoom("absorbed"); | |||||
| return false; | |||||
| } | |||||
| return true; | |||||
| }, | |||||
| delay: 1000/60, | |||||
| loop: true, | |||||
| classes: [ | |||||
| "absorption" | |||||
| ] | |||||
| }); | |||||
| startTimer({ | |||||
| id: "absorbption-random", | |||||
| func: () => { | |||||
| const result = pickRandom([ | |||||
| () => { | |||||
| print(["The fox kneads on his flattening belly"]); | |||||
| statLerp("absorption", 0.1, 1000); | |||||
| }, | |||||
| () => { | |||||
| print(["A crass belch pours from Geta's maw"]); | |||||
| statLerp("absorption", 0.05, 1000); | |||||
| }, | |||||
| () => { | |||||
| print(["Geta's guts writhe and squeeze, soaking up your digested body and crushing your acid-pitted bones"]); | |||||
| statLerp("absorption", 0.2, 1000); | |||||
| } | |||||
| ])(); | |||||
| return result ? result : Math.random() * 3000 + 4000; | |||||
| }, | |||||
| delay: 2000, | |||||
| loop: true, | |||||
| classes: [ | |||||
| "absorption" | |||||
| ] | |||||
| }); | |||||
| playSfx("sfx/digest.ogg"); | playSfx("sfx/digest.ogg"); | ||||
| }, | }, | ||||
| @@ -1358,6 +1401,10 @@ | |||||
| }, | }, | ||||
| "enter": (room) => { | "enter": (room) => { | ||||
| playSfx("sfx/absorb.ogg"); | playSfx("sfx/absorb.ogg"); | ||||
| stopTimer("clock"); | |||||
| stopClassTimers("absorption"); | |||||
| state.player.stats.absorption.hidden = true; | |||||
| print(["Your erasure is completed with a dull, slimy gurgle. Geta has destroyed you."]); | |||||
| }, | }, | ||||
| "exit": (room) => { | "exit": (room) => { | ||||