| @@ -7,7 +7,7 @@ | |||
| function digest(state, count) { | |||
| 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); | |||
| @@ -46,15 +46,8 @@ | |||
| ], | |||
| sounds: [ | |||
| "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" | |||
| ], | |||
| ].concat(sfxGroups["swallow"]), | |||
| preload: [ | |||
| "loop/stomach/stomach.ogg" | |||
| ], | |||
| @@ -99,6 +92,14 @@ | |||
| type: "counter", | |||
| value: 0 | |||
| } | |||
| state.player.stats.digestrate = { | |||
| name: "Digestion Rate", | |||
| type: "hidden", | |||
| value: 0.5, | |||
| min: 0, | |||
| max: 1, | |||
| color: "rgb(0, 255, 0)" | |||
| } | |||
| startTimer({ | |||
| id: "belch", | |||
| @@ -121,6 +122,8 @@ | |||
| id: "digestion", | |||
| func: 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 | |||
| vol = Math.sqrt(vol); | |||
| playLoop("loop/stomach/stomach.ogg", vol); | |||
| @@ -163,6 +166,14 @@ | |||
| print(["You scoop up " + victims + " people and swallow them down."]); | |||
| 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: { | |||