diff --git a/atlas.js b/atlas.js index 34dc4a4..2111d72 100644 --- a/atlas.js +++ b/atlas.js @@ -39,19 +39,12 @@ function atlasClick() { atlas_img.style.zIndex = 1; atlas.classList.add("atlas"); let roll = Math.random(); - let rollchance = 0.03; - if (roll < rollchance) { - atlas_img.src = "/media/memes/lmoa.png"; - } else if (roll < 2*rollchance) { - atlas_img.src = "/media/memes/doom.png"; - } else if (roll < 3*rollchance) { - atlas_img.src = "/media/memes/agony.png"; - } else if (roll < 4*rollchance) { - atlas_img.src = "/media/memes/enraged.png"; - } else if (roll < 5*rollchance) { - atlas_img.src = "/media/memes/sunglaso.png"; - } else if (roll < 6*rollchance) { - atlas_img.src = "/media/memes/thonk.png"; + let rollchance = 0.0069; + let rollList = ["lmoa","doom","agony","enraged","sunglaso","thonk","unglaso"]; + for (let i = rollList.length-1; i > -1; i--) { + if (roll < (i+1) * rollchance) { + atlas_img.src = "./media/memes/" + rollList[i] + ".png"; + } } atlas.appendChild(atlas_img); atlas.style = "background-image: radial-gradient(closest-side, #" + Math.round(255*Math.random()).toString(16)+Math.round(255*Math.random()).toString(16)+Math.round(255*Math.random()).toString(16) + " 0%," + "#121516 120%);"; diff --git a/media/memes/unglaso.png b/media/memes/unglaso.png new file mode 100644 index 0000000..53aef6a Binary files /dev/null and b/media/memes/unglaso.png differ