|
- (() => {
- function devour(state, count) {
- state.player.stats.stomach.value += count;
- playSfx("sfx/swallows/swallow.ogg")
- }
- function digest(state, count) {
- if (count === undefined) {
- count = state.player.stats.stomach.value / 10;
- }
- state.player.stats.stomach.value -= count;
- state.player.stats.gas.value += count;
- }
- stories.push({
- id: "mass-vore",
- name: "Mass Vore",
- tags: [
- "Player Predator",
- "Macro/Micro",
- "Digestion"
- ],
- sounds: [
- "sfx/belches/belch.ogg",
- "sfx/swallows/swallow.ogg"
- ],
- preload: [
-
- ],
- intro: {
- start: "city",
- setup: state => {
- state.player.stats.fullness = {
- name: "Fullness",
- type: "meter",
- get value() {
- return state.player.stats.gas.value + state.player.stats.stomach.value;
- },
- min: 0,
- max: 10000,
- color: "rgb(200,20,100)"
- };
- state.player.stats.gas = {
- name: "Gas",
- type: "meter",
- value: 0,
- min: 0,
- get max() {
- return 10000 - state.player.stats.stomach.value;
- },
- color: "rgb(10,200,100)"
- }
- state.player.stats.stomach = {
- name: "Stomach",
- type: "meter",
- value: 0,
- min: 0,
- max: 10000,
- color: "rgb(255,10,150)"
- }
-
- startTimer({
- id: "belch",
- func: state => {
- if (state.player.stats.gas.value > state.player.stats.gas.max) {
- print(["BUURRRRRP!"]);
- playSfx("sfx/belches/belch.ogg");
- state.player.stats.gas.value /= 3;
- }
- return true;
- },
- delay: 100,
- loop: true,
- classes: [
-
- ]
- }, state);
-
- startTimer({
- id: "digestion",
- func: state => {
- digest(state);
- return true;
- },
- delay: 100,
- loop: true,
- classes: [
-
- ]
- }, state);
- },
- intro: state => {
- print(["Munch time"]);
- }
- },
- world: {
- "city": {
- id: "",
- name: "",
- desc: "",
- move: (room, state) => {
-
- },
- enter: (room, state) => {
-
- },
- exit: (room, state) => {
-
- },
- hooks: [
-
- ],
- actions: [
- {
- name: "Eat",
- desc: "Munch!",
- execute: (room, state) => {
- print(["Munch!"]);
- devour(state, 500);
- }
- }
- ],
- exits: {
-
- }
- }
- }
- });
- })();
|