1
0
mirror of https://github.com/Luzifer/automate-cookie-clicker.git synced 2024-09-19 15:23:02 +00:00

Automagically manage Santa

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-04-22 02:33:44 +02:00
parent 23dc21bdfc
commit 17f923aadd
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name Automate CookieClicker
// @namespace https://luzifer.io/
// @version 0.19.2
// @version 0.20.0
// @description Automate everything!
// @author Knut Ahlers <knut@ahlers.me>
// @source https://github.com/Luzifer/automate-cookie-clicker
@ -66,8 +66,6 @@ function executeAutoActions() {
availableProducts = Game.ObjectsById.filter(obj => obj.price < Game.cookies && obj.amount < getMaxBuy());
}
manageDragon();
}
function controlAutoClicker() {
@ -107,6 +105,9 @@ function installHelper() {
blockingUpgrades = blockingUpgrades.concat(Game.UpgradesByPool['toggle'].map(obj => obj.id));
Game.customChecks.push(controlAutoClicker);
Game.customChecks.push(manageDragon);
Game.customChecks.push(manageSanta);
Game.customLogic.push(executeAutoActions);
}
@ -120,6 +121,11 @@ function manageDragon() {
// This will just open a select dialogue...
}
function manageSanta() {
let moni = Math.pow(Game.santaLevel + 1, Game.santaLevel + 1);
if (Game.cookies > moni && Game.santaLevel < 14) Game.UpgradeSanta();
}
function note(msg, quick = true) {
// Icon: img/icons.png 0-based indices
Game.Notify('Auto-CookieClicker', msg, [12, 0], quick, true);