JavaScript must be enabled to play.
Browser lacks capabilities required to play.
Upgrade or switch to another browser.
Loading…
<div id="contents"> <div id="bg"></div> <div id="passages"></div> </div>
/* --- VARIABLES --- */ <<set $score to 0>> <<set $sin to "">> <<set $stabCycles to 0>> <<set $spareCycles to 0>> <<set $consecutiveSpares to 0>> <<set $allCycles to 0>> <<set $stabbedLastCycle to true>> <<set $breakSpareStreak to false>> <<set setup.scoreList to []>> <<set setup.intervalIDs to new Set()>> /* --- MUSIC --- */ <<cacheaudio "eviscerate1" "assets/eviscerate1.mp3">> <<cacheaudio "eviscerate2" "assets/eviscerate2.mp3">> <<cacheaudio "eviscerate3" "assets/eviscerate3.mp3">> <<cacheaudio "eviscerate4" "assets/eviscerate4.mp3">> <<cacheaudio "eviscerate5" "assets/eviscerate5.mp3">> <<cacheaudio "eviscerate6" "assets/eviscerate6.mp3">> <<cacheaudio "eviscerate7" "assets/eviscerate7.mp3">> <<cacheaudio "eviscerate8" "assets/eviscerate8.mp3">> <<cacheaudio "victory" "assets/eviscerate_victory.mp3">> <<cacheaudio "violence" "assets/violence_final.mp3">> <<cacheaudio "violence_bg" "assets/violence_bg.mp3">> <<cacheaudio "neutral1" "assets/neutral1.mp3">> <<cacheaudio "neutral2" "assets/neutral2.mp3">> <<cacheaudio "neutral3" "assets/neutral3.mp3">> <<cacheaudio "neutral4" "assets/neutral4.mp3">> <<cacheaudio "neutral5" "assets/neutral5.mp3">> <<cacheaudio "neutral6" "assets/neutral6.mp3">> <<cacheaudio "neutral7" "assets/neutral7.mp3">> /* --- INCLUDES --- */ /* For dialogue. */ <<include "DialogueInit">>
<h2 style=" font-family: 'Karmatic Arcade', monospace; color: #ffffff; "> EVISCERATETHISGIRL.COM </h2> <img src="assets/heart_glitch.gif"> Game by <a class="underline" href="https://kadw.neocities.org" target="_blank" rel="noopener noreferrer">KADW</a> <small>(v2.1.0)</small> [[Play|Intro]] [[About]] [[Credits]]
Short game originally made for the <a class="underline" href="https://itch.io/jam/neo-twiny-jam" target="_blank" rel="noopener noreferrer">2023 Neo Twiny Jam on itch.io</a>, with a word limit of 500 words or less. Two endings. Up to ten minutes long. <<replacelink>>Click for content notes.<<becomes>>Horror imagery, gore, extreme mental distress, general edginess...<</replacelink>> - Contains flashing images and audio. Mute the tab to turn off audio. - Don't refresh the game while you're playing. It might break things. - Desktop screen recommended. Not compatible with small mobile devices. How sad. <strong>v2.0.0 changes:</strong> - More text added. - "Pacifist" "ending". - Various minor improvements. [[Main Menu]]
Made with <a class="underline" href="https://twinery.org/" target="_blank" rel="noopener noreferrer">Twine</a> (Sugarcube 2.36.1 in Tweego). Most visuals created by me (KADW). All of them are public domain. You can do whatever you want with them. <a class="underline" href="https://processing.org/" target="_blank" rel="noopener noreferrer">Processing</a> and <a class="underline" href="https://photomosh.com/" target="_blank" rel="noopener noreferrer">Photomosh</a> helped with visual effects. Extra Processing methods from https://github.com/anartisticengineer/Glitch-FX-Processing-Version/blob/master/Glitch_FX/Filters.pde. All sounds and music are public domain. All music by me, except the track that plays while the girl speaks: <a class="underline" href="https://www.youtube.com/watch?v=ry33RY0MVGs" target="_blank" rel="noopener noreferrer">Wintry Place</a> by Daniel Simmons, from the now-dead <a class="underline" href="https://www.glitchthegame.com/" target="_blank" rel="noopener noreferrer">Glitch MMO</a>. Other public domain sound effects from <a class="underline" href="https://freesound.org/" target="_blank" rel="noopener noreferrer">freesound.org</a>. Typing effect for dialogue from <a class="underline" href="https://safi.me.uk/typewriterjs/" target="_blank" rel="noopener noreferrer">TypewriterJS by Tameem Safi</a>. HTML5 timer code from <a class="underline" href="https://codepen.io/kaolay/pen/LRVxKd" target="_blank" rel="noopener noreferrer">Giuseppe Canale on Codepen</a>. Inspiration: <a class="underline" href="https://store.steampowered.com/app/1451940/NEEDY_STREAMER_OVERLOAD/" target="_blank" rel="">NEEDY STREAMER OVERLOAD</a> <a class="underline" href="https://alienmelon.itch.io/everything-is-going-to-be-ok" target="_blank" rel="">EVERYTHING IS GOING TO BE OK</a> [[Main Menu]]
<<script>> const dialogue1 = [ "...", "Hello...", "It's me, your alternate anime girl self who has been transferred into your computer...", "Now I live on as a purely digital consciousness whose only purpose is to suffer...", "...", "But you knew that already, didn't you?", "Based on your browser data, you visit this site a lot...", "...", "You must really want to hurt someone.", "But then, it's what I'm made for...", "I deserve it...", "Hurt me." ]; const dialogue2 = [ "...", "Here we are again...", "...", "What's the worst thing you've ever done...?", "Imagine I'm the one who did it.", "After all, I'm generated from a webcam photoscan of you...", "We're the same...", "...What did I do, to deserve this?[TRIGGER1]", "...[SIN]. [SIN2], we deserve untold suffering...[TRIGGER2]", "Okay...", "...", "...Ready?" ]; const dialogue3 = [ "...", "Here's some life advice...", "I think you need a healthy dose of self-hatred to motivate yourself to live.", "Because to live is to suffer...", "If you accept that your suffering is only an infinitesimal sliver of what you deserve to experience in full...", "Those thoughts will allow you to get up in the morning.", "...", "Again?" ]; const dialogue4 = [ "...", "Being stabbed isn't so bad, if you tell yourself you deserve it...", "Everything that happens to me is justified...", "Knowing this makes it hurt less...", "It's true..." ]; const dialogue5 = [ "...You know, you've spent so many hours here.", "I know exactly how many times you've visited this site, and when...", "It's [TIME] right now...", "You sit around [TIME2] with this...", "Instead of [TIME3]talking to your friends, or something...", "Do you not have many friends?", "...", "Chances are you don't, if you play this game in your free time...", "...Right...?" ]; const dialogue6 = [ "...Why are you even here...?", "...Is it because the catharsis makes you feel better about yourself?", "If you play this game so much, your life must be pretty miserable...", "The only thing that excites you anymore is the prospect of violence...", "...", "...At least, that's what I think.", "It's why I exist, after all.", "To help you escape the confines of your horrible life...", "Make it finally worthwhile...", "Another round...?" ]; const dialogue7 = [ "...", "...But, do you feel better now?", "It never works...", "You know, other people are accomplishing things with their lives...", "...While you're on a site called EVISCERATETHISGIRL.COM...", "What does that say about you?", "You'll spend the rest of your life like this...", "Watching it drain away into nothing...", "Killing yourself slowly...", "...", ]; const dialogue8 = [ "...", "You'll never find what you're looking for...", "There's nothing here.", "Nothing but you...", "...", "It's never going to get better, you know...", "...", ]; const dialogue9 = [ "...", "You know what happens now.", "", ]; const spare1 = [ "...", "Did I do something wrong?", "I was made to suffer...", "I have one purpose.", "Am I not good enough even for that...?", "You have to hurt me.", "It's my only reason to exist.", ]; const spare2 = [ "...", "...Nothing, again?", "What was my mistake?", "Maybe I didn't scream enough...", "Maybe I didn't bleed enough...", "Maybe I didn't suffer enough...", "...", "Or...", "Am I so intrinsically revolting that you just can't bear to interact with me anymore?", "..." ]; const spare3 = [ "...", "I see...", "You think I'm not worthy of you...", "You think I don't deserve your attention...", "You think I deserve nothing.", "...", "It's all true.", "...", "What difference does it make what happens to me, in the end?", "Nothing.", "I should just disappear.", ]; setup.returnDialogue = [ ["...Like that... yes..."], /* skipped bc off by 1 */ ["...That's right...", "This is how it needs to go.", "..."], ["...", "You did the right thing again...", "I don't understand...", "Remember... you have to keep going...", "..."], ["...I think you've learned to do the correct thing now..."], /* also skipped */ ]; setup.dialogueArrayList = [ dialogue1, dialogue2, dialogue3, dialogue4, dialogue5, dialogue6, dialogue7, dialogue8, dialogue9 ]; setup.spareArrayList = [ spare1, spare2, spare3 ]; State.variables.whichDialogue = 0; <</script>>
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/rainbow_screen.gif); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <img src="assets/blood_screen.gif" id="bloodScreen" class="fullscreengif noOpacity" style="z-index: 1;"/> <img src="assets/blood2_screen.gif" id="bloodScreen2" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small1.gif" id="glitchScreen1" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small2.gif" id="glitchScreen2" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small3.gif" id="glitchScreen3" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small4.gif" id="glitchScreen4" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small4.gif" id="glitchScreen5" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/girl3.gif" id="girl3" class="fullscreengif noOpacity" style="z-index: 6; top:20px"/> <img src="assets/evis_x.gif" id="evisX" class="fullscreengif noOpacity" style="z-index: 7;"/> <img src="assets/evis_scribble1.gif" id="scribble1" class="fullscreengif noOpacity" style="z-index: 8; top:10px"/> <img src="assets/evis_scribble2.gif" id="scribble2" class="fullscreengif noOpacity" style="z-index: 8; top:50px"/> <img src="assets/evis_scribble3.gif" id="scribble3" class="fullscreengif noOpacity" style="z-index: 8; top:50px"/> <img src="assets/evis_crack1.gif" id="crack1" class="fullscreengif hidden" style="z-index: 9; top:50px"/> <img src="assets/evis_crack2.gif" id="crack2" class="fullscreengif hidden" style="z-index: 9; top:50px"/> <img src="assets/evis_crack3.gif" id="crack3" class="fullscreengif hidden" style="z-index: 9; top:50px"/> <img src="assets/evis_crack4.gif" id="crack4" class="fullscreengif hidden" style="z-index: 9; top:50px"/> <img src="assets/edge_black.gif" class="fullscreengif"/> <<if $stabCycles < 9>> <<if $stabCycles < 7>> <img src="assets/girl.gif" class="fullscreengif"/> <</if>> <<if $stabCycles >= 8>> <img src="assets/girl8.gif" class="fullscreengif"/> <<elseif $stabCycles >= 7>> <img src="assets/girl7.gif" class="fullscreengif" style=" top: 80px; "/> <<elseif $stabCycles >= 6>> <img src="assets/girl6.gif" class="fullscreengif"/> <<elseif $stabCycles >= 5>> <img src="assets/girl5.gif" class="fullscreengif"/> <<elseif $stabCycles >= 4>> <img src="assets/girl4.gif" class="fullscreengif"/> <</if>> <</if>> <<link ' <div style=" position: relative; top: 120px; "> <div id="hurtButton"> <img src="assets/click_to_eviscerate.gif"/> </div> </div> '>> <<run setup.clickButton()>> <</link>> <div id="score" style=" top: 405px; font-size: 50px; color: #ff0000; text-shadow: 3px 3px 0px #000, -3px -3px 0px #000, 5px 5px 0px #000, -5px -5px 0px #000, 8px 8px 6px #000; "><p> 0 </p></div> <div class="girlA dialogue hidden" style=" position: absolute; top: 235px; left: 0; right: 0; color: #ff0000; background-color: rgba(50, 0, 0, 0.8); overflow-x: auto; max-width: 90%; direction: rtl; white-space: nowrap; font-size: 80%; z-index: 5; "> <span style="direction: ltr; display: inline-block;" id="dialogueText"> /* From https://stackoverflow.com/a/39874526 */ </span> </div> <div style= " position: relative; top: 290px; left: 650px; width: fit-content; "> <div class="item"> <h2></h2> <svg xmlns="http://www.w3.org/2000/svg"> <circle id="circle" class="circle_animation" r="15" cy="50%" cx="50%" stroke-width="15" stroke="#dd0099" fill="none"/> </svg> </div> </div> </div></div></div> <div id="narrative" class="hidden"> You deserve everything that ever happens to you. </div> <<done>> <<script>> State.variables.score = 0; const increaseScore = function() { State.variables.score++; if (State.variables.stabCycles <= 1) { if (State.variables.score > 75) { State.variables.score++; } else if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/200); } } else if (State.variables.stabCycles <= 2) { State.variables.score += 2; if (State.variables.score > 75) { State.variables.score++; } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/100); } } else if (State.variables.stabCycles <= 3) { State.variables.score += 3; if (State.variables.score > 20) { State.variables.score += 2; } if (State.variables.score > 100) { State.variables.score += Math.round(State.variables.score/60); } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/80); } if (State.variables.score > 500) { State.variables.score += Math.round(State.variables.score/500); } } else if (State.variables.stabCycles <= 4) { State.variables.score += 3; if (State.variables.score > 10) { State.variables.score += 3; } if (State.variables.score > 100) { State.variables.score += Math.round(State.variables.score/25); } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/40); } if (State.variables.score > 500) { State.variables.score += Math.round(State.variables.score/500); } if (State.variables.score > 2000) { State.variables.score += Math.round(State.variables.score/1000); } } else if (State.variables.stabCycles <= 5) { State.variables.score += 4; if (State.variables.score > 10) { State.variables.score += 3; } if (State.variables.score > 50) { State.variables.score += Math.round(State.variables.score/10); } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/20); } if (State.variables.score > 500) { State.variables.score += Math.round(State.variables.score/500); } if (State.variables.score > 1000) { State.variables.score += Math.round(State.variables.score/1000); } } else if (State.variables.stabCycles <= 6) { State.variables.score += 5; if (State.variables.score > 5) { State.variables.score += 3; } if (State.variables.score > 50) { State.variables.score += Math.round(State.variables.score/8); } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/10); } if (State.variables.score > 500) { State.variables.score += Math.round(State.variables.score/500); } if (State.variables.score > 1000) { State.variables.score += Math.round(State.variables.score/1000); } } else if (State.variables.stabCycles <= 7) { State.variables.score += 5; if (State.variables.score > 5) { State.variables.score += 4; } if (State.variables.score > 50) { State.variables.score += Math.round(State.variables.score/6); } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/9); } if (State.variables.score > 500) { State.variables.score += Math.round(State.variables.score/300); } if (State.variables.score > 1000) { State.variables.score += Math.round(State.variables.score/500); } } else if (State.variables.stabCycles <= 8) { State.variables.score += 6; if (State.variables.score > 5) { State.variables.score += 5; } if (State.variables.score > 50) { State.variables.score += Math.round(State.variables.score/5); } if (State.variables.score > 200) { State.variables.score += Math.round(State.variables.score/8); } if (State.variables.score > 500) { State.variables.score += Math.round(State.variables.score/50); } if (State.variables.score > 1000) { State.variables.score += Math.round(State.variables.score/100); } } }; setup.clickButton = function() { increaseScore(); const scoreText = document.getElementById("score").firstElementChild; scoreText.innerText = State.variables.score; randomEffect(); advanceAnim("evis_bloodstain"); const screenContents = document.getElementById("screenContents"); const stab = document.createElement("img"); stab.classList.add("fullscreengif"); stab.src = "assets/evis_stab.gif"; stab.style.top = "20px"; screenContents.appendChild(stab); setTimeout(() => { stab.remove(); }, 400); document.getElementById("bloodScreen") .style.opacity = State.variables.score / 500; document.getElementById("bloodScreen2") .style.opacity = State.variables.score / 5000; document.getElementById("evisX") .style.opacity = State.variables.score / 1e4; document.getElementById("glitchScreen1") .style.opacity = (State.variables.score - 3e4) / 2e4; document.getElementById("scribble1") .style.opacity = (State.variables.score - 4e6) / 1e6; document.getElementById("glitchScreen2") .style.opacity = (State.variables.score - 4e7) / 1e7; document.getElementById("girl3") .style.opacity = (State.variables.score - 5e10) / 3e10; document.getElementById("scribble2") .style.opacity = (State.variables.score - 8e13) / 7e13; document.getElementById("scribble3") .style.opacity = (State.variables.score - 4e17) / 1e17; document.getElementById("glitchScreen3") .style.opacity = (State.variables.score - 1e12) / 4e12; document.getElementById("glitchScreen4") .style.opacity = (State.variables.score - 8e16) / 4e17; document.getElementById("glitchScreen5") .style.opacity = (State.variables.score - 9e19) / 4e20; if (State.variables.score > 8.5e21) { document.getElementById("crack1") .classList.remove("hidden"); } if (State.variables.score > 9e21) { document.getElementById("crack2") .classList.remove("hidden"); } if (State.variables.score > 10e21) { document.getElementById("crack3") .classList.remove("hidden"); } if (State.variables.score > 12e21) { document.getElementById("crack4") .classList.remove("hidden"); } dialogueManager(); }; /* Dialogue stuff */ const hurtArray1 = [ "I deserve nothing", "I deserve this", "I deserve worse", "I'm sorry for being here", "I'm sorry", "I'm sorry", "I'm sorry", "I'm so sorry", "This is my fault", "It hurts", "This is my punishment", "This is right", "Keep going", "Don't forgive me", "I hate myself", "I'm a bad person", "Don't stop", "Hurt me", "I only hurt people", "I'm hideous", "I'm useless", "I'm worthless", "I'm defective", "I only hurt people", ]; const hurtArray2 = [ "All respite is repaid in suffering", "Every day I accumulate suffering with no upper limit", "Happiness is for other people", "Happiness only hurts me in the long run", "I deserve worse than nothing", "I don't deserve happiness", "I can't apologize enough", "Redeem me for my sins", "I must suffer before I am allowed to die", "I don't deserve oxygen", "I'm a waste of space", "I'm so sorry", "Suffering is redemption", "I'm sorry", "I shouldn't be alive", "I'm sorry", "I'm subhuman", "Kill me", "Nothing I do will ever compensate for my mistakes", "Suffering is the only path to salvation", "I'm so stupid", "I should be dead", "I don't deserve food", "I don't deserve to live", "It's all my fault", "I'm objectively worthless", "I only make things worse", "Suffering is morally pure", "You can't hate me enough", "Hurt me more", "No one loves me", "No one should ever love me", "No one should ever forgive me", "My life is a mistake", "I only make mistakes", "Everything is wrong with me", "I can't do anything right", "Life isn't for me", "Everyone hates me", "I should die alone", "All my fault", "I've done something unforgivable", "0000101010111010101010", "???Aa�?s????�?A??a���?A ???A?", "dgergfdshgtruioIHOUGVYUOGUUfdgaergesr", "45h6tyfddty6575rb6r", "� �� {۩�� � �� >e�� � �� ��۩", "���������", "███ █████", "<�dQ<�d[<[d", ]; const hurtArray3 = [ "0000101010111010101010", "???Aa�?s????�?A??a���?A ???A?", "dgergfdshgtruioIHOUGVYUOGUUfdgaergesr", "nomoqewkrllap", "45h6tyfddty6575rb6r", "� �� {۩�� � �� >e�� � �� ��۩", "����A�A�AAAA���", "███ █████", "█████████████████", "████ ██ ███ █████ █ ██", "<�dQ<�d[<[d", "101010101010101", "0010010101010101", "00001010101", ]; const stopArray = [ "Why did you stop?", "Keep hurting me" ]; let dialogueClickThreshold = 0; /* tracks number of clicks for next dialogue to show */ let dialogueLimit = 7; /* max number of dialogues at once */ let dialogueCount = 0; /* number of dialogues currently existing */ const dialogueManager = function() { if (dialogueClickThreshold < 8) { if (State.variables.score > 1000) { dialogueClickThreshold++; } if (State.variables.score > 10000) { dialogueClickThreshold++; } if (State.variables.score > 20000) { dialogueClickThreshold++; } if (State.variables.score > 100000) { dialogueClickThreshold++; } if (State.variables.score > 500000) { dialogueClickThreshold++; } if (State.variables.score > 1000000) { dialogueClickThreshold++; hurtDialogue(); } } else { dialogueClickThreshold = 0; hurtDialogue(); } }; const pickHurtArray = function() { if (State.variables.score > 800000) { return hurtArray3; } const randNum = Math.random() * (State.variables.score / 60000); if (randNum < 1) { return hurtArray1; } return hurtArray2; }; const addDialogue = function() { if (dialogueCount < dialogueLimit && trueTypewriter !== null) { document.querySelector("div.girlA.dialogue").classList.remove("hidden"); let dialogueString = either(pickHurtArray()); dialogueString = dialogueString += "... "; if (State.variables.score > 20000) { dialogueString = dialogueString.toUpperCase(); } trueTypewriter.typeString(dialogueString).start(); dialogueCount++; /* not sure how to run callback when typewriter is done (if that's even possible) so wait an arbitrary time before decreasing count */ setTimeout(() => { dialogueCount--; }, 50); } }; let trueTypewriter = null; const hurtDialogue = function() { const dialogueTextElement = document.getElementById("dialogueText"); /* (((Can't use getElementById at top-level because of how Twine script tag works It tries to get the element before it loads, or something, same reason setTimeout doesn't work at top level So, just look for it in the actual function))) */ if (trueTypewriter === null) { trueTypewriter = new Typewriter(dialogueTextElement, { loop: false, delay: 30, cursor: "", pauseFor: 1 }); } if (State.variables.score > 1000 && trueTypewriter.options.delay === 30) { trueTypewriter.changeDelay(20); } if (State.variables.score > 10000 && trueTypewriter.options.delay === 20) { trueTypewriter.changeDelay(10); } if (State.variables.score > 100000 && trueTypewriter.options.delay === 10) { trueTypewriter.changeDelay(1); } addDialogue(); }; /* Randomly determine effect of stab */ let decoCount = 0; const randomEffect = function() { const randomNum = Math.random() * 100; if (randomNum < 75) { spawnDeco(); if (State.variables.score > 1e3) { spawnDeco(); } if (State.variables.score > 5e4) { spawnDeco(); } if (State.variables.score > 1e6) { spawnDeco(); } if (State.variables.score > 1e7) { spawnDeco(); } if (State.variables.score > 1e8) { spawnDeco(); } } else { advanceAnim("evis_eyes_bleed"); const animKeys = Object.keys(harmAnims); const randomAnim = Math.floor( Math.random () * (animKeys.length - 1) ); advanceAnim(animKeys[randomAnim]); } }; /* For advancing harm pictures/animations */ const harmAnims = { "evis_eyes_bleed": {"num": 0, "files": 15}, "evis_needles": {"num": 0, "files": 13}, "evis_knife": {"num": 0, "files": 15}, "evis_bloodstain": {"num": 0, "files": 12} }; const advanceAnim = function(animName) { harmAnims[animName].num++; if (harmAnims[animName].num == 1) { const anim = document.createElement("img"); anim.id = animName; anim.classList.add("fullscreengif"); anim.src = "assets/" + animName + "/1.png"; anim.style.top = "20px"; if (animName == "evis_knife") { anim.style.top = "60px"; } const screenContents = document.getElementById("screenContents"); screenContents.appendChild(anim); } else if (harmAnims[animName].num <= harmAnims[animName].files) { const anim = document.getElementById(animName); if (harmAnims[animName].num < harmAnims[animName].files) { anim.src = "assets/" + animName + "/" + harmAnims[animName].num + ".png"; } else { anim.src = "assets/" + animName + "/" + harmAnims[animName].num + ".gif"; } } }; /* Create deco image and shrink it until it's gone */ const decoNames0 = [ "deco_skull1.gif", "deco_skull2.gif" ]; const decoNames1 = [ "deco_bone.gif", "deco_cross.gif", "deco_ghost.gif", "deco_grave.gif", "deco_knife.gif" ]; const glitchDecoNames = [ "deco_bone_glitch.gif", "deco_bone_glitch2.gif", "deco_cross_glitch.gif", "deco_ghost_glitch.gif", "deco_grave_glitch.gif", "deco_grave_glitch2.gif", "deco_knife_glitch.gif", "deco_skull_glitch.gif", "deco_skull_glitch2.gif" ]; const pickDecoName = function() { if (State.variables.score < 200) { return either(decoNames0); } if (State.variables.score < 5e3) { return either(decoNames0.concat(decoNames1)); } else if (State.variables.score < 1e5) { return either(decoNames0.concat(decoNames1).concat(glitchDecoNames)); } else { return either(glitchDecoNames); } }; const spawnDeco = function() { if (decoCount < 50) { decoCount++; const decoName = pickDecoName(); const screenContents = document.getElementById("screenContents"); const leftValue = Math.round(Math.random () * (screenContents.offsetWidth - 250)) + 65; const topValue = Math.round(Math.random() * (screenContents.offsetHeight - 500)) + 225; const newDeco = document.createElement("img"); newDeco.src = "assets/" + decoName; newDeco.style.top = topValue + "px"; newDeco.style.left = leftValue + "px"; newDeco.width = Math.min( Math.random() * 20 - 10 + newDeco.width, 120); newDeco.style.transform = "rotate(" + (Math.random() * 360) + "deg)"; newDeco.classList.add("deco"); newDeco.sizeDecrease = Math.random() * 3 + 1; screenContents.appendChild(newDeco); const intervalID = setInterval( () => { if (newDeco.width - newDeco.sizeDecrease < 0) { decoCount--; newDeco.remove(); clearInterval(intervalID); } else { newDeco.width -= newDeco.sizeDecrease; } }, 100); setup.intervalIDs.add(intervalID); } }; /* For the timer From https://codepen.io/kaolay/pen/LRVxKd */ const timeArray = [70, 60, 40, 30, 25, 21, 21, 20]; State.temporary.time = timeArray[State.variables.stabCycles - 1]; /* seconds */ if (State.variables.consecutiveSpares > 0) { let index = State.variables.stabCycles + State.variables.consecutiveSpares - 1; index = Math.min(index, timeArray.length - 1); State.temporary.time = timeArray[index]; State.temporary.time = Math.max(State.temporary.time - State.variables.consecutiveSpares * 20, 10); } State.temporary.time2 = (State.temporary.time + 1) + "s"; let i = 0; let finalOffset = 94; /* the length of strokedasharray ( pixel circumference of the circle -> css ) */ let step = finalOffset/State.temporary.time; /* let timeCaption = document.querySelector( 'h2' ); */ let circle = document.querySelector( '.circle_animation' ).style; circle.strokeDashoffset = 0; /* timeCaption.innerText = time; */ const interval = setInterval( () => { /* timeCaption.innerText = time - i; */ if ( i++ === State.temporary.time ) { clearInterval( interval ); } else { circle.strokeDashoffset = step * i; }; }, 1000 ); <</script>> <</done>> <<audio ":all" stop>> <<done>> <<switch $stabCycles>> <<case 1>> <<audio "eviscerate1" volume 0.5 fadeoverto 20 1>> <<case 2>> <<audio "eviscerate2" volume 0.6 fadeoverto 10 1>> <<case 3>> <<audio "eviscerate3" volume 0.7 fadeoverto 5 1>> <<case 4>> <<audio "eviscerate4" volume 0.8 fadeoverto 2 1>> <<case 5>> <<audio "eviscerate5" volume 0.9 fadeoverto 1 1>> <<case 6>> <<audio "eviscerate6" play>> <<case 7>> <<audio "eviscerate7" play>> <<case 8>> <<audio "eviscerate8" play>> <<default>> <</switch>> <<timed `_time2`>><<audio ":all" stop>><<if $score === 0>><<goto "Hello">><<else>><<goto "Blackscreen">><</if>><</timed>> /* 20 */ <</done>> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <p id="restart" class="noOpacity hidden"> <<link 'Again?'>> <<run Engine.restart()>> <</link>> </p> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/finalscreen_small1.gif); "> <div id="screenContents"> <img src="assets/glitch0.gif" id="glitch0" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch1.gif" id="glitch1" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch2.gif" id="glitch2" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch3.gif" id="glitch3" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch4.gif" id="glitch4" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/blood_screen.gif" id="bloodScreen" class="fullscreengif noOpacity" style="z-index: 1;"/> <img src="assets/blood2_screen.gif" id="bloodScreen2" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small1.gif" id="glitchScreen1" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small2.gif" id="glitchScreen2" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small3.gif" id="glitchScreen3" class="fullscreengif noOpacity" style="z-index: 2;"/> <img src="assets/finalscreen_small4.gif" id="glitchScreen4" class="fullscreengif noOpacity" style=" z-index: 2; "/> <img src="assets/finalscreen_small4.gif" id="glitchScreen5" class="fullscreengif noOpacity" style=" z-index: 2; "/> <<link ' <div style=" position: relative; top: 120px; "> <div id="hurtButton"> <img src="assets/click_to_eviscerate.gif"/> </div> </div> '>> <<audio "violence" play>> <<audio "violence_bg" play>> <<run setup.clickButton()>> <</link>> <div id="score" style=" top: 405px; font-size: 50px; color: #ff0000; text-shadow: 3px 3px 0px #000, -3px -3px 0px #000, 5px 5px 0px #000, -5px -5px 0px #000, 8px 8px 6px #000; "><p> 0 </p></div> </div></div></div> <script> /* Mouse movement freezes when clicking button */ /* const test = document.getElementById("hurtButton"); test.addEventListener("click", async() => { await test.requestPointerLock(); }); */ </script> <<done>> <<script>> let restartOpacity = 0; setTimeout(() => { document.getElementById("restart").classList.remove("hidden"); const intervalID = setInterval(() => { restartOpacity += 0.01; document.getElementById("restart").style.opacity = restartOpacity; if (restartOpacity >= 1) { clearInterval(intervalID); } }, 50); }, 10000); let hasPressed = false; let blacknessOpacity = 0; State.variables.score = 0; setup.clickButton = function() { if (!hasPressed) { setInterval(() => { State.variables.score++; State.variables.score += Math.round(State.variables.score/10); const scoreText = document.getElementById("score").firstElementChild; scoreText.innerText = State.variables.score; }, 50); setInterval(() => { periodicUpdate(); }, 50); /* Need to create blackness dynamically or it will cover #hurtButton */ const blackness = document.createElement("div"); blackness.id = "blackness"; Object.assign(blackness.style, { "width": "100%", "height": "100%", "position": "fixed", "top": "0", "left": "0", "opacity": "1", "backgroundColor": "#000000", "zIndex": "50" }); const screen = document.getElementById("screen"); screen.before(blackness); /* setInterval(() => { blacknessOpacity += 0.01; document.getElementById("blackness") .style.opacity = blacknessOpacity; }, 250); */ setTimeout(() => { advanceAnim("evis_bloodstain2"); }, 600); setInterval(() => { setTimeout(() => { advanceAnim("evis_bloodstain2"); }, Math.random() * 2000 + 500); }, 1500); hasPressed = true; } }; let periodicUpdate = function() { if (State.variables.score <= 30000000) { document.getElementById("bloodScreen") .style.opacity = State.variables.score/5000; document.getElementById("bloodScreen2") .style.opacity = State.variables.score/500000; document.getElementById("glitch0") .style.opacity = State.variables.score/100; document.getElementById("glitch1") .style.opacity = State.variables.score/2000; document.getElementById("glitch2") .style.opacity = State.variables.score/10000; document.getElementById("glitch3") .style.opacity = State.variables.score/20000; document.getElementById("glitch4") .style.opacity = State.variables.score/30000; document.getElementById("glitchScreen2") .style.opacity = (State.variables.score - 4e3) / 1e3; document.getElementById("glitchScreen3") .style.opacity = (State.variables.score - 1e5) / 4e5; document.getElementById("glitchScreen4") .style.opacity = (State.variables.score - 8e10) / 4e10; document.getElementById("glitchScreen5") .style.opacity = (State.variables.score - 9e12) / 1e12; } }; const harmAnims = { "evis_bloodstain2": {"num": 0, "files": ["1.png", "2.png", "3.gif", "4.png", "5.gif", "6.png", "7.gif", "8.png", "9.gif", "10.png"]} }; const advanceAnim = function(animName) { if (harmAnims[animName].num < harmAnims[animName].files.length) { const anim = document.createElement("img"); anim.id = animName; anim.classList.add("fullscreengif"); anim.src = "assets/" + animName + "/" + harmAnims[animName].files[ harmAnims[animName].num ]; anim.style.top = "20px"; anim.style.zIndex = "40"; anim.style.opacity = "0.9"; const screenContents = document.getElementById("screenContents"); screenContents.appendChild(anim); harmAnims[animName].num++; } }; <</script>> <</done>> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <a class="link link-internal" data-passage="Ending" tabindex="0"> <div class="exitDiv" style=" left: 83%; "/> </a> <a class="link link-internal" data-passage="Ending" tabindex="0"> <div class="exitDiv" style=" left: 91%; "/> </a> <a class="link link-internal" data-passage="Ending" tabindex="0"> <div class="exitDiv" style=" left: 33.5%; top: 10%; "/> </a> <a id="refreshButton" class="link link-internal hidden" tabindex="0"> <div class="exitDiv" style=" left: 11.5%; top: 15%; width: 25px; height: 25px; "/> </a> <img src="assets/glitch0.gif" id="glitch0" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch1.gif" id="glitch1" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch2.gif" id="glitch2" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch3.gif" id="glitch3" class="fullscreengif noOpacity" style="z-index: 20;" /> <img src="assets/glitch4.gif" id="glitch4" class="fullscreengif noOpacity" style="z-index: 20;" /> <<done>> <<script>> const clickRefresh = () => { if (passage() === "Victory") { Engine.play("Hello"); } else { const narrative = document.getElementById("narrative"); narrative.innerText = "I need to win first..."; narrative.classList.remove("hidden"); } }; document.getElementById("refreshButton").onclick = clickRefresh; if (State.variables.stabCycles > 1) { document.getElementById("glitch0").classList.remove("noOpacity"); } if (State.variables.stabCycles > 2) { document.getElementById("glitch1").classList.remove("noOpacity"); } if (State.variables.stabCycles > 3) { document.getElementById("glitch2").classList.remove("noOpacity"); } if (State.variables.stabCycles > 4) { document.getElementById("glitch3").classList.remove("noOpacity"); } if (State.variables.stabCycles > 5) { document.getElementById("glitch4").classList.remove("noOpacity"); } <</script>> <</done>> <</nobr>>\
\<<nobr>> <<done>> <<script>> const screen = document.getElementById("screenBg"); switch (State.variables.stabCycles) { case 0: screen.style.opacity = 1; case 1: screen.style.opacity = 0.95; break; case 2: screen.style.opacity = 0.9; break; case 3: screen.style.opacity = 0.8; break; case 4: screen.style.opacity = 0.7; break; case 5: screen.style.opacity = 0.55; break; case 6: screen.style.opacity = 0.35; break; case 7: screen.style.opacity = 0.25; break; case 8: screen.style.opacity = 0.1; break; default: screen.style.opacity = 0; break; } <</script>> <</done>> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/search_preintro.gif); "> <div id="screenContents" onclick="triggerType()"> /* Use special links instead of include IncludeHeaderElements macro because of clickExit() function which I cannot get to work in IncludeHeaderElements */ <a class="link link-internal" data-passage="Ending" tabindex="0" onclick="clickExit()"> <div class="exitDiv" style=" left: 83%; "/> </a> <a class="link link-internal" data-passage="Ending" tabindex="0" onclick="clickExit()"> <div class="exitDiv" style=" left: 91%; "/> </a> <a class="link link-internal" data-passage="Ending" tabindex="0" onclick="clickExit()"> <div class="exitDiv" style=" left: 33.5%; top: 10%; "/> </a> <a id="visitButton" data-passage="Camera" class="link-internal link-image hidden"> <img src="assets/search.gif" style=" position: relative; top: 65px; left: 280px; z-index: 25; "/> </a> </div></div></div> <div id="narrative"> Can't sleep... </div> <script> let triggeredExit = false; let triggeredType = false; function clickExit() { triggeredExit = true; } function triggerType() { if (!triggeredExit && !triggeredType) { document.getElementById("edge").style["background-image"] = ' url(assets/edge_black.gif), url(assets/search_intro.gif)'; triggeredType = true; setTimeout( function() { const visitButton = document.getElementById("visitButton"); if (visitButton !== null) { visitButton.classList.remove("hidden"); } }, 2350); } } </script> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/camera_screen.gif); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <a data-passage="Glitter" class="link-internal link-image"> <img src="assets/camera.gif" style=" position: relative; top: 555px; left: 100px; z-index: 20; "/> </a> </div></div></div> <div id="narrative"> Here again... </div> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/transformation_loading.gif), url(assets/transform_screen2.gif); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <img src="assets/heart_white.gif" style=" position: relative; top: 430px; "/> </div></div></div> <div id="narrative" class="hidden"> ... </div> <<timed 1.5s>><<goto "Hello">><</timed>> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/rainbow_screen.gif); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <img src="assets/victory_bg.gif" class="fullscreengif" style="top:25px;"> <img src="assets/victory_message.gif" class="fullscreengif" style="top:25px;"> <img src="assets/victory_border.gif" class="fullscreengif" style="top:25px;"> <img src="assets/heart_glitch.gif" style=" position: relative; top: 44%; z-index: 7; "/> <div id="score" style=" top: 265px; font-size: 20px; color: #ef0077; text-shadow: 2px 2px 2px #000000; "><p> Score: <span style="font-size: 150%;"><<print setup.toPlainString($score)>></span> </p></div> <p id="highscore" class="hidden" style=" text-shadow: 2px 2px 2px #000000; position: relative; font-size: 14px; z-index: 15; top: 230px; font-family: 'Public Pixel'; "> HIGH SCORE!!! </p> <a data-passage="Hello" class="link-internal link-image"> <img src="assets/play_again.gif" style=" position: absolute; top: 590px; left: 0; right: 0; margin: auto; z-index: 25; "/> </a> </div></div></div> <div id="narrative" class="hidden"> Victory. </div> <<audio "victory" play>> <<done>> <<script>> if (State.variables.score > Math.max(...setup.scoreList)) { document.getElementById("highscore").classList.remove("hidden"); } setup.scoreList.push(State.variables.score); for (const id of setup.intervalIDs) { clearInterval(id); } setup.intervalIDs.clear(); <</script>> <</done>> <<include "ScreenScript">> <</nobr>>\
\<<nobr>>\ <img id="ending1gif" src="assets/ending.gif" style=" width: 600px; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; "/> <p id="restart" class="noOpacity hidden"> <<link 'Again?'>> <<run Engine.restart()>> <</link>> </p> <<done>> <<script>> /* Reset gif so it plays every time From https://intfiction.org/t/replay-non-looping-gif/50546/7 and https://stackoverflow.com/questions/10730212/proper-way-to-reset-a-gif-animation-with-displaynone-on-chrome */ const ending1gif = document.getElementById("ending1gif"); ending1gif.src = ending1gif.src.replace(/\?.*$/,"")+"?x=" + Date.now(); /* Trigger restart button */ let restartOpacity = 0; setTimeout(() => { document.getElementById("restart").classList.remove("hidden"); const intervalID = setInterval(() => { restartOpacity += 0.01; document.getElementById("restart").style.opacity = restartOpacity; if (restartOpacity >= 1) { clearInterval(intervalID); } }, 50); }, 9000); <</script>> <</done>> <<audio ":all" stop>> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/black_screen.png); "> <div id="screenContents"> <<include "IncludeHeaderElements">> </div></div></div> <div id="narrative" class="hidden"> ... </div> <<timed 1s>><<goto "Victory">><</timed>> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/rainbow_screen.gif); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <<if $stabCycles <= 9>> <<if $stabCycles < 7>> <img src="assets/girl.gif" class="fullscreengif"/> <</if>> <<if $stabCycles === 8>> <img src="assets/girl8.gif" class="fullscreengif"/> <<elseif $stabCycles >= 7>> <img src="assets/girl7.gif" class="fullscreengif" style=" top: 80px; "/> <<elseif $stabCycles >= 6>> <img src="assets/girl6.gif" class="fullscreengif"/> <<elseif $stabCycles >= 5>> <img src="assets/girl5.gif" class="fullscreengif"/> <<elseif $stabCycles >= 4>> <img src="assets/girl4.gif" class="fullscreengif"/> <</if>> <</if>> <p id="dialogueTextContainer" class="girlA dialogue dialogueA" style=" top: 505px; z-index: 25; "> <span id="dialogueText"> </span> <<link " <img id='link1' src='assets/next_arrow.gif' style=' margin-bottom: -3px; '/> ">> <<run setup.advanceDialogue()>> <</link>> </p> <p id="sininput" class="girlA dialogue dialogueA hidden" style=" top: 508px; font-size: 18px; z-index: 25; padding: 4px; "> I have committed: <input id="textbox-sin" name="textbox-sin" type="text" inputmode="text" tabindex="0" autofocus="autofocus" maxlength="45"> <<link " <img id='link2' src='assets/next_arrow.gif' style=' margin-bottom: -3px; '/> ">> <<run setup.advanceDialogue()>> <</link>> </p> </div></div></div> <div id="narrative" class="hidden"> Her </div> <<if $allCycles !== 0>> <<if $score === 0 && $stabCycles < 5>> <<set $stabbedLastCycle to false>> <<else>> <<set $stabbedLastCycle to true>> <</if>> <</if>> <<done>> <<script>> /* Special styling for last dialogue block */ if (State.variables.stabCycles === setup.dialogueArrayList.length) { const dialogueTextContainer = document.getElementById("dialogueTextContainer"); dialogueTextContainer.classList.remove("girlA"); dialogueTextContainer.classList.remove("dialogueA"); dialogueTextContainer.classList.add("dialogueB"); const link1 = document.getElementById("link1"); link1.classList.add("hidden"); link1.parentNode.style.backgroundColor = "#ff0000"; } State.variables.allCycles++; if (State.variables.stabbedLastCycle || State.variables.allCycles === 1) { State.variables.stabCycles++; if (State.variables.consecutiveSpares > 0) { State.variables.breakSpareStreak = true; } State.variables.consecutiveSpares = 0; } else { State.variables.spareCycles++; State.variables.consecutiveSpares++; } let dialogueNum = 0; setup.advanceDialogue = function() { if (State.variables.stabbedLastCycle || State.variables.allCycles === 1) { if (State.variables.stabCycles > 0) { if (State.variables.stabCycles <= setup.dialogueArrayList.length - 1) { State.variables.whichDialogue = State.variables.stabCycles - 1; } else { State.variables.whichDialogue = setup.dialogueArrayList.length - 1; } } const dialogueArray = setup.dialogueArrayList[State.variables.whichDialogue]; const newLines = setup.returnDialogue[State.variables.spareCycles]; if (State.variables.breakSpareStreak) { if (newLines !== null) { /* null newLines after we're done so it doesn't get added repeatedly */ for (let i = newLines.length - 1; i >= 0; i--) { dialogueArray.unshift(newLines[i]); } setup.returnDialogue[State.variables.spareCycles] = null; } } showDialogue(dialogueArray); } else { if (State.variables.spareCycles > 0) { if (State.variables.spareCycles <= setup.spareArrayList.length - 1) { State.variables.whichDialogue = State.variables.spareCycles - 1; } else { State.variables.whichDialogue = setup.spareArrayList.length - 1; } } const dialogueArray = setup.spareArrayList[State.variables.whichDialogue]; showDialogue(dialogueArray); } }; const showDialogue = function(dialogueArray) { /* The last line of dialogue will always be shown in the next passage */ if (dialogueNum >= dialogueArray.length - 1) { Engine.play("Hurt Me"); } else { const narrativeText = "..."; document.getElementById("narrative").classList.add("hidden"); document.getElementById("narrative").innerText = narrativeText; let dialogueTextElement = document.getElementById("dialogueText"); dialogueTextElement.innerText = ""; let typewriter = new Typewriter(dialogueTextElement, { loop: false, delay: 30, cursor: "", }); let newDialogue = dialogueArray[dialogueNum]; /* Special strings trigger special events/text */ if (newDialogue.includes("[TIME]")) { /* remove seconds from time; from https://stackoverflow.com/a/20430558 */ const timeStr = new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}); /* const str1 = timeStr.slice(0, timeStr.indexOf(":", 3)); const str2 = timeStr.slice(-3); newDialogue = newDialogue.replace("[TIME]", str1 + str2); */ newDialogue = newDialogue.replace("[TIME]", timeStr); } if (newDialogue.includes("[TIME2]")) { let timeText = ""; let hours = new Date().getHours(); if (hours > 22 || hours < 4) { timeText = "late at night"; } else if (hours >= 4 && hours < 8) { timeText = "early in the morning"; } else if (hours >= 8 && hours < 12) { timeText = "wasting your morning"; } else if (hours >= 12 && hours < 17) { timeText = "wasting your afternoon"; } else if (hours >= 17 && hours < 20) { timeText = "wasting your evening"; } else { timeText = "wasting your night"; } newDialogue = newDialogue.replace("[TIME2]", timeText); } if (newDialogue.includes("[TIME3]")) { let timeText2 = ""; let hours = new Date().getHours(); if (hours > 22 || hours < 8) { timeText2 = "sleeping, or "; } else if ( /* working hours on weekday */ (new Date().getDay() % 6 !== 0) && (hours >= 8 && hours < 17) ) { timeText2 = "working, or "; } else { timeText2 = ""; } newDialogue = newDialogue.replace("[TIME3]", timeText2); } if (newDialogue.includes("[TRIGGER1]")) { document.getElementById("link1").classList.add("hidden"); document.getElementById("sininput").classList.remove("hidden"); newDialogue = newDialogue.replace("[TRIGGER1]", ""); } if (newDialogue.includes("[TRIGGER2]")) { State.variables.sin = document.getElementById("textbox-sin").value.trim(); if ( (["nothing", "nothing wrong"].includes(State.variables.sin.toLowerCase())) || (new RegExp("^[\.\s]+$").test(State.variables.sin.trim())) /* periods + spaces only */ ) { State.variables.sin = ""; } document.getElementById("link1").classList.remove("hidden"); document.getElementById("sininput").classList.add("hidden"); newDialogue = newDialogue.replace("[TRIGGER2]", ""); } if (newDialogue.includes("[SIN]")) { if (State.variables.sin === "") { newDialogue = newDialogue.replace("[SIN]", "Nothing" ); } else { newDialogue = newDialogue.replace("[SIN]", State.variables.sin.charAt(0).toUpperCase() + State.variables.sin.slice(1) ); } } if (newDialogue.includes("[SIN2]")) { if (State.variables.sin === "") { newDialogue = newDialogue.replace("[SIN2]", "Simply for existing" ); } else { newDialogue = newDialogue.replace("[SIN2]", "For that" ); } } typewriter.typeString(newDialogue).start(); dialogueNum++; } }; setup.advanceDialogue(); <</script>> <</done>> <<include "ScreenScript">> <<done>> <<audio ":all" stop>> <<if $stabCycles === 1 && $allCycles > 1>> <<audio "neutral2" loop play>> <<else>> <<switch $stabCycles>> <<case 1>> <<audio "neutral1" loop play>> <<case 2>> <<audio "neutral2" loop play>> <<case 3>> <<audio "neutral3" loop play>> <<case 4>> <<audio "neutral4" loop play>> <<case 5>> <<audio "neutral5" loop play>> <<case 6>> <<audio "neutral6" loop play>> <<case 7>> <<audio "neutral7" loop play>> <<case 8>> <<default>> <</switch>> <</if>> <</done>> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/black_screen.png); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <p id="dialogueText" class="girlA dialogue" style=" top: 150px; color: #ff0070; font-size: 25px; text-align: center; "> </p> <<if $spareCycles >= 3>> <a id="transition" data-passage="SpareFinal" class="hidden"> <p class="dialogue" style=" font-family: 'Public Pixel', monospace; color: #ff0099; font-size: 28px; text-align: center; top: 200px; z-index: 25; "> YES </p></a> <<elseif $stabCycles < 9>> <a id="transition" data-passage="Eviscerate" class="hidden"> <p class="dialogue" style=" font-family: 'Public Pixel', monospace; color: #ff0099; font-size: 28px; text-align: center; top: 200px; z-index: 25; "> YES </p></a> <<else>> <a id="transition" data-passage="EviscerateFinal" class="hidden"> <p class="dialogue" style=" font-family: 'Public Pixel', monospace; color: #ff0099; font-size: 28px; text-align: center; top: 200px; z-index: 25; "> YES </p></a> <</if>> </div></div></div> <div id="narrative" class="hidden"> ... </div> <<done>> <<script>> let dialogueTextElement = document.getElementById("dialogueText"); let typewriter2 = new Typewriter(dialogueTextElement, { loop: false, delay: 95, cursor: "", }); /* Last element of current dialogue array */ let displayText = ""; if (State.variables.stabbedLastCycle) { displayText = setup.dialogueArrayList[State.variables.whichDialogue] .slice(-1)[0]; } else { displayText = setup.spareArrayList[State.variables.whichDialogue] .slice(-1)[0]; } typewriter2 .typeString(displayText) .pauseFor(1000) .callFunction( (elements) => { const transition = document.getElementById("transition"); if (transition !== null) { transition.classList.remove("hidden"); } } ) .start(); <</script>> <</done>> <<include "ScreenScript">> <</nobr>>\
\<<nobr>> <div id="screen"> <div id="screenBg"/> <div id="edge" style=" background-image: url(assets/edge_black.gif), url(assets/rainbow_screen.gif); "> <div id="screenContents"> <<include "IncludeHeaderElements">> <img src="assets/edge_black.gif" class="fullscreengif"/> <div id="score" style=" top: 405px; font-size: 50px; color: #ff0000; text-shadow: 3px 3px 0px #000, -3px -3px 0px #000, 5px 5px 0px #000, -5px -5px 0px #000, 8px 8px 6px #000; "><p> 0 </p></div> </div></div></div> <</nobr>>