瀏覽代碼

Text tweaks, fixed stamina going negative

tags/v0.1.1
Fen Dweller 6 年之前
父節點
當前提交
f76531afdb
共有 1 個檔案被更改,包括 51 行新增8 行删除
  1. +51
    -8
      stories/fen-snack.js

+ 51
- 8
stories/fen-snack.js 查看文件

@@ -32,6 +32,30 @@ stories.push({
state.player.stats.health = {name: "Health", type: "meter", value: 100, max: 100, color: "rgb(255,0,0)"}; state.player.stats.health = {name: "Health", type: "meter", value: 100, max: 100, color: "rgb(255,0,0)"};
state.player.stats.stamina = {name: "Stamina", type: "meter", value: 100, max: 100, color: "rgb(100,255,0)"}; state.player.stats.stamina = {name: "Stamina", type: "meter", value: 100, max: 100, color: "rgb(100,255,0)"};


startTimer({
id: "movement",
func: state => {
const pinned = state.player.flags.pinned;

if (pinned) {
print(["Fen rolls back over, releasing you from under his huge, heated bulk."]);
state.player.flags.pinned = false;
playSfx("sfx/intestines-churn-stay.ogg");
return 30000 + Math.random() * 15000;
} else {
print(["Fen rolls onto his belly, crushing you under his heavy body. You can barely move!"]);
state.player.flags.pinned = true;
playSfx("sfx/stomach-to-intestines-fail.ogg");
return 10000 + Math.random() * 10000;
}
},
delay: 15000,
loop: true,
classes: [
"alive"
]
}, state);

startTimer({ startTimer({
id: "digestion", id: "digestion",
func: state => { func: state => {
@@ -83,7 +107,7 @@ stories.push({
func: state => { func: state => {
const location = state.player.location; const location = state.player.location;
let bonus = state.player.flags.submission ? -3 : 0; let bonus = state.player.flags.submission ? -3 : 0;
bonus += state.player.flags.pinned ? -0.5 : 0;
if (location.startsWith("stomach")) { if (location.startsWith("stomach")) {
state.player.stats.stamina.value += 1 + bonus; state.player.stats.stamina.value += 1 + bonus;
} }
@@ -96,9 +120,13 @@ stories.push({
state.player.stats.stamina.value += -0.5 + bonus; state.player.stats.stamina.value += -0.5 + bonus;
} }


if (state.player.stats.stamina.value > 100) {
state.player.stats.stamina.value = 100;
}
if (state.player.stats.stamina.value > 100) {
state.player.stats.stamina.value = 100;
}

if (state.player.stats.stamina.value < 0) {
state.player.stats.stamina.value = 0;
}


return true; return true;
}, },
@@ -223,6 +251,9 @@ stories.push({
conditions: [ conditions: [
(room, state) => { (room, state) => {
return !state.player.flags.submission; return !state.player.flags.submission;
},
(room, state) => {
return !state.player.flags.pinned;
} }
] ]
} }
@@ -278,6 +309,9 @@ stories.push({
conditions: [ conditions: [
(room, state) => { (room, state) => {
return !state.player.flags.submission; return !state.player.flags.submission;
},
(room, state) => {
return !state.player.flags.pinned;
} }
] ]
}, },
@@ -291,6 +325,9 @@ stories.push({
conditions: [ conditions: [
(room, state) => { (room, state) => {
return !state.player.flags.submission; return !state.player.flags.submission;
},
(room, state) => {
return !state.player.flags.pinned;
} }
] ]
} }
@@ -388,6 +425,9 @@ stories.push({
conditions: [ conditions: [
(room, state) => { (room, state) => {
return !state.player.flags.submission; return !state.player.flags.submission;
},
(room, state) => {
return !state.player.flags.pinned;
} }
], ],
hooks: [ hooks: [
@@ -433,13 +473,14 @@ stories.push({
}, },
"digested-stomach": { "digested-stomach": {
id: "digested-stomach", id: "digested-stomach",
name: "Fen's Hips",
name: "Fen's Belly",
desc: "You look good on him, at least~", desc: "You look good on him, at least~",
enter: (room, state) => { enter: (room, state) => {
playLoop("loop/fen-intestines.ogg"); playLoop("loop/fen-intestines.ogg");
playSfx("sfx/digested-test.ogg"); playSfx("sfx/digested-test.ogg");
playSfx("sfx/bowels-churn-safe.ogg");
stopClassTimers("alive", state); stopClassTimers("alive", state);
print(["You slump down in the acidic pit, curling up as it begins to churn you down to chyme. Fen's stomach snarls and bubbles for the next few minutes...and then you're gone~",newline,"Nothing's left but a bit of padding on your predator's hips..."]);
print(["You slump down in the acidic pit, curling up as it begins to churn you down to chyme. Fen's stomach snarls and bubbles for the next few minutes...and then you're gone~",newline,"Nothing's left but a bit of padding on your predator's gut..."]);
} }
}, },
"digested-intestines": { "digested-intestines": {
@@ -449,6 +490,7 @@ stories.push({
enter: (room, state) => { enter: (room, state) => {
playLoop("loop/fen-intestines.ogg"); playLoop("loop/fen-intestines.ogg");
playSfx("sfx/digested-test.ogg"); playSfx("sfx/digested-test.ogg");
playSfx("sfx/bowels-churn-safe.ogg");
stopClassTimers("alive", state); stopClassTimers("alive", state);
print(["Fen's intestines clench and squeeze, melting you down into slop and soaking you up like a sponge.",newline,"Nothing's left but a bit of padding on your predator's hips..."]); print(["Fen's intestines clench and squeeze, melting you down into slop and soaking you up like a sponge.",newline,"Nothing's left but a bit of padding on your predator's hips..."]);
} }
@@ -458,10 +500,11 @@ stories.push({
name: "Fen's Ass", name: "Fen's Ass",
desc: "A little extra heft on the predator's posterior.", desc: "A little extra heft on the predator's posterior.",
enter: (room, state) => { enter: (room, state) => {
playLoop("loop/fen-intestines.ogg");
playLoop("loop/fen-bowels.ogg");
playSfx("sfx/digested-test.ogg"); playSfx("sfx/digested-test.ogg");
playSfx("sfx/bowels-churn-danger.ogg");
stopClassTimers("alive", state); stopClassTimers("alive", state);
print(["A powerful ripple of muscle pins you in a vice-grip of flesh - and within seconds, you're part of Fen's bowels.",newline,"Nothing's left but a bit of padding on your predator's hips..."]);
print(["A powerful ripple of muscle pins you in a vice-grip of flesh - and within seconds, you're part of Fen's bowels.",newline,"Nothing's left but a bit of padding on your predator's ass..."]);
} }
} }
} }


Loading…
取消
儲存