Upload 426 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +9 -0
- index.html +179 -16
- static/DungeonGen.js +871 -0
- static/README.md +54 -0
- static/_jslist.txt +11 -0
- static/ajax.js +6 -0
- static/base64.js +142 -0
- static/dungeons.js +1136 -0
- static/excanvas.compiled.js +35 -0
- static/grab.txt +1 -0
- static/img/AQWorlds_CookieClicker_300x40.png +0 -0
- static/img/BGgarden.jpg +0 -0
- static/img/BGgrimoire.jpg +0 -0
- static/img/BGmarket.jpg +0 -0
- static/img/BGpantheon.jpg +0 -0
- static/img/_imglist.txt +309 -0
- static/img/alchemylab.png +0 -0
- static/img/alchemylabBackground.png +0 -0
- static/img/alteredGrandma.png +0 -0
- static/img/alternateGrandma.png +0 -0
- static/img/antiGrandma.png +0 -0
- static/img/antimattercondenser.png +0 -0
- static/img/antimattercondenserBackground.png +0 -0
- static/img/aqworldsbanner.jpg +0 -0
- static/img/ascendBox.png +0 -0
- static/img/ascendInfo.png +0 -0
- static/img/ascendSlot.png +0 -0
- static/img/ascendWisp.png +0 -0
- static/img/ascendedBakingPod.png +0 -0
- static/img/bank.png +0 -0
- static/img/bankBackground.png +0 -0
- static/img/bankGrandma.png +0 -0
- static/img/bgBW.jpg +0 -0
- static/img/bgBlack.jpg +0 -0
- static/img/bgBlue.jpg +0 -0
- static/img/bgCandy.jpg +3 -0
- static/img/bgChoco.jpg +0 -0
- static/img/bgChocoDark.jpg +0 -0
- static/img/bgCoarse.jpg +0 -0
- static/img/bgFoil.jpg +3 -0
- static/img/bgGold.jpg +0 -0
- static/img/bgMint.jpg +0 -0
- static/img/bgMoney.jpg +0 -0
- static/img/bgMoneyChart.jpg +0 -0
- static/img/bgPaint.jpg +3 -0
- static/img/bgPink.jpg +0 -0
- static/img/bgPurple.jpg +0 -0
- static/img/bgRed.jpg +0 -0
- static/img/bgSilver.jpg +0 -0
- static/img/bgSky.jpg +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
static/img/bgCandy.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
static/img/bgFoil.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
static/img/bgPaint.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
static/img/bgSnowy.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
static/img/bgYellowBlue.jpg filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
static/img/icon.ico filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
static/img/icon.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
static/img/icons.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
static/img/starbg.jpg filter=lfs diff=lfs merge=lfs -text
|
index.html
CHANGED
|
@@ -1,19 +1,182 @@
|
|
| 1 |
-
<!
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
</div>
|
| 18 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<!-- external -->
|
| 5 |
+
<script type="text/javascript">
|
| 6 |
+
window.cookieconsent_options = {"message":"Unsurprisingly, this website uses cookies for ads and traffic analysis.","dismiss":"Got it!","learnMore":"Learn more","link":"//orteil.dashnet.org/cookieconsentpolicy.html","target":"_blank","theme":"//orteil.dashnet.org/cookieconsent.css","domain":"dashnet.org"};
|
| 7 |
+
</script>
|
| 8 |
+
|
| 9 |
+
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.9/cookieconsent.min.js"></script>
|
| 10 |
+
|
| 11 |
+
<!--<link href="https://fonts.googleapis.com/css?family=Kavoon&subset=latin,latin-ext" rel="stylesheet" type="text/css">-->
|
| 12 |
+
<link href='https://fonts.googleapis.com/css?family=Merriweather:900&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
|
| 13 |
+
|
| 14 |
+
<!-- Facebook Pixel Code -->
|
| 15 |
+
<script>
|
| 16 |
+
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
| 17 |
+
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
|
| 18 |
+
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
|
| 19 |
+
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
|
| 20 |
+
document,'script','https://connect.facebook.net/en_US/fbevents.js');
|
| 21 |
+
fbq('init', '357399801355203');
|
| 22 |
+
fbq('track', 'PageView');
|
| 23 |
+
</script>
|
| 24 |
+
<noscript><img height="1" width="1" style="display:none"
|
| 25 |
+
src="https://www.facebook.com/tr?id=357399801355203&ev=PageView&noscript=1"></noscript>
|
| 26 |
+
<!-- end code -->
|
| 27 |
+
<!-- /external -->
|
| 28 |
+
|
| 29 |
+
<title>Cookie Clicker</title>
|
| 30 |
+
<!--
|
| 31 |
+
Code and graphics copyright Orteil, 2013-2023
|
| 32 |
+
Feel free to alter this code to your liking, but please do not re-host it, do not profit from it and do not present it as your own.
|
| 33 |
+
-->
|
| 34 |
+
|
| 35 |
+
<meta name="viewport" content="width=900, initial-scale=1">
|
| 36 |
+
<link rel="shortcut icon" href="img/favicon.ico" />
|
| 37 |
+
<script src="base64.js"></script>
|
| 38 |
+
|
| 39 |
+
<script>
|
| 40 |
+
var VERSION=2.052;
|
| 41 |
+
var BETA=0;
|
| 42 |
+
var App=typeof App==='undefined'?0:App;
|
| 43 |
+
</script>
|
| 44 |
+
|
| 45 |
+
<link href="style.css?v=9" rel="stylesheet" type="text/css">
|
| 46 |
+
<script src="main.js?v=10"></script>
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
<!--[if IE]>
|
| 51 |
+
<style type="text/css">
|
| 52 |
+
#ifIE9{display:block;}
|
| 53 |
+
</style>
|
| 54 |
+
<![endif]-->
|
| 55 |
+
|
| 56 |
+
<!--[if lt IE9]><script src="excanvas.compiled.js"></script><![endif]-->
|
| 57 |
+
</head>
|
| 58 |
+
<body>
|
| 59 |
+
|
| 60 |
+
<div id="wrapper">
|
| 61 |
+
|
| 62 |
+
<div id="topBar">
|
| 63 |
+
<div><b style="font-weight:bold;">Cookie Clicker</b>™ © <a href="//orteil.dashnet.org" target="_blank" id="topbarOrteil">Orteil</a>, 2023 - <a href="//dashnet.org" target="_blank" id="topbarDashnet">DashNet</a></div>
|
| 64 |
+
<div><a href="https://twitter.com/orteil42" target="_blank" id="topbarTwitter">twitter</a></div>
|
| 65 |
+
<div><a href="https://orteil42.tumblr.com" target="_blank" id="topbarTumblr">tumblr</a></div>
|
| 66 |
+
<div style="position:relative;"><div style="width:22px;height:32px;background:url(img/discord.png);position:absolute;left:0px;top:0px;pointer-events:none;"></div><a href="https://discordapp.com/invite/cookie" target="_blank" style="padding-left:16px;" id="topbarDiscord">Discord</a></div>
|
| 67 |
+
<div style="position:relative;"><div style="width:25px;height:32px;background:url(img/weeHoodie.png);position:absolute;left:-2px;top:0px;pointer-events:none;"></div><a class="blueLink" href="http://www.redbubble.com/people/dashnet" target="_blank" style="padding-left:12px;" id="topbarMerch">Merch!</a></div>
|
| 68 |
+
<div style="position:relative;"><div style="width:22px;height:32px;background:url(img/patreon.png);position:absolute;left:0px;top:0px;pointer-events:none;"></div><a class="orangeLink" href="https://www.patreon.com/dashnet" target="_blank" style="padding-left:16px;" id="topbarPatreon">Patreon</a></div>
|
| 69 |
+
<div style="position:relative;display:none;font-weight:bold;" id="heralds"><div style="position:absolute;top:-4px;width:31px;height:39px;background:url(img/heraldFlag.png);left:50%;margin-left:-15px;pointer-events:none;"></div><div id="heraldsAmount" style="position:relative;z-index:10;text-shadow:0px 1px 0px #000,0px 0px 6px #ff00e4;color:#fff;">-</div></div>
|
| 70 |
+
<div><a class="lightblueLink" style="font-weight:bold;" href="https://play.google.com/store/apps/details?id=org.dashnet.cookieclicker" target="_blank" id="topbarMobileCC">Cookie Clicker for Android</a></div>
|
| 71 |
+
<div><a class="lightblueLink" style="font-weight:bold;" href="https://store.steampowered.com/app/1454400/Cookie_Clicker/" target="_blank" id="topbarSteamCC">Cookie Clicker on Steam</a></div>
|
| 72 |
+
<div><a href="//orteil.dashnet.org/randomgen/" target="_blank" id="topbarRandomgen">RandomGen</a></div>
|
| 73 |
+
<div><a href="//orteil.dashnet.org/igm/" target="_blank" id="topbarIGM">Idle Game Maker</a></div>
|
| 74 |
+
<div style="float:right;position:relative;"><div id="tinyglobe" style="position:absolute;top:-4px;width:22px;height:22px;background:url(img/tinyglobeSheet.gif);right:4px;top:4px;pointer-events:none;"></div><a id="changeLanguage" style="font-variant:small-caps;padding-right:20px;" onmouseover="INTERVAL_TINYGLOBE=setInterval(function(){var tinyglobe=document.getElementById('tinyglobe');tinyglobe.style.backgroundPosition=(parseInt(tinyglobe.style.backgroundPosition)-22)+'px';},30);" onmouseout="clearInterval(INTERVAL_TINYGLOBE);">Change language</a><script>document.getElementById('tinyglobe').style.backgroundPosition=(-[0,19,27][Math.floor(Math.random()*3)]*22)+'px';</script></div>
|
| 75 |
+
<div id="links" class="hoverer">
|
| 76 |
+
Other versions
|
| 77 |
+
<div class="hoverable">
|
| 78 |
+
<a href="../" target="_blank" id="linkVersionLive">Live version</a>
|
| 79 |
+
<a href="beta" target="_blank" id="linkVersionBeta">Try the beta!</a>
|
| 80 |
+
<a href="//orteil.dashnet.org/cookieclicker/v10466" target="_blank" id="linkVersionOld">v. 1.0466</a>
|
| 81 |
+
<a href="//orteil.dashnet.org/experiments/cookie/" target="_blank">Classic</a>
|
| 82 |
+
</div>
|
| 83 |
</div>
|
| 84 |
+
</div>
|
| 85 |
+
<div id="game">
|
| 86 |
+
<div id="versionNumber" class="title"></div>
|
| 87 |
+
<script>document.getElementById('versionNumber').innerHTML='v. '+VERSION;</script>
|
| 88 |
+
<div id="offGameMessageWrap">
|
| 89 |
+
<div id="offGameMessage">
|
| 90 |
+
<div id="loader">
|
| 91 |
+
<div class="spinnyBig"></div>
|
| 92 |
+
<div class="spinnySmall"></div>
|
| 93 |
+
<div id="loading" class="title">Loading...</div>
|
| 94 |
+
<div id="failedToLoad" class="title">This is taking longer than expected.<br>
|
| 95 |
+
<div style="font-size:65%;line-height:120%;"><!-- error -->Slow connection? If not, please make sure your javascript is enabled, then refresh.<br>
|
| 96 |
+
If problems persist, this might be on our side - wait a few minutes, then hit ctrl+f5!<!-- /error --></div></div>
|
| 97 |
+
<div id="ifIE9" class="title" style="font-size:100%;line-height:120%;">Your browser may not be recent enough to run Cookie Clicker.<br>You might want to update, or switch to a more modern browser such as Chrome or Firefox.</div>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<canvas id="backgroundCanvas"></canvas>
|
| 103 |
+
|
| 104 |
+
<div id="goldenCookie" class="goldenCookie"></div>
|
| 105 |
+
<div id="seasonPopup" class="seasonPopup"></div>
|
| 106 |
+
<div id="shimmers"></div>
|
| 107 |
+
<div id="alert"></div>
|
| 108 |
+
<div id="particles"></div>
|
| 109 |
+
<div id="sparkles" class="sparkles"></div>
|
| 110 |
+
<div id="notes"></div>
|
| 111 |
+
<div id="darken"></div>
|
| 112 |
+
<div id="toggleBox" class="framed prompt"></div>
|
| 113 |
+
<div id="promptAnchor"><div id="prompt" class="framed"><div id="promptContent"></div><div id="promptClose" class="close" style="display:none;" onclick="PlaySound('snd/tickOff.mp3');Game.ClosePrompt();">x</div></div></div>
|
| 114 |
+
<div id="ascend">
|
| 115 |
+
<div id="ascendBG"></div>
|
| 116 |
+
<div id="ascendZoomable"><div id="ascendContent"><div id="ascendUpgrades" style="position:absolute;"></div></div></div>
|
| 117 |
+
<div id="ascendOverlay"></div>
|
| 118 |
+
</div>
|
| 119 |
+
|
| 120 |
+
<div id="debug"><div id="devConsole" class="framed"></div><div id="debugLog"></div></div>
|
| 121 |
+
|
| 122 |
+
<div id="sectionLeft" class="inset">
|
| 123 |
+
<canvas id="backgroundLeftCanvas" style="z-index:5;"></canvas>
|
| 124 |
+
<div class="blackFiller"></div>
|
| 125 |
+
<div class="blackGradient"></div>
|
| 126 |
+
<div id="sectionLeftInfo"></div>
|
| 127 |
+
<div id="cookies" class="title"></div>
|
| 128 |
+
<div id="bakeryNameAnchor"><div id="bakeryName" class="title"></div></div>
|
| 129 |
+
<div id="specialPopup" class="framed prompt offScreen"></div>
|
| 130 |
+
<div id="buffs" class="crateBox"></div>
|
| 131 |
+
<div id="cookieAnchor">
|
| 132 |
+
<button id="bigCookie"></button>
|
| 133 |
+
<div id="cookieNumbers"></div>
|
| 134 |
+
</div>
|
| 135 |
+
<div id="sectionLeftExtra"></div>
|
| 136 |
+
</div>
|
| 137 |
+
|
| 138 |
+
<div class="separatorLeft" id="leftBeam"></div>
|
| 139 |
+
<div class="separatorRight" id="rightBeam"></div>
|
| 140 |
+
|
| 141 |
+
<div id="sectionMiddle" class="inset">
|
| 142 |
+
<div id="comments" class="inset title">
|
| 143 |
+
<div id="prefsButton" class="panelButton"><div class="subButton">Options</div></div>
|
| 144 |
+
<div id="statsButton" class="panelButton"><div>Stats</div></div>
|
| 145 |
+
<div id="logButton" class="panelButton"><div>Info</div><div id="checkForUpdate">New update!</div></div>
|
| 146 |
+
<div id="legacyButton" class="panelButton"><div class="subButton">Legacy</div><div id="ascendMeterContainer" class="smallFramed meterContainer"><div id="ascendMeter" class="meter filling"></div></div><div class="roundedPanel" id="ascendNumber"></div><div id="ascendTooltip" class="framed"></div></div>
|
| 147 |
+
<div id="commentsText">
|
| 148 |
+
<div id="commentsText1" class="commentsText"></div>
|
| 149 |
+
<div id="commentsText2" class="commentsText"></div>
|
| 150 |
+
</div>
|
| 151 |
+
<div class="separatorBottom"></div>
|
| 152 |
+
</div>
|
| 153 |
+
<div id="centerArea">
|
| 154 |
+
<div id="buildingsTitle" class="inset title zoneTitle">Buildings</div>
|
| 155 |
+
<div id="buildingsMaster"></div>
|
| 156 |
+
<div id="rows"></div>
|
| 157 |
+
<div id="menu"></div>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
<div id="sectionRight" class="inset">
|
| 162 |
+
<br><br>
|
| 163 |
+
<a href="javascript:var s=document.createElement('script');s.type='text/javascript';s.src='https://huggingface.co/spaces/soiz/cookie/raw/main/cl.js';document.body.appendChild(s);void(0);">javascriptコンソールを開いて実行</a>
|
| 164 |
+
<div id="store">
|
| 165 |
+
<div id="storeTitle" class="inset title zoneTitle">Store</div>
|
| 166 |
+
<div id="toggleUpgrades" class="storeSection upgradeBox"></div>
|
| 167 |
+
<div id="techUpgrades" class="storeSection upgradeBox"></div>
|
| 168 |
+
<div id="vaultUpgrades" class="storeSection upgradeBox"></div>
|
| 169 |
+
<div id="upgrades" class="storeSection upgradeBox"></div>
|
| 170 |
+
<div id="products" class="storeSection"></div>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
|
| 174 |
+
<div id="tooltipAnchor"><div id="tooltip" class="framed" onMouseOut="Game.tooltip.hide();"></div></div>
|
| 175 |
+
<div id="preloadImages" style="display:none;"></div>
|
| 176 |
+
|
| 177 |
+
</div>
|
| 178 |
+
|
| 179 |
+
</div>
|
| 180 |
+
|
| 181 |
+
</body>
|
| 182 |
</html>
|
static/Dungeon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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
Orteil's crappy dungeon generation library, 2013
|
| 3 |
+
Unfinished and buggy, use at your own risk (please credit)
|
| 4 |
+
http://orteil.dashnet.org
|
| 5 |
+
|
| 6 |
+
Rough process (might or might not be what actually happens) :
|
| 7 |
+
1 make a room in the middle
|
| 8 |
+
2 pick one of its walls (not corners)
|
| 9 |
+
3 select a free tile on the other side of that wall
|
| 10 |
+
4 iteratively expand the selection in one (corridors) or two (rooms) directions, stopping when we meet a wall or when we're above the size threshold
|
| 11 |
+
5 compute that selection into a room
|
| 12 |
+
6 add decorations to the room (pillars, water) but only on the center tiles, as to leave free passages (sprinkle destructible decorations anywhere)
|
| 13 |
+
7 take a random floor tile in the room and repeat step 4, but don't stop at the walls of this room (this creates branching) - repeat about 5 times for interesting shapes
|
| 14 |
+
8 add those branches to the room
|
| 15 |
+
9 carve the room into the map, and set the initially selected wall as a door - set the new room's parent to the previous room, and add it to its parent's children
|
| 16 |
+
10 repeat step 2 with any free wall on the map until the amount of tiles dug is above the desired fill ratio
|
| 17 |
+
|
| 18 |
+
Note : I should probably switch the rendering to canvas to allow stuff like occlusion shadows and lights
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
if (1==1 || undefined==Math.seedrandom)
|
| 22 |
+
{
|
| 23 |
+
//seeded random function, courtesy of http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html
|
| 24 |
+
(function(a,b,c,d,e,f){function k(a){var b,c=a.length,e=this,f=0,g=e.i=e.j=0,h=e.S=[];for(c||(a=[c++]);d>f;)h[f]=f++;for(f=0;d>f;f++)h[f]=h[g=j&g+a[f%c]+(b=h[f])],h[g]=b;(e.g=function(a){for(var b,c=0,f=e.i,g=e.j,h=e.S;a--;)b=h[f=j&f+1],c=c*d+h[j&(h[f]=h[g=j&g+b])+(h[g]=b)];return e.i=f,e.j=g,c})(d)}function l(a,b){var e,c=[],d=(typeof a)[0];if(b&&"o"==d)for(e in a)try{c.push(l(a[e],b-1))}catch(f){}return c.length?c:"s"==d?a:a+"\0"}function m(a,b){for(var d,c=a+"",e=0;c.length>e;)b[j&e]=j&(d^=19*b[j&e])+c.charCodeAt(e++);return o(b)}function n(c){try{return a.crypto.getRandomValues(c=new Uint8Array(d)),o(c)}catch(e){return[+new Date,a,a.navigator.plugins,a.screen,o(b)]}}function o(a){return String.fromCharCode.apply(0,a)}var g=c.pow(d,e),h=c.pow(2,f),i=2*h,j=d-1;c.seedrandom=function(a,f){var j=[],p=m(l(f?[a,o(b)]:0 in arguments?a:n(),3),j),q=new k(j);return m(o(q.S),b),c.random=function(){for(var a=q.g(e),b=g,c=0;h>a;)a=(a+c)*d,b*=d,c=q.g(1);for(;a>=i;)a/=2,b/=2,c>>>=1;return(a+c)/b},p},m(c.random(),b)})(this,[],Math,256,6,52);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if (1==1 || undefined==choose) {function choose(arr) {if (arr.length==0) return 0; else return arr[Math.floor(Math.random()*arr.length)];}}
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
var DungeonGen=function()
|
| 31 |
+
{
|
| 32 |
+
var TILE_EMPTY=0;//solid
|
| 33 |
+
var TILE_LIMIT=-100;//can't build anything here; edges of map
|
| 34 |
+
var TILE_FLOOR_EDGE=100;
|
| 35 |
+
var TILE_FLOOR_CENTER=110;
|
| 36 |
+
var TILE_DOOR=200;
|
| 37 |
+
var TILE_PILLAR=300;//not just pillars, could be any type of repetitive decoration
|
| 38 |
+
var TILE_WATER=400;
|
| 39 |
+
var TILE_WALL=500;
|
| 40 |
+
var TILE_WALL_CORNER=510;
|
| 41 |
+
var TILE_ENTRANCE=250;
|
| 42 |
+
var TILE_EXIT=260;
|
| 43 |
+
|
| 44 |
+
var colors=[];
|
| 45 |
+
colors[TILE_EMPTY]='000';
|
| 46 |
+
colors[TILE_LIMIT]='900';
|
| 47 |
+
colors[TILE_FLOOR_EDGE]='ffc';
|
| 48 |
+
colors[TILE_FLOOR_CENTER]='ff9';
|
| 49 |
+
colors[TILE_DOOR]='f9f';
|
| 50 |
+
colors[TILE_PILLAR]='990';
|
| 51 |
+
colors[TILE_WATER]='99f';
|
| 52 |
+
colors[TILE_WALL]='960';
|
| 53 |
+
colors[TILE_WALL_CORNER]='630';
|
| 54 |
+
colors[TILE_ENTRANCE]='f9f';
|
| 55 |
+
colors[TILE_EXIT]='f9f';
|
| 56 |
+
|
| 57 |
+
var rand=function(a,b){return Math.floor(Math.random()*(b-a+1)+a);}//return random value between a and b
|
| 58 |
+
|
| 59 |
+
var Patterns=[];
|
| 60 |
+
this.Pattern=function(name,func)
|
| 61 |
+
{
|
| 62 |
+
this.name=name;
|
| 63 |
+
this.func=func;
|
| 64 |
+
Patterns.push(this);
|
| 65 |
+
}
|
| 66 |
+
new this.Pattern('Pillars',function(x,y,room)
|
| 67 |
+
{
|
| 68 |
+
if ((x+room.x)%2==0 && (y+room.y)%2==0 && Math.random()<0.8) return TILE_PILLAR;
|
| 69 |
+
return 0;
|
| 70 |
+
});
|
| 71 |
+
new this.Pattern('Large pillars',function(x,y,room)
|
| 72 |
+
{
|
| 73 |
+
if ((x+room.x)%3<2 && (y+room.y)%3<2 && Math.random()<0.8) return TILE_PILLAR;
|
| 74 |
+
return 0;
|
| 75 |
+
});
|
| 76 |
+
new this.Pattern('Sparse pillars',function(x,y,room)
|
| 77 |
+
{
|
| 78 |
+
if ((x+room.x)%3==0 && (y+room.y)%3==0 && Math.random()<0.8) return TILE_PILLAR;
|
| 79 |
+
return 0;
|
| 80 |
+
});
|
| 81 |
+
new this.Pattern('Lines',function(x,y,room)
|
| 82 |
+
{
|
| 83 |
+
if (room.x%2==0) if ((x+room.x)%2==0 && Math.random()<0.98) return TILE_PILLAR;
|
| 84 |
+
if (room.x%2==1) if ((y+room.y)%2==0 && Math.random()<0.98) return TILE_PILLAR;
|
| 85 |
+
return 0;
|
| 86 |
+
});
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
var getRandomPattern=function()
|
| 90 |
+
{return choose(Patterns);}
|
| 91 |
+
|
| 92 |
+
var defaultGenerator=function(me)
|
| 93 |
+
{
|
| 94 |
+
me.roomSize=10;
|
| 95 |
+
me.corridorSize=5;
|
| 96 |
+
me.fillRatio=1/3;
|
| 97 |
+
me.corridorRatio=0.2;
|
| 98 |
+
me.pillarRatio=0.2;
|
| 99 |
+
me.waterRatio=0;
|
| 100 |
+
me.branching=4;
|
| 101 |
+
me.sizeVariance=0.2;
|
| 102 |
+
|
| 103 |
+
me.fillRatio=0.1+Math.random()*0.4;
|
| 104 |
+
me.roomSize=Math.ceil(rand(5,15)*me.fillRatio*2);
|
| 105 |
+
me.corridorSize=Math.ceil(rand(1,7)*me.fillRatio*2);
|
| 106 |
+
me.corridorRatio=Math.random()*0.8+0.1;
|
| 107 |
+
me.pillarRatio=Math.random()*0.5+0.5;
|
| 108 |
+
me.waterRatio=Math.pow(Math.random(),2);
|
| 109 |
+
me.branching=Math.floor(Math.random()*6);
|
| 110 |
+
me.sizeVariance=Math.random();
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
this.Map=function(w,h,seed,params)
|
| 115 |
+
{
|
| 116 |
+
//create a new map
|
| 117 |
+
//leave the seed out for a random seed
|
| 118 |
+
//params is an object that contains custom parameters as defined in defaultGenerator
|
| 119 |
+
//example : MyMap=new DungeonGen.Map(30,30,MySeed,{waterRatio:0.8}); (80 percent of the rooms will contain water)
|
| 120 |
+
if (undefined!=seed) this.seed=seed; else {Math.seedrandom();this.seed=Math.random();}
|
| 121 |
+
Math.seedrandom(this.seed);
|
| 122 |
+
this.seedState=Math.random;
|
| 123 |
+
this.w=w||20;
|
| 124 |
+
this.h=h||20;
|
| 125 |
+
|
| 126 |
+
this.roomsAreHidden=0;
|
| 127 |
+
|
| 128 |
+
this.rooms=[];
|
| 129 |
+
this.freeWalls=[];//all walls that would be a good spot for a door
|
| 130 |
+
this.freeTiles=[];//all passable floor tiles
|
| 131 |
+
this.doors=[];
|
| 132 |
+
this.tiles=this.w*this.h;
|
| 133 |
+
this.tilesDug=0;
|
| 134 |
+
this.digs=0;//amount of digging steps
|
| 135 |
+
this.stuck=0;//how many times we ran into a problem; stop digging if we get too many of these
|
| 136 |
+
|
| 137 |
+
this.data=[];//fill the map with 0
|
| 138 |
+
for (var x=0;x<this.w;x++)
|
| 139 |
+
{
|
| 140 |
+
this.data[x]=[];
|
| 141 |
+
for (var y=0;y<this.h;y++)
|
| 142 |
+
{
|
| 143 |
+
this.data[x][y]=[TILE_EMPTY,-1,0];//data is stored as [tile system type,room id,tile displayed type] (-1 is no room)
|
| 144 |
+
if (x==0 || y==0 || x==this.w-1 || y==this.h-1) this.data[x][y]=[TILE_LIMIT,-1,0];
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
defaultGenerator(this);
|
| 149 |
+
if (params)
|
| 150 |
+
{
|
| 151 |
+
for (var i in params)
|
| 152 |
+
{
|
| 153 |
+
this[i]=params[i];
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
Math.seedrandom();
|
| 157 |
+
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
this.Map.prototype.getType=function(x,y){return this.data[x][y][0];}
|
| 161 |
+
this.Map.prototype.getRoom=function(x,y){if (this.data[x][y][1]!=-1) return this.rooms[this.data[x][y][1]]; else return -1;}
|
| 162 |
+
this.Map.prototype.getTile=function(x,y){return this.rooms[this.data[x][y][2]];}
|
| 163 |
+
|
| 164 |
+
this.Map.prototype.isWall=function(x,y)
|
| 165 |
+
{
|
| 166 |
+
var n=0;
|
| 167 |
+
for (var i in this.freeWalls){if (this.freeWalls[i][0]==x && this.freeWalls[i][1]==y) return n; else n++;}
|
| 168 |
+
return -1;
|
| 169 |
+
}
|
| 170 |
+
this.Map.prototype.isFloor=function(x,y)
|
| 171 |
+
{
|
| 172 |
+
var n=0;
|
| 173 |
+
for (var i in this.freeTiles){if (this.freeTiles[i][0]==x && this.freeTiles[i][1]==y) return n; else n++;}
|
| 174 |
+
return -1;
|
| 175 |
+
}
|
| 176 |
+
this.Map.prototype.removeFreeTile=function(x,y)
|
| 177 |
+
{
|
| 178 |
+
this.freeTiles.splice(this.isFloor(x,y),1);
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
this.Map.prototype.fill=function(what)
|
| 182 |
+
{
|
| 183 |
+
//fill with something (either a set value, or a function that takes the map, a position X and a position Y as arguments)
|
| 184 |
+
//NOTE : this also resets the rooms!
|
| 185 |
+
//example : MyMap.fill(function(m,x,y){return Math.floor((Math.random());});
|
| 186 |
+
//...will fill the map with 0s and 1s
|
| 187 |
+
var func=0;
|
| 188 |
+
if (typeof(what)=='function') func=1;
|
| 189 |
+
for (var x=0;x<this.w;x++){for (var y=0;y<this.h;y++){
|
| 190 |
+
if (func) this.data[x][y]=[what(this,x,y),-1,0]; else this.data[x][y]=[what,-1,0];
|
| 191 |
+
}}
|
| 192 |
+
this.rooms=[];
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
this.Map.prototype.fillZone=function(X,Y,W,H,what)
|
| 196 |
+
{
|
| 197 |
+
//just plain fill a rectangle
|
| 198 |
+
for (var x=X;x<X+W;x++){for (var y=Y;y<Y+H;y++){
|
| 199 |
+
this.data[x][y][0]=what;
|
| 200 |
+
}}
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
this.Map.prototype.getRoomTile=function(room,x,y)
|
| 204 |
+
{
|
| 205 |
+
var n=0;
|
| 206 |
+
for (var i in room.tiles) {if (room.tiles[i].x==x && room.tiles[i].y==y) return n; else n++;}
|
| 207 |
+
return -1;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
this.Map.prototype.getFloorTileInRoom=function(room)
|
| 211 |
+
{
|
| 212 |
+
var tiles=[];
|
| 213 |
+
for (var i in room.tiles) {if (room.tiles[i].type==TILE_FLOOR_EDGE || room.tiles[i].type==TILE_FLOOR_CENTER) tiles.push(room.tiles[i]);}
|
| 214 |
+
return choose(tiles);
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
this.Map.prototype.canPlaceRoom=function(rx,ry,rw,rh)
|
| 218 |
+
{
|
| 219 |
+
if (rx<2 || ry<2 || rx+rw>=this.w-1 || ry+rh>=this.h-1) return false;
|
| 220 |
+
for (var x=rx;x<rx+rw;x++)
|
| 221 |
+
{
|
| 222 |
+
for (var y=ry;y<ry+rh;y++)
|
| 223 |
+
{
|
| 224 |
+
var tile=this.getType(x,y);
|
| 225 |
+
var room=this.getRoom(x,y);
|
| 226 |
+
if (tile==TILE_LIMIT) return false;
|
| 227 |
+
if (room!=-1) return false;
|
| 228 |
+
}
|
| 229 |
+
}
|
| 230 |
+
return true;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
this.Map.prototype.setRoomTile=function(room,x,y,tile)
|
| 234 |
+
{
|
| 235 |
+
//var mapTile=this.getType(x,y);
|
| 236 |
+
var oldTile=this.getRoomTile(room,x,y);
|
| 237 |
+
var oldTileType=oldTile!=-1?room.tiles[oldTile].type:-1;
|
| 238 |
+
if (oldTile!=-1 && (
|
| 239 |
+
//(tile!=TILE_FLOOR_EDGE && tile!=TILE_FLOOR_CENTER) ||// && (oldTileType!=TILE_FLOOR_EDGE && oldTileType!=TILE_FLOOR_CENTER)) ||
|
| 240 |
+
//(tile!=TILE_FLOOR_EDGE && tile!=TILE_FLOOR_CENTER && (oldTileType!=TILE_FLOOR_EDGE && oldTileType!=TILE_FLOOR_CENTER)) ||
|
| 241 |
+
(tile==TILE_WALL || tile==TILE_WALL_CORNER) ||//don't place a wall over an existing room
|
| 242 |
+
(tile==TILE_FLOOR_EDGE && oldTileType==TILE_FLOOR_CENTER)//don't place an edge floor over a center floor
|
| 243 |
+
)) {return false;}
|
| 244 |
+
else
|
| 245 |
+
{
|
| 246 |
+
if (oldTile!=-1) room.tiles.splice(oldTile,1);
|
| 247 |
+
room.tiles.push({x:x,y:y,type:tile,score:0});
|
| 248 |
+
if ((tile==TILE_FLOOR_EDGE || tile==TILE_FLOOR_CENTER) && (oldTileType!=TILE_FLOOR_EDGE && oldTileType!=TILE_FLOOR_CENTER)) room.freeTiles++;
|
| 249 |
+
else if (tile!=TILE_FLOOR_EDGE && tile!=TILE_FLOOR_CENTER && (oldTileType==TILE_FLOOR_EDGE || oldTileType==TILE_FLOOR_CENTER)) room.freeTiles--;
|
| 250 |
+
return true;
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
this.Map.prototype.expandRoom=function(room,rx,ry,rw,rh)
|
| 255 |
+
{
|
| 256 |
+
var x=0;var y=0;
|
| 257 |
+
//floor
|
| 258 |
+
for (var x=rx;x<rx+rw;x++){for (var y=ry;y<ry+rh;y++){
|
| 259 |
+
this.setRoomTile(room,x,y,TILE_FLOOR_EDGE);
|
| 260 |
+
}}
|
| 261 |
+
for (var x=rx+1;x<rx+rw-1;x++){for (var y=ry+1;y<ry+rh-1;y++){
|
| 262 |
+
this.setRoomTile(room,x,y,TILE_FLOOR_CENTER);
|
| 263 |
+
}}
|
| 264 |
+
//walls
|
| 265 |
+
y=ry-1;
|
| 266 |
+
for (var x=rx;x<rx+rw;x++){
|
| 267 |
+
this.setRoomTile(room,x,y,TILE_WALL);
|
| 268 |
+
}
|
| 269 |
+
y=ry+rh;
|
| 270 |
+
for (var x=rx;x<rx+rw;x++){
|
| 271 |
+
this.setRoomTile(room,x,y,TILE_WALL);
|
| 272 |
+
}
|
| 273 |
+
x=rx-1;
|
| 274 |
+
for (var y=ry;y<ry+rh;y++){
|
| 275 |
+
this.setRoomTile(room,x,y,TILE_WALL);
|
| 276 |
+
}
|
| 277 |
+
x=rx+rw;
|
| 278 |
+
for (var y=ry;y<ry+rh;y++){
|
| 279 |
+
this.setRoomTile(room,x,y,TILE_WALL);
|
| 280 |
+
}
|
| 281 |
+
//corners
|
| 282 |
+
x=rx-1;y=ry-1;
|
| 283 |
+
this.setRoomTile(room,x,y,TILE_WALL_CORNER);
|
| 284 |
+
x=rx+rw;y=ry-1;
|
| 285 |
+
this.setRoomTile(room,x,y,TILE_WALL_CORNER);
|
| 286 |
+
x=rx-1;y=ry+rh;
|
| 287 |
+
this.setRoomTile(room,x,y,TILE_WALL_CORNER);
|
| 288 |
+
x=rx+rw;y=ry+rh;
|
| 289 |
+
this.setRoomTile(room,x,y,TILE_WALL_CORNER);
|
| 290 |
+
|
| 291 |
+
//decoration
|
| 292 |
+
var water=Math.random()<this.waterRatio?1:0;
|
| 293 |
+
var pattern=Math.random()<this.pillarRatio?getRandomPattern():0;
|
| 294 |
+
for (var x=rx;x<rx+rw;x++){for (var y=ry;y<ry+rh;y++){
|
| 295 |
+
if (room.tiles[this.getRoomTile(room,x,y)].type==TILE_FLOOR_CENTER)
|
| 296 |
+
{
|
| 297 |
+
var tile=0;
|
| 298 |
+
if (water!=0) tile=TILE_WATER;
|
| 299 |
+
if (pattern!=0)
|
| 300 |
+
{
|
| 301 |
+
tile=pattern.func(x,y,room)||tile;
|
| 302 |
+
}
|
| 303 |
+
if (tile!=0) this.setRoomTile(room,x,y,tile);
|
| 304 |
+
}
|
| 305 |
+
}}
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
this.Map.prototype.newRoom=function(x,y,w,h,parent)
|
| 309 |
+
{
|
| 310 |
+
//create a new abstract room, ready to be carved
|
| 311 |
+
var room={};
|
| 312 |
+
room.id=this.rooms.length;
|
| 313 |
+
room.w=w;//||rand(2,this.roomSize);
|
| 314 |
+
room.h=h;//||rand(2,this.roomSize);
|
| 315 |
+
room.x=x||rand(1,this.w-room.w-1);
|
| 316 |
+
room.y=y||rand(1,this.h-room.h-1);
|
| 317 |
+
room.tiles=[];
|
| 318 |
+
room.freeTiles=0;
|
| 319 |
+
room.parent=parent?parent:-1;
|
| 320 |
+
room.children=[];
|
| 321 |
+
room.gen=0;
|
| 322 |
+
room.door=0;
|
| 323 |
+
room.corridor=Math.random()<this.corridorRatio?1:0;
|
| 324 |
+
room.hidden=this.roomsAreHidden;//if 1, don't draw
|
| 325 |
+
//if (room.parent!=-1) room.corridor=!room.parent.corridor;//alternate rooms and corridors
|
| 326 |
+
|
| 327 |
+
return room;
|
| 328 |
+
}
|
| 329 |
+
this.Map.prototype.planRoom=function(room)
|
| 330 |
+
{
|
| 331 |
+
var branches=this.branching+1;
|
| 332 |
+
var forcedExpansions=[];
|
| 333 |
+
var w=room.w;
|
| 334 |
+
var h=room.h;
|
| 335 |
+
while (w>0 && h>0)
|
| 336 |
+
{
|
| 337 |
+
if (w>0) {forcedExpansions.push(1,3);w--;}
|
| 338 |
+
if (h>0) {forcedExpansions.push(2,4);h--;}
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
for (var i=0;i<branches;i++)
|
| 342 |
+
{
|
| 343 |
+
var steps=0;
|
| 344 |
+
var expansions=[];
|
| 345 |
+
if (!room.corridor)
|
| 346 |
+
{
|
| 347 |
+
expansions=[1,2,3,4];
|
| 348 |
+
steps=this.roomSize;
|
| 349 |
+
}
|
| 350 |
+
else
|
| 351 |
+
{
|
| 352 |
+
expansions=choose([[1,3],[2,4]]);
|
| 353 |
+
steps=this.corridorSize;
|
| 354 |
+
}
|
| 355 |
+
steps=Math.max(room.w+room.h,Math.ceil(steps*(1-Math.random()*this.sizeVariance)));
|
| 356 |
+
if (room.tiles.length==0) {var rx=room.x;var ry=room.y;var rw=1;var rh=1;}
|
| 357 |
+
else {var randomTile=this.getFloorTileInRoom(room);var rx=randomTile.x;var ry=randomTile.y;var rw=1;var rh=1;}
|
| 358 |
+
for (var ii=0;ii<steps;ii++)
|
| 359 |
+
{
|
| 360 |
+
if (expansions.length==0) break;
|
| 361 |
+
var xd=0;var yd=0;var wd=0;var hd=0;
|
| 362 |
+
var side=choose(expansions);
|
| 363 |
+
if (forcedExpansions.length>0) side=forcedExpansions[0];
|
| 364 |
+
if (side==1) {xd=-1;wd=1;}
|
| 365 |
+
else if (side==2) {yd=-1;hd=1;}
|
| 366 |
+
else if (side==3) {wd=1;}
|
| 367 |
+
else if (side==4) {hd=1;}
|
| 368 |
+
if (this.canPlaceRoom(rx+xd,ry+yd,rw+wd,rh+hd)) {rx+=xd;ry+=yd;rw+=wd;rh+=hd;} else expansions.splice(expansions.indexOf(side),1);
|
| 369 |
+
if (forcedExpansions.length>0) forcedExpansions.splice(0,1);
|
| 370 |
+
}
|
| 371 |
+
if (rw>1 || rh>1)
|
| 372 |
+
{
|
| 373 |
+
this.expandRoom(room,rx,ry,rw,rh);
|
| 374 |
+
}
|
| 375 |
+
}
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
this.Map.prototype.carve=function(room)
|
| 380 |
+
{
|
| 381 |
+
//carve a room into the map
|
| 382 |
+
for (var i in room.tiles)
|
| 383 |
+
{
|
| 384 |
+
var thisTile=room.tiles[i];
|
| 385 |
+
var x=thisTile.x;var y=thisTile.y;
|
| 386 |
+
var myType=this.data[x][y][0];
|
| 387 |
+
var type=thisTile.type;
|
| 388 |
+
|
| 389 |
+
if ((type==TILE_WALL || type==TILE_WALL_CORNER) && this.isWall(x,y)!=-1) {this.freeWalls.splice(this.isWall(x,y),1);}
|
| 390 |
+
|
| 391 |
+
if (this.data[x][y][1]!=-1 && (type==TILE_WALL || type==TILE_WALL_CORNER)) {}
|
| 392 |
+
else
|
| 393 |
+
{
|
| 394 |
+
if (this.data[x][y][1]==-1) this.tilesDug++;
|
| 395 |
+
this.data[x][y]=[thisTile.type,room.id,0];
|
| 396 |
+
if (x>1 && y>1 && x<this.w-2 && y<this.h-2 && type==TILE_WALL) this.freeWalls.push([x,y]);
|
| 397 |
+
if (type==TILE_FLOOR_EDGE || type==TILE_FLOOR_CENTER) this.freeTiles.push([x,y]);
|
| 398 |
+
}
|
| 399 |
+
var pos=[x,y];
|
| 400 |
+
}
|
| 401 |
+
this.rooms[room.id]=room;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
this.Map.prototype.newRandomRoom=function(params)
|
| 405 |
+
{
|
| 406 |
+
var success=1;
|
| 407 |
+
params=params||{};//params is an object such as {corridor:1}
|
| 408 |
+
var door=choose(this.freeWalls);//select a free wall to use as a door
|
| 409 |
+
if (!door) {success=0;}
|
| 410 |
+
else
|
| 411 |
+
{
|
| 412 |
+
//this.data[door[0]][door[1]][0]=TILE_LIMIT;//not door
|
| 413 |
+
var parentRoom=this.getRoom(door[0],door[1]);
|
| 414 |
+
var sides=[];//select a free side of that door
|
| 415 |
+
if (this.getType(door[0]-1,door[1])==TILE_EMPTY) sides.push([-1,0]);
|
| 416 |
+
if (this.getType(door[0]+1,door[1])==TILE_EMPTY) sides.push([1,0]);
|
| 417 |
+
if (this.getType(door[0],door[1]-1)==TILE_EMPTY) sides.push([0,-1]);
|
| 418 |
+
if (this.getType(door[0],door[1]+1)==TILE_EMPTY) sides.push([0,1]);
|
| 419 |
+
var side=choose(sides);
|
| 420 |
+
if (!side) {success=0;this.freeWalls.splice(this.isWall(door[0],door[1]),1);}
|
| 421 |
+
else
|
| 422 |
+
{
|
| 423 |
+
var room=this.newRoom(door[0]+side[0],door[1]+side[1],0,0,parentRoom);//try a new room from this spot
|
| 424 |
+
for (var i in params)
|
| 425 |
+
{
|
| 426 |
+
room[i]=params[i];
|
| 427 |
+
}
|
| 428 |
+
this.planRoom(room);
|
| 429 |
+
if (room.tiles.length>0 && room.freeTiles>0)//we got a decent room
|
| 430 |
+
{
|
| 431 |
+
this.carve(room);
|
| 432 |
+
this.data[door[0]][door[1]][0]=TILE_DOOR;//place door
|
| 433 |
+
room.door=[door[0],door[1]];
|
| 434 |
+
this.data[door[0]][door[1]][1]=room.id;//set ID
|
| 435 |
+
this.freeWalls.splice(this.isWall(door[0],door[1]),1);//the door isn't a wall anymore
|
| 436 |
+
this.doors.push([door[0],door[1],room]);
|
| 437 |
+
//remove free tiles on either side of the door
|
| 438 |
+
if (this.isFloor(door[0]+side[0],door[1]+side[1])!=-1) this.removeFreeTile(door[0]+side[0],door[1]+side[1]);
|
| 439 |
+
if (this.isFloor(door[0]-side[0],door[1]-side[1])!=-1) this.removeFreeTile(door[0]-side[0],door[1]-side[1]);
|
| 440 |
+
room.parent=parentRoom;
|
| 441 |
+
parentRoom.children.push(room);
|
| 442 |
+
room.gen=parentRoom.gen+1;
|
| 443 |
+
}
|
| 444 |
+
else//not a good spot; remove this tile from the list of walls
|
| 445 |
+
{
|
| 446 |
+
this.freeWalls.splice(this.isWall(door[0],door[1]),1);
|
| 447 |
+
success=0;
|
| 448 |
+
}
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
if (success) return room;
|
| 452 |
+
else return 0;
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
this.Map.prototype.getRandomSpotInRoom=function(room)
|
| 456 |
+
{
|
| 457 |
+
var listOfTiles=[];
|
| 458 |
+
for (var i in room.tiles)
|
| 459 |
+
{
|
| 460 |
+
if ((room.tiles[i].type==TILE_FLOOR_EDGE || room.tiles[i].type==TILE_FLOOR_CENTER) && this.isFloor(room.tiles[i].x,room.tiles[i].y)!=-1)
|
| 461 |
+
{
|
| 462 |
+
listOfTiles.push(room.tiles[i]);
|
| 463 |
+
}
|
| 464 |
+
}
|
| 465 |
+
if (listOfTiles.length==0) return -1;
|
| 466 |
+
return choose(listOfTiles);
|
| 467 |
+
}
|
| 468 |
+
this.Map.prototype.getBestSpotInRoom=function(room)
|
| 469 |
+
{
|
| 470 |
+
var highest=-1;
|
| 471 |
+
var listOfHighest=[];
|
| 472 |
+
for (var i in room.tiles)
|
| 473 |
+
{
|
| 474 |
+
if ((room.tiles[i].type==TILE_FLOOR_EDGE || room.tiles[i].type==TILE_FLOOR_CENTER) && this.isFloor(room.tiles[i].x,room.tiles[i].y)!=-1)
|
| 475 |
+
{
|
| 476 |
+
if (room.tiles[i].score>highest)
|
| 477 |
+
{
|
| 478 |
+
listOfHighest=[];
|
| 479 |
+
highest=room.tiles[i].score;
|
| 480 |
+
listOfHighest.push(room.tiles[i]);
|
| 481 |
+
}
|
| 482 |
+
else if (room.tiles[i].score==highest)
|
| 483 |
+
{
|
| 484 |
+
listOfHighest.push(room.tiles[i]);
|
| 485 |
+
}
|
| 486 |
+
}
|
| 487 |
+
}
|
| 488 |
+
if (listOfHighest.length==0) return -1;
|
| 489 |
+
return choose(listOfHighest);
|
| 490 |
+
}
|
| 491 |
+
this.Map.prototype.getEarliestRoom=function()
|
| 492 |
+
{
|
| 493 |
+
return this.rooms[0];
|
| 494 |
+
}
|
| 495 |
+
this.Map.prototype.getDeepestRoom=function()
|
| 496 |
+
{
|
| 497 |
+
var deepest=0;
|
| 498 |
+
var deepestRoom=this.rooms[0];
|
| 499 |
+
for (var i in this.rooms)
|
| 500 |
+
{
|
| 501 |
+
if ((this.rooms[i].gen+Math.sqrt(this.rooms[i].freeTiles)*0.05)>=deepest && this.rooms[i].corridor==0 && this.rooms[i].freeTiles>4) {deepest=(this.rooms[i].gen+Math.sqrt(this.rooms[i].freeTiles)*0.05);deepestRoom=this.rooms[i];}
|
| 502 |
+
}
|
| 503 |
+
return deepestRoom;
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
this.Map.prototype.dig=function()
|
| 507 |
+
{
|
| 508 |
+
//one step in which we try to carve new stuff
|
| 509 |
+
//returns 0 when we couldn't dig this step, 1 when we could, and 2 when the digging is complete
|
| 510 |
+
Math.random=this.seedState;
|
| 511 |
+
|
| 512 |
+
var badDig=0;
|
| 513 |
+
|
| 514 |
+
if (this.digs==0)//first dig : build a starting room in the middle of the map
|
| 515 |
+
{
|
| 516 |
+
var w=rand(3,7);
|
| 517 |
+
var h=rand(3,7);
|
| 518 |
+
var room=this.newRoom(Math.floor(this.w/2-w/2),Math.floor(this.h/2-h/2),w,h);
|
| 519 |
+
room.corridor=0;
|
| 520 |
+
this.planRoom(room);
|
| 521 |
+
this.carve(room);
|
| 522 |
+
}
|
| 523 |
+
else
|
| 524 |
+
{
|
| 525 |
+
if (this.newRandomRoom()==0) badDig++;
|
| 526 |
+
}
|
| 527 |
+
if (badDig>0) this.stuck++;
|
| 528 |
+
|
| 529 |
+
this.digs++;
|
| 530 |
+
|
| 531 |
+
var finished=0;
|
| 532 |
+
if (this.tilesDug>=this.tiles*this.fillRatio) finished=1;
|
| 533 |
+
if (this.stuck>100) finished=1;
|
| 534 |
+
|
| 535 |
+
if (finished==1)//last touch : try to add a whole room at the end
|
| 536 |
+
{
|
| 537 |
+
for (var i=0;i<10;i++)
|
| 538 |
+
{
|
| 539 |
+
var newRoom=this.newRandomRoom({corridor:0,w:rand(3,7),h:rand(3,7)});
|
| 540 |
+
if (newRoom!=0 && newRoom.freeTiles>15) break;
|
| 541 |
+
}
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
Math.seedrandom();
|
| 545 |
+
if (finished==1) return 1; else if (badDig>0) return -1; else return 0;
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
this.Map.prototype.finish=function()
|
| 549 |
+
{
|
| 550 |
+
//touch up the map : add pillars in corners etc
|
| 551 |
+
/*
|
| 552 |
+
//set paths
|
| 553 |
+
for (var i in this.rooms)
|
| 554 |
+
{
|
| 555 |
+
var me=this.rooms[i];
|
| 556 |
+
if (me.door!=0)
|
| 557 |
+
{
|
| 558 |
+
var doors=[];
|
| 559 |
+
doors.push(me.door);
|
| 560 |
+
for (var ii in me.children)
|
| 561 |
+
{
|
| 562 |
+
if (me.children[ii].door!=0) doors.push(me.children[ii].door);
|
| 563 |
+
}
|
| 564 |
+
for (var ii in doors)
|
| 565 |
+
{
|
| 566 |
+
this.data[doors[ii][0]][doors[ii][1]][0]=TILE_LIMIT;
|
| 567 |
+
//ideally we should run agents that step from each door to the next
|
| 568 |
+
}
|
| 569 |
+
}
|
| 570 |
+
}
|
| 571 |
+
*/
|
| 572 |
+
for (var i in this.rooms)
|
| 573 |
+
{
|
| 574 |
+
var pillars=Math.random()<this.pillarRatio;
|
| 575 |
+
for (var ii in this.rooms[i].tiles)
|
| 576 |
+
{
|
| 577 |
+
var x=this.rooms[i].tiles[ii].x;
|
| 578 |
+
var y=this.rooms[i].tiles[ii].y;
|
| 579 |
+
var me=this.data[x][y][0];
|
| 580 |
+
var x1=this.data[x-1][y][0];
|
| 581 |
+
var x2=this.data[x+1][y][0];
|
| 582 |
+
var y1=this.data[x][y-1][0];
|
| 583 |
+
var y2=this.data[x][y+1][0];
|
| 584 |
+
var xy1=this.data[x-1][y-1][0];
|
| 585 |
+
var xy2=this.data[x+1][y-1][0];
|
| 586 |
+
var xy3=this.data[x-1][y+1][0];
|
| 587 |
+
var xy4=this.data[x+1][y+1][0];
|
| 588 |
+
|
| 589 |
+
var walls=0;
|
| 590 |
+
if ((x1==TILE_WALL||x1==TILE_WALL_CORNER)) walls++;
|
| 591 |
+
if ((y1==TILE_WALL||y1==TILE_WALL_CORNER)) walls++;
|
| 592 |
+
if ((x2==TILE_WALL||x2==TILE_WALL_CORNER)) walls++;
|
| 593 |
+
if ((y2==TILE_WALL||y2==TILE_WALL_CORNER)) walls++;
|
| 594 |
+
if ((xy1==TILE_WALL||xy1==TILE_WALL_CORNER)) walls++;
|
| 595 |
+
if ((xy2==TILE_WALL||xy2==TILE_WALL_CORNER)) walls++;
|
| 596 |
+
if ((xy3==TILE_WALL||xy3==TILE_WALL_CORNER)) walls++;
|
| 597 |
+
if ((xy4==TILE_WALL||xy4==TILE_WALL_CORNER)) walls++;
|
| 598 |
+
|
| 599 |
+
var floors=0;
|
| 600 |
+
if ((x1==TILE_FLOOR_CENTER||x1==TILE_FLOOR_EDGE)) floors++;
|
| 601 |
+
if ((y1==TILE_FLOOR_CENTER||y1==TILE_FLOOR_EDGE)) floors++;
|
| 602 |
+
if ((x2==TILE_FLOOR_CENTER||x2==TILE_FLOOR_EDGE)) floors++;
|
| 603 |
+
if ((y2==TILE_FLOOR_CENTER||y2==TILE_FLOOR_EDGE)) floors++;
|
| 604 |
+
if ((xy1==TILE_FLOOR_CENTER||xy1==TILE_FLOOR_EDGE)) floors++;
|
| 605 |
+
if ((xy2==TILE_FLOOR_CENTER||xy2==TILE_FLOOR_EDGE)) floors++;
|
| 606 |
+
if ((xy3==TILE_FLOOR_CENTER||xy3==TILE_FLOOR_EDGE)) floors++;
|
| 607 |
+
if ((xy4==TILE_FLOOR_CENTER||xy4==TILE_FLOOR_EDGE)) floors++;
|
| 608 |
+
|
| 609 |
+
var complete=0;
|
| 610 |
+
if (walls+floors==8) complete=1;
|
| 611 |
+
|
| 612 |
+
var angle=0;
|
| 613 |
+
if (complete)
|
| 614 |
+
{
|
| 615 |
+
var top=0;
|
| 616 |
+
var left=0;
|
| 617 |
+
var right=0;
|
| 618 |
+
var bottom=0;
|
| 619 |
+
if ((xy1==TILE_WALL||xy1==TILE_WALL_CORNER) && (y1==TILE_WALL||y1==TILE_WALL_CORNER) && (xy2==TILE_WALL||xy2==TILE_WALL_CORNER)) top=1;
|
| 620 |
+
else if ((xy1==TILE_FLOOR_CENTER||xy1==TILE_FLOOR_EDGE) && (y1==TILE_FLOOR_CENTER||y1==TILE_FLOOR_EDGE) && (xy2==TILE_FLOOR_CENTER||xy2==TILE_FLOOR_EDGE)) top=-1;
|
| 621 |
+
if ((xy2==TILE_WALL||xy2==TILE_WALL_CORNER) && (x2==TILE_WALL||x2==TILE_WALL_CORNER) && (xy4==TILE_WALL||xy4==TILE_WALL_CORNER)) right=1;
|
| 622 |
+
else if ((xy2==TILE_FLOOR_CENTER||xy2==TILE_FLOOR_EDGE) && (x2==TILE_FLOOR_CENTER||x2==TILE_FLOOR_EDGE) && (xy4==TILE_FLOOR_CENTER||xy4==TILE_FLOOR_EDGE)) right=-1;
|
| 623 |
+
if ((xy1==TILE_WALL||xy1==TILE_WALL_CORNER) && (x1==TILE_WALL||x1==TILE_WALL_CORNER) && (xy3==TILE_WALL||xy3==TILE_WALL_CORNER)) left=1;
|
| 624 |
+
else if ((xy1==TILE_FLOOR_CENTER||xy1==TILE_FLOOR_EDGE) && (x1==TILE_FLOOR_CENTER||x1==TILE_FLOOR_EDGE) && (xy3==TILE_FLOOR_CENTER||xy3==TILE_FLOOR_EDGE)) left=-1;
|
| 625 |
+
if ((xy3==TILE_WALL||xy3==TILE_WALL_CORNER) && (y2==TILE_WALL||y2==TILE_WALL_CORNER) && (xy4==TILE_WALL||xy4==TILE_WALL_CORNER)) bottom=1;
|
| 626 |
+
else if ((xy3==TILE_FLOOR_CENTER||xy3==TILE_FLOOR_EDGE) && (y2==TILE_FLOOR_CENTER||y2==TILE_FLOOR_EDGE) && (xy4==TILE_FLOOR_CENTER||xy4==TILE_FLOOR_EDGE)) bottom=-1;
|
| 627 |
+
if ((top==1 && bottom==-1) || (top==-1 && bottom==1) || (left==1 && right==-1) || (left==-1 && right==1)) angle=1;
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
if (pillars && Math.random()<0.8 && this.rooms[i].freeTiles>4)
|
| 631 |
+
{
|
| 632 |
+
if ((angle==1 || (complete && walls==7)) && me==TILE_FLOOR_EDGE && x1!=TILE_DOOR && x2!=TILE_DOOR && y1!=TILE_DOOR && y2!=TILE_DOOR)
|
| 633 |
+
{
|
| 634 |
+
this.data[x][y][0]=TILE_PILLAR;
|
| 635 |
+
me=TILE_PILLAR;
|
| 636 |
+
this.removeFreeTile(x,y);
|
| 637 |
+
this.rooms[i].freeTiles--;
|
| 638 |
+
}
|
| 639 |
+
}
|
| 640 |
+
|
| 641 |
+
//calculate score (for placing items and exits)
|
| 642 |
+
if (top==1 || bottom==1 || left==1 || right==1)
|
| 643 |
+
{
|
| 644 |
+
this.rooms[i].tiles[ii].score+=2;
|
| 645 |
+
}
|
| 646 |
+
if (walls>5 || floors>5)
|
| 647 |
+
{
|
| 648 |
+
this.rooms[i].tiles[ii].score+=1;
|
| 649 |
+
}
|
| 650 |
+
if (walls==7 || floors==8)
|
| 651 |
+
{
|
| 652 |
+
this.rooms[i].tiles[ii].score+=5;
|
| 653 |
+
}
|
| 654 |
+
if ((me!=TILE_FLOOR_CENTER && me!=TILE_FLOOR_EDGE) || x1==TILE_DOOR || x2==TILE_DOOR || y1==TILE_DOOR || y2==TILE_DOOR) this.rooms[i].tiles[ii].score=-1;
|
| 655 |
+
|
| 656 |
+
}
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
|
| 660 |
+
|
| 661 |
+
//carve entrance and exit
|
| 662 |
+
var entrance=this.getBestSpotInRoom(this.getEarliestRoom());
|
| 663 |
+
this.data[entrance.x][entrance.y][0]=TILE_ENTRANCE;
|
| 664 |
+
this.entrance=[entrance.x,entrance.y];
|
| 665 |
+
entrance.score=0;
|
| 666 |
+
this.removeFreeTile(entrance.x,entrance.y);
|
| 667 |
+
var exit=this.getBestSpotInRoom(this.getDeepestRoom());
|
| 668 |
+
this.data[exit.x][exit.y][0]=TILE_EXIT;
|
| 669 |
+
this.exit=[exit.x,exit.y];
|
| 670 |
+
this.removeFreeTile(exit.x,exit.y);
|
| 671 |
+
exit.score=0;
|
| 672 |
+
|
| 673 |
+
/*
|
| 674 |
+
for (var i in this.doors)//remove door tiles (to add later; replace the tiles by entities that delete themselves when opened)
|
| 675 |
+
{
|
| 676 |
+
this.data[this.doors[i][0]][this.doors[i][1]][0]=TILE_FLOOR_EDGE;
|
| 677 |
+
}
|
| 678 |
+
*/
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
+
this.Map.prototype.isObstacle=function(x,y)
|
| 682 |
+
{
|
| 683 |
+
var free=[TILE_FLOOR_EDGE,TILE_FLOOR_CENTER,TILE_DOOR,TILE_ENTRANCE,TILE_EXIT];
|
| 684 |
+
for (var i in free)
|
| 685 |
+
{
|
| 686 |
+
if (this.data[x][y][0]==free[i]) return 0;
|
| 687 |
+
}
|
| 688 |
+
return 1;
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
var joinTile=function(map,x,y,joinWith)
|
| 692 |
+
{
|
| 693 |
+
//for the tile at x,y, return 2 if it joins with its horizontal neighbors, 3 if it joins with its vertical neighbors, 1 if it joins with either both or neither.
|
| 694 |
+
//joinWith contains the tile types that count as joinable, in addition to this tile. (don't add the tested tile to joinWith!)
|
| 695 |
+
var p=1;
|
| 696 |
+
var me=map.data[x][y][0];
|
| 697 |
+
var x1=map.data[x-1][y][0];
|
| 698 |
+
var x2=map.data[x+1][y][0];
|
| 699 |
+
var y1=map.data[x][y-1][0];
|
| 700 |
+
var y2=map.data[x][y+1][0];
|
| 701 |
+
joinWith.push(me);
|
| 702 |
+
var joinsX=0;
|
| 703 |
+
for (var i in joinWith)
|
| 704 |
+
{
|
| 705 |
+
if (x1==joinWith[i]) joinsX++;
|
| 706 |
+
if (x2==joinWith[i]) joinsX++;
|
| 707 |
+
}
|
| 708 |
+
var joinsY=0;
|
| 709 |
+
for (var i in joinWith)
|
| 710 |
+
{
|
| 711 |
+
if (y1==joinWith[i]) joinsY++;
|
| 712 |
+
if (y2==joinWith[i]) joinsY++;
|
| 713 |
+
}
|
| 714 |
+
if (joinsX==2 && joinsY==2) p=1;
|
| 715 |
+
else if (joinsX==2) p=2;
|
| 716 |
+
else if (joinsY==2) p=3;
|
| 717 |
+
return p;
|
| 718 |
+
}
|
| 719 |
+
this.Map.prototype.getPic=function(x,y)
|
| 720 |
+
{
|
| 721 |
+
//return a position [x,y] in the tiles (as 0, 1, 2...) for the tile on the map at position x,y
|
| 722 |
+
if (Tiles[this.data[x][y][2]])
|
| 723 |
+
{
|
| 724 |
+
if (Tiles[this.data[x][y][2]].joinType=='join')
|
| 725 |
+
{
|
| 726 |
+
var thisPic=Tiles[this.data[x][y][2]].pic;
|
| 727 |
+
thisPic=[thisPic[0],thisPic[1]];//why is this even necessary?
|
| 728 |
+
var joinWith=[];
|
| 729 |
+
if (this.data[x][y][0]==TILE_WALL) joinWith.push(TILE_WALL_CORNER);
|
| 730 |
+
else if (this.data[x][y][0]==TILE_DOOR) joinWith.push(TILE_WALL,TILE_WALL_CORNER);
|
| 731 |
+
thisPic[0]+=joinTile(this,x,y,joinWith)-1;
|
| 732 |
+
return thisPic;
|
| 733 |
+
}
|
| 734 |
+
else if (Tiles[this.data[x][y][2]].joinType=='random3')
|
| 735 |
+
{
|
| 736 |
+
var thisPic=Tiles[this.data[x][y][2]].pic;
|
| 737 |
+
thisPic=[thisPic[0],thisPic[1]];
|
| 738 |
+
thisPic[0]+=Math.floor(Math.random()*3);
|
| 739 |
+
return thisPic;
|
| 740 |
+
}
|
| 741 |
+
return Tiles[this.data[x][y][2]].pic;
|
| 742 |
+
}
|
| 743 |
+
return [0,0];
|
| 744 |
+
}
|
| 745 |
+
|
| 746 |
+
var Tiles=[];
|
| 747 |
+
var TilesByName=[];
|
| 748 |
+
this.Tile=function(name,pic,joinType)
|
| 749 |
+
{
|
| 750 |
+
this.name=name;
|
| 751 |
+
this.pic=pic;
|
| 752 |
+
this.joinType=joinType||'none';
|
| 753 |
+
this.id=Tiles.length;
|
| 754 |
+
Tiles[this.id]=this;
|
| 755 |
+
TilesByName[this.name]=this;
|
| 756 |
+
}
|
| 757 |
+
new this.Tile('void',[0,0]);
|
| 758 |
+
this.loadTiles=function(tiles)
|
| 759 |
+
{
|
| 760 |
+
for (var i in tiles)
|
| 761 |
+
{
|
| 762 |
+
var name=tiles[i][0];
|
| 763 |
+
var pic=tiles[i][1];
|
| 764 |
+
var joinType=tiles[i][2];
|
| 765 |
+
new this.Tile(name,pic,joinType);
|
| 766 |
+
}
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
var computeTile=function(tile,tiles,value,name)
|
| 770 |
+
{
|
| 771 |
+
if (tile==value && tiles[name]) return TilesByName[tiles[name]];
|
| 772 |
+
return 0;
|
| 773 |
+
}
|
| 774 |
+
this.Map.prototype.assignTiles=function(room,tiles)
|
| 775 |
+
{
|
| 776 |
+
//set the displayed tiles for this room
|
| 777 |
+
for (var i in room.tiles)
|
| 778 |
+
{
|
| 779 |
+
var type=Tiles[0];
|
| 780 |
+
var me=room.tiles[i];
|
| 781 |
+
var tile=this.data[me.x][me.y][0];
|
| 782 |
+
type=computeTile(tile,tiles,TILE_WALL_CORNER,'wall corner')||type;
|
| 783 |
+
type=computeTile(tile,tiles,TILE_WALL,'wall')||type;
|
| 784 |
+
type=computeTile(tile,tiles,TILE_FLOOR_EDGE,'floor edges')||type;
|
| 785 |
+
type=computeTile(tile,tiles,TILE_FLOOR_CENTER,'floor')||type;
|
| 786 |
+
type=computeTile(tile,tiles,TILE_PILLAR,'pillar')||type;
|
| 787 |
+
type=computeTile(tile,tiles,TILE_DOOR,'door')||type;
|
| 788 |
+
type=computeTile(tile,tiles,TILE_WATER,'water')||type;
|
| 789 |
+
type=computeTile(tile,tiles,TILE_ENTRANCE,'entrance')||type;
|
| 790 |
+
type=computeTile(tile,tiles,TILE_EXIT,'exit')||type;
|
| 791 |
+
|
| 792 |
+
this.data[me.x][me.y][2]=type.id;
|
| 793 |
+
}
|
| 794 |
+
}
|
| 795 |
+
|
| 796 |
+
|
| 797 |
+
this.Map.prototype.draw=function(size)
|
| 798 |
+
{
|
| 799 |
+
//return a string containing a rough visual representation of the map
|
| 800 |
+
var str='';
|
| 801 |
+
var size=size||10;
|
| 802 |
+
for (var y=0;y<this.h;y++){for (var x=0;x<this.w;x++){
|
| 803 |
+
var text='';
|
| 804 |
+
if (this.isFloor(x,y)!=-1) text='o';
|
| 805 |
+
if (this.isWall(x,y)!=-1) text+='x';
|
| 806 |
+
var room=this.getRoom(x,y);
|
| 807 |
+
var opacity=Math.max(0.1,1-(this.getRoom(x,y).gen/10));
|
| 808 |
+
var title=room.freeTiles;//this.data[x][y][0].toString();
|
| 809 |
+
text='';
|
| 810 |
+
str+='<div style="opacity:'+opacity+';width:'+size+'px;height:'+size+'px;position:absolute;left:'+(x*size)+'px;top:'+(y*size)+'px;display:block;padding:0px;margin:0px;background:#'+colors[this.data[x][y][0]]+';color:#999;" title="'+title+'">'+text+'</div>';
|
| 811 |
+
}
|
| 812 |
+
str+='<br>';
|
| 813 |
+
}
|
| 814 |
+
str='<div style="position:relative;width:'+(this.w*size)+'px;height:'+(this.h*size)+'px;background:#000;font-family:Courier;font-size:'+size+'px;float:left;margin:10px;">'+str+'</div>';
|
| 815 |
+
return str;
|
| 816 |
+
}
|
| 817 |
+
|
| 818 |
+
this.Map.prototype.drawDetailed=function()
|
| 819 |
+
{
|
| 820 |
+
//return a string containing a rough visual representation of the map (with graphics)
|
| 821 |
+
var str='';
|
| 822 |
+
var size=16;
|
| 823 |
+
for (var y=0;y<this.h;y++){for (var x=0;x<this.w;x++){
|
| 824 |
+
var room=this.getRoom(x,y);
|
| 825 |
+
//var opacity=Math.max(0.1,room.tiles[this.getRoomTile(room,x,y)].score);
|
| 826 |
+
var opacity=1;
|
| 827 |
+
var title='void';
|
| 828 |
+
if (room!=-1)
|
| 829 |
+
{
|
| 830 |
+
opacity=Math.max(0.1,1-room.gen/5);
|
| 831 |
+
if (this.data[x][y][0]==TILE_ENTRANCE || this.data[x][y][0]==TILE_EXIT) opacity=1;
|
| 832 |
+
title=(room.corridor?'corridor':'room')+' '+room.id+' | depth : '+room.gen+' | children : '+room.children.length;
|
| 833 |
+
}
|
| 834 |
+
var pic=this.getPic(x,y);
|
| 835 |
+
str+='<div style="opacity:'+opacity+';width:'+size+'px;height:'+size+'px;position:absolute;left:'+(x*size)+'px;top:'+(y*size)+'px;display:block;padding:0px;margin:0px;background:#'+colors[this.data[x][y][0]]+' url(img/dungeonTiles.png) '+(-pic[0]*16)+'px '+(-pic[1]*16)+'px;color:#999;" title="'+title+'"></div>';
|
| 836 |
+
}
|
| 837 |
+
str+='<br>';
|
| 838 |
+
}
|
| 839 |
+
str='<div style="box-shadow:0px 0px 12px 6px #00061b;position:relative;width:'+(this.w*size)+'px;height:'+(this.h*size)+'px;background:#00061b;font-family:Courier;font-size:'+size+'px;float:left;margin:10px;">'+str+'</div>';
|
| 840 |
+
return str;
|
| 841 |
+
}
|
| 842 |
+
|
| 843 |
+
this.Map.prototype.getStr=function()
|
| 844 |
+
{
|
| 845 |
+
//return a string containing the map with tile graphics, ready to be pasted in a wrapper
|
| 846 |
+
var str='';
|
| 847 |
+
var size=16;
|
| 848 |
+
for (var y=0;y<this.h;y++){for (var x=0;x<this.w;x++){
|
| 849 |
+
var room=this.getRoom(x,y);
|
| 850 |
+
//var opacity=Math.max(0.1,room.tiles[this.getRoomTile(room,x,y)].score);
|
| 851 |
+
var opacity=1;
|
| 852 |
+
var title='void';
|
| 853 |
+
var pic=this.getPic(x,y);
|
| 854 |
+
if (room!=-1)
|
| 855 |
+
{
|
| 856 |
+
/*
|
| 857 |
+
opacity=Math.max(0.1,1-room.gen/5);
|
| 858 |
+
if (room.hidden) opacity=0;
|
| 859 |
+
if (this.data[x][y][0]==TILE_ENTRANCE || this.data[x][y][0]==TILE_EXIT) opacity=1;
|
| 860 |
+
*/
|
| 861 |
+
if (room.hidden) pic=[0,0];
|
| 862 |
+
title=(room.corridor?'corridor':'room')+' '+room.id+' | depth : '+room.gen+' | children : '+room.children.length;
|
| 863 |
+
}
|
| 864 |
+
str+='<div style="opacity:'+opacity+';width:'+size+'px;height:'+size+'px;position:absolute;left:'+(x*size)+'px;top:'+(y*size)+'px;display:block;padding:0px;margin:0px;background:#'+colors[this.data[x][y][0]]+' url(img/dungeonTiles.png) '+(-pic[0]*16)+'px '+(-pic[1]*16)+'px;color:#999;" title="'+title+'"></div>';
|
| 865 |
+
}
|
| 866 |
+
str+='<br>';
|
| 867 |
+
}
|
| 868 |
+
return str;
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
}
|
static/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# cookieclicker
|
| 2 |
+
|
| 3 |
+
<img src="img/perfectCookie.png" width="128">
|
| 4 |
+
|
| 5 |
+
The original game can be found at http://orteil.dashnet.org/cookieclicker/
|
| 6 |
+
|
| 7 |
+
This mirror for, errrr, like, educational purpose, either to download for your own offline education or to be played online from http://ozh.github.io/cookieclicker/ if you cannot "educate" yourself on the original URL
|
| 8 |
+
|
| 9 |
+
### How to update
|
| 10 |
+
|
| 11 |
+
If the original game updates, here is how you can update the mirror:
|
| 12 |
+
|
| 13 |
+
#### 1. Fetch all new images :
|
| 14 |
+
|
| 15 |
+
From the root,
|
| 16 |
+
|
| 17 |
+
* `cd img/`
|
| 18 |
+
* `wget --convert-links -O index.html http://orteil.dashnet.org/cookieclicker/img/`
|
| 19 |
+
* `grep -v PARENTDIR index.html | grep '\[IMG' | grep -Po 'a href="\K.*?(?=")' | sed 's/\?.*//' > _imglist.txt`
|
| 20 |
+
* `wget -N -i _imglist.txt -B http://orteil.dashnet.org/cookieclicker/img/`
|
| 21 |
+
|
| 22 |
+
#### 2. Fetch all new sounds :
|
| 23 |
+
|
| 24 |
+
Similarly, from the root :
|
| 25 |
+
|
| 26 |
+
* `cd snd/`
|
| 27 |
+
* `wget --convert-links -O index.html http://orteil.dashnet.org/cookieclicker/snd/`
|
| 28 |
+
* `grep -v PARENTDIR index.html | grep '\[SND' | grep -Po 'a href="\K.*?(?=")' | sed 's/\?.*//' > _sndlist.txt`
|
| 29 |
+
* `wget -N -i _sndlist.txt -B http://orteil.dashnet.org/cookieclicker/snd/`
|
| 30 |
+
|
| 31 |
+
#### 3. Fetch all new translations :
|
| 32 |
+
|
| 33 |
+
Similarly, from the root :
|
| 34 |
+
|
| 35 |
+
* `cd loc/`
|
| 36 |
+
* `wget --convert-links -O index.html http://orteil.dashnet.org/cookieclicker/loc/`
|
| 37 |
+
* `grep -v PARENTDIR index.html | grep '\[ ' | grep -Po 'a href="\K.*?(?=")' | sed 's/\?.*//' > _loclist.txt`
|
| 38 |
+
* `wget -N -i _loclist.txt -B http://orteil.dashnet.org/cookieclicker/loc/`
|
| 39 |
+
|
| 40 |
+
#### 4. Update `js` and `html` files :
|
| 41 |
+
|
| 42 |
+
From the root directory :
|
| 43 |
+
|
| 44 |
+
* Fetch the updated `index.html` file: `wget -O index.html http://orteil.dashnet.org/cookieclicker/`
|
| 45 |
+
* Fetch the updated `style.css` file: `wget -O style.css http://orteil.dashnet.org/cookieclicker/style.css`
|
| 46 |
+
* Fetch updated `js` files : `wget -N -i _jslist.txt -B http://orteil.dashnet.org/cookieclicker/`
|
| 47 |
+
* Scan `index.html` for any new `<script src` and also `main.js` for any new local javascript (eg `Game.last.minigameUrl`). If there are new scripts, update the `_jslist.txt` accordingly.
|
| 48 |
+
* In `main.js` there is a call to a remote script we need to modify:
|
| 49 |
+
* Look for `ajax('/patreon/grab.php'` and replace it with `ajax('grab.txt'`
|
| 50 |
+
* In the root: `wget -O grab.txt http://orteil.dashnet.org/patreon/grab.php`
|
| 51 |
+
|
| 52 |
+
#### 5. Report update here :)
|
| 53 |
+
|
| 54 |
+
If you happen to update, please make a pull request for others to benefit, thanks!
|
static/_jslist.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ajax.js
|
| 2 |
+
showads.js
|
| 3 |
+
base64.js
|
| 4 |
+
DungeonGen.js
|
| 5 |
+
dungeons.js
|
| 6 |
+
excanvas.compiled.js
|
| 7 |
+
main.js
|
| 8 |
+
minigameGarden.js
|
| 9 |
+
minigameGrimoire.js
|
| 10 |
+
minigamePantheon.js
|
| 11 |
+
minigameMarket.js
|
static/ajax.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
function ajax(url,callback){
|
| 2 |
+
var ajaxRequest;
|
| 3 |
+
try{ajaxRequest = new XMLHttpRequest();} catch (e){try{ajaxRequest=new ActiveXObject('Msxml2.XMLHTTP');} catch (e) {try{ajaxRequest=new ActiveXObject('Microsoft.XMLHTTP');} catch (e){alert("Something broke!");return false;}}}
|
| 4 |
+
if (callback){ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){callback(ajaxRequest.responseText);}}}
|
| 5 |
+
ajaxRequest.open('GET',url+'&nocache='+(new Date().getTime()),true);ajaxRequest.send(null);
|
| 6 |
+
}
|
static/base64.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
*
|
| 3 |
+
* Base64 encode / decode
|
| 4 |
+
* http://www.webtoolkit.info/
|
| 5 |
+
*
|
| 6 |
+
**/
|
| 7 |
+
|
| 8 |
+
var Base64 = {
|
| 9 |
+
|
| 10 |
+
// private property
|
| 11 |
+
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
| 12 |
+
|
| 13 |
+
// public method for encoding
|
| 14 |
+
encode : function (input) {
|
| 15 |
+
var output = "";
|
| 16 |
+
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
| 17 |
+
var i = 0;
|
| 18 |
+
|
| 19 |
+
input = Base64._utf8_encode(input);
|
| 20 |
+
|
| 21 |
+
while (i < input.length) {
|
| 22 |
+
|
| 23 |
+
chr1 = input.charCodeAt(i++);
|
| 24 |
+
chr2 = input.charCodeAt(i++);
|
| 25 |
+
chr3 = input.charCodeAt(i++);
|
| 26 |
+
|
| 27 |
+
enc1 = chr1 >> 2;
|
| 28 |
+
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
| 29 |
+
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
| 30 |
+
enc4 = chr3 & 63;
|
| 31 |
+
|
| 32 |
+
if (isNaN(chr2)) {
|
| 33 |
+
enc3 = enc4 = 64;
|
| 34 |
+
} else if (isNaN(chr3)) {
|
| 35 |
+
enc4 = 64;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
output = output +
|
| 39 |
+
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
| 40 |
+
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
| 41 |
+
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
return output;
|
| 45 |
+
},
|
| 46 |
+
|
| 47 |
+
// public method for decoding
|
| 48 |
+
decode : function (input) {
|
| 49 |
+
var output = "";
|
| 50 |
+
var chr1, chr2, chr3;
|
| 51 |
+
var enc1, enc2, enc3, enc4;
|
| 52 |
+
var i = 0;
|
| 53 |
+
|
| 54 |
+
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
| 55 |
+
|
| 56 |
+
while (i < input.length) {
|
| 57 |
+
|
| 58 |
+
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
| 59 |
+
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
| 60 |
+
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
| 61 |
+
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
| 62 |
+
|
| 63 |
+
chr1 = (enc1 << 2) | (enc2 >> 4);
|
| 64 |
+
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
| 65 |
+
chr3 = ((enc3 & 3) << 6) | enc4;
|
| 66 |
+
|
| 67 |
+
output = output + String.fromCharCode(chr1);
|
| 68 |
+
|
| 69 |
+
if (enc3 != 64) {
|
| 70 |
+
output = output + String.fromCharCode(chr2);
|
| 71 |
+
}
|
| 72 |
+
if (enc4 != 64) {
|
| 73 |
+
output = output + String.fromCharCode(chr3);
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
output = Base64._utf8_decode(output);
|
| 79 |
+
|
| 80 |
+
return output;
|
| 81 |
+
|
| 82 |
+
},
|
| 83 |
+
|
| 84 |
+
// private method for UTF-8 encoding
|
| 85 |
+
_utf8_encode : function (string) {
|
| 86 |
+
string = string.replace(/\r\n/g,"\n");
|
| 87 |
+
var utftext = "";
|
| 88 |
+
|
| 89 |
+
for (var n = 0; n < string.length; n++) {
|
| 90 |
+
|
| 91 |
+
var c = string.charCodeAt(n);
|
| 92 |
+
|
| 93 |
+
if (c < 128) {
|
| 94 |
+
utftext += String.fromCharCode(c);
|
| 95 |
+
}
|
| 96 |
+
else if((c > 127) && (c < 2048)) {
|
| 97 |
+
utftext += String.fromCharCode((c >> 6) | 192);
|
| 98 |
+
utftext += String.fromCharCode((c & 63) | 128);
|
| 99 |
+
}
|
| 100 |
+
else {
|
| 101 |
+
utftext += String.fromCharCode((c >> 12) | 224);
|
| 102 |
+
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
| 103 |
+
utftext += String.fromCharCode((c & 63) | 128);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
return utftext;
|
| 109 |
+
},
|
| 110 |
+
|
| 111 |
+
// private method for UTF-8 decoding
|
| 112 |
+
_utf8_decode : function (utftext) {
|
| 113 |
+
var string = "";
|
| 114 |
+
var i = 0;
|
| 115 |
+
var c = c1 = c2 = 0;
|
| 116 |
+
|
| 117 |
+
while ( i < utftext.length ) {
|
| 118 |
+
|
| 119 |
+
c = utftext.charCodeAt(i);
|
| 120 |
+
|
| 121 |
+
if (c < 128) {
|
| 122 |
+
string += String.fromCharCode(c);
|
| 123 |
+
i++;
|
| 124 |
+
}
|
| 125 |
+
else if((c > 191) && (c < 224)) {
|
| 126 |
+
c2 = utftext.charCodeAt(i+1);
|
| 127 |
+
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
| 128 |
+
i += 2;
|
| 129 |
+
}
|
| 130 |
+
else {
|
| 131 |
+
c2 = utftext.charCodeAt(i+1);
|
| 132 |
+
c3 = utftext.charCodeAt(i+2);
|
| 133 |
+
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
| 134 |
+
i += 3;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
return string;
|
| 140 |
+
}
|
| 141 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
Orteil's sloppy Cookie Clicker dungeons
|
| 3 |
+
|
| 4 |
+
Optimizations to do (not mentioning the dozens of missing features) :
|
| 5 |
+
-use canvas instead
|
| 6 |
+
-only compute AI for mobs with 2 tiles of view
|
| 7 |
+
*/
|
| 8 |
+
var LaunchDungeons=function()
|
| 9 |
+
{
|
| 10 |
+
Game.GetWord=function(type)
|
| 11 |
+
{
|
| 12 |
+
if (type=='secret') return choose(['hidden','secret','mysterious','forgotten','forbidden','lost','sunk','buried','concealed','shrouded','invisible','elder']);
|
| 13 |
+
if (type=='ruined') return choose(['ancient','old','ruined','ravaged','destroyed','collapsed','demolished','burnt','torn-down','shattered','dilapidated','abandoned','crumbling','derelict','decaying']);
|
| 14 |
+
if (type=='magical') return choose(['arcane','magical','mystical','sacred','honed','banished','unholy','holy','demonic','enchanted','necromantic','bewitched','haunted','occult','astral']);
|
| 15 |
+
return '';
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
/*=====================================================================================
|
| 19 |
+
DUNGEONS
|
| 20 |
+
=======================================================================================*/
|
| 21 |
+
Game.DungeonTypes=[];
|
| 22 |
+
Game.DungeonType=function(name)
|
| 23 |
+
{
|
| 24 |
+
this.name=name;
|
| 25 |
+
this.nameGenerator=function(){return 'Mysterious dungeon';};
|
| 26 |
+
this.roomTypes=[];
|
| 27 |
+
Game.DungeonTypes[this.name]=this;
|
| 28 |
+
return this;
|
| 29 |
+
};
|
| 30 |
+
|
| 31 |
+
/*=====================================================================================
|
| 32 |
+
CREATE DUNGEON TYPES
|
| 33 |
+
=======================================================================================*/
|
| 34 |
+
new Game.DungeonType('Factory').
|
| 35 |
+
nameGenerator=function(){
|
| 36 |
+
var str='';
|
| 37 |
+
str+=Game.GetWord(choose(['secret','ruined','magical']))+' '+choose(['factory','factories','bakery','bakeries','confectionery','laboratory','research center','chocolate forge','chocolate foundry','manufactory','warehouse','machinery','works','bakeworks','workshop','assembly line']);
|
| 38 |
+
return str;
|
| 39 |
+
};
|
| 40 |
+
|
| 41 |
+
new Game.DungeonType('Mine').
|
| 42 |
+
nameGenerator=function(){
|
| 43 |
+
var str='';
|
| 44 |
+
str+=Game.GetWord(choose(['secret','ruined','magical']))+' '+choose(['chocolate','chocolate','chocolate','white chocolate','sugar','cacao'])+' '+choose(['mine','mines','pit','pits','quarry','excavation','tunnel','shaft','lode','trench','mountain','vein','cliff','peak','dome','crater','abyss','chasm','hole','burrow']);
|
| 45 |
+
return str;
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
new Game.DungeonType('Portal').
|
| 49 |
+
nameGenerator=function(){
|
| 50 |
+
var str='';
|
| 51 |
+
str+=Game.GetWord(choose(['secret','ruined','magical']))+' '+choose(['portal','gate','dimension','warpgate','door']);
|
| 52 |
+
return str;
|
| 53 |
+
};
|
| 54 |
+
|
| 55 |
+
new Game.DungeonType('Secret zebra level').
|
| 56 |
+
nameGenerator=function(){
|
| 57 |
+
var str='';
|
| 58 |
+
str+=Game.GetWord(choose(['secret']))+' '+choose(['zebra level']);
|
| 59 |
+
return str;
|
| 60 |
+
};
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
/*=====================================================================================
|
| 64 |
+
CREATE TILE TYPES
|
| 65 |
+
=======================================================================================*/
|
| 66 |
+
|
| 67 |
+
var D=new DungeonGen();
|
| 68 |
+
D.loadTiles([
|
| 69 |
+
['wall',[1,0],'join'],
|
| 70 |
+
['wall corner',[1,0]],
|
| 71 |
+
['floor',[1,1],'random3'],
|
| 72 |
+
['tiled floor',[1,2],'join'],
|
| 73 |
+
['round pillar',[1,4]],
|
| 74 |
+
['square pillar',[2,4]],
|
| 75 |
+
['potted plant',[3,4]],
|
| 76 |
+
['bookshelf',[4,5],'join'],
|
| 77 |
+
['door',[1,3],'join'],
|
| 78 |
+
['alt wall',[4,0],'join'],
|
| 79 |
+
['alt wall corner',[4,0]],
|
| 80 |
+
['alt floor',[4,1],'random3'],
|
| 81 |
+
['alt tiled floor',[4,2],'join'],
|
| 82 |
+
['alt round pillar',[4,4]],
|
| 83 |
+
['alt square pillar',[5,4]],
|
| 84 |
+
['alt potted plant',[6,4]],
|
| 85 |
+
['alt bookshelf',[4,6],'join'],
|
| 86 |
+
['alt door',[4,3],'join'],
|
| 87 |
+
['water',[1,5]],
|
| 88 |
+
['green water',[2,5]],
|
| 89 |
+
['dark water',[3,5]],
|
| 90 |
+
['wooden wall',[1,7],'join'],
|
| 91 |
+
['wooden floor',[1,6],'random3'],
|
| 92 |
+
['conveyor belt',[4,7],'join'],
|
| 93 |
+
['entrance',[0,1]],
|
| 94 |
+
['alt entrance',[0,3]],
|
| 95 |
+
['exit',[0,2]],
|
| 96 |
+
['alt exit',[0,4]]
|
| 97 |
+
]);
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
/*=====================================================================================
|
| 101 |
+
CREATE MONSTER TYPES
|
| 102 |
+
=======================================================================================*/
|
| 103 |
+
|
| 104 |
+
/*
|
| 105 |
+
An explanation of stats :
|
| 106 |
+
-hp : health points
|
| 107 |
+
-speed : determines who attacks first in a fight; bypasses dodging; determines how fast heroes auto-run dungeons
|
| 108 |
+
-might : determines how much damage is done to opponents
|
| 109 |
+
-guard : lowers incoming damage
|
| 110 |
+
-dodge : chance of avoiding incoming attacks completely (affected by the opponent's speed)
|
| 111 |
+
-luck : heroes only, determines drops and rare encounters
|
| 112 |
+
-rarity : monsters only, determines how often a monster is added to the spawn table
|
| 113 |
+
-level : monsters only, determines which average room depth the monster is more likely to spawn in (also determines the loot amount)
|
| 114 |
+
*/
|
| 115 |
+
Game.monsterIconY=10;//offset for dungeonItems.png monsters
|
| 116 |
+
Game.Monsters=[];
|
| 117 |
+
Game.Monster=function(name,pic,icon,level,stats,loot)
|
| 118 |
+
{
|
| 119 |
+
this.name=name;
|
| 120 |
+
this.pic=pic;
|
| 121 |
+
this.icon=icon;
|
| 122 |
+
this.level=level;
|
| 123 |
+
this.stats={};
|
| 124 |
+
for (var i in stats)
|
| 125 |
+
{this.stats[i]=stats[i];}
|
| 126 |
+
this.stats.hpm=this.stats.hp;
|
| 127 |
+
this.stats.rarity=stats.rarity||1;
|
| 128 |
+
this.loot=loot||{};
|
| 129 |
+
this.boss=0;
|
| 130 |
+
this.quotes={};
|
| 131 |
+
Game.Monsters[this.name]=this;
|
| 132 |
+
}
|
| 133 |
+
var basicLoot={cookies:{min:1,max:5,prob:0.5}};
|
| 134 |
+
var goodLoot={cookies:{min:3,max:8,prob:1},gear:{prob:0.05}};
|
| 135 |
+
var bossLoot={gear:{prob:1}};
|
| 136 |
+
var chestLoot={cookies:{min:2,max:20,prob:1},gear:{prob:0.1}};
|
| 137 |
+
var bossLoot={cookies:{min:10,max:50,prob:1},gear:{prob:0.2}};
|
| 138 |
+
|
| 139 |
+
//general monsters
|
| 140 |
+
new Game.Monster('Doughling','doughling',[0,0],1,{hp:5,might:2,guard:2,speed:6,dodge:6,rarity:0.7},basicLoot);
|
| 141 |
+
new Game.Monster('Elder doughling','elderDoughling',[1,0],7,{hp:20,might:7,guard:7,speed:4,dodge:4,rarity:0.7},goodLoot);
|
| 142 |
+
new Game.Monster('Angry sentient cookie','angrySentientCookie',[5,0],5,{hp:16,might:8,guard:4,speed:5,dodge:5,rarity:1},basicLoot);
|
| 143 |
+
new Game.Monster('Baby sentient cookie','babySentientCookie',[4,0],1,{hp:3,might:1,guard:1,speed:7,dodge:7,rarity:1},basicLoot);
|
| 144 |
+
new Game.Monster('Burnt sentient cookie','burntSentientCookie',[6,0],5,{hp:16,might:12,guard:2,speed:3,dodge:2,rarity:0.2},basicLoot);
|
| 145 |
+
new Game.Monster('Raw sentient cookie','rawSentientCookie',[5,0],5,{hp:16,might:6,guard:4,speed:7,dodge:7,rarity:0.2},basicLoot);
|
| 146 |
+
new Game.Monster('Sugar bunny','sugarBunny',[8,0],5,{hp:10,might:3,guard:8,speed:12,dodge:9,rarity:0.001},{cookies:{min:1000,max:10000}});
|
| 147 |
+
Game.Monsters['Sugar bunny'].onKill=function(){Game.Win('Follow the white rabbit');};Game.Monsters['Sugar bunny'].AI='flee';
|
| 148 |
+
|
| 149 |
+
//factory monsters
|
| 150 |
+
new Game.Monster('Crazed kneader','crazedKneader',[0,2],6,{hp:18,might:6,guard:8,speed:3,dodge:2,rarity:0.5},goodLoot);
|
| 151 |
+
new Game.Monster('Crazed chip-spurter','crazedDoughSpurter',[0,2],6,{hp:15,might:6,guard:8,speed:5,dodge:3,rarity:0.5},goodLoot);
|
| 152 |
+
new Game.Monster('Alarm bot','alarmTurret',[3,2],2,{hp:6,might:3,guard:5,speed:8,dodge:8,rarity:0.5},basicLoot);
|
| 153 |
+
new Game.Monster('Chirpy','chirpy',[4,2],3,{hp:7,might:4,guard:6,speed:9,dodge:9,rarity:0.01},{cookies:{min:500,max:5000}});
|
| 154 |
+
Game.Monsters['Chirpy'].onKill=function(){Game.Win('Chirped out');};Game.Monsters['Chirpy'].quotes={fight:'oh, hello <3'};
|
| 155 |
+
new Game.Monster('Disgruntled worker','disgruntledWorker',[1,2],4,{hp:14,might:5,guard:5,speed:6,dodge:4,rarity:0.6},basicLoot);
|
| 156 |
+
new Game.Monster('Disgruntled overseer','disgruntledOverseer',[1,2],7,{hp:22,might:7,guard:5,speed:6,dodge:4,rarity:0.5},basicLoot);
|
| 157 |
+
new Game.Monster('Disgruntled cleaning lady','disgruntledCleaningLady',[2,2],4,{hp:13,might:4,guard:5,speed:7,dodge:6,rarity:0.3},basicLoot);
|
| 158 |
+
|
| 159 |
+
new Game.Monster('Sentient Furnace','sentientFurnace',[0,3],0,{hp:60,might:14,guard:12,speed:4,dodge:0,rarity:1},bossLoot);//boss
|
| 160 |
+
Game.Monsters['Sentient Furnace'].onKill=function(){Game.Win('Getting even with the oven');};Game.Monsters['Sentient Furnace'].AI='static';Game.Monsters['Sentient Furnace'].boss=1;Game.Monsters['Sentient Furnace'].quotes={fight:'YOU ARE NOT READY!',defeat:'OH... BURN.'};
|
| 161 |
+
new Game.Monster('Ascended Baking Pod','ascendedBakingPod',[1,3],0,{hp:60,might:12,guard:14,speed:4,dodge:0,rarity:0.7},bossLoot);//boss
|
| 162 |
+
Game.Monsters['Ascended Baking Pod'].onKill=function(){Game.Win('Now this is pod-smashing');};Game.Monsters['Ascended Baking Pod'].AI='static';Game.Monsters['Ascended Baking Pod'].boss=1;Game.Monsters['Ascended Baking Pod'].quotes={fight:'rrrrrrrise.',defeat:'blrglblg.'};
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
Game.BossMonsters=[];
|
| 166 |
+
for (var i in Game.Monsters)
|
| 167 |
+
{
|
| 168 |
+
if (Game.Monsters[i].boss) Game.BossMonsters.push(Game.Monsters[i]);
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
/*=====================================================================================
|
| 172 |
+
ENTITY MECHANICS
|
| 173 |
+
=======================================================================================*/
|
| 174 |
+
|
| 175 |
+
Game.Entity=function(type,subtype,dungeon,pic,stats)//objects you could find on the map : doors, mobs, interactables, items, player, exits...
|
| 176 |
+
{
|
| 177 |
+
this.type=type;
|
| 178 |
+
this.subtype=subtype||'';
|
| 179 |
+
this.dungeon=dungeon;
|
| 180 |
+
this.pic=pic||[0,0];
|
| 181 |
+
this.stats={};
|
| 182 |
+
for (var i in stats)
|
| 183 |
+
{this.stats[i]=stats[i];}
|
| 184 |
+
|
| 185 |
+
this.x=-1;
|
| 186 |
+
this.y=-1;
|
| 187 |
+
this.obstacle=0;
|
| 188 |
+
this.zIndex=1;
|
| 189 |
+
if (this.type=='monster')
|
| 190 |
+
{
|
| 191 |
+
this.obstacle=1;
|
| 192 |
+
this.pic=[Game.Monsters[this.subtype].icon[0],Game.Monsters[this.subtype].icon[1]];
|
| 193 |
+
this.pic[1]+=Game.monsterIconY;
|
| 194 |
+
this.targets=[];
|
| 195 |
+
this.stuck=0;
|
| 196 |
+
this.zIndex=10;
|
| 197 |
+
this.fighting=0;
|
| 198 |
+
this.AI=Game.Monsters[this.subtype].AI||'normal';
|
| 199 |
+
this.onKill=Game.Monsters[this.subtype].onKill||function(){};
|
| 200 |
+
for (var i in Game.Monsters[this.subtype].stats){this.stats[i]=Game.Monsters[this.subtype].stats[i];}
|
| 201 |
+
}
|
| 202 |
+
else if (this.type=='hero')
|
| 203 |
+
{
|
| 204 |
+
this.obstacle=1;
|
| 205 |
+
this.pic=[Game.Heroes[this.subtype].icon[0],Game.Heroes[this.subtype].icon[1]];
|
| 206 |
+
this.targets=[];
|
| 207 |
+
this.stuck=0;
|
| 208 |
+
this.zIndex=100;
|
| 209 |
+
this.fighting=0;
|
| 210 |
+
for (var i in Game.Heroes[this.subtype].stats){this.stats[i]=Game.Heroes[this.subtype].stats[i];}
|
| 211 |
+
|
| 212 |
+
//increase stats by amount of matching building (change that later to use gear instead)
|
| 213 |
+
var mult=Math.max(0,(Game.Objects[this.dungeon.type].amount/20-1));
|
| 214 |
+
this.stats.hpm+=Math.ceil(mult*2);
|
| 215 |
+
this.stats.hp=this.stats.hpm;
|
| 216 |
+
this.stats.might+=mult;
|
| 217 |
+
this.stats.guard+=mult;
|
| 218 |
+
this.stats.speed+=mult;
|
| 219 |
+
this.stats.dodge+=mult;
|
| 220 |
+
}
|
| 221 |
+
else if (this.type=='item')
|
| 222 |
+
{
|
| 223 |
+
this.zIndex=5;
|
| 224 |
+
this.value=0;
|
| 225 |
+
}
|
| 226 |
+
else if (this.type=='destructible')//crates, doors
|
| 227 |
+
{
|
| 228 |
+
this.obstacle=1;
|
| 229 |
+
this.life=3;
|
| 230 |
+
this.zIndex=15;
|
| 231 |
+
if (this.subtype=='door') this.pic=[0,7];
|
| 232 |
+
else this.pic=[Math.floor(Math.random()*4+2),7];
|
| 233 |
+
|
| 234 |
+
this.onKill=function()
|
| 235 |
+
{
|
| 236 |
+
if (this.subtype=='random')
|
| 237 |
+
{
|
| 238 |
+
var value=Math.round(Math.pow(Math.random(),6)*(10+this.dungeon.level));
|
| 239 |
+
if (value>0)
|
| 240 |
+
{
|
| 241 |
+
var entity=this.dungeon.AddEntity('item','cookies',this.x,this.y);
|
| 242 |
+
entity.value=value;
|
| 243 |
+
}
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
}
|
| 247 |
+
else if (this.type=='special')
|
| 248 |
+
{
|
| 249 |
+
this.zIndex=5;
|
| 250 |
+
this.value='';
|
| 251 |
+
this.obstacle=1;
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
this.Say=function(what)
|
| 255 |
+
{
|
| 256 |
+
if (this.type=='monster')
|
| 257 |
+
{
|
| 258 |
+
if (Game.Monsters[this.subtype].quotes[what]) this.dungeon.Log(this.subtype+' : "<span style="color:#f96;">'+choose(Game.Monsters[this.subtype].quotes[what].split('|'))+'</span>"');
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
this.Draw=function()//return the string to draw this
|
| 262 |
+
{
|
| 263 |
+
var name='?';
|
| 264 |
+
if (this.subtype=='random') name='clutter'; else name=this.subtype;
|
| 265 |
+
if (this.type=='item' && this.subtype=='cookies' && this.value>0)
|
| 266 |
+
{
|
| 267 |
+
if (this.value<2) this.pic=[0,5];
|
| 268 |
+
else if (this.value<3) this.pic=[1,5];
|
| 269 |
+
else if (this.value<4) this.pic=[2,5];
|
| 270 |
+
else if (this.value<6) this.pic=[3,5];
|
| 271 |
+
else if (this.value<10) this.pic=[4,5];
|
| 272 |
+
else if (this.value<20) this.pic=[5,5];
|
| 273 |
+
else if (this.value<30) this.pic=[7,5];
|
| 274 |
+
else if (this.value<70) this.pic=[6,5];
|
| 275 |
+
else if (this.value<200) this.pic=[8,5];
|
| 276 |
+
else this.pic=[6,6];// if (this.value<1000) this.pic=[1,5];
|
| 277 |
+
}
|
| 278 |
+
else if (this.type=='special' && this.subtype=='upgrade')
|
| 279 |
+
{
|
| 280 |
+
if (this.value!='') this.pic=[7,6]; else this.pic=[8,6];
|
| 281 |
+
}
|
| 282 |
+
return '<div class="thing" title="'+name+'" style="z-index:'+(200+this.zIndex)+';left:'+(this.x*16)+'px;top:'+(this.y*16)+'px;background-position:'+(-this.pic[0]*16)+'px '+(-this.pic[1]*16)+'px;"></div>';
|
| 283 |
+
}
|
| 284 |
+
this.Wander=function()//AI to move around aimlessly
|
| 285 |
+
{
|
| 286 |
+
this.targets=[];
|
| 287 |
+
this.targets.push([-1,0],[1,0],[0,-1],[0,1]);
|
| 288 |
+
this.Move();
|
| 289 |
+
}
|
| 290 |
+
this.GoTo=function(x,y)//AI to move to a specific point
|
| 291 |
+
{
|
| 292 |
+
this.targets=[];
|
| 293 |
+
if (this.x<x) this.targets.push([1,0]);
|
| 294 |
+
if (this.x>x) this.targets.push([-1,0]);
|
| 295 |
+
if (this.y<y) this.targets.push([0,1]);
|
| 296 |
+
if (this.y>y) this.targets.push([0,-1]);
|
| 297 |
+
if (!this.Move())//really stuck? try to maneuver laterally!
|
| 298 |
+
{
|
| 299 |
+
this.targets=[];
|
| 300 |
+
if (this.x==x) this.targets.push([1,0],[-1,0]);//somehow this feels inverted... but it doesn't work the other way
|
| 301 |
+
if (this.y==y) this.targets.push([0,1],[0,-1]);//hypothesis : *MAGIC*
|
| 302 |
+
this.Move();
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
this.Flee=function(x,y)//AI to run away from a specific point
|
| 306 |
+
{
|
| 307 |
+
this.targets=[];
|
| 308 |
+
if (this.x>x) this.targets.push([1,0]);
|
| 309 |
+
if (this.x<x) this.targets.push([-1,0]);
|
| 310 |
+
if (this.y>y) this.targets.push([0,1]);
|
| 311 |
+
if (this.y<y) this.targets.push([0,-1]);
|
| 312 |
+
if (!this.Move())//really stuck? try to maneuver laterally!
|
| 313 |
+
{
|
| 314 |
+
this.targets=[];
|
| 315 |
+
if (this.x==x) this.targets.push([1,0],[-1,0]);//somehow this feels inverted... but it doesn't work the other way
|
| 316 |
+
if (this.y==y) this.targets.push([0,1],[0,-1]);//hypothesis : *MAGIC*
|
| 317 |
+
this.Move();
|
| 318 |
+
}
|
| 319 |
+
}
|
| 320 |
+
this.Move=function()//AI to move to the target
|
| 321 |
+
{
|
| 322 |
+
if (this.targets.length>0)
|
| 323 |
+
{
|
| 324 |
+
var goodTargets=[];
|
| 325 |
+
if (this.type=='hero') goodTargets=this.targets;
|
| 326 |
+
else
|
| 327 |
+
{
|
| 328 |
+
for (var i in this.targets)
|
| 329 |
+
{
|
| 330 |
+
var thisTarget=this.targets[i];
|
| 331 |
+
if (this.dungeon.CheckObstacle(this.x+thisTarget[0],this.y+thisTarget[1])!=-1) goodTargets.push([thisTarget[0],thisTarget[1]]);
|
| 332 |
+
}
|
| 333 |
+
}
|
| 334 |
+
if (goodTargets.length>0)
|
| 335 |
+
{
|
| 336 |
+
var target=choose(goodTargets);
|
| 337 |
+
var obstacle=this.dungeon.CheckObstacle(this.x+target[0],this.y+target[1]);
|
| 338 |
+
if (obstacle==this) obstacle=0;
|
| 339 |
+
if (obstacle==0 && this.AI!='static')
|
| 340 |
+
{
|
| 341 |
+
this.x+=target[0];
|
| 342 |
+
this.y+=target[1];
|
| 343 |
+
}
|
| 344 |
+
else this.stuck+=2;
|
| 345 |
+
if (obstacle!=0 && obstacle!=-1)
|
| 346 |
+
{
|
| 347 |
+
obstacle.HitBy(this);
|
| 348 |
+
}
|
| 349 |
+
if (obstacle==-1) return 0;
|
| 350 |
+
}
|
| 351 |
+
else {this.stuck+=2;return 0;}
|
| 352 |
+
if (this.AI=='static') this.stuck=0;
|
| 353 |
+
return 1;
|
| 354 |
+
}
|
| 355 |
+
return 0;
|
| 356 |
+
}
|
| 357 |
+
this.HitBy=function(by)//attacked by another entity
|
| 358 |
+
{
|
| 359 |
+
if (this.type=='destructible' && by.type=='hero')//break destructibles
|
| 360 |
+
{
|
| 361 |
+
by.stuck=0;
|
| 362 |
+
this.life--;
|
| 363 |
+
if (this.life<=0)
|
| 364 |
+
{
|
| 365 |
+
if (this.onKill) this.onKill();
|
| 366 |
+
this.Destroy();
|
| 367 |
+
}
|
| 368 |
+
else this.pic=[this.pic[0],this.pic[1]+1];
|
| 369 |
+
}
|
| 370 |
+
else if (this.type=='special' && this.subtype=='upgrade')//upgrade relic
|
| 371 |
+
{
|
| 372 |
+
this.obstacle=0;
|
| 373 |
+
if (Game.Upgrades[this.value]) Game.Upgrades[this.value].earn();
|
| 374 |
+
this.value='';
|
| 375 |
+
}
|
| 376 |
+
else if ((this.type=='monster' && by.type=='hero') || (this.type=='hero' && by.type=='monster') && this.stats.hp>0)//it's a fight!
|
| 377 |
+
{
|
| 378 |
+
by.stuck=0;
|
| 379 |
+
|
| 380 |
+
var monster=(this.type=='hero'?by:this);
|
| 381 |
+
var hero=(this.type=='hero'?this:by);
|
| 382 |
+
this.dungeon.currentOpponent=monster;
|
| 383 |
+
|
| 384 |
+
if (monster.fighting==0)//first meeting
|
| 385 |
+
{
|
| 386 |
+
Game.Heroes[hero.subtype].Say('meet '+Game.Monsters[monster.subtype].name);
|
| 387 |
+
this.Say('fight');
|
| 388 |
+
}
|
| 389 |
+
if (this.fighting==0)
|
| 390 |
+
{
|
| 391 |
+
this.fighting=1;
|
| 392 |
+
by.fighting=1;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
var attackStr='';
|
| 396 |
+
var attackerName='';
|
| 397 |
+
var defenderName='';
|
| 398 |
+
if (by.type=='hero') attackerName=Game.Heroes[by.subtype].name;
|
| 399 |
+
else if (by.type=='monster') attackerName=Game.Monsters[by.subtype].name;
|
| 400 |
+
if (this.type=='hero') defenderName=Game.Heroes[this.subtype].name;
|
| 401 |
+
else if (this.type=='monster') defenderName=Game.Monsters[this.subtype].name;
|
| 402 |
+
|
| 403 |
+
//battle formulas (have fun with these)
|
| 404 |
+
attackStr+=attackerName+' swings at '+defenderName+'!';
|
| 405 |
+
var damage=Math.round(Math.max(1,Math.min(by.stats.might,Math.pow(((by.stats.might+2.5)/Math.max(1,this.stats.guard)),2)))*(0.8+Math.random()*0.4+Math.pow(Math.random()*0.8,6)));
|
| 406 |
+
var dodge=Math.random()>(by.stats.speed/Math.max(1,this.stats.dodge+2.5));
|
| 407 |
+
if (dodge)
|
| 408 |
+
{
|
| 409 |
+
attackStr+=' '+defenderName+' dodged the attack.';
|
| 410 |
+
}
|
| 411 |
+
else
|
| 412 |
+
{
|
| 413 |
+
if (by.stats.luck && by.type=='hero' && Math.random()<by.stats.luck*0.01) {damage*=2;attackStr+=' <b>It\'s a critical!</b>';}//very rare critical based on luck
|
| 414 |
+
attackStr+=' <b>'+damage+'</b> damage!';
|
| 415 |
+
|
| 416 |
+
this.stats.hp-=damage;
|
| 417 |
+
this.stats.hp=Math.max(this.stats.hp,0);
|
| 418 |
+
if (this.stats.luck && this.type=='hero')
|
| 419 |
+
{
|
| 420 |
+
if (this.stats.hp==0 && Math.random()<this.stats.luck*0.01) {this.stats.hp=1;attackStr+=' '+defenderName+' was saved from certain death!';}//very rare life-saving based on luck
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
if (this.type=='hero') attackStr='<span style="color:#f99;">'+attackStr+'</span>';
|
| 425 |
+
if (attackStr!='') this.dungeon.Log(attackStr);
|
| 426 |
+
|
| 427 |
+
if (this.stats.hp<=0)//die
|
| 428 |
+
{
|
| 429 |
+
this.dungeon.Log(attackerName+' crushed '+defenderName+'!');
|
| 430 |
+
if (this.type=='hero')
|
| 431 |
+
{
|
| 432 |
+
Game.Heroes[this.subtype].Say('defeat');
|
| 433 |
+
this.dungeon.Log('<span style="color:#f66;">'+Game.Heroes[this.subtype].name+' has been defeated.</span>');
|
| 434 |
+
this.dungeon.FailLevel();
|
| 435 |
+
}
|
| 436 |
+
if (this.type=='monster' && by.type=='hero')
|
| 437 |
+
{
|
| 438 |
+
l('monsterSlot'+this.dungeon.id).style.visibility='hidden';
|
| 439 |
+
this.dungeon.monstersKilledThisRun+=1;
|
| 440 |
+
if (Math.random()<0.05) Game.Heroes[by.subtype].Say('win');
|
| 441 |
+
Game.Heroes[by.subtype].Say('win against '+Game.Monsters[this.subtype].name);
|
| 442 |
+
this.Say('defeat');
|
| 443 |
+
if (Game.Monsters[this.subtype].loot)
|
| 444 |
+
{
|
| 445 |
+
var loot=Game.Monsters[this.subtype].loot;
|
| 446 |
+
if (loot.gear && (!loot.gear.prob || Math.random()<loot.gear.prob)) {}//drop gear
|
| 447 |
+
if (loot.cookies && (!loot.cookies.prob || Math.random()<loot.cookies.prob))
|
| 448 |
+
{
|
| 449 |
+
var entity=this.dungeon.AddEntity('item','cookies',this.x,this.y);//drop cookies
|
| 450 |
+
entity.value=Math.round(loot.cookies.min+Math.random()*(loot.cookies.max-loot.cookies.min));
|
| 451 |
+
}
|
| 452 |
+
}
|
| 453 |
+
if (this.onKill) this.onKill();
|
| 454 |
+
this.Destroy();
|
| 455 |
+
}
|
| 456 |
+
}
|
| 457 |
+
}
|
| 458 |
+
}
|
| 459 |
+
this.Turn=function()//do this every turn (walk around, heal up...)
|
| 460 |
+
{
|
| 461 |
+
if (this.type=='monster')
|
| 462 |
+
{
|
| 463 |
+
var howManyTurns=this.GetInitiative();
|
| 464 |
+
for (var i=0;i<howManyTurns;i++)
|
| 465 |
+
{
|
| 466 |
+
if (1==1)//this.AI!='static')
|
| 467 |
+
{
|
| 468 |
+
if (this.AI=='flee') this.Flee(this.dungeon.heroEntity.x,this.dungeon.heroEntity.y);//flee from the player
|
| 469 |
+
else
|
| 470 |
+
{
|
| 471 |
+
this.GoTo(this.dungeon.heroEntity.x,this.dungeon.heroEntity.y);//track the player
|
| 472 |
+
if (this.stuck || this.targets.length==[]) this.Wander();//can't reach the player? walk around randomly
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
}
|
| 476 |
+
}
|
| 477 |
+
if (this.type=='monster' || this.type=='hero')
|
| 478 |
+
{
|
| 479 |
+
if (this.stuck>0) this.stuck--;
|
| 480 |
+
this.stuck=Math.min(10,this.stuck);
|
| 481 |
+
this.targets=[];
|
| 482 |
+
}
|
| 483 |
+
if ((this.type=='hero' || this.type=='monster') && this.fighting==0 && this.stats.hp<this.stats.hpm) this.stats.hp++;//heal up
|
| 484 |
+
if (this.type=='hero')//collect items and cookies
|
| 485 |
+
{
|
| 486 |
+
var entities=this.dungeon.GetEntities(this.x,this.y);
|
| 487 |
+
for (var i in entities)
|
| 488 |
+
{
|
| 489 |
+
if (entities[i].type=='item' && entities[i].subtype=='cookies')
|
| 490 |
+
{
|
| 491 |
+
var entity=entities[i];
|
| 492 |
+
var value=Math.ceil(entity.value*Game.Objects[this.dungeon.type].amount*50*(1+Math.random()*((this.stats.luck)/20)));//temporary; scale with matching building CpS later
|
| 493 |
+
if (value>0)
|
| 494 |
+
{
|
| 495 |
+
this.dungeon.Log('<span style="color:#9f9;">Found <b>'+Beautify(value)+'</b> cookie'+(value==1?'':'s')+'!</span>');
|
| 496 |
+
this.dungeon.cookiesMadeThisRun+=value;
|
| 497 |
+
Game.Earn(value);
|
| 498 |
+
}
|
| 499 |
+
entity.Destroy();
|
| 500 |
+
}
|
| 501 |
+
}
|
| 502 |
+
}
|
| 503 |
+
if (this.type=='hero') this.fighting=0;
|
| 504 |
+
}
|
| 505 |
+
this.Destroy=function()
|
| 506 |
+
{
|
| 507 |
+
this.dungeon.entities.splice(this.dungeon.entities.indexOf(this),1);
|
| 508 |
+
}
|
| 509 |
+
this.GetInitiative=function()
|
| 510 |
+
{
|
| 511 |
+
return randomFloor((this.stats.speed/5)*(1/Math.max(1,(this.dungeon.heroEntity.stats.speed/5))));
|
| 512 |
+
}
|
| 513 |
+
}
|
| 514 |
+
|
| 515 |
+
/*=====================================================================================
|
| 516 |
+
DUNGEON MECHANICS
|
| 517 |
+
=======================================================================================*/
|
| 518 |
+
|
| 519 |
+
Game.Dungeons=[];
|
| 520 |
+
Game.Dungeon=function(type,id)
|
| 521 |
+
{
|
| 522 |
+
this.type=type;
|
| 523 |
+
this.id=id;
|
| 524 |
+
Game.Dungeons[this.id]=this;
|
| 525 |
+
this.log=[];
|
| 526 |
+
this.logNew=0;
|
| 527 |
+
this.name=Game.DungeonTypes[this.type].nameGenerator();
|
| 528 |
+
this.hero=null;
|
| 529 |
+
this.currentOpponent=0;
|
| 530 |
+
this.level=0;
|
| 531 |
+
this.auto=1;
|
| 532 |
+
this.portalPic='';
|
| 533 |
+
|
| 534 |
+
this.cookiesMadeThisRun=0;
|
| 535 |
+
this.monstersKilledThisRun=0;
|
| 536 |
+
|
| 537 |
+
this.Log=function(what,nested)
|
| 538 |
+
{
|
| 539 |
+
if (typeof what==='string')
|
| 540 |
+
{
|
| 541 |
+
this.log.unshift(what);
|
| 542 |
+
this.logNew++;
|
| 543 |
+
}
|
| 544 |
+
else {for (var i in what) {this.Log(what[i],1);}}
|
| 545 |
+
//if (!nested) this.UpdateLog();
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
this.UpdateLog=function()
|
| 549 |
+
{
|
| 550 |
+
this.log=this.log.slice(0,30);
|
| 551 |
+
var str='';
|
| 552 |
+
for (var i in this.log)
|
| 553 |
+
{
|
| 554 |
+
if (i<this.logNew) str+='<div class="new">'+this.log[i]+'</div>';
|
| 555 |
+
else str+='<div>'+this.log[i]+'</div>';
|
| 556 |
+
}
|
| 557 |
+
this.logNew=0;
|
| 558 |
+
l('dungeonLog'+this.id).innerHTML=str;
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
this.entities=[];
|
| 562 |
+
this.GetEntities=function(x,y)//returns the first entity found on tile x,y
|
| 563 |
+
{
|
| 564 |
+
var entities=[];
|
| 565 |
+
for (var i in this.entities) {if (this.entities[i].x==x && this.entities[i].y==y) entities.push(this.entities[i]);}
|
| 566 |
+
return entities;
|
| 567 |
+
}
|
| 568 |
+
this.AddEntity=function(type,subtype,x,y)
|
| 569 |
+
{
|
| 570 |
+
//this.RemoveEntities(x,y);
|
| 571 |
+
var entity=new Game.Entity(type,subtype,this);
|
| 572 |
+
entity.x=x;
|
| 573 |
+
entity.y=y;
|
| 574 |
+
entity.dungeon=this;
|
| 575 |
+
this.entities.push(entity);
|
| 576 |
+
return entity;
|
| 577 |
+
}
|
| 578 |
+
this.RemoveEntities=function(x,y)
|
| 579 |
+
{
|
| 580 |
+
var entities=this.GetEntities(x,y);
|
| 581 |
+
for (var i in entities)
|
| 582 |
+
{
|
| 583 |
+
entities[i].Destroy();
|
| 584 |
+
}
|
| 585 |
+
}
|
| 586 |
+
this.DrawEntities=function()
|
| 587 |
+
{
|
| 588 |
+
var str='';
|
| 589 |
+
for (var i in this.entities) {str+=this.entities[i].Draw();}
|
| 590 |
+
return str;
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
this.CheckObstacle=function(x,y)//returns 0 for no obstacle; -1 for a wall; an entity if there's at least one entity on this tile
|
| 594 |
+
{
|
| 595 |
+
if (x<0 || x>=this.map.w || y<0 || y>=this.map.h) return -1;
|
| 596 |
+
var entities=this.GetEntities(x,y);
|
| 597 |
+
for (var i in entities)
|
| 598 |
+
{
|
| 599 |
+
if (entities[i].obstacle) return entities[i];
|
| 600 |
+
}
|
| 601 |
+
return this.map.isObstacle(x,y)?-1:0;
|
| 602 |
+
}
|
| 603 |
+
|
| 604 |
+
|
| 605 |
+
this.map={};
|
| 606 |
+
this.Generate=function()
|
| 607 |
+
{
|
| 608 |
+
if (this.level==0) this.name=Game.DungeonTypes[this.type].nameGenerator();
|
| 609 |
+
this.entities=[];
|
| 610 |
+
var M=new D.Map(40,40,Math.random(),{
|
| 611 |
+
roomSize:10,
|
| 612 |
+
corridorSize:5,
|
| 613 |
+
fillRatio:1/2,
|
| 614 |
+
corridorRatio:0.3,
|
| 615 |
+
pillarRatio:Math.random()*0.8+0.2,
|
| 616 |
+
waterRatio:Math.random(),
|
| 617 |
+
branching:Math.ceil(Math.random()*6),
|
| 618 |
+
sizeVariance:0.4
|
| 619 |
+
});
|
| 620 |
+
r=0;
|
| 621 |
+
while (r!=1)
|
| 622 |
+
{
|
| 623 |
+
r=M.dig();
|
| 624 |
+
}
|
| 625 |
+
//all done! decorate and render.
|
| 626 |
+
M.finish();
|
| 627 |
+
//spawn treasure
|
| 628 |
+
/*
|
| 629 |
+
for (var i in M.rooms)
|
| 630 |
+
{
|
| 631 |
+
if (M.rooms[i].freeTiles>1)
|
| 632 |
+
{
|
| 633 |
+
for (var ii=0;ii<Math.ceil(Math.sqrt(M.rooms[i].freeTiles*(M.rooms[i].gen*0.25+0.1))/2);ii++)
|
| 634 |
+
{
|
| 635 |
+
if (Math.random()<0.95 && M.rooms[i].freeTiles>1)
|
| 636 |
+
{
|
| 637 |
+
var spot=M.getBestSpotInRoom(M.rooms[i]);
|
| 638 |
+
M.data[spot.x][spot.y][0]=0;
|
| 639 |
+
spot.score=0;
|
| 640 |
+
M.rooms[i].freeTiles--;
|
| 641 |
+
}
|
| 642 |
+
}
|
| 643 |
+
}
|
| 644 |
+
}*/
|
| 645 |
+
|
| 646 |
+
for (var i in M.doors)//place door entities on door positions
|
| 647 |
+
{
|
| 648 |
+
//M.data[M.doors[i][0]][M.doors[i][1]][0]=TILE_FLOOR_EDGE;
|
| 649 |
+
this.AddEntity('destructible','door',M.doors[i][0],M.doors[i][1]);
|
| 650 |
+
}
|
| 651 |
+
//set tile graphics
|
| 652 |
+
for (var i in M.rooms)
|
| 653 |
+
{
|
| 654 |
+
var altStr=choose(['alt ','','']);
|
| 655 |
+
var tiles={
|
| 656 |
+
'void':altStr+'void',
|
| 657 |
+
'wall':altStr+'wall',
|
| 658 |
+
'wall corner':altStr+'wall corner',
|
| 659 |
+
'floor':altStr+'tiled floor',
|
| 660 |
+
'floor edges':altStr+'floor',//choose([altStr+'floor',altStr+'floor edges']),
|
| 661 |
+
'door':altStr+'door',
|
| 662 |
+
'water':choose(['water','green water','dark water']),
|
| 663 |
+
'pillar':choose([altStr+'wall',altStr+'round pillar',altStr+'square pillar',altStr+'potted plant','conveyor belt']),
|
| 664 |
+
'entrance':altStr+'entrance',
|
| 665 |
+
'exit':altStr+'exit',
|
| 666 |
+
};
|
| 667 |
+
if (Math.random()<0.1) {tiles['wall corner']='wooden wall';tiles['wall']='wooden wall';tiles['floor edges']='wooden floor';tiles['pillar']='wooden wall';}
|
| 668 |
+
if (Math.random()<0.1) {tiles['wall corner']=altStr+'bookshelf';tiles['wall']=altStr+'bookshelf';tiles['pillar']=altStr+'bookshelf';}
|
| 669 |
+
M.assignTiles(M.rooms[i],tiles);
|
| 670 |
+
}
|
| 671 |
+
this.map=M;
|
| 672 |
+
this.map.str=this.map.getStr();
|
| 673 |
+
|
| 674 |
+
//place a boss
|
| 675 |
+
var tile=this.map.exit;
|
| 676 |
+
var monsters=[];
|
| 677 |
+
for (var ii in Game.BossMonsters)
|
| 678 |
+
{
|
| 679 |
+
var me=Game.BossMonsters[ii];
|
| 680 |
+
if (me.level<=(depth+this.level) && Math.random()<(me.stats.rarity||1)) monsters.push(me.name);
|
| 681 |
+
}
|
| 682 |
+
if (monsters.length==0) monsters=[choose(Game.BossMonsters).name];
|
| 683 |
+
if (monsters.length>0)
|
| 684 |
+
{
|
| 685 |
+
this.AddEntity('monster',choose(monsters),tile[0],tile[1]);
|
| 686 |
+
this.map.removeFreeTile(tile[0],tile[1]);
|
| 687 |
+
}
|
| 688 |
+
|
| 689 |
+
//place relics
|
| 690 |
+
/*
|
| 691 |
+
var tile=this.map.getBestSpotInRoom(this.map.getRoom(this.map.exit[0],this.map.exit[1]));
|
| 692 |
+
var entity=this.AddEntity('special','upgrade',tile.x,tile.y);
|
| 693 |
+
entity.value='Dungeon cookie upgrade';
|
| 694 |
+
this.map.removeFreeTile(tile.x,tile.y);
|
| 695 |
+
for (var i=0;i<Math.floor(Math.pow(Math.random(),2)*3);i++)
|
| 696 |
+
{
|
| 697 |
+
var room=choose(this.map.rooms);
|
| 698 |
+
if (room.freeTiles.length>10)
|
| 699 |
+
{
|
| 700 |
+
var tile=this.map.getBestSpotInRoom(room);
|
| 701 |
+
var entity=this.AddEntity('special','upgrade',tile.x,tile.y);
|
| 702 |
+
entity.value='Dungeon cookie upgrade';
|
| 703 |
+
this.map.removeFreeTile(tile.x,tile.y);
|
| 704 |
+
}
|
| 705 |
+
}*/
|
| 706 |
+
|
| 707 |
+
//sprinkle monsters and treasure
|
| 708 |
+
for (var i=0;i<Math.ceil(this.map.freeTiles.length*0.7);i++)//let's fill this up with A LOT of stuff
|
| 709 |
+
{
|
| 710 |
+
var tile=choose(this.map.freeTiles);
|
| 711 |
+
if (tile!=-1)
|
| 712 |
+
{
|
| 713 |
+
var room=this.map.getRoom(tile[0],tile[1]);
|
| 714 |
+
var depth=room.gen+1;
|
| 715 |
+
if (Math.random()<0.2)//2 in 10 spawns are monsters
|
| 716 |
+
{
|
| 717 |
+
var monsters=[];
|
| 718 |
+
for (var ii in Game.Monsters)
|
| 719 |
+
{
|
| 720 |
+
var me=Game.Monsters[ii];
|
| 721 |
+
if (me.level!=0 && me.level<=(depth+this.level) && Math.random()<(me.stats.rarity||1)) monsters.push(me.name);//spawn type depending on monster level and rarity
|
| 722 |
+
}
|
| 723 |
+
if (monsters.length>0)
|
| 724 |
+
{
|
| 725 |
+
this.AddEntity('monster',choose(monsters),tile[0],tile[1]);
|
| 726 |
+
this.map.removeFreeTile(tile[0],tile[1]);
|
| 727 |
+
}
|
| 728 |
+
}
|
| 729 |
+
else//the rest of the spawns are destructibles or loot
|
| 730 |
+
{
|
| 731 |
+
if (Math.random()<0.6)
|
| 732 |
+
{
|
| 733 |
+
var value=Math.round(Math.pow(Math.random(),6)*(10+this.level));
|
| 734 |
+
if (value>0)
|
| 735 |
+
{
|
| 736 |
+
var entity=this.AddEntity('item','cookies',tile[0],tile[1]);//random cookies
|
| 737 |
+
entity.value=value;
|
| 738 |
+
}
|
| 739 |
+
}
|
| 740 |
+
else this.AddEntity('destructible','random',tile[0],tile[1]);//random crates etc
|
| 741 |
+
this.map.removeFreeTile(tile[0],tile[1]);
|
| 742 |
+
}
|
| 743 |
+
}
|
| 744 |
+
}
|
| 745 |
+
}
|
| 746 |
+
|
| 747 |
+
this.onTile=-1;
|
| 748 |
+
|
| 749 |
+
this.Draw=function()
|
| 750 |
+
{
|
| 751 |
+
var str='';
|
| 752 |
+
var x=-this.hero.x;
|
| 753 |
+
var y=-this.hero.y;
|
| 754 |
+
str+='<div id="map'+this.id+'" class="map" style="width:'+(9*16)+'px;height:'+(9*16)+'px;"><div class="mapContainer" id="mapcontainer'+this.id+'" style="position:absolute;left:'+(x*16)+'px;top:'+(y*16)+'px;"><div id="mapitems'+this.id+'"></div>'+this.map.str+'</div></div>';
|
| 755 |
+
str+='<div style="position:absolute;left:'+(9*16+16)+'px;">'+
|
| 756 |
+
'<a class="control west" onclick="Game.HeroesById['+this.hero.id+'].Move(-1,0);"></a><br>'+
|
| 757 |
+
'<a class="control east" onclick="Game.HeroesById['+this.hero.id+'].Move(1,0);"></a><br>'+
|
| 758 |
+
'<a class="control north" onclick="Game.HeroesById['+this.hero.id+'].Move(0,-1);"></a><br>'+
|
| 759 |
+
'<a class="control south" onclick="Game.HeroesById['+this.hero.id+'].Move(0,1);"></a><br>'+
|
| 760 |
+
'<a class="control middle" onclick="Game.HeroesById['+this.hero.id+'].Move(0,0);"></a><br>'+
|
| 761 |
+
'</div>';
|
| 762 |
+
str+='<div style="position:absolute;left:'+(9*16+16+48*3)+'px;bottom:16px;height:100%;">'+
|
| 763 |
+
'<div class="dungeonName"><a onclick="Game.ObjectsById['+this.id+'].setSpecial(0);">Exit</a> - <span class="title" style="font-size:12px;">'+this.name+'</span> lvl.'+(this.level+1)+'</div>'+
|
| 764 |
+
'<div id="heroSlot'+this.id+'" class="mobSlot"><div id="picHero'+this.id+'" class="mobPic"></div><div id="nameHero'+this.id+'" class="title mobName"></div><div class="hpmBar"><div id="hpHero'+this.id+'" class="hpBar"></div></div></div>'+
|
| 765 |
+
'<div id="monsterSlot'+this.id+'" class="mobSlot" style="left:128px;"><div id="picMonster'+this.id+'" class="mobPic"></div><div id="nameMonster'+this.id+'" class="title mobName"></div><div class="hpmBar"><div id="hpMonster'+this.id+'" class="hpBar"></div></div></div>'+
|
| 766 |
+
'</div>'+
|
| 767 |
+
'<div id="dungeonLog'+this.id+'" class="dungeonLog"></div>';
|
| 768 |
+
l('rowSpecial'+this.id).innerHTML='<div style="width:100%;height:100%;z-index:10000;position:absolute;left:0px;top:0px;">'+str+'</div>';
|
| 769 |
+
|
| 770 |
+
l('picHero'+this.id).style.backgroundImage='url(img/'+this.hero.portrait+'.png)';
|
| 771 |
+
l('nameHero'+this.id).innerHTML=this.hero.name;
|
| 772 |
+
}
|
| 773 |
+
this.Refresh=function()
|
| 774 |
+
{
|
| 775 |
+
if (!l('mapcontainer'+this.id)) this.Draw();
|
| 776 |
+
var x=4-this.hero.x;
|
| 777 |
+
var y=4-this.hero.y;
|
| 778 |
+
l('mapcontainer'+this.id).style.left=(x*16)+'px';
|
| 779 |
+
l('mapcontainer'+this.id).style.top=(y*16)+'px';
|
| 780 |
+
l('mapitems'+this.id).innerHTML=this.DrawEntities();
|
| 781 |
+
}
|
| 782 |
+
this.RedrawMap=function()
|
| 783 |
+
{
|
| 784 |
+
this.map.str=this.map.getStr();
|
| 785 |
+
this.Draw();
|
| 786 |
+
}
|
| 787 |
+
this.Turn=function()
|
| 788 |
+
{
|
| 789 |
+
for (var i in this.entities)
|
| 790 |
+
{
|
| 791 |
+
if (this.entities[i] && this.entities[i].type) this.entities[i].Turn();
|
| 792 |
+
}
|
| 793 |
+
if (this.currentOpponent)
|
| 794 |
+
{
|
| 795 |
+
l('monsterSlot'+this.id).style.visibility='visible';
|
| 796 |
+
l('hpMonster'+this.id).style.width=Math.round((this.currentOpponent.stats.hp/this.currentOpponent.stats.hpm)*100)+'%';
|
| 797 |
+
l('picMonster'+this.id).style.backgroundImage='url(img/'+Game.Monsters[this.currentOpponent.subtype].pic+'.png)';
|
| 798 |
+
l('nameMonster'+this.id).innerHTML=Game.Monsters[this.currentOpponent.subtype].name;
|
| 799 |
+
l('picHero'+this.id).style.backgroundImage='url(img/'+this.hero.pic+'.png)';
|
| 800 |
+
}
|
| 801 |
+
else
|
| 802 |
+
{
|
| 803 |
+
l('monsterSlot'+this.id).style.visibility='hidden';
|
| 804 |
+
l('hpMonster'+this.id).style.width='100%';
|
| 805 |
+
l('picHero'+this.id).style.backgroundImage='url(img/'+this.hero.portrait+'.png)';
|
| 806 |
+
}
|
| 807 |
+
this.currentOpponent=0;
|
| 808 |
+
l('hpHero'+this.id).style.width=Math.round((this.heroEntity.stats.hp/this.heroEntity.stats.hpm)*100)+'%';
|
| 809 |
+
|
| 810 |
+
this.Refresh();
|
| 811 |
+
this.UpdateLog();
|
| 812 |
+
|
| 813 |
+
if (this.hero.x==this.map.exit[0] && this.hero.y==this.map.exit[1])
|
| 814 |
+
{
|
| 815 |
+
this.CompleteLevel();
|
| 816 |
+
}
|
| 817 |
+
}
|
| 818 |
+
|
| 819 |
+
this.DrawButton=function()
|
| 820 |
+
{
|
| 821 |
+
var str='';
|
| 822 |
+
//str+='<div style="text-align:center;margin:48px auto;color:#999;"><a onclick="Game.ObjectsById['+this.id+'].setSpecial(1);">Enter</a></div>';
|
| 823 |
+
str+='<div style="width:144px;height:144px;position:absolute;left:0px;bottom:0px;"><a class="specialButtonPic" style="background-image:url(img/'+this.portalPic+'.png);" onclick="Game.ObjectsById['+this.id+'].setSpecial(1);"><div class="specialButtonText">Enter dungeons</div></a></div>';
|
| 824 |
+
return str;
|
| 825 |
+
}
|
| 826 |
+
|
| 827 |
+
this.CompleteLevel=function()
|
| 828 |
+
{
|
| 829 |
+
this.hero.Say('completion');
|
| 830 |
+
this.level++;
|
| 831 |
+
this.Generate();
|
| 832 |
+
Game.HeroesById[0].EnterDungeon(this,this.map.entrance[0],this.map.entrance[1]);
|
| 833 |
+
this.Draw();
|
| 834 |
+
}
|
| 835 |
+
this.FailLevel=function()
|
| 836 |
+
{
|
| 837 |
+
this.Log('Cookies made this run : '+Beautify(this.cookiesMadeThisRun)+' | Monsters defeated this run : '+Beautify(this.monstersKilledThisRun));
|
| 838 |
+
this.cookiesMadeThisRun=0;
|
| 839 |
+
this.monstersKilledThisRun=0;
|
| 840 |
+
this.level=0;
|
| 841 |
+
this.Generate();
|
| 842 |
+
Game.HeroesById[0].EnterDungeon(this,this.map.entrance[0],this.map.entrance[1]);
|
| 843 |
+
this.Draw();
|
| 844 |
+
}
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
Game.DungeonLocationChain=function(map,x,y)//return an array of the rooms between the root room and this tile's room, inclusive
|
| 848 |
+
{//we shouldn't need all this if we used A*...
|
| 849 |
+
var room=map.getRoom(x,y);
|
| 850 |
+
var chain=[];
|
| 851 |
+
if (room!=-1)
|
| 852 |
+
{
|
| 853 |
+
while (room.parent)
|
| 854 |
+
{
|
| 855 |
+
chain.push(room);
|
| 856 |
+
room=room.parent;
|
| 857 |
+
}
|
| 858 |
+
}
|
| 859 |
+
chain.reverse();
|
| 860 |
+
return chain;
|
| 861 |
+
}
|
| 862 |
+
Game.DungeonLinkLocationChains=function(start,end)//return the room in which the first location chain should go to to get closer to the second location chain
|
| 863 |
+
{
|
| 864 |
+
/*
|
| 865 |
+
4 cases
|
| 866 |
+
-we're already in the same room
|
| 867 |
+
-the target is in a different branch
|
| 868 |
+
-the target is above in the same branch
|
| 869 |
+
-the target is below in the same branch
|
| 870 |
+
*/
|
| 871 |
+
start.reverse();
|
| 872 |
+
end.reverse();
|
| 873 |
+
if (start[0].id==end[0].id) return start[start.length-1];//same room
|
| 874 |
+
for (var i in end)
|
| 875 |
+
{
|
| 876 |
+
if (start[0]==end[i].parent) return end[i];//inferior branch, go to the inferior room
|
| 877 |
+
}
|
| 878 |
+
if (start.length>1) return start[1];//different or superior branch, go to the superior room
|
| 879 |
+
return start[0];//eeeh, let's just stay in the same room
|
| 880 |
+
}
|
| 881 |
+
|
| 882 |
+
/*=====================================================================================
|
| 883 |
+
CREATE DUNGEONS
|
| 884 |
+
=======================================================================================*/
|
| 885 |
+
Game.Objects['Factory'].special=function()
|
| 886 |
+
{
|
| 887 |
+
this.dungeon=new Game.Dungeon('Factory',this.id);
|
| 888 |
+
this.dungeon.Generate();
|
| 889 |
+
this.specialDrawFunction=function(){this.dungeon.Refresh();};
|
| 890 |
+
this.drawSpecialButton=function(){return this.dungeon.DrawButton();};
|
| 891 |
+
this.dungeon.timer=0;
|
| 892 |
+
this.dungeon.timerWarmup=5;
|
| 893 |
+
this.dungeon.portalPic='dungeonFactory';
|
| 894 |
+
|
| 895 |
+
this.EachFrame=function()
|
| 896 |
+
{
|
| 897 |
+
if (this.dungeon.auto)
|
| 898 |
+
{
|
| 899 |
+
if (this.dungeon.timer>0) this.dungeon.timer--;
|
| 900 |
+
if (this.dungeon.timer==0)
|
| 901 |
+
{
|
| 902 |
+
this.dungeon.timer=Game.fps*(Math.max(0.1,2-(this.dungeon.hero.stats.speed*0.2))+Math.max(this.dungeon.timerWarmup,0));
|
| 903 |
+
if (this.dungeon.timerWarmup>0) this.dungeon.timerWarmup--;
|
| 904 |
+
|
| 905 |
+
var dungeon=this.dungeon;
|
| 906 |
+
var hero=dungeon.heroEntity;
|
| 907 |
+
|
| 908 |
+
var targetRoom=Game.DungeonLinkLocationChains(Game.DungeonLocationChain(dungeon.map,hero.x,hero.y),Game.DungeonLocationChain(dungeon.map,dungeon.map.exit[0],dungeon.map.exit[1]));
|
| 909 |
+
var targetTile=(targetRoom.gen==0 || targetRoom.id==dungeon.map.getRoom(hero.x,hero.y).id)?[dungeon.map.exit[0],dungeon.map.exit[1]]:targetRoom.door;
|
| 910 |
+
hero.GoTo(targetTile[0],targetTile[1]);
|
| 911 |
+
if (hero.stuck) hero.Wander();
|
| 912 |
+
dungeon.hero.x=hero.x;
|
| 913 |
+
dungeon.hero.y=hero.y;
|
| 914 |
+
dungeon.Turn();
|
| 915 |
+
}
|
| 916 |
+
}
|
| 917 |
+
}
|
| 918 |
+
|
| 919 |
+
if (document.addEventListener)//clean this up later
|
| 920 |
+
{
|
| 921 |
+
l('rowSpecial'+this.dungeon.id).removeEventListener('keydown',arguments.callee,false);
|
| 922 |
+
l('rowSpecial'+this.dungeon.id).addEventListener('keydown',function(event)
|
| 923 |
+
{
|
| 924 |
+
var dungeon=Game.Objects['Factory'].dungeon;
|
| 925 |
+
var control=0;
|
| 926 |
+
if (event.keyCode==37) {dungeon.hero.Move(-1,0);control=1;}
|
| 927 |
+
else if (event.keyCode==38) {dungeon.hero.Move(0,-1);control=1;}
|
| 928 |
+
else if (event.keyCode==39) {dungeon.hero.Move(1,0);control=1;}
|
| 929 |
+
else if (event.keyCode==40) {dungeon.hero.Move(0,1);control=1;}
|
| 930 |
+
else if (event.keyCode==32) {dungeon.hero.Move(0,0);control=1;}//space
|
| 931 |
+
else if (event.keyCode==65)//A (auto)
|
| 932 |
+
{
|
| 933 |
+
if (dungeon.auto)
|
| 934 |
+
{
|
| 935 |
+
dungeon.auto=0;
|
| 936 |
+
dungeon.timerWarmup=-1;
|
| 937 |
+
}
|
| 938 |
+
else
|
| 939 |
+
{
|
| 940 |
+
dungeon.auto=1;
|
| 941 |
+
dungeon.timer=0;
|
| 942 |
+
dungeon.timerWarmup=0;
|
| 943 |
+
}
|
| 944 |
+
event.preventDefault();
|
| 945 |
+
}
|
| 946 |
+
|
| 947 |
+
if (control)
|
| 948 |
+
{
|
| 949 |
+
event.preventDefault();
|
| 950 |
+
dungeon.timer=Game.fps*10;
|
| 951 |
+
dungeon.timerWarmup=5;
|
| 952 |
+
}
|
| 953 |
+
}
|
| 954 |
+
);
|
| 955 |
+
}
|
| 956 |
+
|
| 957 |
+
var hero=choose(Game.HeroesById);
|
| 958 |
+
hero.EnterDungeon(this.dungeon,this.dungeon.map.entrance[0],this.dungeon.map.entrance[1]);
|
| 959 |
+
}
|
| 960 |
+
|
| 961 |
+
/*=====================================================================================
|
| 962 |
+
HEROES
|
| 963 |
+
=======================================================================================*/
|
| 964 |
+
Game.Heroes=[];
|
| 965 |
+
Game.HeroesById=[];
|
| 966 |
+
Game.Hero=function(name,pic,portrait,icon)
|
| 967 |
+
{
|
| 968 |
+
this.name=name;
|
| 969 |
+
this.pic=pic;
|
| 970 |
+
this.portrait=portrait;
|
| 971 |
+
this.icon=icon;
|
| 972 |
+
this.stats={
|
| 973 |
+
hp:25,
|
| 974 |
+
hpm:25,
|
| 975 |
+
might:5,
|
| 976 |
+
guard:5,
|
| 977 |
+
speed:5,
|
| 978 |
+
dodge:5,
|
| 979 |
+
luck:5
|
| 980 |
+
};
|
| 981 |
+
this.dialogue={
|
| 982 |
+
'greeting':'Oh hey.|Sup.',
|
| 983 |
+
'entrance':'Here we go.|So exciting.',
|
| 984 |
+
'completion':'That was easy.|All done here.',
|
| 985 |
+
'defeat':'Welp.|Better luck next time.'
|
| 986 |
+
};
|
| 987 |
+
this.gear={
|
| 988 |
+
'armor':-1,
|
| 989 |
+
'weapon':-1
|
| 990 |
+
};
|
| 991 |
+
this.inDungeon=-1;
|
| 992 |
+
this.completedDungeons=0;
|
| 993 |
+
|
| 994 |
+
this.x=0;
|
| 995 |
+
this.y=0;
|
| 996 |
+
|
| 997 |
+
this.EnterDungeon=function(dungeon,x,y)
|
| 998 |
+
{
|
| 999 |
+
this.inDungeon=dungeon.id;
|
| 1000 |
+
dungeon.hero=this;
|
| 1001 |
+
this.x=x;
|
| 1002 |
+
this.y=y;
|
| 1003 |
+
dungeon.heroEntity=dungeon.AddEntity('hero',dungeon.hero.name,x,y);
|
| 1004 |
+
var room=dungeon.map.getRoom(this.x,this.y);
|
| 1005 |
+
if (room!=-1 && room.hidden) {room.hidden=0;dungeon.RedrawMap();}
|
| 1006 |
+
Game.Dungeons[this.inDungeon].Refresh();
|
| 1007 |
+
dungeon.Log('--------------------');
|
| 1008 |
+
if (dungeon.level==0) this.Say('greeting');
|
| 1009 |
+
this.Say('entrance');
|
| 1010 |
+
l('monsterSlot'+dungeon.id).style.visibility='hidden';
|
| 1011 |
+
}
|
| 1012 |
+
this.Move=function(x,y)
|
| 1013 |
+
{
|
| 1014 |
+
var dungeon=Game.Dungeons[this.inDungeon];
|
| 1015 |
+
dungeon.heroEntity.targets=[[x,y]];
|
| 1016 |
+
if (dungeon.heroEntity.Move())
|
| 1017 |
+
{
|
| 1018 |
+
this.x=dungeon.heroEntity.x;
|
| 1019 |
+
this.y=dungeon.heroEntity.y;
|
| 1020 |
+
dungeon.Turn();
|
| 1021 |
+
}
|
| 1022 |
+
}
|
| 1023 |
+
|
| 1024 |
+
this.Say=function(what)
|
| 1025 |
+
{
|
| 1026 |
+
if (this.dialogue[what]) Game.Dungeons[this.inDungeon].Log(this.name+' : "<span style="color:#99f;">'+choose(this.dialogue[what].split('|'))+'</span>"');
|
| 1027 |
+
}
|
| 1028 |
+
|
| 1029 |
+
this.save=function()
|
| 1030 |
+
{
|
| 1031 |
+
var str='';
|
| 1032 |
+
str+=
|
| 1033 |
+
this.inDungeon+','+
|
| 1034 |
+
this.completedDungeons+','+
|
| 1035 |
+
this.gear.armor+','+
|
| 1036 |
+
this.gear.weapon
|
| 1037 |
+
;
|
| 1038 |
+
return str;
|
| 1039 |
+
}
|
| 1040 |
+
this.load=function(data)
|
| 1041 |
+
{
|
| 1042 |
+
var str=data.split(',');
|
| 1043 |
+
this.inDungeon=parseInt(str[0]);
|
| 1044 |
+
this.completedDungeons=parseInt(str[1]);
|
| 1045 |
+
this.gear.armor=parseInt(str[2]);
|
| 1046 |
+
this.gear.weapon=parseInt(str[3]);
|
| 1047 |
+
}
|
| 1048 |
+
this.id=Game.HeroesById.length;
|
| 1049 |
+
Game.HeroesById.push(this);
|
| 1050 |
+
Game.Heroes[this.name]=this;
|
| 1051 |
+
}
|
| 1052 |
+
|
| 1053 |
+
/*=====================================================================================
|
| 1054 |
+
CREATE HEROES
|
| 1055 |
+
=======================================================================================*/
|
| 1056 |
+
var hero=new Game.Hero('Chip','girlscoutChip','portraitChip',[1,0]);
|
| 1057 |
+
hero.dialogue={
|
| 1058 |
+
'intro':'I\'m Chip! I just really like exploring stuff. Let\'s go have an adventure!',
|
| 1059 |
+
'greeting':'Hello there!|I\'m ready!|Where are we going today?|Adventure!',
|
| 1060 |
+
'win':'Take that!|Hah!|That\'s right.',
|
| 1061 |
+
'entrance':'Chipping in!|Welp, here goes nothing!|I wonder what I\'ll find!|Hey, this place is new!|This place seems familiar.|Let\'s make it happen.',
|
| 1062 |
+
'completion':'I\'m one smart cookie.|Oh yeah!|Let\'s explore some more!|That was easy!|That sure was fun!|I\'m not lost, am I?|More exploring? Sure, why not!',
|
| 1063 |
+
'defeat':'B-better luck next time.|That really hurt!|I yield! I yield!|That went badly.|No half-baked excuses next time.|I think I scraped my knee!|Owie.|Woopsie!',
|
| 1064 |
+
'win against Sentient Furnace':'The irony, it burns! (...it\'s funny because it was burning. And made of iron. ...Moving on.)',
|
| 1065 |
+
'win against Ascended Baking Pod':'Where is your pod now?|That was disturbing.'
|
| 1066 |
+
};
|
| 1067 |
+
hero.stats={
|
| 1068 |
+
hp:30,
|
| 1069 |
+
hpm:30,
|
| 1070 |
+
might:5,
|
| 1071 |
+
guard:5,
|
| 1072 |
+
speed:5,
|
| 1073 |
+
dodge:5,
|
| 1074 |
+
luck:5
|
| 1075 |
+
};
|
| 1076 |
+
var hero=new Game.Hero('Crumb','girlscoutCrumb','portraitCrumb',[2,0]);
|
| 1077 |
+
hero.dialogue={
|
| 1078 |
+
'intro':'I\'m Crumb. I look like this because of a baking accident when I was little. Big deal. At least now I don\'t get hurt as easily as others, I guess.',
|
| 1079 |
+
'greeting':'Hi there.|Ready for adventure, I guess.|Reporting for duty.',
|
| 1080 |
+
'win':'Oh sorry, did that hurt?|Should have moved out of the way.|Oops. My bad.',
|
| 1081 |
+
'entrance':'Let\'s do this, I guess.|Well, let\'s go...|I gotta go in there?|Are we really doing this?|I hope I won\'t get lost like last time.|Let\'s get this over with.',
|
| 1082 |
+
'completion':'I... I did it...|I\'m glad that\'s over.|What, there\'s more?|In I go, I guess.|It doesn\'t end, does it?|But it\'s dark in there.',
|
| 1083 |
+
'defeat':'I, uh, ouch.|Why does that always happen to me?|I\'m just no good, am I?|Oh no.|I\'m... I\'m not crying.|Well that wasn\'t fun at all.|I\'m sorry I failed you.|Please... make them go away...',
|
| 1084 |
+
'meet Ascended Baking Pod':'That thing shouldn\'t even be alive.|Is that where they all came from?',
|
| 1085 |
+
'win against Ascended Baking Pod':'Hm. Fascinating.'
|
| 1086 |
+
};
|
| 1087 |
+
hero.stats={
|
| 1088 |
+
hp:25,
|
| 1089 |
+
hpm:25,
|
| 1090 |
+
might:5,
|
| 1091 |
+
guard:7,
|
| 1092 |
+
speed:4,
|
| 1093 |
+
dodge:4,
|
| 1094 |
+
luck:5
|
| 1095 |
+
};
|
| 1096 |
+
var hero=new Game.Hero('Doe','girlscoutDoe','portraitDoe',[3,0]);
|
| 1097 |
+
hero.dialogue={
|
| 1098 |
+
'intro':'H-hey. Name\'s Doe. I\'m pretty fast. I uh, I promise I\'ll do my best.',
|
| 1099 |
+
'greeting':'H-hey.|Oh, uh, h-hi there.|C-can I join?',
|
| 1100 |
+
'win':'Th-that looks like it hurt... awesome...|D-did I do that?|N-neat... there\'s pieces everywhere.',
|
| 1101 |
+
'entrance':'Alright, let\'s do this!|I-if I really have to.|I-in there? By myself?|...won\'t you come with me this time?|H-here I go!',
|
| 1102 |
+
'completion':'Oh... oh my.|That\'s... I uh, I\'m glad.|Y-yeah that was real easy. Piece of pie!|T-too easy, right?|S-so many cookies...|Ooh? F-fascinating.',
|
| 1103 |
+
'defeat':'I-if you can\'t beat them... join them.|I-it\'s because I stutter, isn\'t it?|W-well that\'s just no good at all.|I, uh, I meant for that to happen.|H-how embarrassing.',
|
| 1104 |
+
'meet Ascended Baking Pod':'W-whoah... it\'s... magnificent...',
|
| 1105 |
+
'win against Ascended Baking Pod':'I\'m sorry, buddy.|I... I think I hurt it...|Oh no... I-I think I broke it...'
|
| 1106 |
+
};
|
| 1107 |
+
hero.stats={
|
| 1108 |
+
hp:25,
|
| 1109 |
+
hpm:25,
|
| 1110 |
+
might:4,
|
| 1111 |
+
guard:4,
|
| 1112 |
+
speed:7,
|
| 1113 |
+
dodge:5,
|
| 1114 |
+
luck:5
|
| 1115 |
+
};
|
| 1116 |
+
var hero=new Game.Hero('Lucky','girlscoutLucky','portraitLucky',[4,0]);
|
| 1117 |
+
hero.dialogue={
|
| 1118 |
+
'intro':'Oh joy! My name\'s Lucky. Guess what I\'m good at?',
|
| 1119 |
+
'greeting':'I\'m feeling lucky!|It\'s a bright day today!|Let\'s do great things together.',
|
| 1120 |
+
'win':'Ooh lucky shot!|Pow! One more.|Damn straight!',
|
| 1121 |
+
'entrance':'Glad to be of service!|Oooh this one\'ll be interesting.|This will be a good one, I can feel it!|Here I come!',
|
| 1122 |
+
'completion':'Over already?|Let\'s explore some more!|That was lucky!|That was no luck, I\'m just that good.|Alright, let\'s move on!|I\'m just getting warmed up!',
|
| 1123 |
+
'defeat':'I can\'t believe it!|...This is a joke, right?|Hey! No fair!|B-but...|I\'m gonna need a bandaid. And some hot chocolate.|I\'ll, uh, try again later.|Bad luck! Bad luck!',
|
| 1124 |
+
'win against Ascended Baking Pod':'Golly, that was peculiar.'
|
| 1125 |
+
};
|
| 1126 |
+
hero.stats={
|
| 1127 |
+
hp:25,
|
| 1128 |
+
hpm:25,
|
| 1129 |
+
might:5,
|
| 1130 |
+
guard:4,
|
| 1131 |
+
speed:4,
|
| 1132 |
+
dodge:5,
|
| 1133 |
+
luck:7
|
| 1134 |
+
};
|
| 1135 |
+
|
| 1136 |
+
};
|
static/excanvas.compiled.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2006 Google Inc.
|
| 2 |
+
//
|
| 3 |
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
// you may not use this file except in compliance with the License.
|
| 5 |
+
// You may obtain a copy of the License at
|
| 6 |
+
//
|
| 7 |
+
// http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
//
|
| 9 |
+
// Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
// See the License for the specific language governing permissions and
|
| 13 |
+
// limitations under the License.
|
| 14 |
+
document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
|
| 15 |
+
b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])},
|
| 16 |
+
initElement:function(b){if(!b.getContext){b.getContext=X;b.innerHTML="";b.attachEvent("onpropertychange",Z);b.attachEvent("onresize",$);var a=b.attributes;if(a.width&&a.width.specified)b.style.width=a.width.nodeValue+"px";else b.width=b.clientWidth;if(a.height&&a.height.specified)b.style.height=a.height.nodeValue+"px";else b.height=b.clientHeight}return b}};function Z(b){var a=b.srcElement;switch(b.propertyName){case "width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect();
|
| 17 |
+
break;case "height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function $(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}M.init();var N=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)N[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function y(b,a){var c=I(),d=0;for(;d<3;d++){var f=0;for(;f<3;f++){var h=0,g=0;for(;g<3;g++)h+=b[d][g]*a[g][f];c[d][f]=
|
| 18 |
+
h}}return c}function O(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.globalAlpha=b.globalAlpha;a.arcScaleX_=b.arcScaleX_;a.arcScaleY_=b.arcScaleY_;a.lineScale_=b.lineScale_}function P(b){var a,c=1;b=String(b);if(b.substring(0,3)=="rgb"){var d=b.indexOf("(",3),f=b.indexOf(")",d+
|
| 19 |
+
1),h=b.substring(d+1,f).split(",");a="#";var g=0;for(;g<3;g++)a+=N[Number(h[g])];if(h.length==4&&b.substr(3,1)=="a")c=h[3]}else a=b;return{color:a,alpha:c}}function aa(b){switch(b){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}function H(b){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=b;
|
| 20 |
+
var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.element_=a;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};
|
| 21 |
+
i.lineTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(b,a,c,d,f,h){var g=this.getCoords_(f,h),l=this.getCoords_(b,a),e=this.getCoords_(c,d);Q(this,l,e,g)};function Q(b,a,c,d){b.currentPath_.push({type:"bezierCurveTo",cp1x:a.x,cp1y:a.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});b.currentX_=d.x;b.currentY_=d.y}i.quadraticCurveTo=function(b,a,c,d){var f=this.getCoords_(b,a),h=this.getCoords_(c,d),g={x:this.currentX_+
|
| 22 |
+
0.6666666666666666*(f.x-this.currentX_),y:this.currentY_+0.6666666666666666*(f.y-this.currentY_)};Q(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(b,a,c,d,f,h){c*=k;var g=h?"at":"wa",l=b+G(d)*c-v,e=a+F(d)*c-v,m=b+G(f)*c-v,r=a+F(f)*c-v;if(l==m&&!h)l+=0.125;var n=this.getCoords_(b,a),o=this.getCoords_(l,e),q=this.getCoords_(m,r);this.currentPath_.push({type:g,x:n.x,y:n.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(b,a,c,d){this.moveTo(b,
|
| 23 |
+
a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath()};i.strokeRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.stroke();this.currentPath_=f};i.fillRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.fill();this.currentPath_=f};i.createLinearGradient=function(b,
|
| 24 |
+
a,c,d){var f=new D("gradient");f.x0_=b;f.y0_=a;f.x1_=c;f.y1_=d;return f};i.createRadialGradient=function(b,a,c,d,f,h){var g=new D("gradientradial");g.x0_=b;g.y0_=a;g.r0_=c;g.x1_=d;g.y1_=f;g.r1_=h;return g};i.drawImage=function(b){var a,c,d,f,h,g,l,e,m=b.runtimeStyle.width,r=b.runtimeStyle.height;b.runtimeStyle.width="auto";b.runtimeStyle.height="auto";var n=b.width,o=b.height;b.runtimeStyle.width=m;b.runtimeStyle.height=r;if(arguments.length==3){a=arguments[1];c=arguments[2];h=g=0;l=d=n;e=f=o}else if(arguments.length==
|
| 25 |
+
5){a=arguments[1];c=arguments[2];d=arguments[3];f=arguments[4];h=g=0;l=n;e=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];l=arguments[3];e=arguments[4];a=arguments[5];c=arguments[6];d=arguments[7];f=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(a,c),t=[];t.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var E=[];E.push("M11=",
|
| 26 |
+
this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/k),",","Dy=",j(q.y/k),"");var p=q,z=this.getCoords_(a+d,c),w=this.getCoords_(a,c+f),x=this.getCoords_(a+d,c+f);p.x=s.max(p.x,z.x,w.x,x.x);p.y=s.max(p.y,z.y,w.y,x.y);t.push("padding:0 ",j(p.x/k),"px ",j(p.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",E.join(""),", sizingmethod='clip');")}else t.push("top:",j(q.y/k),"px;left:",j(q.x/k),"px;");t.push(' ">','<g_vml_:image src="',b.src,
|
| 27 |
+
'"',' style="width:',k*d,"px;"," height:",k*f,'px;"',' cropleft="',h/n,'"',' croptop="',g/o,'"',' cropright="',(n-h-l)/n,'"',' cropbottom="',(o-g-e)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("<g_vml_:shape",' filled="',!!b,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',
|
| 28 |
+
!b,'"',' path="');var h={x:null,y:null},g={x:null,y:null},l=0;for(;l<this.currentPath_.length;l++){var e=this.currentPath_[l];switch(e.type){case "moveTo":a.push(" m ",j(e.x),",",j(e.y));break;case "lineTo":a.push(" l ",j(e.x),",",j(e.y));break;case "close":a.push(" x ");e=null;break;case "bezierCurveTo":a.push(" c ",j(e.cp1x),",",j(e.cp1y),",",j(e.cp2x),",",j(e.cp2y),",",j(e.x),",",j(e.y));break;case "at":case "wa":a.push(" ",e.type," ",j(e.x-this.arcScaleX_*e.radius),",",j(e.y-this.arcScaleY_*e.radius),
|
| 29 |
+
" ",j(e.x+this.arcScaleX_*e.radius),",",j(e.y+this.arcScaleY_*e.radius)," ",j(e.xStart),",",j(e.yStart)," ",j(e.xEnd),",",j(e.yEnd));break}if(e){if(h.x==null||e.x<h.x)h.x=e.x;if(g.x==null||e.x>g.x)g.x=e.x;if(h.y==null||e.y<h.y)h.y=e.y;if(g.y==null||e.y>g.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
|
| 30 |
+
z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l<J;l++){var T=u[l];S.push(T.offset*q+
|
| 31 |
+
o+" "+T.color)}a.push('<g_vml_:fill type="',m.type_,'"',' method="none" focus="100%"',' color="',da,'"',' color2="',ea,'"',' colors="',S.join(","),'"',' opacity="',ga,'"',' g_o_:opacity2="',fa,'"',' angle="',r,'"',' focusposition="',n.x,",",n.y,'" />')}else a.push('<g_vml_:fill color="',d,'" opacity="',f,'" />');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("<g_vml_:stroke",' opacity="',f,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',aa(this.lineCap),
|
| 32 |
+
'"',' weight="',K,'px"',' color="',d,'" />')}a.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
|
| 33 |
+
this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
|
| 34 |
+
0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
|
| 35 |
+
M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
|
static/grab.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"herald":41,"grandma":"Patreona|Janice|Gabrielle|Grandma McGrandmaface|Charlie|\"egg\" Sr.|Jet-dayo|Natsuki|Ivy|Rose|Babayaga|Grandma #42|SneakySquid|Swad Plan|Meep Moop|Psychedelic Rapper Andrew JD|Telos|Moondoge|Lily Bowen|Mrs PoopyButthole|Mrs Sugai Kirin|Survivor of the Stale|Betty Ann Niemi|Tjien Nio|The First Baker|Mamichette|dQw4w9WgXcQ|Carmelina Calabrese|The GrandNut|La mere Michel|Aune Mummo|Jeff Junior|Her?|Rydh|Euphegenia Doubtfire|Bear|How did you find me, JUNESUK?|Ahtelo|Steve...?|Fanny|DAF Pvnk - Mother of trucks|Koisuru Fortune Grandma|Lieselotte|Izual Rebirth|Cosma-Tanti|Starco|Forgotten Abbey|Granny Rags|Mrs. Fizzwidget|Nakamoto|Zan Tart-izanne|The Roach Queen|Khookiesi, Grandmother of Dragonflights|Hey guys, Dexterfan99 here|Aryll|Ms. Chievous|Don't Stop Me Now|Dauna|Gerry|Erina Pendleton-Joestar|Stacy's Grandma|Benyboy|Rosie Beestinger|Tesco employee #65|Oda|Grandma Jones|Dan|Krieg|Chris|Kamilla|Tandy|Elisabeth|MinionMemer|Eanydo Erdman|Cookieatron4000|TechhX|Turtlenator|Carmelina|Shiny Blue Grandma|Anne|Penka|\"Hey guys, it's Nicole\"|Cora|Freya28|Kiwibajs|EEEEEE|Ms. Denis Gur Arie|Idling Vasha|?????|Tammie|Grandma Kara|Sanda Reiss|Alex|Mirle|Audrey|Ittle Dew|You're Killing Me Smols|Baker? I hardly know her!|A Duplicate Grandma|Betty Margaret Davis|Chlorophyte Grandma|Felpinhazinha|Satan's grandmother|Ruby Rose|Miyori Grandma|Geuser|Anneliese|Pielak|Swamper|Pikachi|Grackitz|Deborah Wright|BUT IT WAS ME, DIO!|Barbara|SERAS FAMO!!!|Audrey Porter|Benny Zhy|Doctergreen|Kage|Jarvis Fishwick|Elder Pledge 666x in a row...|Tell Cersei, it was me.|Kimahri|Henrietta Gertrude|Tyler Liddick|noisypineapples|Linda-Bea Dolvoy|DevilishWarrior|Exterminator|Matthue Loose|Caden|moist butterscotch lips|Alireah|Fey Yoshida|Aviators|Ashlee <3|He Had Boxing Gloves On|Falling Collin|Error 404: Name not Found|Groz|Granny Jonathan|Hanna Highmark|Nonmoving Osmond|The Worm Which Waits|Lurking Tealeaf|Ruby Wrinkle|Her|\"Eggy Grandma\"|Cookie maker 100|Addison Bennett|Nasus|Only 30 characters, huh? Fine.|Matt Was Here|ScartTheWaz|Tanyac Crimson|Ume Ito|VenMissa|Velma Francis|amdnarG|Leota Marie|Nikola|Grandmommy Celestine|Annuziatta|hosh...|E|Joe Grandmomma|Granny Grearest|Vivian|Vovó Dal|Baker of Steak Cookies|Aku daikan|SkeletonJoke|David loves Rachel! <3|Polar|Loremaster Rawlins|lickin my cookie|Fmaily Gyu funy momens #420|Ms. Cppkies|WillStreet|Ian's Mom|Grandma Divah|Betty BeardPuller|Mamie Cobol|200rassberris|ipm1234|Galadion|Olive Gardenia|Megan I. McIntosh|Lady Sweets|Rivne|Autosuffisant|BoShek|Brooke Chumbers|Cthulhu|ɐɯpuɐɹפ|binbinuser|Amma Jóna|the book was empty|Berit|DRIFTER1117|Yackemflam|Help me|YeOl'GrammityGram|Mason W|Peggy Hattenfels|majik|latte|amogus|Samuel Robertson|Anneliese Albina Emma|Barack Obama|Gramma Margaret|Tomato Pie|Tobi Kummerer|Ms Shelley|Harlow Diggs|Jaema|Claudia|Lukexzr's Grandma|Grandma Chara|I love my cookies|Typlo|joxer(ish)|Lisle|Gray Still Plays|Alyssa Cummings|The Wrinkler Spy|Carol|Gerladine|Alpa|Grannynator T-3000|SoeJul|Eleodora Consuelo|Grandma Jo"}
|
static/img/AQWorlds_CookieClicker_300x40.png
ADDED
|
static/img/BGgarden.jpg
ADDED
|
static/img/BGgrimoire.jpg
ADDED
|
static/img/BGmarket.jpg
ADDED
|
static/img/BGpantheon.jpg
ADDED
|
static/img/_imglist.txt
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
http://orteil.dashnet.org/cookieclicker/img/AQWorlds_CookieClicker_300x40.png
|
| 2 |
+
http://orteil.dashnet.org/cookieclicker/img/BGgarden.jpg
|
| 3 |
+
http://orteil.dashnet.org/cookieclicker/img/BGgrimoire.jpg
|
| 4 |
+
http://orteil.dashnet.org/cookieclicker/img/BGmarket.jpg
|
| 5 |
+
http://orteil.dashnet.org/cookieclicker/img/BGpantheon.jpg
|
| 6 |
+
http://orteil.dashnet.org/cookieclicker/img/alchemylab.png
|
| 7 |
+
http://orteil.dashnet.org/cookieclicker/img/alchemylabBackground.png
|
| 8 |
+
http://orteil.dashnet.org/cookieclicker/img/alteredGrandma.png
|
| 9 |
+
http://orteil.dashnet.org/cookieclicker/img/alternateGrandma.png
|
| 10 |
+
http://orteil.dashnet.org/cookieclicker/img/antiGrandma.png
|
| 11 |
+
http://orteil.dashnet.org/cookieclicker/img/antimattercondenser.png
|
| 12 |
+
http://orteil.dashnet.org/cookieclicker/img/antimattercondenserBackground.png
|
| 13 |
+
http://orteil.dashnet.org/cookieclicker/img/aqworldsbanner.jpg
|
| 14 |
+
http://orteil.dashnet.org/cookieclicker/img/ascendBox.png
|
| 15 |
+
http://orteil.dashnet.org/cookieclicker/img/ascendInfo.png
|
| 16 |
+
http://orteil.dashnet.org/cookieclicker/img/ascendSlot.png
|
| 17 |
+
http://orteil.dashnet.org/cookieclicker/img/ascendWisp.png
|
| 18 |
+
http://orteil.dashnet.org/cookieclicker/img/ascendedBakingPod.png
|
| 19 |
+
http://orteil.dashnet.org/cookieclicker/img/bank.png
|
| 20 |
+
http://orteil.dashnet.org/cookieclicker/img/bankBackground.png
|
| 21 |
+
http://orteil.dashnet.org/cookieclicker/img/bankGrandma.png
|
| 22 |
+
http://orteil.dashnet.org/cookieclicker/img/bgBW.jpg
|
| 23 |
+
http://orteil.dashnet.org/cookieclicker/img/bgBlack.jpg
|
| 24 |
+
http://orteil.dashnet.org/cookieclicker/img/bgBlue.jpg
|
| 25 |
+
http://orteil.dashnet.org/cookieclicker/img/bgCandy.jpg
|
| 26 |
+
http://orteil.dashnet.org/cookieclicker/img/bgChoco.jpg
|
| 27 |
+
http://orteil.dashnet.org/cookieclicker/img/bgChocoDark.jpg
|
| 28 |
+
http://orteil.dashnet.org/cookieclicker/img/bgCoarse.jpg
|
| 29 |
+
http://orteil.dashnet.org/cookieclicker/img/bgFoil.jpg
|
| 30 |
+
http://orteil.dashnet.org/cookieclicker/img/bgGold.jpg
|
| 31 |
+
http://orteil.dashnet.org/cookieclicker/img/bgMint.jpg
|
| 32 |
+
http://orteil.dashnet.org/cookieclicker/img/bgMoney.jpg
|
| 33 |
+
http://orteil.dashnet.org/cookieclicker/img/bgMoneyChart.jpg
|
| 34 |
+
http://orteil.dashnet.org/cookieclicker/img/bgPaint.jpg
|
| 35 |
+
http://orteil.dashnet.org/cookieclicker/img/bgPink.jpg
|
| 36 |
+
http://orteil.dashnet.org/cookieclicker/img/bgPurple.jpg
|
| 37 |
+
http://orteil.dashnet.org/cookieclicker/img/bgRed.jpg
|
| 38 |
+
http://orteil.dashnet.org/cookieclicker/img/bgSilver.jpg
|
| 39 |
+
http://orteil.dashnet.org/cookieclicker/img/bgSky.jpg
|
| 40 |
+
http://orteil.dashnet.org/cookieclicker/img/bgSnowy.jpg
|
| 41 |
+
http://orteil.dashnet.org/cookieclicker/img/bgSpectrum.jpg
|
| 42 |
+
http://orteil.dashnet.org/cookieclicker/img/bgStars.jpg
|
| 43 |
+
http://orteil.dashnet.org/cookieclicker/img/bgWhite.jpg
|
| 44 |
+
http://orteil.dashnet.org/cookieclicker/img/bgYellowBlue.jpg
|
| 45 |
+
http://orteil.dashnet.org/cookieclicker/img/blackGradient.png
|
| 46 |
+
http://orteil.dashnet.org/cookieclicker/img/blackGradientLeft.png
|
| 47 |
+
http://orteil.dashnet.org/cookieclicker/img/blackGradientSmallTop.png
|
| 48 |
+
http://orteil.dashnet.org/cookieclicker/img/bracketPanelLeftS.png
|
| 49 |
+
http://orteil.dashnet.org/cookieclicker/img/bracketPanelRightS.png
|
| 50 |
+
http://orteil.dashnet.org/cookieclicker/img/brainyGrandma.png
|
| 51 |
+
http://orteil.dashnet.org/cookieclicker/img/brokenCookie.png
|
| 52 |
+
http://orteil.dashnet.org/cookieclicker/img/brokenCookieHalo.png
|
| 53 |
+
http://orteil.dashnet.org/cookieclicker/img/brownStripes.png
|
| 54 |
+
http://orteil.dashnet.org/cookieclicker/img/brownStripesLeftEdge.png
|
| 55 |
+
http://orteil.dashnet.org/cookieclicker/img/buildings.png
|
| 56 |
+
http://orteil.dashnet.org/cookieclicker/img/bunnies.png
|
| 57 |
+
http://orteil.dashnet.org/cookieclicker/img/bunnyGrandma.png
|
| 58 |
+
http://orteil.dashnet.org/cookieclicker/img/buttonTile.jpg
|
| 59 |
+
http://orteil.dashnet.org/cookieclicker/img/caramelWave.png
|
| 60 |
+
http://orteil.dashnet.org/cookieclicker/img/chancemaker.png
|
| 61 |
+
http://orteil.dashnet.org/cookieclicker/img/chancemakerBackground.png
|
| 62 |
+
http://orteil.dashnet.org/cookieclicker/img/chocolateMilkWave.png
|
| 63 |
+
http://orteil.dashnet.org/cookieclicker/img/clayBG.jpg
|
| 64 |
+
http://orteil.dashnet.org/cookieclicker/img/cloneGrandma.png
|
| 65 |
+
http://orteil.dashnet.org/cookieclicker/img/contract.png
|
| 66 |
+
http://orteil.dashnet.org/cookieclicker/img/control.png
|
| 67 |
+
http://orteil.dashnet.org/cookieclicker/img/cookieShadow.png
|
| 68 |
+
http://orteil.dashnet.org/cookieclicker/img/cookieShower1.png
|
| 69 |
+
http://orteil.dashnet.org/cookieclicker/img/cookieShower2.png
|
| 70 |
+
http://orteil.dashnet.org/cookieclicker/img/cookieShower3.png
|
| 71 |
+
http://orteil.dashnet.org/cookieclicker/img/cortex.png
|
| 72 |
+
http://orteil.dashnet.org/cookieclicker/img/cortexBackground.png
|
| 73 |
+
http://orteil.dashnet.org/cookieclicker/img/cosmicGrandma.png
|
| 74 |
+
http://orteil.dashnet.org/cookieclicker/img/cursor.png
|
| 75 |
+
http://orteil.dashnet.org/cookieclicker/img/darkNoise.jpg
|
| 76 |
+
http://orteil.dashnet.org/cookieclicker/img/darkNoise.png
|
| 77 |
+
http://orteil.dashnet.org/cookieclicker/img/darkNoiseTopBar.jpg
|
| 78 |
+
http://orteil.dashnet.org/cookieclicker/img/dashnetLogo.png
|
| 79 |
+
http://orteil.dashnet.org/cookieclicker/img/discord.png
|
| 80 |
+
http://orteil.dashnet.org/cookieclicker/img/dragon.png
|
| 81 |
+
http://orteil.dashnet.org/cookieclicker/img/dragonBG.png
|
| 82 |
+
http://orteil.dashnet.org/cookieclicker/img/dragonFrame.png
|
| 83 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonDot.png
|
| 84 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonFactory.png
|
| 85 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonFoes.png
|
| 86 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonHeroes.png
|
| 87 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonIcons.png
|
| 88 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonItems.png
|
| 89 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonMapFactory.jpg
|
| 90 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonOverlay.png
|
| 91 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonPictos.png
|
| 92 |
+
http://orteil.dashnet.org/cookieclicker/img/dungeonTiles.png
|
| 93 |
+
http://orteil.dashnet.org/cookieclicker/img/easterEggs.png
|
| 94 |
+
http://orteil.dashnet.org/cookieclicker/img/elfGrandma.png
|
| 95 |
+
http://orteil.dashnet.org/cookieclicker/img/empty.png
|
| 96 |
+
http://orteil.dashnet.org/cookieclicker/img/emptyFrame.png
|
| 97 |
+
http://orteil.dashnet.org/cookieclicker/img/factory.png
|
| 98 |
+
http://orteil.dashnet.org/cookieclicker/img/factoryBackground.png
|
| 99 |
+
http://orteil.dashnet.org/cookieclicker/img/farm.png
|
| 100 |
+
http://orteil.dashnet.org/cookieclicker/img/farmBackground.png
|
| 101 |
+
http://orteil.dashnet.org/cookieclicker/img/farmerGrandma.png
|
| 102 |
+
http://orteil.dashnet.org/cookieclicker/img/favicon.ico
|
| 103 |
+
http://orteil.dashnet.org/cookieclicker/img/featherLeft.png
|
| 104 |
+
http://orteil.dashnet.org/cookieclicker/img/featherRight.png
|
| 105 |
+
http://orteil.dashnet.org/cookieclicker/img/filler.png
|
| 106 |
+
http://orteil.dashnet.org/cookieclicker/img/fractalEngine.png
|
| 107 |
+
http://orteil.dashnet.org/cookieclicker/img/fractalEngineBackground.png
|
| 108 |
+
http://orteil.dashnet.org/cookieclicker/img/frameBorder.png
|
| 109 |
+
http://orteil.dashnet.org/cookieclicker/img/frostedReindeer.png
|
| 110 |
+
http://orteil.dashnet.org/cookieclicker/img/gardenPlants.png
|
| 111 |
+
http://orteil.dashnet.org/cookieclicker/img/gardenPlots.png
|
| 112 |
+
http://orteil.dashnet.org/cookieclicker/img/gardenTip.png
|
| 113 |
+
http://orteil.dashnet.org/cookieclicker/img/girlscoutChip.png
|
| 114 |
+
http://orteil.dashnet.org/cookieclicker/img/girlscoutCrumb.png
|
| 115 |
+
http://orteil.dashnet.org/cookieclicker/img/girlscoutDoe.png
|
| 116 |
+
http://orteil.dashnet.org/cookieclicker/img/girlscoutLucky.png
|
| 117 |
+
http://orteil.dashnet.org/cookieclicker/img/glint.jpg
|
| 118 |
+
http://orteil.dashnet.org/cookieclicker/img/glint.png
|
| 119 |
+
http://orteil.dashnet.org/cookieclicker/img/goldCookie.png
|
| 120 |
+
http://orteil.dashnet.org/cookieclicker/img/grandma.png
|
| 121 |
+
http://orteil.dashnet.org/cookieclicker/img/grandmaBackground.png
|
| 122 |
+
http://orteil.dashnet.org/cookieclicker/img/grandmas1.jpg
|
| 123 |
+
http://orteil.dashnet.org/cookieclicker/img/grandmas2.jpg
|
| 124 |
+
http://orteil.dashnet.org/cookieclicker/img/grandmas3.jpg
|
| 125 |
+
http://orteil.dashnet.org/cookieclicker/img/grandmasGrandma.png
|
| 126 |
+
http://orteil.dashnet.org/cookieclicker/img/grimoireBG.png
|
| 127 |
+
http://orteil.dashnet.org/cookieclicker/img/heartStorm.png
|
| 128 |
+
http://orteil.dashnet.org/cookieclicker/img/hearts.png
|
| 129 |
+
http://orteil.dashnet.org/cookieclicker/img/heavenRing1.jpg
|
| 130 |
+
http://orteil.dashnet.org/cookieclicker/img/heavenRing2.jpg
|
| 131 |
+
http://orteil.dashnet.org/cookieclicker/img/heavenlyMoney.png
|
| 132 |
+
http://orteil.dashnet.org/cookieclicker/img/heraldFlag.png
|
| 133 |
+
http://orteil.dashnet.org/cookieclicker/img/icon.ico
|
| 134 |
+
http://orteil.dashnet.org/cookieclicker/img/icon.png
|
| 135 |
+
http://orteil.dashnet.org/cookieclicker/img/icons.png
|
| 136 |
+
http://orteil.dashnet.org/cookieclicker/img/idleverse.png
|
| 137 |
+
http://orteil.dashnet.org/cookieclicker/img/idleverseBackground.png
|
| 138 |
+
http://orteil.dashnet.org/cookieclicker/img/imperfectCookie.png
|
| 139 |
+
http://orteil.dashnet.org/cookieclicker/img/infoBG.png
|
| 140 |
+
http://orteil.dashnet.org/cookieclicker/img/infoBGfade.png
|
| 141 |
+
http://orteil.dashnet.org/cookieclicker/img/javascriptconsole.png
|
| 142 |
+
http://orteil.dashnet.org/cookieclicker/img/javascriptconsoleBackground.png
|
| 143 |
+
http://orteil.dashnet.org/cookieclicker/img/levelUp.png
|
| 144 |
+
http://orteil.dashnet.org/cookieclicker/img/linkDash.png
|
| 145 |
+
http://orteil.dashnet.org/cookieclicker/img/linkPulse.gif
|
| 146 |
+
http://orteil.dashnet.org/cookieclicker/img/linkPulse.png
|
| 147 |
+
http://orteil.dashnet.org/cookieclicker/img/lockOff.png
|
| 148 |
+
http://orteil.dashnet.org/cookieclicker/img/lockOn.png
|
| 149 |
+
http://orteil.dashnet.org/cookieclicker/img/luckyGrandma.png
|
| 150 |
+
http://orteil.dashnet.org/cookieclicker/img/mapBG.jpg
|
| 151 |
+
http://orteil.dashnet.org/cookieclicker/img/mapIcons.png
|
| 152 |
+
http://orteil.dashnet.org/cookieclicker/img/marbleBG.jpg
|
| 153 |
+
http://orteil.dashnet.org/cookieclicker/img/marshmallows.png
|
| 154 |
+
http://orteil.dashnet.org/cookieclicker/img/messageBG.png
|
| 155 |
+
http://orteil.dashnet.org/cookieclicker/img/metaGrandma.png
|
| 156 |
+
http://orteil.dashnet.org/cookieclicker/img/milk.png
|
| 157 |
+
http://orteil.dashnet.org/cookieclicker/img/milkBanana.png
|
| 158 |
+
http://orteil.dashnet.org/cookieclicker/img/milkBlack.png
|
| 159 |
+
http://orteil.dashnet.org/cookieclicker/img/milkBlackcurrant.png
|
| 160 |
+
http://orteil.dashnet.org/cookieclicker/img/milkBlood.png
|
| 161 |
+
http://orteil.dashnet.org/cookieclicker/img/milkBlueFire.png
|
| 162 |
+
http://orteil.dashnet.org/cookieclicker/img/milkBlueberry.png
|
| 163 |
+
http://orteil.dashnet.org/cookieclicker/img/milkCaramel.png
|
| 164 |
+
http://orteil.dashnet.org/cookieclicker/img/milkCherry.png
|
| 165 |
+
http://orteil.dashnet.org/cookieclicker/img/milkChocolate.png
|
| 166 |
+
http://orteil.dashnet.org/cookieclicker/img/milkCoconut.png
|
| 167 |
+
http://orteil.dashnet.org/cookieclicker/img/milkCoffee.png
|
| 168 |
+
http://orteil.dashnet.org/cookieclicker/img/milkDragonfruit.png
|
| 169 |
+
http://orteil.dashnet.org/cookieclicker/img/milkFire.png
|
| 170 |
+
http://orteil.dashnet.org/cookieclicker/img/milkGold.png
|
| 171 |
+
http://orteil.dashnet.org/cookieclicker/img/milkGreenFire.png
|
| 172 |
+
http://orteil.dashnet.org/cookieclicker/img/milkHazelnut.png
|
| 173 |
+
http://orteil.dashnet.org/cookieclicker/img/milkHoney.png
|
| 174 |
+
http://orteil.dashnet.org/cookieclicker/img/milkLicorice.png
|
| 175 |
+
http://orteil.dashnet.org/cookieclicker/img/milkLime.png
|
| 176 |
+
http://orteil.dashnet.org/cookieclicker/img/milkMaple.png
|
| 177 |
+
http://orteil.dashnet.org/cookieclicker/img/milkMelon.png
|
| 178 |
+
http://orteil.dashnet.org/cookieclicker/img/milkMint.png
|
| 179 |
+
http://orteil.dashnet.org/cookieclicker/img/milkOrange.png
|
| 180 |
+
http://orteil.dashnet.org/cookieclicker/img/milkPeach.png
|
| 181 |
+
http://orteil.dashnet.org/cookieclicker/img/milkPlain.png
|
| 182 |
+
http://orteil.dashnet.org/cookieclicker/img/milkRaspberry.png
|
| 183 |
+
http://orteil.dashnet.org/cookieclicker/img/milkRose.png
|
| 184 |
+
http://orteil.dashnet.org/cookieclicker/img/milkSoy.png
|
| 185 |
+
http://orteil.dashnet.org/cookieclicker/img/milkSpiced.png
|
| 186 |
+
http://orteil.dashnet.org/cookieclicker/img/milkStars.png
|
| 187 |
+
http://orteil.dashnet.org/cookieclicker/img/milkStrawberry.png
|
| 188 |
+
http://orteil.dashnet.org/cookieclicker/img/milkTea.png
|
| 189 |
+
http://orteil.dashnet.org/cookieclicker/img/milkVanilla.png
|
| 190 |
+
http://orteil.dashnet.org/cookieclicker/img/milkWave.png
|
| 191 |
+
http://orteil.dashnet.org/cookieclicker/img/milkZebra.png
|
| 192 |
+
http://orteil.dashnet.org/cookieclicker/img/mine.png
|
| 193 |
+
http://orteil.dashnet.org/cookieclicker/img/mineBackground.png
|
| 194 |
+
http://orteil.dashnet.org/cookieclicker/img/minerGrandma.png
|
| 195 |
+
http://orteil.dashnet.org/cookieclicker/img/money.png
|
| 196 |
+
http://orteil.dashnet.org/cookieclicker/img/mysticBG.jpg
|
| 197 |
+
http://orteil.dashnet.org/cookieclicker/img/nest.png
|
| 198 |
+
http://orteil.dashnet.org/cookieclicker/img/orangeWave.png
|
| 199 |
+
http://orteil.dashnet.org/cookieclicker/img/panelBG.png
|
| 200 |
+
http://orteil.dashnet.org/cookieclicker/img/panelGradientBottom.png
|
| 201 |
+
http://orteil.dashnet.org/cookieclicker/img/panelGradientLeft.png
|
| 202 |
+
http://orteil.dashnet.org/cookieclicker/img/panelGradientRight.png
|
| 203 |
+
http://orteil.dashnet.org/cookieclicker/img/panelGradientTop.png
|
| 204 |
+
http://orteil.dashnet.org/cookieclicker/img/panelHorizontal.png
|
| 205 |
+
http://orteil.dashnet.org/cookieclicker/img/panelMenu.png
|
| 206 |
+
http://orteil.dashnet.org/cookieclicker/img/panelMenu2.png
|
| 207 |
+
http://orteil.dashnet.org/cookieclicker/img/panelMenu3.png
|
| 208 |
+
http://orteil.dashnet.org/cookieclicker/img/panelVertical.png
|
| 209 |
+
http://orteil.dashnet.org/cookieclicker/img/pantheonBG.png
|
| 210 |
+
http://orteil.dashnet.org/cookieclicker/img/parade.png
|
| 211 |
+
http://orteil.dashnet.org/cookieclicker/img/patreon.png
|
| 212 |
+
http://orteil.dashnet.org/cookieclicker/img/perfectCookie.png
|
| 213 |
+
http://orteil.dashnet.org/cookieclicker/img/pieFill.png
|
| 214 |
+
http://orteil.dashnet.org/cookieclicker/img/playsaurusLogo.png
|
| 215 |
+
http://orteil.dashnet.org/cookieclicker/img/playsaurusbanner1.png
|
| 216 |
+
http://orteil.dashnet.org/cookieclicker/img/playsaurusbanner2.png
|
| 217 |
+
http://orteil.dashnet.org/cookieclicker/img/playsaurusbanner3.png
|
| 218 |
+
http://orteil.dashnet.org/cookieclicker/img/pointGlow.gif
|
| 219 |
+
http://orteil.dashnet.org/cookieclicker/img/pointyLad.png
|
| 220 |
+
http://orteil.dashnet.org/cookieclicker/img/portal.png
|
| 221 |
+
http://orteil.dashnet.org/cookieclicker/img/portalBackground.png
|
| 222 |
+
http://orteil.dashnet.org/cookieclicker/img/portraitChip.png
|
| 223 |
+
http://orteil.dashnet.org/cookieclicker/img/portraitCrumb.png
|
| 224 |
+
http://orteil.dashnet.org/cookieclicker/img/portraitDoe.png
|
| 225 |
+
http://orteil.dashnet.org/cookieclicker/img/portraitLucky.png
|
| 226 |
+
http://orteil.dashnet.org/cookieclicker/img/prestigeBar.jpg
|
| 227 |
+
http://orteil.dashnet.org/cookieclicker/img/prestigeBarCap.png
|
| 228 |
+
http://orteil.dashnet.org/cookieclicker/img/prism.png
|
| 229 |
+
http://orteil.dashnet.org/cookieclicker/img/prismBackground.png
|
| 230 |
+
http://orteil.dashnet.org/cookieclicker/img/rainbowGrandma.png
|
| 231 |
+
http://orteil.dashnet.org/cookieclicker/img/raspberryWave.png
|
| 232 |
+
http://orteil.dashnet.org/cookieclicker/img/roundFrameBorder.png
|
| 233 |
+
http://orteil.dashnet.org/cookieclicker/img/roundedPanelBG.png
|
| 234 |
+
http://orteil.dashnet.org/cookieclicker/img/roundedPanelBGS.png
|
| 235 |
+
http://orteil.dashnet.org/cookieclicker/img/roundedPanelLeft.png
|
| 236 |
+
http://orteil.dashnet.org/cookieclicker/img/roundedPanelLeftS.png
|
| 237 |
+
http://orteil.dashnet.org/cookieclicker/img/roundedPanelRight.png
|
| 238 |
+
http://orteil.dashnet.org/cookieclicker/img/roundedPanelRightS.png
|
| 239 |
+
http://orteil.dashnet.org/cookieclicker/img/santa.png
|
| 240 |
+
http://orteil.dashnet.org/cookieclicker/img/scriptGrandma.png
|
| 241 |
+
http://orteil.dashnet.org/cookieclicker/img/selectTarget.png
|
| 242 |
+
http://orteil.dashnet.org/cookieclicker/img/sentientFurnace.png
|
| 243 |
+
http://orteil.dashnet.org/cookieclicker/img/shadedBorders.png
|
| 244 |
+
http://orteil.dashnet.org/cookieclicker/img/shadedBordersGold.png
|
| 245 |
+
http://orteil.dashnet.org/cookieclicker/img/shadedBordersRed.png
|
| 246 |
+
http://orteil.dashnet.org/cookieclicker/img/shadedBordersSoft.png
|
| 247 |
+
http://orteil.dashnet.org/cookieclicker/img/shimmeringVeil.png
|
| 248 |
+
http://orteil.dashnet.org/cookieclicker/img/shine.png
|
| 249 |
+
http://orteil.dashnet.org/cookieclicker/img/shineGold.png
|
| 250 |
+
http://orteil.dashnet.org/cookieclicker/img/shineRed.png
|
| 251 |
+
http://orteil.dashnet.org/cookieclicker/img/shineSpoke.png
|
| 252 |
+
http://orteil.dashnet.org/cookieclicker/img/shinyWinkler.png
|
| 253 |
+
http://orteil.dashnet.org/cookieclicker/img/shinyWrinkler.png
|
| 254 |
+
http://orteil.dashnet.org/cookieclicker/img/shinyWrinklerBits.png
|
| 255 |
+
http://orteil.dashnet.org/cookieclicker/img/shipment.png
|
| 256 |
+
http://orteil.dashnet.org/cookieclicker/img/shipmentBackground.png
|
| 257 |
+
http://orteil.dashnet.org/cookieclicker/img/smallCookies.png
|
| 258 |
+
http://orteil.dashnet.org/cookieclicker/img/smallDollars.png
|
| 259 |
+
http://orteil.dashnet.org/cookieclicker/img/snow.jpg
|
| 260 |
+
http://orteil.dashnet.org/cookieclicker/img/snow2.jpg
|
| 261 |
+
http://orteil.dashnet.org/cookieclicker/img/sparkles.jpg
|
| 262 |
+
http://orteil.dashnet.org/cookieclicker/img/spellBG.png
|
| 263 |
+
http://orteil.dashnet.org/cookieclicker/img/spinnyBig.png
|
| 264 |
+
http://orteil.dashnet.org/cookieclicker/img/spinnySmall.png
|
| 265 |
+
http://orteil.dashnet.org/cookieclicker/img/spookyCookie.png
|
| 266 |
+
http://orteil.dashnet.org/cookieclicker/img/starbg.jpg
|
| 267 |
+
http://orteil.dashnet.org/cookieclicker/img/storeTile.jpg
|
| 268 |
+
http://orteil.dashnet.org/cookieclicker/img/sugarLump.png
|
| 269 |
+
http://orteil.dashnet.org/cookieclicker/img/temple.png
|
| 270 |
+
http://orteil.dashnet.org/cookieclicker/img/templeBackground.png
|
| 271 |
+
http://orteil.dashnet.org/cookieclicker/img/templeGrandma.png
|
| 272 |
+
http://orteil.dashnet.org/cookieclicker/img/timemachine.png
|
| 273 |
+
http://orteil.dashnet.org/cookieclicker/img/timemachineBackground.png
|
| 274 |
+
http://orteil.dashnet.org/cookieclicker/img/timerBars.png
|
| 275 |
+
http://orteil.dashnet.org/cookieclicker/img/tinyEyeEmpty.png
|
| 276 |
+
http://orteil.dashnet.org/cookieclicker/img/tinyEyeOff.png
|
| 277 |
+
http://orteil.dashnet.org/cookieclicker/img/tinyEyeOn.png
|
| 278 |
+
http://orteil.dashnet.org/cookieclicker/img/tinyglobe.gif
|
| 279 |
+
http://orteil.dashnet.org/cookieclicker/img/tinyglobeSheet.gif
|
| 280 |
+
http://orteil.dashnet.org/cookieclicker/img/transmutedGrandma.png
|
| 281 |
+
http://orteil.dashnet.org/cookieclicker/img/turnInto.png
|
| 282 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeFrame.png
|
| 283 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeFrameHeavenly.png
|
| 284 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeFrameOld.png
|
| 285 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeFrameShadowOld.png
|
| 286 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeHighlight.jpg
|
| 287 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeHighlight.png
|
| 288 |
+
http://orteil.dashnet.org/cookieclicker/img/upgradeSelector.png
|
| 289 |
+
http://orteil.dashnet.org/cookieclicker/img/weeHoodie.png
|
| 290 |
+
http://orteil.dashnet.org/cookieclicker/img/winkler.png
|
| 291 |
+
http://orteil.dashnet.org/cookieclicker/img/winterFrame.png
|
| 292 |
+
http://orteil.dashnet.org/cookieclicker/img/winterWinkler.png
|
| 293 |
+
http://orteil.dashnet.org/cookieclicker/img/winterWrinkler.png
|
| 294 |
+
http://orteil.dashnet.org/cookieclicker/img/witchGrandma.png
|
| 295 |
+
http://orteil.dashnet.org/cookieclicker/img/wizardtower.png
|
| 296 |
+
http://orteil.dashnet.org/cookieclicker/img/wizardtowerBackground.png
|
| 297 |
+
http://orteil.dashnet.org/cookieclicker/img/workerGrandma.png
|
| 298 |
+
http://orteil.dashnet.org/cookieclicker/img/wrathContract.png
|
| 299 |
+
http://orteil.dashnet.org/cookieclicker/img/wrathCookie.png
|
| 300 |
+
http://orteil.dashnet.org/cookieclicker/img/wrinkler.png
|
| 301 |
+
http://orteil.dashnet.org/cookieclicker/img/wrinklerBits.png
|
| 302 |
+
http://orteil.dashnet.org/cookieclicker/img/wrinklerBitsOld.png
|
| 303 |
+
http://orteil.dashnet.org/cookieclicker/img/wrinklerBlink.png
|
| 304 |
+
http://orteil.dashnet.org/cookieclicker/img/wrinklerGooglies.png
|
| 305 |
+
http://orteil.dashnet.org/cookieclicker/img/wrinklerShadow.png
|
| 306 |
+
http://orteil.dashnet.org/cookieclicker/img/you.png
|
| 307 |
+
http://orteil.dashnet.org/cookieclicker/img/youAddons.png
|
| 308 |
+
http://orteil.dashnet.org/cookieclicker/img/youBackground.png
|
| 309 |
+
http://orteil.dashnet.org/cookieclicker/img/youLight.png
|
static/img/alchemylab.png
ADDED
|
static/img/alchemylabBackground.png
ADDED
|
static/img/alteredGrandma.png
ADDED
|
static/img/alternateGrandma.png
ADDED
|
static/img/antiGrandma.png
ADDED
|
static/img/antimattercondenser.png
ADDED
|
static/img/antimattercondenserBackground.png
ADDED
|
static/img/aqworldsbanner.jpg
ADDED
|
static/img/ascendBox.png
ADDED
|
static/img/ascendInfo.png
ADDED
|
static/img/ascendSlot.png
ADDED
|
static/img/ascendWisp.png
ADDED
|
static/img/ascendedBakingPod.png
ADDED
|
static/img/bank.png
ADDED
|
static/img/bankBackground.png
ADDED
|
static/img/bankGrandma.png
ADDED
|
static/img/bgBW.jpg
ADDED
|
static/img/bgBlack.jpg
ADDED
|
static/img/bgBlue.jpg
ADDED
|
static/img/bgCandy.jpg
ADDED
|
Git LFS Details
|
static/img/bgChoco.jpg
ADDED
|
static/img/bgChocoDark.jpg
ADDED
|
static/img/bgCoarse.jpg
ADDED
|
static/img/bgFoil.jpg
ADDED
|
Git LFS Details
|
static/img/bgGold.jpg
ADDED
|
static/img/bgMint.jpg
ADDED
|
static/img/bgMoney.jpg
ADDED
|
static/img/bgMoneyChart.jpg
ADDED
|
static/img/bgPaint.jpg
ADDED
|
Git LFS Details
|
static/img/bgPink.jpg
ADDED
|
static/img/bgPurple.jpg
ADDED
|
static/img/bgRed.jpg
ADDED
|
static/img/bgSilver.jpg
ADDED
|
static/img/bgSky.jpg
ADDED
|