| @@ -7,7 +7,7 @@ | |||||
| function digest(state, count) { | function digest(state, count) { | ||||
| if (count === undefined) { | if (count === undefined) { | ||||
| count = state.player.stats.stomach.value / 200 + 2; | |||||
| count = state.player.stats.digestrate.value * (state.player.stats.stomach.value / 100 + 2); | |||||
| } | } | ||||
| count = Math.min(state.player.stats.stomach.value, count); | count = Math.min(state.player.stats.stomach.value, count); | ||||
| @@ -46,15 +46,8 @@ | |||||
| ], | ], | ||||
| sounds: [ | sounds: [ | ||||
| "sfx/belches/belch.ogg", | "sfx/belches/belch.ogg", | ||||
| "sfx/swallows/swallow-1.ogg", | |||||
| "sfx/swallows/swallow-2.ogg", | |||||
| "sfx/swallows/swallow-3.ogg", | |||||
| "sfx/swallows/swallow-4.ogg", | |||||
| "sfx/swallows/swallow-5.ogg", | |||||
| "sfx/swallows/swallow-6.ogg", | |||||
| "sfx/swallows/swallow-7.ogg", | |||||
| "loop/stomach/stomach.ogg" | "loop/stomach/stomach.ogg" | ||||
| ], | |||||
| ].concat(sfxGroups["swallow"]), | |||||
| preload: [ | preload: [ | ||||
| "loop/stomach/stomach.ogg" | "loop/stomach/stomach.ogg" | ||||
| ], | ], | ||||
| @@ -99,6 +92,14 @@ | |||||
| type: "counter", | type: "counter", | ||||
| value: 0 | value: 0 | ||||
| } | } | ||||
| state.player.stats.digestrate = { | |||||
| name: "Digestion Rate", | |||||
| type: "hidden", | |||||
| value: 0.5, | |||||
| min: 0, | |||||
| max: 1, | |||||
| color: "rgb(0, 255, 0)" | |||||
| } | |||||
| startTimer({ | startTimer({ | ||||
| id: "belch", | id: "belch", | ||||
| @@ -121,6 +122,8 @@ | |||||
| id: "digestion", | id: "digestion", | ||||
| func: state => { | func: state => { | ||||
| digest(state); | digest(state); | ||||
| const rateChange = (state.player.stats.digestrate.value - 0.5) / 1000 | |||||
| state.player.stats.digestrate.value -= rateChange; | |||||
| let vol = state.player.stats.fullness.value / state.player.stats.fullness.max | let vol = state.player.stats.fullness.value / state.player.stats.fullness.max | ||||
| vol = Math.sqrt(vol); | vol = Math.sqrt(vol); | ||||
| playLoop("loop/stomach/stomach.ogg", vol); | playLoop("loop/stomach/stomach.ogg", vol); | ||||
| @@ -163,6 +166,14 @@ | |||||
| print(["You scoop up " + victims + " people and swallow them down."]); | print(["You scoop up " + victims + " people and swallow them down."]); | ||||
| devour(state, victims); | devour(state, victims); | ||||
| } | } | ||||
| }, | |||||
| { | |||||
| name: "Rub", | |||||
| desc: "Rub your belly", | |||||
| execute: (room, state) => { | |||||
| print(["You rub over the " + state.player.stats.stomach.value + " prey in your guts, hastening their digestion."]); | |||||
| state.player.stats.digestrate.value += 0.25; | |||||
| } | |||||
| } | } | ||||
| ], | ], | ||||
| exits: { | exits: { | ||||