Compare commits
102
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
affd704443 | ||
|
|
7f06fd383a | ||
|
|
0f5aa41305 | ||
|
|
acd0fbbaf5 | ||
|
|
63e06d7133 | ||
|
|
38636f6323 | ||
|
|
5a37e21d10 | ||
|
|
082bc89a4a | ||
|
|
8675bd041a | ||
|
|
570c0b760e | ||
|
|
fcd39a3860 | ||
|
|
859045b475 | ||
|
|
60e9ced10e | ||
|
|
9f9a28b008 | ||
|
|
5f26d36cc2 | ||
|
|
5403aa8bac | ||
|
|
65add868f1 | ||
|
|
888b175f25 | ||
|
|
b17a8625bc | ||
|
|
df31286af0 | ||
|
|
9291403f58 | ||
|
|
5718e621f7 | ||
|
|
370940000b | ||
|
|
ee3e44cbba | ||
|
|
f5769ed74b | ||
|
|
dc96341087 | ||
|
|
7a7419a2f6 | ||
|
|
33b968cab8 | ||
|
|
096f18deef | ||
|
|
a241ea51e7 | ||
|
|
86523a4a6c | ||
|
|
bbc8ed6ec2 | ||
|
|
6c939d0591 | ||
|
|
78bb328d5d | ||
|
|
b8f8c3ef0c | ||
|
|
0c64005603 | ||
|
|
f24e07465b | ||
|
|
bed1647332 | ||
|
|
a02423f25b | ||
|
|
b409ddd2ed | ||
|
|
7c78299ade | ||
|
|
1ac83d901a | ||
|
|
7b75ddddea | ||
|
|
9f55f279e7 | ||
|
|
1c14ee0267 | ||
|
|
8bae0fdb85 | ||
|
|
362d403601 | ||
|
|
4b16c896f1 | ||
|
|
33c463b15a | ||
|
|
5b982cf9cf | ||
|
|
e0ef8d7b11 | ||
|
|
38f33e2478 | ||
|
|
9bc392a0c5 | ||
|
|
50d4e3e215 | ||
|
|
17ac30177c | ||
|
|
ef6585b9af | ||
|
|
a89f440809 | ||
|
|
e928c0227e | ||
|
|
c20abff9f4 | ||
|
|
26672fe57b | ||
|
|
f59b041e96 | ||
|
|
89c94ea934 | ||
|
|
3e525da15c | ||
|
|
c498574a77 | ||
|
|
0a6113cf72 | ||
|
|
248be6d9ce | ||
|
|
a0b4d5eecb | ||
|
|
aa2e866cc5 | ||
|
|
46202be466 | ||
|
|
b2fcbcdb81 | ||
|
|
386dae3830 | ||
|
|
5ac33725b7 | ||
|
|
96fa090f0d | ||
|
|
e4143126a0 | ||
|
|
c8a5a3c34f | ||
|
|
0616887d28 | ||
|
|
196a911e2d | ||
|
|
2695fdb140 | ||
|
|
11b1be5c71 | ||
|
|
bf4f910cee | ||
|
|
b0ad9b9786 | ||
|
|
eb0861c5d7 | ||
|
|
4ebc2d597e | ||
|
|
4a76fa9f95 | ||
|
|
3b8adb7b9f | ||
|
|
9c28ef5411 | ||
|
|
b1ba7f02f7 | ||
|
|
c78b06b16a | ||
|
|
ea1d288c39 | ||
|
|
d69e249d58 | ||
|
|
a2db049b71 | ||
|
|
beb894557b | ||
|
|
6d9f6d61f4 | ||
|
|
0dd3f2594b | ||
|
|
75b59fdaa8 | ||
|
|
627fcb7b52 | ||
|
|
1cde6308fa | ||
|
|
fa49f84262 | ||
|
|
2b174fe323 | ||
|
|
aaeb8a62eb | ||
|
|
1c0a0a9851 | ||
|
|
b1ec82b4b8 |
No files matched your search
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
/*! For license information please see CookieMonster.js.LICENSE.txt */
|
||||
(()=>{var e={75:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,a,n,i=(n={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&("loading"!==e.document.readyState?n.pub.init():e.document.addEventListener("DOMContentLoaded",n.pub.init,!1))},installBySelector:function(t,o){if(!(o=o?n.node(o):e.document))throw new Error("Missing root node");for(var a=o.querySelectorAll(t),i=new RegExp("(^|\\s)("+n.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<a.length;r+=1){var s,l;if(!(a[r].jscolor&&a[r].jscolor instanceof n.pub)&&(void 0===a[r].type||"color"!=a[r].type.toLowerCase()||!n.isColorAttrSupported)&&(null!==(s=n.getDataAttr(a[r],"jscolor"))||a[r].className&&(l=a[r].className.match(i)))){var c=a[r],d="";null!==s?d=s:l&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+n.docsRef),l[4]&&(d=l[4]));var m=null;if(d.trim())try{m=n.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new n.pub(c,m)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!n.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<n.instances.length;t+=1)n.instances[t]&&n.instances[t].targetElement&&e.push(n.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return n.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,a=null;try{a=e.document.querySelector(o)}catch(e){return console.warn(e),null}return a||console.warn("No element matches the selector: %s",o),a}return n.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===n.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=n.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(n.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(a=e.document.createElement("input"),!(!a.setAttribute||(a.setAttribute("type","color"),"color"!=a.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={},o=arguments[2];return t[i=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={};var a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(n.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[n.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(n.dataProp)){if(void 0===o)return;e[n.dataProp]={}}var a=e[n.dataProp];return a.hasOwnProperty(t)||void 0===o||(a[t]=o),a[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var a="data-"+t;e.setAttribute(a,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,a){n._attachedGroupEvents.hasOwnProperty(e)||(n._attachedGroupEvents[e]=[]),n._attachedGroupEvents[e].push([t,o,a]),t.addEventListener(o,a,!1)},detachGroupEvents:function(e){if(n._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<n._attachedGroupEvents[e].length;t+=1){var o=n._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete n._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},triggerEvent:function(t,o,a,i){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:a,cancelable:i}):(r=e.document.createEvent("Event")).initEvent(o,a,i),!!r&&(n.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,a){e&&n.isTextInput(e)&&n.triggerEvent(e,t,o,a)},eventKey:function(e){var t={9:"Tab",13:"Enter",27:"Escape"};return"string"==typeof e.code?e.code:void 0!==e.keyCode&&t.hasOwnLine truncated
|
||||
(()=>{var e={75:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,a,n,i=(n={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&("loading"!==e.document.readyState?n.pub.init():e.document.addEventListener("DOMContentLoaded",n.pub.init,!1))},installBySelector:function(t,o){if(!(o=o?n.node(o):e.document))throw new Error("Missing root node");for(var a=o.querySelectorAll(t),i=new RegExp("(^|\\s)("+n.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<a.length;r+=1){var s,l;if(!(a[r].jscolor&&a[r].jscolor instanceof n.pub)&&(void 0===a[r].type||"color"!=a[r].type.toLowerCase()||!n.isColorAttrSupported)&&(null!==(s=n.getDataAttr(a[r],"jscolor"))||a[r].className&&(l=a[r].className.match(i)))){var c=a[r],d="";null!==s?d=s:l&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+n.docsRef),l[4]&&(d=l[4]));var m=null;if(d.trim())try{m=n.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new n.pub(c,m)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!n.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<n.instances.length;t+=1)n.instances[t]&&n.instances[t].targetElement&&e.push(n.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return n.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,a=null;try{a=e.document.querySelector(o)}catch(e){return console.warn(e),null}return a||console.warn("No element matches the selector: %s",o),a}return n.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===n.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=n.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(n.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(a=e.document.createElement("input"),!(!a.setAttribute||(a.setAttribute("type","color"),"color"!=a.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={},o=arguments[2];return t[i=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={};var a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(n.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[n.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(n.dataProp)){if(void 0===o)return;e[n.dataProp]={}}var a=e[n.dataProp];return a.hasOwnProperty(t)||void 0===o||(a[t]=o),a[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var a="data-"+t;e.setAttribute(a,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,a){n._attachedGroupEvents.hasOwnProperty(e)||(n._attachedGroupEvents[e]=[]),n._attachedGroupEvents[e].push([t,o,a]),t.addEventListener(o,a,!1)},detachGroupEvents:function(e){if(n._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<n._attachedGroupEvents[e].length;t+=1){var o=n._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete n._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},triggerEvent:function(t,o,a,i){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:a,cancelable:i}):(r=e.document.createEvent("Event")).initEvent(o,a,i),!!r&&(n.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,a){e&&n.isTextInput(e)&&n.triggerEvent(e,t,o,a)},eventKey:function(e){var t={9:"Tab",13:"Enter",27:"Escape"};return"string"==typeof e.code?e.code:void 0!==e.keyCode&&t.hasOwnLine truncated
|
||||
//# sourceMappingURL=https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js.map
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"CookieMonster.js","mappings":";6BAYA,SAAWA,EAAQC,GAElB,aAE4D,iBAAnBC,EAAOC,QAchDF,EAAQD,GAZPE,EAAOC,QAAUH,EAAOI,SACvBH,EAASD,GACT,SAAUK,GACT,IAAKA,EAAID,SACR,MAAM,IAAIE,MAAM,wCAEjB,OAAOL,EAAQI,EAChB,CAOF,CApBD,CAoBqB,oBAAXE,OAAyBA,OAASC,MAAM,SAAUD,GAK5D,aAGA,IAmiDME,EAl8BAC,EApYAC,EA3NFC,EAFAC,GAEAD,EAAM,CAGTE,aAAc,EA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AAIoD,EAAWC,EAASC,GAChD,GAAKtD,EAAL,CAIA,IAAIuD,EAAK,KAaT,MAXqB,mBAAVC,MACVD,EAAK,IAAIC,MAAMJ,EAAW,CACzBC,QAASA,EACTC,WAAYA,KAIbC,EAAKhH,EAAOH,SAALine truncated
|
||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
/*! For license information please see CookieMonsterDev.js.LICENSE.txt */
|
||||
(()=>{var e={75:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,a,n,i=(n={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&("loading"!==e.document.readyState?n.pub.init():e.document.addEventListener("DOMContentLoaded",n.pub.init,!1))},installBySelector:function(t,o){if(!(o=o?n.node(o):e.document))throw new Error("Missing root node");for(var a=o.querySelectorAll(t),i=new RegExp("(^|\\s)("+n.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<a.length;r+=1){var s,l;if(!(a[r].jscolor&&a[r].jscolor instanceof n.pub)&&(void 0===a[r].type||"color"!=a[r].type.toLowerCase()||!n.isColorAttrSupported)&&(null!==(s=n.getDataAttr(a[r],"jscolor"))||a[r].className&&(l=a[r].className.match(i)))){var c=a[r],d="";null!==s?d=s:l&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+n.docsRef),l[4]&&(d=l[4]));var m=null;if(d.trim())try{m=n.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new n.pub(c,m)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!n.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<n.instances.length;t+=1)n.instances[t]&&n.instances[t].targetElement&&e.push(n.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return n.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,a=null;try{a=e.document.querySelector(o)}catch(e){return console.warn(e),null}return a||console.warn("No element matches the selector: %s",o),a}return n.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===n.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=n.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(n.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(a=e.document.createElement("input"),!(!a.setAttribute||(a.setAttribute("type","color"),"color"!=a.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={},o=arguments[2];return t[i=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={};var a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(n.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[n.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(n.dataProp)){if(void 0===o)return;e[n.dataProp]={}}var a=e[n.dataProp];return a.hasOwnProperty(t)||void 0===o||(a[t]=o),a[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var a="data-"+t;e.setAttribute(a,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,a){n._attachedGroupEvents.hasOwnProperty(e)||(n._attachedGroupEvents[e]=[]),n._attachedGroupEvents[e].push([t,o,a]),t.addEventListener(o,a,!1)},detachGroupEvents:function(e){if(n._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<n._attachedGroupEvents[e].length;t+=1){var o=n._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete n._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},triggerEvent:function(t,o,a,i){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:a,cancelable:i}):(r=e.document.createEvent("Event")).initEvent(o,a,i),!!r&&(n.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,a){e&&n.isTextInput(e)&&n.triggerEvent(e,t,o,a)},eventKey:function(e){var t={9:"Tab",13:"Enter",27:"Escape"};return"string"==typeof e.code?e.code:void 0!==e.keyCode&&t.hasOwnLine truncated
|
||||
(()=>{var e={75:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,a,n,i=(n={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&("loading"!==e.document.readyState?n.pub.init():e.document.addEventListener("DOMContentLoaded",n.pub.init,!1))},installBySelector:function(t,o){if(!(o=o?n.node(o):e.document))throw new Error("Missing root node");for(var a=o.querySelectorAll(t),i=new RegExp("(^|\\s)("+n.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<a.length;r+=1){var s,l;if(!(a[r].jscolor&&a[r].jscolor instanceof n.pub)&&(void 0===a[r].type||"color"!=a[r].type.toLowerCase()||!n.isColorAttrSupported)&&(null!==(s=n.getDataAttr(a[r],"jscolor"))||a[r].className&&(l=a[r].className.match(i)))){var c=a[r],d="";null!==s?d=s:l&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+n.docsRef),l[4]&&(d=l[4]));var m=null;if(d.trim())try{m=n.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new n.pub(c,m)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!n.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<n.instances.length;t+=1)n.instances[t]&&n.instances[t].targetElement&&e.push(n.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return n.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,a=null;try{a=e.document.querySelector(o)}catch(e){return console.warn(e),null}return a||console.warn("No element matches the selector: %s",o),a}return n.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===n.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=n.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(n.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(a=e.document.createElement("input"),!(!a.setAttribute||(a.setAttribute("type","color"),"color"!=a.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={},o=arguments[2];return t[i=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(n.dataProp)?e[n.dataProp]:e[n.dataProp]={};var a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(n.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[n.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(n.dataProp)){if(void 0===o)return;e[n.dataProp]={}}var a=e[n.dataProp];return a.hasOwnProperty(t)||void 0===o||(a[t]=o),a[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var a="data-"+t;e.setAttribute(a,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,a){n._attachedGroupEvents.hasOwnProperty(e)||(n._attachedGroupEvents[e]=[]),n._attachedGroupEvents[e].push([t,o,a]),t.addEventListener(o,a,!1)},detachGroupEvents:function(e){if(n._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<n._attachedGroupEvents[e].length;t+=1){var o=n._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete n._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},triggerEvent:function(t,o,a,i){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:a,cancelable:i}):(r=e.document.createEvent("Event")).initEvent(o,a,i),!!r&&(n.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,a){e&&n.isTextInput(e)&&n.triggerEvent(e,t,o,a)},eventKey:function(e){var t={9:"Tab",13:"Enter",27:"Escape"};return"string"==typeof e.code?e.code:void 0!==e.keyCode&&t.hasOwnLine truncated
|
||||
//# sourceMappingURL=https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonsterDev.js.map
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"CookieMonsterDev.js","mappings":";6BAYA,SAAWA,EAAQC,GAElB,aAE4D,iBAAnBC,EAAOC,QAchDF,EAAQD,GAZPE,EAAOC,QAAUH,EAAOI,SACvBH,EAASD,GACT,SAAUK,GACT,IAAKA,EAAID,SACR,MAAM,IAAIE,MAAM,wCAEjB,OAAOL,EAAQI,EAChB,CAOF,CApBD,CAoBqB,oBAAXE,OAAyBA,OAASC,MAAM,SAAUD,GAK5D,aAGA,IAmiDME,EAl8BAC,EApYAC,EA3NFC,EAFAC,GAEAD,EAAM,CAGTE,aAAc,EAEdC,UAAY,GAEZC,WAAa,GAGbC,SAAW,gBACY,IAAXV,GAA0BA,EAAOH,WACR,YAA/BG,EAAOH,SAASc,WACnBN,EAAIO,IAAIC,OAERb,EAAOH,SAASiB,iBAAiB,mBAAoBT,EAAIO,IAAIC,MAAM,GAGtE,EAGAE,kBAAoB,SAAUC,EAAUC,GAEvC,KADAA,EAAWA,EAAWZ,EAAIa,KAAKD,GAAYjB,EAAOH,UAEjD,MAAM,IAAIE,MAAM,qBAQjB,IALA,IAAIoB,EAAOF,EAASG,iBAAiBJ,GAGjCK,EAAa,IAAIC,OAAO,WAAajB,EAAIO,IAAIW,YAAc,6BAA8B,KAEpFC,EAAI,EAAGA,EAAIL,EAAKM,OAAQD,GAAK,EAAG,CAUxC,IAAIE,EAAUC,EARd,KAAIR,EAAKK,GAAGlB,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EAAW,QAAUD,EACzBtC,EAAG2B,aAAaY,EAAUpB,EAC3B,EAGAuB,qBAAuB,CAAC,EAGxBC,iBAAmB,SAAUC,EAAW5C,EAAI6C,EAAMC,GAC5ClG,EAAI8F,qBAAqBV,eAAeY,KAC5ChG,EAAI8F,qBAAqBE,GAAa,IAEvChG,EAAI8F,qBAAqBE,GAAW/C,KAAK,CAACG,EAAI6C,EAAMC,IACpD9C,EAAG3C,iBAAiBwF,EAAMC,GAAM,EACjC,EAGAC,kBAAoB,SAAUH,GAC7B,GAAIhG,EAAI8F,qBAAqBV,eAAeY,GAAY,CACvD,IAAK,IAAI7E,EAAI,EAAGA,EAAInB,EAAI8F,qBAAqBE,GAAW5E,OAAQD,GAAK,EAAG,CACvE,IAAIiF,EAAMpG,EAAI8F,qBAAqBE,GAAW7E,GAC9CiF,EAAI,GAAGtB,oBAAoBsB,EAAI,GAAIA,EAAI,IAAI,EAC5C,QACOpG,EAAI8F,qBAAqBE,EACjC,CACD,EAGAK,eAAiB,SAAU/D,GACtBA,EAAE+D,gBAAkB/D,EAAE+D,iBAC1B/D,EAAEgE,aAAc,CACjB,EAGAC,aAAe,SAAUnD,EAAIoD,EAAWC,EAASC,GAChD,GAAKtD,EAAL,CAIA,IAAIuD,EAAK,KAaT,MAXqB,mBAAVC,MACVD,EAAK,IAAIC,MAAMJ,EAAW,CACzBC,QAASA,EACTC,WAAYA,KAIbC,EAAKhH,EAAOH,Line truncated
|
||||
Generated
+6
-6
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"name": "@cookiemonsterteam/cookiemonster-mod",
|
||||
"version": "2.053.10",
|
||||
"version": "2.058.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@cookiemonsterteam/cookiemonster-mod",
|
||||
"version": "2.053.10",
|
||||
"version": "2.058.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@cookiemonsterteam/cookiemonsterframework": "0.2.3",
|
||||
"@eastdesire/jscolor": "^2.5.1",
|
||||
"@eslint/compat": "^1.2.7",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@eslint/js": "^9.20.0",
|
||||
"chai": "^5.2.0",
|
||||
"eslint": "^9.21.0",
|
||||
@@ -136,9 +136,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz",
|
||||
"integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz",
|
||||
"integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cookiemonsterteam/cookiemonster-mod",
|
||||
"version": "2.053.10",
|
||||
"version": "2.058.0",
|
||||
"description": "Cookie Monster is an add-on that you can load into Cookie Clicker which offers a wide range of tools and statistics to enhance the game. It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want. This is a helper and everything is an option.",
|
||||
"main": "CookieMonster.js",
|
||||
"keywords": [
|
||||
@@ -58,7 +58,7 @@
|
||||
"@cookiemonsterteam/cookiemonsterframework": "0.2.3",
|
||||
"@eastdesire/jscolor": "^2.5.1",
|
||||
"@eslint/compat": "^1.2.7",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@eslint/js": "^9.20.0",
|
||||
"chai": "^5.2.0",
|
||||
"eslint": "^9.21.0",
|
||||
|
||||
@@ -104,6 +104,11 @@ export let CacheDoRemakeBuildPrices;
|
||||
|
||||
export let CacheHadBuildAura;
|
||||
|
||||
export let CacheFarmLevel = -1;
|
||||
export let CacheGardenSoil = -1;
|
||||
export let CacheSupremeIntellect = -1;
|
||||
export let CachePlotChances = [[], [], [], [], [], []];
|
||||
|
||||
/** Store the CPS effect of each god if it was put into each slot */
|
||||
export let CacheGods = {
|
||||
0: [0, 0, 0],
|
||||
|
||||
@@ -18,7 +18,7 @@ export function AddAuraInfo(aura) {
|
||||
if (Game.cookiesPs === 0) bonusCPSPercentage = Beautify(Infinity);
|
||||
else bonusCPSPercentage = Beautify((bonusCPS / Game.cookiesPs) * 100);
|
||||
|
||||
l('dragonAuraInfo').style.minHeight = '60px';
|
||||
l('dragonAuraInfo').style.minHeight = '120px';
|
||||
l('dragonAuraInfo').style.margin = '8px';
|
||||
l('dragonAuraInfo').appendChild(document.createElement('div')).className = 'line';
|
||||
const div = document.createElement('div');
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/* eslint-disable no-continue */
|
||||
|
||||
import { CachePlotChances } from '../../Cache/VariablesAndData.js';
|
||||
import CalculateSingleTileChances from './CalculateSingleTileChances.js';
|
||||
|
||||
/**
|
||||
* Calculates the possible plants for the next garden tick and updates **`CachePlotChances`** accordingly (expensive.)
|
||||
*
|
||||
* @param {Object} minigame a reference to the garden minigame
|
||||
* @param {number} auraMult the current value of the "Supreme Intellect" dragon aura multiplier
|
||||
*/
|
||||
export default function CalculateAllPlotChances(minigame, auraMult) {
|
||||
const { plantsById, soilsById, soil, isTileUnlocked, getTile } = minigame;
|
||||
const dragonBoost = 1 + 0.05 * auraMult;
|
||||
|
||||
// calculate boosts from neighbors for next tick
|
||||
const boosts = [];
|
||||
for (let y = 0; y < 6; y++) {
|
||||
boosts[y] = [];
|
||||
for (let x = 0; x < 6; x++) boosts[y].push([1, 1]); // [aging, weed]
|
||||
}
|
||||
|
||||
const ApplyMultsToNearbyTiles = function (x, y, range, mults) {
|
||||
for (let dy = -range; dy <= range; dy++) {
|
||||
for (let dx = -range; dx <= range; dx++) {
|
||||
if ((dx !== 0 || dy !== 0) && isTileUnlocked(x + dx, y + dy)) {
|
||||
boosts[y + dy][x + dx][0] *= mults[0];
|
||||
boosts[y + dy][x + dx][1] *= mults[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (let y = 0; y < 6; y++) {
|
||||
for (let x = 0; x < 6; x++) {
|
||||
const tile = getTile(x, y);
|
||||
if (tile[0] === 0) continue;
|
||||
|
||||
let ageMult;
|
||||
let weedMult;
|
||||
let range;
|
||||
const id = tile[0] - 1;
|
||||
switch (id) {
|
||||
case 7:
|
||||
ageMult = 1.03;
|
||||
weedMult = 1;
|
||||
range = 1;
|
||||
break;
|
||||
case 31:
|
||||
ageMult = 1;
|
||||
weedMult = 0;
|
||||
range = 2;
|
||||
break;
|
||||
case 32:
|
||||
ageMult = 1;
|
||||
weedMult = 0;
|
||||
range = 1;
|
||||
break;
|
||||
case 33:
|
||||
ageMult = 0.5;
|
||||
weedMult = 1;
|
||||
range = 1;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
let mult = soilsById[soil].effMult;
|
||||
const matureAge = plantsById[id].mature;
|
||||
const stage = 1 + (tile[1] >= matureAge ? 3 : Math.floor(tile[1] / (matureAge * 0.333)));
|
||||
|
||||
// eslint-disable-next-line default-case
|
||||
switch (stage) {
|
||||
case 1:
|
||||
mult *= 0.1;
|
||||
break;
|
||||
case 2:
|
||||
mult *= 0.25;
|
||||
break;
|
||||
case 3:
|
||||
mult *= 0.5;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ageMult > 1 || mult < 1) ageMult = (ageMult - 1) * mult + 1;
|
||||
else ageMult /= mult;
|
||||
|
||||
ApplyMultsToNearbyTiles(x, y, range, [ageMult, weedMult]);
|
||||
}
|
||||
}
|
||||
|
||||
// initialize all probabilities to current state
|
||||
const plotOutcomes = [[], [], [], [], [], []];
|
||||
|
||||
for (let y = 0; y < 6; y++) {
|
||||
for (let x = 0; x < 6; x++) {
|
||||
if (!isTileUnlocked(x, y)) continue;
|
||||
|
||||
const tile = getTile(x, y);
|
||||
if (tile[0] === 0) plotOutcomes[y][x] = [{ plantId: -1, isMature: false, p: 1 }];
|
||||
else {
|
||||
const plantId = tile[0] - 1;
|
||||
plotOutcomes[y][x] = [{ plantId, isMature: tile[1] >= plantsById[plantId].mature, p: 1 }];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update each tile's chances
|
||||
for (let y = 0; y < 6; y++) {
|
||||
for (let x = 0; x < 6; x++) {
|
||||
if (!isTileUnlocked(x, y)) continue;
|
||||
|
||||
// collect neighbor probabilities
|
||||
const neighResults = [];
|
||||
const cardinals = [];
|
||||
for (let dy = -1; dy <= 1; dy++)
|
||||
for (let dx = -1; dx <= 1; dx++) {
|
||||
if ((dx !== 0 || dy !== 0) && isTileUnlocked(x + dx, y + dy)) {
|
||||
neighResults.push(plotOutcomes[y + dy][x + dx]);
|
||||
if (dx === 0 || dy === 0) cardinals.push(neighResults.length - 1); // save indices of cardinal neighbors
|
||||
}
|
||||
}
|
||||
|
||||
const tile = getTile(x, y);
|
||||
|
||||
plotOutcomes[y][x] = CalculateSingleTileChances(
|
||||
minigame,
|
||||
tile[0] - 1,
|
||||
tile[1],
|
||||
neighResults,
|
||||
cardinals,
|
||||
boosts[y][x],
|
||||
dragonBoost,
|
||||
);
|
||||
|
||||
// save results
|
||||
CachePlotChances[y][x] = [];
|
||||
|
||||
const emptyP = plotOutcomes[y][x]
|
||||
.filter((o) => o.plantId === -1)
|
||||
.reduce((s, o) => s + o.p, 0);
|
||||
if (emptyP > 0) CachePlotChances[y][x].push({ plantId: -1, maturityP: 0, p: emptyP });
|
||||
|
||||
for (let id = 0; id < plantsById.length; id++) {
|
||||
const matches = plotOutcomes[y][x].filter((o) => o.plantId === id);
|
||||
if (matches.length > 1) {
|
||||
const plantP = matches.reduce((s, o) => s + o.p, 0);
|
||||
const maturityP =
|
||||
matches.filter((o) => o.isMature === true).reduce((s, o) => s + o.p, 0) / plantP;
|
||||
CachePlotChances[y][x].push({ plantId: id, maturityP, p: plantP });
|
||||
} else if (matches.length === 1)
|
||||
CachePlotChances[y][x].push({
|
||||
plantId: id,
|
||||
maturityP: matches[0].isMature ? 1 : 0,
|
||||
p: matches[0].p,
|
||||
});
|
||||
}
|
||||
|
||||
CachePlotChances[y][x].sort((a, b) => a.plantId - b.plantId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
/* eslint-disable guard-for-in */
|
||||
/* eslint-disable no-continue */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
||||
/**
|
||||
* Calculates the possible plants for a tile after the next garden tick.
|
||||
*
|
||||
* @param {Object} minigame A reference to the garden minigame
|
||||
* @param {number} plantId The ID of the tile's current plant (-1 if empty)
|
||||
* @param {number} age The age of the tile's current plant (ignored if empty)
|
||||
* @param {Object[][]} neighResults The calculated results of each neighboring tile
|
||||
* @param {number[]} cardinals The indices of orthogonally adjacent tiles in `neighResults`
|
||||
* @param {number[]} tileBoosts The boosts to aging and weed spawning this tile is recieving from nearby tiles in the format `[ageMult, weedMult]`
|
||||
* @param {number} dragonBoost The current calculated value of the boost from the "Supreme Intellect" dragon aura
|
||||
* @returns {{plantId: number, isMature: boolean, p: number}[]} The possible resulting tile states and their probabilities
|
||||
*/
|
||||
export default function CalculateSingleTileChances(
|
||||
minigame,
|
||||
plantId,
|
||||
age,
|
||||
neighResults,
|
||||
cardinals,
|
||||
tileBoosts,
|
||||
dragonBoost,
|
||||
) {
|
||||
const { getMuts, plants, plantsById, plantContam, soilsById, soil } = minigame;
|
||||
const soilWeedMult = soilsById[soil].weedMult;
|
||||
|
||||
const epsilon = 1e-12;
|
||||
const futureStates = [];
|
||||
const AddOutcome = function (outcome) {
|
||||
if (outcome.p < epsilon) return;
|
||||
|
||||
const existing = futureStates.find(
|
||||
(o) =>
|
||||
o.plantId === outcome.plantId &&
|
||||
(outcome.plantId === -1 || o.isMature === outcome.isMature),
|
||||
);
|
||||
if (existing) existing.p += outcome.p;
|
||||
else futureStates.push(outcome);
|
||||
};
|
||||
let runningP = 1;
|
||||
|
||||
if (plantId !== -1) {
|
||||
// tile has plant
|
||||
const currentPlant = plantsById[plantId];
|
||||
|
||||
const AgeThresholdP = function (multiplier, threshold) {
|
||||
// probability that plant's age increases by at least threshold
|
||||
const minAge = currentPlant.ageTick * multiplier;
|
||||
const maxAge = minAge + currentPlant.ageTickR * multiplier;
|
||||
|
||||
if (Math.abs(maxAge - minAge) < epsilon) {
|
||||
if (minAge >= threshold) return 1;
|
||||
if (minAge < threshold - 1) return 0;
|
||||
return minAge - (threshold - 1);
|
||||
}
|
||||
|
||||
if (threshold <= minAge) return 1;
|
||||
if (threshold - 1 >= maxAge) return 0;
|
||||
|
||||
const lower = Math.max(minAge, threshold - 1);
|
||||
const upper = Math.min(maxAge, threshold);
|
||||
|
||||
const a = 0.5 * (upper - (threshold - 1)) ** 2 - 0.5 * (lower - (threshold - 1)) ** 2;
|
||||
const b = Math.max(0, maxAge - Math.max(minAge, threshold));
|
||||
|
||||
return (a + b) / (maxAge - minAge);
|
||||
};
|
||||
|
||||
// death
|
||||
if (!currentPlant.immortal) {
|
||||
const deathP = AgeThresholdP(tileBoosts[0] * dragonBoost, 100 - age);
|
||||
AddOutcome({ plantId: -1, isMature: false, p: deathP * runningP });
|
||||
runningP -= deathP * runningP;
|
||||
}
|
||||
|
||||
// contamination
|
||||
if (!currentPlant.noContam) {
|
||||
const contamChances = [];
|
||||
|
||||
for (const key in plantContam) {
|
||||
let inclusionP = plantContam[key];
|
||||
if (plants[key].weed) inclusionP *= soilWeedMult;
|
||||
contamChances.push([key, inclusionP]);
|
||||
}
|
||||
|
||||
let totalContamP = 0;
|
||||
for (const [key1, inclusionP1] of contamChances) {
|
||||
if (plants[key1].id === plantId || inclusionP1 === 0) continue;
|
||||
|
||||
let hasNeighborP = 0;
|
||||
for (const i of cardinals) {
|
||||
let isNeighborP = 0;
|
||||
for (const o of neighResults[i]) {
|
||||
if (o.plantId === key1 && o.isMature) isNeighborP += o.p;
|
||||
}
|
||||
hasNeighborP += isNeighborP * (1 - hasNeighborP);
|
||||
}
|
||||
if (hasNeighborP < epsilon) continue;
|
||||
|
||||
let q = [1];
|
||||
for (const [key2, inclusionP2] of contamChances) {
|
||||
if (key1 !== key2) {
|
||||
const newQ = Array(q.length + 1).fill(0);
|
||||
for (let k = 0; k < q.length; k++) {
|
||||
newQ[k] += q[k] * (1 - inclusionP2);
|
||||
newQ[k + 1] += q[k] * inclusionP2;
|
||||
}
|
||||
q = newQ;
|
||||
}
|
||||
}
|
||||
|
||||
const E = q.reduce((acc, probXk, k) => acc + probXk / (1 + k), 0);
|
||||
const contamP = inclusionP1 * E * hasNeighborP * runningP;
|
||||
AddOutcome({ plantId: plants[key1].id, isMature: false, p: contamP });
|
||||
totalContamP += contamP;
|
||||
}
|
||||
runningP -= totalContamP;
|
||||
}
|
||||
|
||||
// survival (remaining probability)
|
||||
const maturityP = AgeThresholdP(tileBoosts[0] * dragonBoost, currentPlant.mature - age);
|
||||
AddOutcome({ plantId, isMature: true, p: maturityP * runningP });
|
||||
AddOutcome({ plantId, isMature: false, p: (1 - maturityP) * runningP });
|
||||
} else {
|
||||
// tile is empty
|
||||
let noNeighborsChance = 1;
|
||||
neighResults.forEach((neighbor) => {
|
||||
let emptyChance = 0;
|
||||
const emptyOutcome = neighbor.find((outcome) => outcome.plantId === -1);
|
||||
if (emptyOutcome) emptyChance = emptyOutcome.p;
|
||||
noNeighborsChance *= emptyChance;
|
||||
});
|
||||
|
||||
// weeds
|
||||
const weedChance = 0.002 * soilWeedMult * tileBoosts[1];
|
||||
AddOutcome({ plantId: 13, isMature: false, p: weedChance * noNeighborsChance });
|
||||
AddOutcome({ plantId: -1, isMature: false, p: (1 - weedChance) * noNeighborsChance });
|
||||
|
||||
runningP -= noNeighborsChance;
|
||||
|
||||
// mutation
|
||||
if (noNeighborsChance < 1) {
|
||||
let totalMutationP = 0;
|
||||
|
||||
const CombineNeighbors = function (i = 0, current = [], comboP = 1, results = []) {
|
||||
if (i >= neighResults.length) {
|
||||
results.push({ tiles: current.slice(), comboP });
|
||||
return results;
|
||||
}
|
||||
|
||||
for (const state of neighResults[i])
|
||||
CombineNeighbors(i + 1, [...current, state], comboP * state.p, results);
|
||||
|
||||
return results;
|
||||
};
|
||||
|
||||
const loopsBase = (soilsById[soil].key === 'woodchips' ? 3 : 1) * dragonBoost;
|
||||
for (const combo of CombineNeighbors()) {
|
||||
// possible combinations of neighboring tiles
|
||||
const neighs = {};
|
||||
const neighsM = {};
|
||||
|
||||
for (const tile of combo.tiles) {
|
||||
if (tile.plantId === -1) continue;
|
||||
const { key } = plantsById[tile.plantId];
|
||||
neighs[key] = (neighs[key] || 0) + 1;
|
||||
if (tile.isMature) neighsM[key] = (neighsM[key] || 0) + 1;
|
||||
}
|
||||
|
||||
const muts = getMuts(neighs, neighsM);
|
||||
|
||||
let perLoopMutationP = 0; // probability that any mutation occurs on a single loop with this combo
|
||||
const mutationChances = [];
|
||||
for (const [key, mutValue] of muts) {
|
||||
let inclusionP = mutValue;
|
||||
if (plants[key].weed) inclusionP *= soilWeedMult;
|
||||
if (plants[key].weed || plants[key].fungus) inclusionP *= tileBoosts[1];
|
||||
if (inclusionP > 0) mutationChances.push([key, inclusionP]);
|
||||
}
|
||||
|
||||
const perLoopMutations = [];
|
||||
for (const [key1, inclusionP1] of mutationChances) {
|
||||
let q = [1];
|
||||
for (const [key2, inclusionP2] of mutationChances) {
|
||||
if (key1 !== key2) {
|
||||
const newQ = Array(q.length + 1).fill(0);
|
||||
for (let k = 0; k < q.length; k++) {
|
||||
newQ[k] += q[k] * (1 - inclusionP2);
|
||||
newQ[k + 1] += q[k] * inclusionP2;
|
||||
}
|
||||
q = newQ;
|
||||
}
|
||||
}
|
||||
|
||||
const E = q.reduce((acc, probXk, k) => acc + probXk / (1 + k), 0);
|
||||
const mutationP = inclusionP1 * E;
|
||||
perLoopMutationP += mutationP;
|
||||
perLoopMutations.push([key1, mutationP * combo.comboP * runningP]);
|
||||
}
|
||||
|
||||
if (perLoopMutationP === 0) continue;
|
||||
|
||||
let loopsBoost = 1;
|
||||
if (loopsBase > 1) {
|
||||
if (Number.isInteger(loopsBase)) {
|
||||
loopsBoost = (1 - (1 - perLoopMutationP) ** loopsBase) / perLoopMutationP;
|
||||
} else {
|
||||
const loopsFloor = Math.floor(loopsBase);
|
||||
const loopsFrac = loopsBase % 1;
|
||||
const boostN = (1 - (1 - perLoopMutationP) ** loopsFloor) / perLoopMutationP;
|
||||
const boostNp1 = (1 - (1 - perLoopMutationP) ** (loopsFloor + 1)) / perLoopMutationP;
|
||||
loopsBoost = (1 - loopsFrac) * boostN + loopsFrac * boostNp1;
|
||||
}
|
||||
}
|
||||
|
||||
for (const [key, mutationP] of perLoopMutations) {
|
||||
AddOutcome({ plantId: plants[key].id, maturityP: 0, p: mutationP * loopsBoost });
|
||||
totalMutationP += mutationP * loopsBoost;
|
||||
}
|
||||
}
|
||||
|
||||
runningP -= totalMutationP;
|
||||
}
|
||||
|
||||
// nothing (remaining probability)
|
||||
AddOutcome({ plantId: -1, isMature: false, p: runningP });
|
||||
}
|
||||
|
||||
const total = futureStates.reduce((sum, o) => sum + o.p, 0);
|
||||
if (Math.abs(total - 1) > 1e-9) {
|
||||
futureStates.forEach((o) => {
|
||||
o.p /= total;
|
||||
});
|
||||
}
|
||||
|
||||
return futureStates;
|
||||
}
|
||||
@@ -1,42 +1,154 @@
|
||||
/* eslint-disable guard-for-in */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
|
||||
import Beautify from '../../BeautifyAndFormatting/Beautify.js';
|
||||
import { TooltipName } from '../../VariablesAndData.js';
|
||||
import * as Create from '../CreateTooltip.js';
|
||||
import {
|
||||
CacheFarmLevel,
|
||||
CacheGardenSoil,
|
||||
CachePlotChances,
|
||||
CacheSupremeIntellect,
|
||||
} from '../../../Cache/VariablesAndData.js';
|
||||
import CalculateAllPlotChances from '../../HelperFunctions/CalculateAllPlotChances.js';
|
||||
|
||||
/**
|
||||
* This function adds extra info to the Garden plots tooltips
|
||||
* This function adds extra info to the garden plot tooltips
|
||||
* It adds to the additional information to l('CMTooltipArea')
|
||||
*/
|
||||
export default function GardenPlots() {
|
||||
const { minigame } = Game.Objects.Farm;
|
||||
if (
|
||||
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TooltipPlots &&
|
||||
minigame.plot[TooltipName[1]][TooltipName[0]][0] !== 0
|
||||
) {
|
||||
const mature =
|
||||
minigame.plot[TooltipName[1]][TooltipName[0]][1] >
|
||||
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1].mature;
|
||||
const plantName =
|
||||
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1].name;
|
||||
l('CMTooltipBorder').appendChild(Create.TooltipCreateHeader('Reward (Current / Maximum)'));
|
||||
const reward = document.createElement('div');
|
||||
reward.id = 'CMTooltipPlantReward';
|
||||
l('CMTooltipBorder').appendChild(reward);
|
||||
if (plantName === 'Chocoroot' || plantName === 'White chocoroot') {
|
||||
l('CMTooltipPlantReward').textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 3)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 3)}`;
|
||||
} else if (plantName === 'Bakeberry') {
|
||||
l('CMTooltipPlantReward').textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 30)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 30)}`;
|
||||
} else if (plantName === 'Queenbeet') {
|
||||
l('CMTooltipPlantReward').textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.04, Game.cookiesPs * 60 * 60)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 60)}`;
|
||||
} else if (plantName === 'Duketater') {
|
||||
l('CMTooltipPlantReward').textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.08, Game.cookiesPs * 60 * 120)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 120)}`;
|
||||
} else l('CMTooltipArea').style.display = 'none';
|
||||
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TooltipPlots) {
|
||||
const tooltipBorder = l('CMTooltipBorder');
|
||||
|
||||
if (minigame.plot[TooltipName[1]][TooltipName[0]][0] !== 0) {
|
||||
const rewardTooltip = document.createElement('div');
|
||||
rewardTooltip.appendChild(Create.TooltipCreateHeader('Reward (Current / Maximum)'));
|
||||
const mature =
|
||||
minigame.plot[TooltipName[1]][TooltipName[0]][1] >=
|
||||
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1].mature;
|
||||
const plantName =
|
||||
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1].name;
|
||||
const reward = document.createElement('div');
|
||||
reward.id = 'CMTooltipPlantReward';
|
||||
rewardTooltip.appendChild(reward);
|
||||
if (plantName === 'Chocoroot' || plantName === 'White chocoroot') {
|
||||
reward.textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 3)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 3)}`;
|
||||
} else if (plantName === 'Bakeberry') {
|
||||
reward.textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 30)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 30)}`;
|
||||
} else if (plantName === 'Queenbeet') {
|
||||
reward.textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.04, Game.cookiesPs * 60 * 60)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 60)}`;
|
||||
} else if (plantName === 'Duketater') {
|
||||
reward.textContent = `${
|
||||
mature ? Beautify(Math.min(Game.cookies * 0.08, Game.cookiesPs * 60 * 120)) : '0'
|
||||
} / ${Beautify(Game.cookiesPs * 60 * 120)}`;
|
||||
} else rewardTooltip.style.display = 'none';
|
||||
|
||||
if (rewardTooltip.style.display !== 'none') tooltipBorder.appendChild(rewardTooltip);
|
||||
}
|
||||
|
||||
if (
|
||||
minigame.parent.level !== CacheFarmLevel ||
|
||||
minigame.soil !== CacheGardenSoil ||
|
||||
Game.auraMult('Supreme Intellect') !== CacheSupremeIntellect
|
||||
) {
|
||||
CacheFarmLevel = minigame.parent.level;
|
||||
CacheGardenSoil = minigame.soil;
|
||||
CacheSupremeIntellect = Game.auraMult('Supreme Intellect');
|
||||
CalculateAllPlotChances(minigame, CacheSupremeIntellect);
|
||||
}
|
||||
const plotChances = CachePlotChances[TooltipName[1]][TooltipName[0]];
|
||||
|
||||
const plotTooltip = document.createElement('div');
|
||||
if (l('CMTooltipPlantReward')) plotTooltip.style.marginTop = '5px';
|
||||
plotTooltip.appendChild(Create.TooltipCreateHeader('After Next Tick:'));
|
||||
|
||||
const showIcon = [];
|
||||
for (const id in minigame.plantsById) {
|
||||
showIcon[id] = minigame.plantsById[id].unlocked !== 0;
|
||||
for (let y = 0; y < 6 && !showIcon[id]; y++) {
|
||||
for (let x = 0; x < 6; x++) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (minigame.plot[y][x][0] - 1 == id) {
|
||||
showIcon[id] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const tooltipOutcomes = document.createElement('div');
|
||||
const ConvertToPercentage = function (x) {
|
||||
if (x <= 0) return '0%';
|
||||
if (x >= 1) return '100%';
|
||||
|
||||
const decimals =
|
||||
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.ScaleDecimals + 1;
|
||||
const delta = 10 ** -decimals;
|
||||
|
||||
const xH = x * 100;
|
||||
if (xH < delta) return `<${Beautify(delta)}%`;
|
||||
if (xH > 100 - delta) return `>${Beautify(100 - delta)}%`;
|
||||
|
||||
return `${Beautify(xH)}%`;
|
||||
};
|
||||
for (const outcome of plotChances) {
|
||||
const outcomeInfo = document.createElement('div');
|
||||
outcomeInfo.style.height = '48px';
|
||||
outcomeInfo.style.display = 'flex';
|
||||
outcomeInfo.style.alignItems = 'center';
|
||||
|
||||
const outcomeIcon = document.createElement('img');
|
||||
outcomeIcon.style.float = 'left';
|
||||
outcomeIcon.style.objectFit = 'none';
|
||||
if (outcome.plantId === -1) {
|
||||
outcomeIcon.style.width = '40px';
|
||||
outcomeIcon.style.height = '40px';
|
||||
outcomeIcon.style.margin = '4px';
|
||||
outcomeIcon.src = `${Game.resPath}img/gardenPlots.png`;
|
||||
outcomeIcon.style.objectPosition = `${0 * -40}px ${0 * -40}px`;
|
||||
|
||||
// add brown colour
|
||||
outcomeIcon.style.background = 'saddlebrown';
|
||||
outcomeIcon.style.maskImage = `url(${Game.resPath}img/gardenPlots.png)`;
|
||||
} else {
|
||||
outcomeIcon.style.width = '48px';
|
||||
outcomeIcon.style.height = '48px';
|
||||
outcomeIcon.style.margin = '0px';
|
||||
|
||||
if (!showIcon[outcome.plantId]) {
|
||||
outcomeIcon.src = `${Game.resPath}img/icons.png?v=${Game.version}`;
|
||||
outcomeIcon.style.objectPosition = `${0 * -48}px ${7 * -48}px`; // question mark
|
||||
} else {
|
||||
outcomeIcon.src = `${Game.resPath}img/gardenPlants.png?v=${Game.version}`;
|
||||
outcomeIcon.style.objectPosition = `${4 * -48}px ${minigame.plantsById[outcome.plantId].icon * -48}px`;
|
||||
}
|
||||
}
|
||||
outcomeInfo.appendChild(outcomeIcon);
|
||||
|
||||
const outcomeInfoText = document.createElement('div');
|
||||
outcomeInfoText.style.marginLeft = '5px';
|
||||
|
||||
const outcomeProbability = document.createElement('div');
|
||||
outcomeProbability.textContent = ConvertToPercentage(outcome.p);
|
||||
outcomeInfoText.appendChild(outcomeProbability);
|
||||
|
||||
if (outcome.plantId !== -1) {
|
||||
const outcomeMaturityChance = document.createElement('small');
|
||||
outcomeMaturityChance.innerHTML = `<small>${ConvertToPercentage(outcome.maturityP)} chance of being mature</small>`;
|
||||
outcomeInfoText.appendChild(outcomeMaturityChance);
|
||||
}
|
||||
|
||||
outcomeInfo.appendChild(outcomeInfoText);
|
||||
tooltipOutcomes.appendChild(outcomeInfo);
|
||||
}
|
||||
plotTooltip.appendChild(tooltipOutcomes);
|
||||
tooltipBorder.appendChild(plotTooltip);
|
||||
} else l('CMTooltipArea').style.display = 'none';
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
/** Functions related to replacing tooltips */
|
||||
|
||||
import CalculateAllPlotChances from '../../Disp/HelperFunctions/CalculateAllPlotChances.js';
|
||||
import { CreateTooltip } from '../../Disp/Tooltips/Tooltip.js';
|
||||
import { LoadMinigames, TooltipBuildBackup, TooltipLumpBackup } from '../VariablesAndData.js'; // eslint-disable-line no-unused-vars
|
||||
import ReplaceNativeGrimoire from './NativeGrimoire.js';
|
||||
@@ -37,7 +38,7 @@ function ReplaceTooltipLump() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This function replaces the original .onmouseover functions of all garden plants
|
||||
* Replaces functions for the garden minigame
|
||||
*/
|
||||
function ReplaceTooltipGarden() {
|
||||
if (Game.Objects.Farm.minigameLoaded) {
|
||||
@@ -55,6 +56,13 @@ function ReplaceTooltipGarden() {
|
||||
Game.tooltip.wobble();
|
||||
};
|
||||
});
|
||||
|
||||
// overwrite the harvesting function to allow CachePlotChances to be updated
|
||||
const OldBuildPlot = Game.Objects.Farm.minigame.buildPlot;
|
||||
Game.Objects.Farm.minigame.buildPlot = function () {
|
||||
OldBuildPlot(arguments); // eslint-disable-line prefer-rest-params
|
||||
CalculateAllPlotChances(Game.Objects.Farm.minigame, Game.auraMult('Supreme Intellect'));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ export default function CalculateGains() {
|
||||
|
||||
if (SimHas('Dragon scale')) mult *= 1.03;
|
||||
|
||||
if (SimHas('Wrinkler ambergris')) mult *= 1.06;
|
||||
|
||||
// Check effect of chosen Gods
|
||||
let buildMult = 1;
|
||||
if (SimHasGod) {
|
||||
|
||||
Reference in new issue
Block a user