-
Notifications
You must be signed in to change notification settings - Fork 0
/
04ffcb724145f7be9c9c.js
1 lines (1 loc) · 6.43 KB
/
04ffcb724145f7be9c9c.js
1
!function(){"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),function(){var t;e.g.importScripts&&(t=e.g.location+"");var o=e.g.document;if(!t&&o&&(o.currentScript&&(t=o.currentScript.src),!t)){var n=o.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!t||!/^http(s?):/.test(t));)t=n[s--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t}();const t=(e,t)=>e.getBoundingClientRect()[t],o=e=>t(document.documentElement,e)/2,n=e=>{e.style.left=o("width")-t(e,"width")/2+"px",e.style.bottom=o("height")-t(e,"height")/2+"px"},s={mainSound:document.querySelector(".audio__main"),callDevil:document.querySelector(".audio__call-devil"),shakeBook:document.querySelector(".audio__shake-book")},r=(e,t)=>s[e][t](),l=document.querySelector(".rules"),c=document.querySelector(".play"),i=document.querySelector(".book"),a=document.querySelector(".book__star"),d=document.querySelector(".book__ellipse"),u=()=>{c.classList.add("play_active"),i.classList.add("book_shake"),a.classList.add("book__star_active"),d.classList.add("book__ellipse_active"),l.remove(),r("callDevil","play"),r("shakeBook","play")},p=e=>new Promise((t=>setTimeout(t,e)));let h;const b=e=>h=e,f=document.querySelector(".devil"),m=[{width:560,coeff:1.3},{height:1e3,coeff:3.3},{height:850,coeff:2.8},{height:780,coeff:2.5},{height:702,coeff:2.25},{height:590,coeff:1.95},{height:525,coeff:1.65},{height:450,coeff:1.35},{height:0,coeff:1}];let _;const y=()=>{p(9001).then((()=>{_=setInterval((()=>{let e=(()=>{const e=t(document.documentElement,"height"),o=t(document.documentElement,"width");for(const t of m){if(o<=t.width)return t.coeff;if(e>=t.height)return t.coeff}})();b(h+e),f.style.width=h+"px",f.style.left=o("width")-h/2+"px",f.style.bottom=o("height")-t(f,"height")/2+"px"}),200)}))},g=(e,o)=>{let n=Math.floor(t(document.documentElement,o)-e);return Math.floor(Math.random()*(n-e+1)+e)};let w;const v=()=>w=k.getBoundingClientRect().width,k=document.querySelector(".search-object"),S=()=>{k.style.left=g(w,"width")+"px",k.style.bottom=g(w,"height")+"px"},q=()=>{var e;k.style.display="inline-block",i.classList.remove("book_shake"),i.classList.add("book_hide"),e="add",f.classList[e]("devil_show")};var L=e.p+"assets/sounds/92eedf40f79c33c9783d.mp3",E=e.p+"assets/sounds/e98c697bb4a19cd7b1c6.mp3";const I=document.querySelector(".result"),x=document.querySelector(".result__text"),B=document.querySelector(".result__button"),T=document.querySelector(".devil__picture"),A=(e,t,o)=>{I.classList.add("result_show"),I.classList.add(t),x.textContent=e,clearInterval(_),B.classList.add(o),T.remove(),O.remove()},D=e=>{const t=new Audio;t.src=e,t.play()};var j=e.p+"assets/sounds/7f7a32bd05e3f4f6bfea.mp3",M=e.p+"assets/sounds/eac466de468e28ab0bf0.mp3";let R=0;const C=()=>R<56?++R:(A("YOU DIED","result_defeat","result__button_defeat"),k.remove(),p(6e3).then((()=>{D(j)})),p(26e3).then((()=>{D(M)})),void $());let U;const $=()=>clearInterval(U),O=document.querySelector(".found-items"),P=document.querySelectorAll(".found-items__pento");let V=0;const Y=[{width:1e3,speed:745},{width:850,speed:730},{width:320,speed:655}],z=()=>{const e=(()=>{const e=t(document.documentElement,"width");for(const t of Y)if(e>=t.width)return t.speed})();setInterval(S,e)},F=()=>{p(8e3).then((()=>{q(),v(),S();const e=t(f,"width");var o;b(e),n(f),r("mainSound","play"),o="add",O.classList[o]("found-items_show"),z()}))};let G={en:"The world collapsed when the king of hell took over. Everyone who tried to stop him before you is dead. In order to end this once and for all, you need to click on the button above. After you click on it, the spell book will open and the summoning of the king of hell will begin. Remember that once you click, there is no going back. If you still dare to press, then you will need to catch 10 pentagrams in order to put an end to this terrible creature once and for all. Be careful and persistent, the king of hell will try in every possible way to interfere with you, moving the pentagram to different parts of the screen.<br> Good luck.",ru:"Мир рухнул, когда его захватил король ада. Все, кто пытался остановить его до тебя, мертвы. Для того чтобы покончить с этим раз и навсегда, нужно нажать на кнопку сверху. После того, как ты нажмешь на неё, откроется книга заклинаний, и начнется призыв короля ада. Помни, что после нажатия пути назад уже не будет. Если всё-таки осмелишься нажать, то тебе нужно будет словить 10 пентаграмм, чтобы раз и навсегда покончить с этим ужасным существом. Будь внимателен и настойчив, король ада будет всячески пытаться помешать тебе, перемещая пентаграмму в разные части экрана. <br>Удачи."};const H=document.querySelector(".rules__btn-en"),N=document.querySelector(".rules__btn-ru"),J=document.querySelector(".rules__text"),K=(e,t,o)=>{var n;H.style.display=e,N.style.display=t,J.innerHTML=G[o],n=o,localStorage.setItem("language",n)};var Q=e.p+"assets/sounds/09b9c433daa241db2ccb.mp3";const W={".rules__btn-en":()=>{D(Q),K("none","block","ru")},".rules__btn-ru":()=>{D(Q),K("block","none","en")},".play":()=>{u(),F(),y(),U=setInterval(C,1e3),c.setAttribute("disabled",!0)},".result__button":()=>{location.reload()},".search-object":()=>{D(L),P[V].classList.add("found-items__pento_found"),++V,5===V&&O.classList.add("found-items__pento_shake"),10===V&&(r("mainSound","pause"),k.remove(),p(800).then((()=>{A("YOU SURVIVED","result_win","result__button_win"),D(E)})),$())}};"en"===(localStorage.getItem("language")||"en")?K("block","none","en"):K("none","block","ru"),n(i),window.addEventListener("click",(e=>((e,t)=>{const o=e.target;for(const e in t)if(o.closest(e)){t[e]();break}})(e,W))),window.addEventListener("resize",(()=>{v(),n(i)}))}();