| @@ -4,7 +4,9 @@ | |||||
| function devour(state, count) { | function devour(state, count) { | ||||
| state.player.stats.stomach.value += count; | state.player.stats.stomach.value += count; | ||||
| state.player.stats.eaten.value += count; | state.player.stats.eaten.value += count; | ||||
| state.info.population.value -= count; | |||||
| state.world[state.player.location].data.stats.population.value -= count; | |||||
| playRandomSfx("swallow"); | playRandomSfx("swallow"); | ||||
| } | } | ||||
| @@ -137,7 +139,9 @@ | |||||
| type: "counter", | type: "counter", | ||||
| min: 0, | min: 0, | ||||
| max: 5000000, | max: 5000000, | ||||
| value: 5000000, | |||||
| get value() { | |||||
| return state.world.city.data.stats.population.value; | |||||
| }, | |||||
| get render() {return this.value}, | get render() {return this.value}, | ||||
| color: "rgb(255,255,255)" | color: "rgb(255,255,255)" | ||||
| }; | }; | ||||
| @@ -149,7 +153,7 @@ | |||||
| world: { | world: { | ||||
| "city": { | "city": { | ||||
| id: "city", | id: "city", | ||||
| name: "City", | |||||
| name: "Downtown", | |||||
| desc: "A city, full of tasty prey", | desc: "A city, full of tasty prey", | ||||
| move: (room, state) => { | move: (room, state) => { | ||||
| @@ -187,7 +191,7 @@ | |||||
| }, | }, | ||||
| data: { | data: { | ||||
| stats: { | stats: { | ||||
| population: {name: "Population", min: 0, max: 1000000, value: 1000000, type: "meter", color: "rgb(255,255,255)"} | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||