diff --git a/dist/extension.zip b/dist/extension.zip index d3a3032..bf4a180 100644 Binary files a/dist/extension.zip and b/dist/extension.zip differ diff --git a/dist/extension/birb.js b/dist/extension/birb.js index 7444feb..9222eba 100644 --- a/dist/extension/birb.js +++ b/dist/extension/birb.js @@ -2064,6 +2064,7 @@ // Petting boosts const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes const PET_FEATHER_BOOST = 2; + const PET_HAT_BOOST = 1.5; // Focus element constraints const MIN_FOCUS_ELEMENT_WIDTH = 100; @@ -2359,7 +2360,7 @@ } function determineHatUnlock() { - if (Math.random() < HAT_CHANCE) { + if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) { insertHat(); } else if (location.hostname === "127.0.0.1") { log("Inserting hat for debug purposes"); diff --git a/dist/obsidian/main.js b/dist/obsidian/main.js index fbc4388..27c4caf 100644 --- a/dist/obsidian/main.js +++ b/dist/obsidian/main.js @@ -2107,6 +2107,7 @@ module.exports = class PocketBird extends Plugin { // Petting boosts const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes const PET_FEATHER_BOOST = 2; + const PET_HAT_BOOST = 1.5; // Focus element constraints const MIN_FOCUS_ELEMENT_WIDTH = 100; @@ -2402,7 +2403,7 @@ module.exports = class PocketBird extends Plugin { } function determineHatUnlock() { - if (Math.random() < HAT_CHANCE) { + if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) { insertHat(); } else if (location.hostname === "127.0.0.1") { log("Inserting hat for debug purposes"); diff --git a/dist/userscript/birb.user.js b/dist/userscript/birb.user.js index 8bcd1d2..15c2968 100644 --- a/dist/userscript/birb.user.js +++ b/dist/userscript/birb.user.js @@ -2069,6 +2069,7 @@ // Petting boosts const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes const PET_FEATHER_BOOST = 2; + const PET_HAT_BOOST = 1.5; // Focus element constraints const MIN_FOCUS_ELEMENT_WIDTH = 100; @@ -2364,7 +2365,7 @@ } function determineHatUnlock() { - if (Math.random() < HAT_CHANCE) { + if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) { insertHat(); } else if (location.hostname === "127.0.0.1") { log("Inserting hat for debug purposes"); diff --git a/dist/web/birb.embed.js b/dist/web/birb.embed.js index 77a375d..1ad390a 100644 --- a/dist/web/birb.embed.js +++ b/dist/web/birb.embed.js @@ -2049,6 +2049,7 @@ // Petting boosts const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes const PET_FEATHER_BOOST = 2; + const PET_HAT_BOOST = 1.5; // Focus element constraints const MIN_FOCUS_ELEMENT_WIDTH = 100; @@ -2344,7 +2345,7 @@ } function determineHatUnlock() { - if (Math.random() < HAT_CHANCE) { + if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) { insertHat(); } else if (location.hostname === "127.0.0.1") { log("Inserting hat for debug purposes"); diff --git a/dist/web/birb.js b/dist/web/birb.js index 77a375d..1ad390a 100644 --- a/dist/web/birb.js +++ b/dist/web/birb.js @@ -2049,6 +2049,7 @@ // Petting boosts const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes const PET_FEATHER_BOOST = 2; + const PET_HAT_BOOST = 1.5; // Focus element constraints const MIN_FOCUS_ELEMENT_WIDTH = 100; @@ -2344,7 +2345,7 @@ } function determineHatUnlock() { - if (Math.random() < HAT_CHANCE) { + if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) { insertHat(); } else if (location.hostname === "127.0.0.1") { log("Inserting hat for debug purposes"); diff --git a/src/application.js b/src/application.js index a478858..14ea0c6 100644 --- a/src/application.js +++ b/src/application.js @@ -116,6 +116,7 @@ const FEATHER_FALL_SPEED = 1; // Petting boosts const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes const PET_FEATHER_BOOST = 2; +const PET_HAT_BOOST = 1.5; // Focus element constraints const MIN_FOCUS_ELEMENT_WIDTH = 100; @@ -411,7 +412,7 @@ function startApplication(birbPixels, featherPixels, hatsPixels) { } function determineHatUnlock() { - if (Math.random() < HAT_CHANCE) { + if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) { insertHat(); } else if (location.hostname === "127.0.0.1") { log("Inserting hat for debug purposes");