a munch adventure
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

1264 rindas
47 KiB

  1. (() => {
  2. function checkSuspicion(add = 0) {
  3. const old = getStat("suspicion");
  4. if (add >= 0) {
  5. add *= state.info.awareness.value;
  6. }
  7. changeStat("suspicion", add);
  8. if (getStat("suspicion") >= 100) {
  9. print(["Geta spots you!", "You're snatched up and tossed into the fox's bowl of cereal."]);
  10. goToRoom("in-bowl");
  11. return false;
  12. } else if (getStat("suspicion") >= 75 && old < 75) {
  13. print(["The fox is very suspicious. You're going to get caught if you keep this up..."]);
  14. }
  15. return true;
  16. }
  17. function randomBodyPart() {
  18. const choices = Object.entries(state.player.limbs).filter(([name, status]) => {
  19. return status;
  20. }).map(([name, status]) => name);
  21. return choices[Math.floor(Math.random() * choices.length)];
  22. }
  23. function limbsLost() {
  24. return Object.entries(state.player.limbs).filter(([name, status]) => {
  25. return !status;
  26. }).length;
  27. }
  28. function synonym(word) {
  29. const choices = {
  30. "slippery": ["slippery", "slimy", "slick", "glistening"],
  31. "chews": ["chews", "crunches"],
  32. "crushes": ["crushes", "pulverizes", "shatters", "smashes"]
  33. }
  34. return choices[word][Math.floor(Math.random() * choices[word].length)];
  35. }
  36. function statLerp(stat, change, duration) {
  37. // pretty sure this'll be a random id...
  38. const id = new Date().getTime() + Math.random();
  39. const iterations = duration / 1000 * 60;
  40. startTimer({
  41. id: id,
  42. func: () => {
  43. changeStat(stat, change / iterations);
  44. return true;
  45. },
  46. delay: 1000 / 60,
  47. loop: true,
  48. classes: [
  49. ]
  50. });
  51. startTimer({
  52. id: id + "-stopper",
  53. func: () => {
  54. stopTimer(id);
  55. return false;
  56. },
  57. delay: duration,
  58. loop: false,
  59. classes: [
  60. ]
  61. });
  62. }
  63. const limbs = {
  64. head: "head",
  65. leftArm: "left arm",
  66. rightArm: "right arm",
  67. leftLeg: "left leg",
  68. rightLeg: "right leg"
  69. };
  70. stories.push({
  71. "id": "geta-unaware",
  72. "info": {
  73. "name": "Geta's Breakfast",
  74. "desc": "Try to sneak past a fox after a catastrophic shrinking incident.",
  75. "tags": [
  76. "prey",
  77. "fatal",
  78. "oral-vore",
  79. "hard-vore",
  80. "hard-digestion",
  81. "macro-micro"
  82. ]
  83. },
  84. "intro": {
  85. "start": "pepper-grinder",
  86. "setup": () => {
  87. state.info.awareness = {
  88. id: "awareness",
  89. name: "Geta's Awareness",
  90. type: "counter",
  91. value: 1,
  92. get render() {
  93. if (this.value < 1) {
  94. return "Distracted";
  95. } else if (this.value == 1) {
  96. return "Normal"
  97. } else {
  98. return "Alert"
  99. }
  100. }
  101. }
  102. state.geta = {};
  103. state.player.stats.health = { name: "Health", type: "meter", value: 100, min: 0, max: 100, color: "rgb(255,55,55)" };
  104. state.player.stats.stamina = { name: "Stamina", type: "meter", value: 100, min: 0, max: 100, color: "rgb(55,255,55)", hidden: true };
  105. state.player.stats.suspicion = { name: "Suspicion", type: "meter", value: 0, min: 0, max: 100, color: "rgb(100,100,100)" };
  106. state.player.stats.mawPos = { "name": "Struggle", "type": "meter", "value": 0.5, "min": 0, "max": 1, "color": "rgb(0,255,0)", hidden: true }
  107. state.info.time.value = 60 * 60 * 7 + 60 * 17;
  108. state.player.limbs = {};
  109. state.player.limbs.head = true;
  110. state.player.limbs.leftArm = true;
  111. state.player.limbs.rightArm = true;
  112. state.player.limbs.leftLeg = true;
  113. state.player.limbs.rightLeg = true;
  114. startTimer({
  115. id: "clock",
  116. func: () => {
  117. state.info.time.value += 1;
  118. state.info.time.value %= 86000;
  119. return true;
  120. },
  121. delay: 1000,
  122. loop: true,
  123. classes: [
  124. ]
  125. });
  126. startTimer({
  127. id: "suspicion-decay",
  128. func: () => {
  129. checkSuspicion(-0.1);
  130. return true;
  131. },
  132. delay: 100,
  133. loop: true,
  134. classes: [
  135. "free"
  136. ]
  137. });
  138. startTimer({
  139. id: "timeout",
  140. func: () => {
  141. if (state.info.time.value == 60 * 60 * 7 + 60 * 19) {
  142. print(["The fox is almost done with his breakfast..."]);
  143. }
  144. if (state.info.time.value >= 60 * 60 * 7 + 60 * 20) {
  145. print(["Time's up! In you go."]);
  146. goToRoom("maw");
  147. return false;
  148. }
  149. return true;
  150. },
  151. delay: 1000,
  152. loop: true,
  153. classes: [
  154. "free"
  155. ]
  156. });
  157. startTimer({
  158. id: "geta-action",
  159. func: () => {
  160. const random = Math.random();
  161. if (random < 0.7) {
  162. print(["Geta slurps up a spoonful of cereal."]);
  163. return Math.random() * 3000 + 3000
  164. } else if (random < 0.9) {
  165. state.info.awareness.value = 0.1;
  166. print(["The fox yawns and stretches."]);
  167. startTimer({
  168. id: "yawn-end",
  169. func: () => {
  170. print(["Geta finishes his stretch"]);
  171. state.info.awareness.value = 1;
  172. return true;
  173. },
  174. delay: 5000,
  175. loop: false,
  176. classes: [
  177. "free"
  178. ]
  179. });
  180. return Math.random() * 3000 + 5000
  181. } else {
  182. state.info.awareness.value = 2;
  183. print(["Geta narrows his eyes and looks around the table. Something seems off to him..."]);
  184. startTimer({
  185. id: "squint-end",
  186. func: () => {
  187. print(["He goes back to his breakfast."]);
  188. state.info.awareness.value = 1;
  189. return true;
  190. },
  191. delay: 5000,
  192. loop: false,
  193. classes: [
  194. "free"
  195. ]
  196. });
  197. return Math.random() * 1000 + 6000
  198. }
  199. },
  200. delay: 5000,
  201. loop: true,
  202. classes: [
  203. "free"
  204. ]
  205. });
  206. },
  207. "intro": () => {
  208. print(["Game started", newline, "Exposition goes here later."]);
  209. }
  210. },
  211. "sounds": [
  212. "loop/stomach.ogg",
  213. "sfx/absorb.ogg",
  214. "sfx/digest.ogg",
  215. "sfx/swallow.ogg"
  216. ],
  217. "preload": [
  218. ],
  219. "refresh": () => {
  220. setBackgroundColor(50 - state.player.stats.health.value / 2, 0, 0);
  221. },
  222. "world": {
  223. "pepper-grinder": {
  224. "id": "pepper-grinder",
  225. "name": "Pepper Grinder",
  226. "desc": "You're hiding behind a pepper grinder",
  227. "move": (room) => {
  228. print(["You dart over to the pepper grinder, which looms over you like a greatwood."]);
  229. },
  230. "enter": (room) => {
  231. },
  232. "exit": (room) => {
  233. },
  234. "actions": [
  235. {
  236. name: "Tap",
  237. desc: "Bang on the pepper shaker",
  238. execute: (room) => {
  239. print(["You thump the pepper shaker, making a dull thud."]);
  240. const safe = checkSuspicion(25);
  241. if (safe && getStat("suspicion") > 50) {
  242. print(["Geta leans in to have a closer look. He's going to catch you if you don't move!"]);
  243. startTimer({
  244. id: "pepper-investigate",
  245. func: () => {
  246. if (state.player.location == "pepper-grinder") {
  247. print(["He catches you.", newline, "You're tossed into the fox's jaws."]);
  248. goToRoom("maw");
  249. } else {
  250. print(["You evaded the fox."]);
  251. }
  252. },
  253. delay: 3000,
  254. loop: false,
  255. classes: [
  256. "free"
  257. ]
  258. });
  259. }
  260. },
  261. show: [
  262. ],
  263. conditions: [
  264. ]
  265. },
  266. {
  267. name: "Wait",
  268. desc: "Wait for the fox to finish his breakfast. Surely you'll be able to escape after that...right?",
  269. execute: (room) => {
  270. state.info.time.value = 60 * 60 * 7 + 60 * 20;
  271. },
  272. show: [
  273. ],
  274. conditions: [
  275. ]
  276. },
  277. ],
  278. "exits": {
  279. "up": {
  280. "target": "bowl",
  281. "desc": "Walk up to the cereal bowl",
  282. "show": [
  283. ],
  284. "conditions": [
  285. ],
  286. "hooks": [
  287. (room, exit) => {
  288. return checkSuspicion(10);
  289. }
  290. ]
  291. },
  292. "left": {
  293. "target": "table",
  294. "desc": "Run out into the open",
  295. "show": [
  296. ],
  297. "conditions": [
  298. ],
  299. "hooks": [
  300. ]
  301. },
  302. },
  303. "hooks": [
  304. ],
  305. "data": {
  306. "stats": {
  307. }
  308. }
  309. },
  310. "bowl": {
  311. "id": "bowl",
  312. "name": "Behind the Bowl",
  313. "desc": "You're crouched behind Geta's bowl of cereal",
  314. "move": (room) => {
  315. print(["You scurry up to the looming bowl, staying low and out of Geta's sight."]);
  316. },
  317. "enter": (room) => {
  318. },
  319. "exit": (room) => {
  320. },
  321. "actions": [
  322. ],
  323. "exits": {
  324. "ascend": {
  325. "target": "in-bowl",
  326. "desc": "Climb into Geta's cereal",
  327. "show": [
  328. ],
  329. "conditions": [
  330. ],
  331. "hooks": [
  332. ]
  333. },
  334. "down": {
  335. "target": "pepper-grinder",
  336. "desc": "Run back behind the pepper grinder",
  337. "show": [
  338. ],
  339. "conditions": [
  340. ],
  341. "hooks": [
  342. (room, exit) => {
  343. return checkSuspicion(15);
  344. }
  345. ]
  346. },
  347. },
  348. "hooks": [
  349. ],
  350. "data": {
  351. "stats": {
  352. }
  353. }
  354. },
  355. "table": {
  356. "id": "table",
  357. "name": "Table",
  358. "desc": "You're out in the open!",
  359. "move": (room) => {
  360. },
  361. "enter": (room) => {
  362. startTimer({
  363. id: "table-suspicion",
  364. func: () => {
  365. checkSuspicion(1.5);
  366. return true;
  367. },
  368. delay: 100,
  369. loop: true,
  370. classes: [
  371. "free"
  372. ]
  373. });
  374. },
  375. "exit": (room) => {
  376. stopTimer("table-suspicion");
  377. },
  378. "actions": [
  379. ],
  380. "exits": {
  381. "right": {
  382. "target": "pepper-grinder",
  383. "desc": "Run back to cover",
  384. "show": [
  385. ],
  386. "conditions": [
  387. ],
  388. "hooks": [
  389. ]
  390. },
  391. },
  392. "hooks": [
  393. ],
  394. "data": {
  395. "stats": {
  396. }
  397. }
  398. },
  399. "in-bowl": {
  400. "id": "in-bowl",
  401. "name": "Bowl",
  402. "desc": "You're in the cereal bowl...",
  403. "move": (room) => {
  404. print(["Why did you do that?"]);
  405. },
  406. "enter": (room) => {
  407. state.player.stats.suspicion.hidden = true;
  408. stopClassTimers("free");
  409. startTimer({
  410. id: "geta-eat",
  411. func: () => {
  412. if (Math.random() < 0.6) {
  413. print(["Geta scoops up a spoonful of cereal; you narrowly avoid being caught."]);
  414. return true;
  415. } else {
  416. print(["Geta scoops you up and slurps you into his maw."]);
  417. goToRoom("maw");
  418. return false;
  419. }
  420. },
  421. delay: 3000,
  422. loop: true,
  423. classes: [
  424. "free"
  425. ]
  426. });
  427. },
  428. "exit": (room) => {
  429. },
  430. "actions": [
  431. ],
  432. "exits": {
  433. "ascend": {
  434. "target": "bowl",
  435. "desc": "Try to climb back out!",
  436. "show": [
  437. ],
  438. "conditions": [
  439. ],
  440. "hooks": [
  441. (room, exit) => {
  442. print([
  443. "You grab at the rim of the bowl and try to pull yourself out. Alas, your struggles are for naught; Geta easily scoops you up in his spoon and, a heartbeat later, slurps you into his sloppy jaws. You didn't stand a chance."
  444. ]);
  445. goToRoom("maw");
  446. return false;
  447. }
  448. ]
  449. },
  450. },
  451. "hooks": [
  452. ],
  453. "data": {
  454. "stats": {
  455. }
  456. }
  457. },
  458. "maw": {
  459. "id": "maw",
  460. "name": "Geta's Maw",
  461. "desc": "You've been slurped up into the fox's jaws",
  462. "move": (room) => {
  463. },
  464. "enter": (room) => {
  465. state.player.stats.suspicion.hidden = true;
  466. stopClassTimers("free");
  467. state.player.stats.stamina.hidden = false;
  468. state.player.stats.mawPos.hidden = false;
  469. state.geta.slurps = 0;
  470. state.geta.chews = 0;
  471. state.geta.swallowsLeft = 3 + Math.floor(Math.random() * 3);
  472. state.geta.mawMovement = 1;
  473. print(["You slip into Geta's maw. He'll swallow you like the snack you are if you slip too far back, but crawl too far forward, and you'll meet his fangs..."])
  474. startTimer({
  475. id: "maw-stamina",
  476. func: () => {
  477. changeStat("stamina", 0.1);
  478. return true;
  479. },
  480. delay: 1000 / 60,
  481. loop: true,
  482. classes: [
  483. "maw-struggle"
  484. ]
  485. });
  486. startTimer({
  487. id: "maw-random-movement",
  488. func: () => {
  489. const time = new Date().getTime();
  490. const movementFactor = (state.geta.mawMovement + limbsLost());
  491. const fastPart = Math.sin(time / 200) / 1600 / 3;
  492. const slowPart = Math.sin(time / 1000) / 1600;
  493. changeStat("mawPos", movementFactor * (fastPart + slowPart));
  494. if (getStat("mawPos") <= 0.02) {
  495. print(["You slip too far back. Geta doesn't even have to try to swallow you like the food you are; you're lost from the world, buried in his hot, tight throat."]);
  496. goToRoom("throat");
  497. return false;
  498. } else if (getStat("mawPos") >= 0.98) {
  499. print(["Geta's jaws close like a falling guillotine's blade. You're crushed like an insect. A sharp gulp drags you down to the fox's guts."]);
  500. playSfx("sfx/swallow.ogg");
  501. changeStat("health", -90);
  502. goToRoom("stomach");
  503. return false;
  504. }
  505. return true;
  506. },
  507. delay: 1000 / 60,
  508. loop: true,
  509. classes: [
  510. "maw-struggle"
  511. ]
  512. });
  513. startTimer({
  514. id: "maw-struggle",
  515. func: () => {
  516. if (state.geta.swallowsLeft <= 0) {
  517. print(["Geta picks up his bowl of cereal and drinks it down, swallowing you in the process."]);
  518. state.geta.swallowsLeft = -1;
  519. goToRoom("throat");
  520. return false;
  521. }
  522. let choice;
  523. if (Math.random() < 0.2) {
  524. const choices = [
  525. "slosh",
  526. "tilt-back",
  527. "shove",
  528. ];
  529. choice = choices[Math.floor(Math.random() * choices.length)];
  530. } else if (Math.random() > state.geta.slurps / 3) {
  531. choice = "slurp";
  532. } else if (state.geta.chews - Math.floor(Math.random() * 3) < state.geta.slurps) {
  533. choice = "chew";
  534. } else {
  535. choice = "swallow";
  536. }
  537. if (choice == "swallow") {
  538. if (getStat("mawPos") < 0.15) {
  539. print(["You're too far back. The fox swallows a mouthful of cereal, taking you with it."]);
  540. goToRoom("throat");
  541. return false;
  542. } else {
  543. printRandom([
  544. ["A light swallow drags a lump of chewed-up cereal into Geta's depths."],
  545. ["Geta swallows, dragging you closer to your demise."],
  546. ["Your captor's throat ripples as he gulps down his breakfast."]
  547. ]);
  548. statLerp("mawPos", -0.25, 500);
  549. state.geta.slurps = 0;
  550. state.geta.chews = 0;
  551. state.geta.swallowsLeft -= 1;
  552. return Math.random() * 1500 + 1500;
  553. }
  554. } else if (choice == "slurp") {
  555. statLerp("mawPos", -0.1, 250);
  556. printRandom([
  557. ["A spoonful of cereal slips into the fox's " + synonym("slippery") + " maw."],
  558. ["Geta slurps up some more of his breakfast."],
  559. ["You're shoved back a bit as Geta slurps up more cereal."]
  560. ]);
  561. state.geta.slurps += 1;
  562. return Math.random() * 1000 + 2500;
  563. } else if (choice == "chew") {
  564. if (getStat("mawPos") > 0.85) {
  565. const limb = randomBodyPart();
  566. state.player.limbs[limb] = false;
  567. const limbName = limbs[limb];
  568. if (limb == "head") {
  569. print(["Geta's jaws crush down on your head. You die."]);
  570. changeStat("health", -100);
  571. goToRoom("stomach");
  572. } else {
  573. print(["You scream in pain as your " + limbName + " is shattered by the fox's jaws"]);
  574. changeStat("health", -40);
  575. return true;
  576. }
  577. } else {
  578. printRandom([
  579. ["Cruel fangs crush down on the food around you."],
  580. ["Geta chews on his breakfast."],
  581. ["The fox's fangs close with a crackle-crunch of cereal."]
  582. ]);
  583. statLerp("mawPos", Math.random() / 10 - 0.05, 250);
  584. state.geta.chews += 1;
  585. return Math.random() * 500 + 1300;
  586. }
  587. } else if (choice == "slosh") {
  588. print(["Geta's tongue sloshes from side to side, throwing you around his maw like a ship in a storm."]);
  589. state.geta.mawMovement = 3;
  590. startTimer({
  591. id: "maw-slosh-end",
  592. func: () => {
  593. state.geta.mawMovement = 1;
  594. print(["The sloshing ends."]);
  595. return true;
  596. },
  597. delay: 4000,
  598. loop: false,
  599. classes: [
  600. "maw-struggle"
  601. ]
  602. });
  603. return Math.random() * 1500 + 4500;
  604. } else if (choice == "tilt-back") {
  605. print(["Geta tilts his head back, sending rivults of slobber flowing down into that yawning gullet."]);
  606. state.geta.mawMovement = 0.2;
  607. statLerp("mawPos", -1, 4000);
  608. startTimer({
  609. id: "maw-tilt-text",
  610. func: () => {
  611. state.geta.mawMovement = 1;
  612. print(["The fox's muzzle tilts back down as he SWALLOWS hard."]);
  613. statLerp("mawPos", -0.3, 500);
  614. state.geta.swallowsLeft -= 1;
  615. state.geta.slurps = 0;
  616. state.geta.chews = 0;
  617. return true;
  618. },
  619. delay: 4000,
  620. loop: false,
  621. classes: [
  622. ]
  623. });
  624. return 5000 + Math.random() * 1000;
  625. } else if (choice == "shove") {
  626. print(["Geta's tongue lurches forward, shoving you towards the front of his maw!"]);
  627. statLerp("mawPos", 0.2, 500);
  628. return 2000 + Math.random() * 1000;
  629. }
  630. },
  631. delay: 0,
  632. loop: true,
  633. classes: [
  634. "maw-struggle"
  635. ]
  636. });
  637. startTimer({
  638. id: "maw-taunts",
  639. func: () => {
  640. printRandom([
  641. ["\"Did you really think I wouldn't notice you?\""],
  642. ["\"You're going to feel good dying in my guts.\""],
  643. ["\"I could just crush you...but where's the fun in that?\""]
  644. ]);
  645. return Math.random() * 5000 + 5000;
  646. },
  647. delay: 5000,
  648. loop: true,
  649. classes: [
  650. "maw-struggle"
  651. ]
  652. });
  653. },
  654. "exit": (room) => {
  655. state.player.stats.stamina.hidden = true;
  656. },
  657. "actions": [
  658. {
  659. name: "Struggle",
  660. desc: "Pull yourself away from the fox's throat! Just don't go too far forward...",
  661. execute: (room) => {
  662. if (getStat("stamina") < 25) {
  663. print(["You're too tired..."]);
  664. } else {
  665. print(["You drag yourself forward"]);
  666. changeStat("stamina", -25);
  667. statLerp("mawPos", 0.15 + Math.random() * 0.05, 250);
  668. }
  669. },
  670. show: [
  671. ],
  672. conditions: [
  673. ]
  674. },
  675. {
  676. name: "Slip Back",
  677. desc: "Slide back towards Geta's gullet",
  678. execute: (room) => {
  679. if (Math.random() * 25 > getStat("stamina")) {
  680. print(["You try to shimmy back an inch or two, but your sore muscles give way; you slide back perilously far!"]);
  681. statLerp("mawPos", -0.3 - Math.random() * 0.25, 250);
  682. }
  683. else if (Math.random() < 0.9) {
  684. print(["You let yourself slip back."]);
  685. statLerp("mawPos", -0.2 - Math.random() * 0.1, 250);
  686. } else {
  687. print(["You lose your grip, sliding back quite far!"]);
  688. statLerp("mawPos", -0.3 - Math.random() * 0.15, 250);
  689. }
  690. },
  691. show: [
  692. ],
  693. conditions: [
  694. ]
  695. },
  696. {
  697. name: "Dive In",
  698. desc: "Throw yourself towards the fox's throat",
  699. execute: (room) => {
  700. print(["Resigned to your fate, you toss yourself into Geta's throat. He seems surprised by your eagerness to submit, but swallows you all the same."]);
  701. goToRoom("throat");
  702. },
  703. show: [
  704. ],
  705. conditions: [
  706. ]
  707. },
  708. ],
  709. "exits": {
  710. },
  711. "hooks": [
  712. ],
  713. "data": {
  714. "stats": {
  715. }
  716. }
  717. },
  718. "throat": {
  719. "id": "throat",
  720. "name": "Geta's Gullet",
  721. "desc": "GULP!",
  722. "move": (room) => {
  723. },
  724. "enter": (room) => {
  725. playSfx("sfx/swallow.ogg");
  726. state.player.stats.mawPos.hidden = true;
  727. stopClassTimers("maw-struggle");
  728. startTimer({
  729. id: "throat-swallow",
  730. func: () => {
  731. print(["You slush down into Geta's stomach"]);
  732. goToRoom("stomach");
  733. return true;
  734. },
  735. delay: 7000,
  736. loop: false,
  737. classes: [
  738. ]
  739. });
  740. },
  741. "exit": (room) => {
  742. },
  743. "actions": [
  744. {
  745. name: "Struggle",
  746. desc: "Try to climb back out!",
  747. execute: (room) => {
  748. print(["Nope"]);
  749. },
  750. show: [
  751. ],
  752. conditions: [
  753. ]
  754. },
  755. {
  756. name: "Give up",
  757. desc: "Dive down into Geta's stomach",
  758. execute: (room) => {
  759. print(["You submit to your predator."]);
  760. goToRoom("stomach");
  761. stopTimer("throat-swallow");
  762. },
  763. show: [
  764. ],
  765. conditions: [
  766. ]
  767. },
  768. ],
  769. "exits": {
  770. },
  771. "hooks": [
  772. ],
  773. "data": {
  774. "stats": {
  775. }
  776. }
  777. },
  778. "stomach": {
  779. "id": "stomach",
  780. "name": "Geta's Stomach",
  781. "desc": "Glorp",
  782. "move": (room) => {
  783. },
  784. "enter": (room) => {
  785. playLoop("loop/stomach.ogg");
  786. stopClassTimers("maw-struggle");
  787. state.geta.digestionStage = 0;
  788. state.geta.acidStrength = 1;
  789. startTimer({
  790. id: "digest-stages",
  791. func: () => {
  792. if (100 - state.geta.digestionStage * 25 - 25 > getStat("health")) {
  793. state.geta.digestionStage = Math.floor((100 - getStat("health")) / 25);
  794. console.log(state.geta.digestionStage);
  795. switch (state.geta.digestionStage) {
  796. case 1:
  797. print(["Your skin begins to tingle."]);
  798. break;
  799. case 2:
  800. print(["The stinging acids work their way into your tender body."]);
  801. break;
  802. case 3:
  803. print(["You're starting to fall apart..."]);
  804. break;
  805. default:
  806. break;
  807. }
  808. }
  809. return true;
  810. },
  811. delay: 1000,
  812. loop: true,
  813. classes: [
  814. "digestion"
  815. ]
  816. });
  817. startTimer({
  818. id: "digest-random",
  819. func: () => {
  820. const choices = [
  821. () => {
  822. const crushed = randomBodyPart();
  823. const name = limbs[crushed];
  824. if (name == "head") {
  825. print(["A powerful fold of muscle grips your head, crushing it like a grape and killing you instantly."]);
  826. changeStat("health", -100);
  827. return false;
  828. } else {
  829. print(["Geta's stomach grips your " + name + " and crushes it with a horrific CRACK"]);
  830. changeStat("health", -40);
  831. return true;
  832. }
  833. },
  834. () => {
  835. printRandom([["Geta squeezes in on his gut with both hands, sloshing you around in the sickly stew of cereal, milk, and enzymatic slime."],
  836. ["Your organic prison snarls and churns, soaking you in fresh acids and hastening your wretched demise."]]);
  837. statLerp("health", -10, 2000);
  838. return true;
  839. },
  840. () => {
  841. if (state.geta.swallowsLeft == 0) {
  842. print(["A deep series of *glurks* rattles your bones."]);
  843. startTimer({
  844. id: "stomach-milk",
  845. func: () => {
  846. print(["A torrent of cold milk pours into the fox's stomach."]);
  847. return false;
  848. },
  849. delay: 3000,
  850. loop: false,
  851. classes: [
  852. "digestion"
  853. ]
  854. });
  855. } else if (state.geta.swallowsLeft > 0) {
  856. print(["Muffled chewing comes from far above. A moment later, you hear a wet *gluk*"]);
  857. startTimer({
  858. id: "stomach-cereal",
  859. func: () => {
  860. print(["A slimy heap of well-chewed corn flakes splatters down around you."]);
  861. return false;
  862. },
  863. delay: 4000,
  864. loop: false,
  865. classes: [
  866. ]
  867. });
  868. } else if (state.geta.swallowsLeft < 0) {
  869. print(["You hear a few light swallows."]);
  870. startTimer({
  871. id: "stomach-coffee",
  872. func: () => {
  873. print(["Gouts of hot, bitter coffee pour into the fox's guts."]);
  874. return false;
  875. },
  876. delay: 3000,
  877. loop: false,
  878. classes: [
  879. ]
  880. });
  881. }
  882. return true;
  883. },
  884. () => {
  885. print(["\"You were barely worth eating,\" murmurs the fox. \"So small. So weak.\""]);
  886. return true;
  887. }
  888. ];
  889. if (choices[Math.floor(Math.random() * choices.length)]()) {
  890. return Math.random() * 3000 + 3500;
  891. } else {
  892. return false;
  893. }
  894. },
  895. delay: 5000,
  896. loop: true,
  897. classes: [
  898. "digestion"
  899. ]
  900. });
  901. startTimer({
  902. id: "digest",
  903. func: () => {
  904. changeStat("health", -0.3 * state.geta.acidStrength);
  905. if (getStat("health") <= 0) {
  906. print(["You're digested before too long."]);
  907. goToRoom("digested");
  908. return false;
  909. }
  910. return true;
  911. },
  912. delay: 100,
  913. loop: true,
  914. classes: [
  915. "digestion"
  916. ]
  917. });
  918. },
  919. "exit": (room) => {
  920. },
  921. "actions": [
  922. {
  923. name: "Squirm",
  924. desc: "Rub at the walls of the fox's churning stomach",
  925. execute: (room) => {
  926. printRandom([
  927. ["You punch and kick at the walls"],
  928. ["A powerful churn grabs hold of you, stifling any attempts at struggling"],
  929. ["Your little thumps and kicks do little to faze your captor"]
  930. ]);
  931. },
  932. show: [
  933. ],
  934. conditions: [
  935. ]
  936. },
  937. {
  938. name: "Beg",
  939. desc: "Plead for your life",
  940. execute: (room) => {
  941. printRandom([
  942. [
  943. "\"PLEASE!\" you scream, thumping on the walls of the vulpine's gut. \"Let me out!\"",
  944. ]
  945. ])
  946. if (Math.random() < 0.7) {
  947. print(["Your pleas fall on deaf ears."]);
  948. } else {
  949. printRandom([
  950. ["\"Shhhh,\" growls Geta, \"you're going to die in me. Stop whimpering.\""],
  951. ["A long moment passes. \"Poor thing,\" says your captor."]
  952. ])
  953. }
  954. },
  955. show: [
  956. ],
  957. conditions: [
  958. ]
  959. },
  960. {
  961. name: "Scream",
  962. desc: "IT HURTS",
  963. execute: (room) => {
  964. printRandom([
  965. [
  966. "\"Oh god, oh god, oh god,\" you wail...quivering and quaking as you're digested alive. \"GETA!\""
  967. ],
  968. [
  969. "A blood-curdling scream bellows from your burning lungs."
  970. ],
  971. [
  972. "You let out a hideous wail as the fox digests you alive."
  973. ]
  974. ]);
  975. if (Math.random() < 0.5) {
  976. print(["Geta doesn't notice."]);
  977. } else {
  978. print(["A booming chuckle rocks your body."]);
  979. printRandom([
  980. ["\"I hope you're suffering in there.\""],
  981. ["\"Pathetic little snack.\""],
  982. ["\"Ready to die?\""]
  983. ]);
  984. }
  985. },
  986. show: [
  987. ],
  988. conditions: [
  989. ]
  990. },
  991. ],
  992. "exits": {
  993. },
  994. "hooks": [
  995. ],
  996. "data": {
  997. "stats": {
  998. }
  999. }
  1000. },
  1001. "digested": {
  1002. "id": "digested",
  1003. "name": "Geta's Stomach",
  1004. "desc": "You're just mush now",
  1005. "move": (room) => {
  1006. },
  1007. "enter": (room) => {
  1008. stopClassTimers("digestion");
  1009. stopTimer("clock");
  1010. state.player.flags.digestTime = state.info.time.value;
  1011. startTimer({
  1012. id: "absorb-clock",
  1013. func: () => {
  1014. state.info.time.value += 1;
  1015. state.info.time.value %= 86000;
  1016. if (state.info.time.value - state.player.flags.digestTime > 5 * 60) {
  1017. print(["Your molten remains drain into the fox's depths..."]);
  1018. goToRoom("absorbed");
  1019. return false;
  1020. }
  1021. return true;
  1022. },
  1023. delay: 1000 / 15,
  1024. loop: true,
  1025. classes: [
  1026. ]
  1027. });
  1028. playSfx("sfx/digest.ogg");
  1029. },
  1030. "exit": (room) => {
  1031. },
  1032. "actions": [
  1033. {
  1034. name: "Gurgle",
  1035. desc: "Glorp",
  1036. execute: (room) => {
  1037. printRandom([
  1038. ["Grrrrgle"],
  1039. ["Glorp"],
  1040. ["Glrrrrrrnnnnnn..."],
  1041. ["Gwoooooorgle"]
  1042. ]);
  1043. },
  1044. show: [
  1045. ],
  1046. conditions: [
  1047. ]
  1048. },
  1049. ],
  1050. "exits": {
  1051. },
  1052. "hooks": [
  1053. ],
  1054. "data": {
  1055. "stats": {
  1056. }
  1057. }
  1058. },
  1059. "absorbed": {
  1060. "id": "absorbed",
  1061. "name": "Geta's Fat",
  1062. "desc": "You're gone.",
  1063. "move": (room) => {
  1064. },
  1065. "enter": (room) => {
  1066. playSfx("sfx/absorb.ogg");
  1067. },
  1068. "exit": (room) => {
  1069. },
  1070. "actions": [
  1071. ],
  1072. "exits": {
  1073. },
  1074. "hooks": [
  1075. ],
  1076. "data": {
  1077. "stats": {
  1078. }
  1079. }
  1080. },
  1081. }
  1082. });
  1083. })();