mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-26 04:07:24 +00:00
Revert "Remove hat pet boost because it doesn't work on page load"
This reverts commit cb1f2f605f.
This commit is contained in:
BIN
dist/extension.zip
vendored
BIN
dist/extension.zip
vendored
Binary file not shown.
3
dist/extension/birb.js
vendored
3
dist/extension/birb.js
vendored
@@ -2064,6 +2064,7 @@
|
|||||||
// Petting boosts
|
// Petting boosts
|
||||||
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
||||||
const PET_FEATHER_BOOST = 2;
|
const PET_FEATHER_BOOST = 2;
|
||||||
|
const PET_HAT_BOOST = 1.5;
|
||||||
|
|
||||||
// Focus element constraints
|
// Focus element constraints
|
||||||
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
||||||
@@ -2359,7 +2360,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function determineHatUnlock() {
|
function determineHatUnlock() {
|
||||||
if (Math.random() < HAT_CHANCE) {
|
if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) {
|
||||||
insertHat();
|
insertHat();
|
||||||
} else if (location.hostname === "127.0.0.1") {
|
} else if (location.hostname === "127.0.0.1") {
|
||||||
log("Inserting hat for debug purposes");
|
log("Inserting hat for debug purposes");
|
||||||
|
|||||||
3
dist/obsidian/main.js
vendored
3
dist/obsidian/main.js
vendored
@@ -2107,6 +2107,7 @@ module.exports = class PocketBird extends Plugin {
|
|||||||
// Petting boosts
|
// Petting boosts
|
||||||
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
||||||
const PET_FEATHER_BOOST = 2;
|
const PET_FEATHER_BOOST = 2;
|
||||||
|
const PET_HAT_BOOST = 1.5;
|
||||||
|
|
||||||
// Focus element constraints
|
// Focus element constraints
|
||||||
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
||||||
@@ -2402,7 +2403,7 @@ module.exports = class PocketBird extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function determineHatUnlock() {
|
function determineHatUnlock() {
|
||||||
if (Math.random() < HAT_CHANCE) {
|
if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) {
|
||||||
insertHat();
|
insertHat();
|
||||||
} else if (location.hostname === "127.0.0.1") {
|
} else if (location.hostname === "127.0.0.1") {
|
||||||
log("Inserting hat for debug purposes");
|
log("Inserting hat for debug purposes");
|
||||||
|
|||||||
3
dist/userscript/birb.user.js
vendored
3
dist/userscript/birb.user.js
vendored
@@ -2069,6 +2069,7 @@
|
|||||||
// Petting boosts
|
// Petting boosts
|
||||||
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
||||||
const PET_FEATHER_BOOST = 2;
|
const PET_FEATHER_BOOST = 2;
|
||||||
|
const PET_HAT_BOOST = 1.5;
|
||||||
|
|
||||||
// Focus element constraints
|
// Focus element constraints
|
||||||
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
||||||
@@ -2364,7 +2365,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function determineHatUnlock() {
|
function determineHatUnlock() {
|
||||||
if (Math.random() < HAT_CHANCE) {
|
if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) {
|
||||||
insertHat();
|
insertHat();
|
||||||
} else if (location.hostname === "127.0.0.1") {
|
} else if (location.hostname === "127.0.0.1") {
|
||||||
log("Inserting hat for debug purposes");
|
log("Inserting hat for debug purposes");
|
||||||
|
|||||||
3
dist/web/birb.embed.js
vendored
3
dist/web/birb.embed.js
vendored
@@ -2049,6 +2049,7 @@
|
|||||||
// Petting boosts
|
// Petting boosts
|
||||||
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
||||||
const PET_FEATHER_BOOST = 2;
|
const PET_FEATHER_BOOST = 2;
|
||||||
|
const PET_HAT_BOOST = 1.5;
|
||||||
|
|
||||||
// Focus element constraints
|
// Focus element constraints
|
||||||
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
||||||
@@ -2344,7 +2345,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function determineHatUnlock() {
|
function determineHatUnlock() {
|
||||||
if (Math.random() < HAT_CHANCE) {
|
if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) {
|
||||||
insertHat();
|
insertHat();
|
||||||
} else if (location.hostname === "127.0.0.1") {
|
} else if (location.hostname === "127.0.0.1") {
|
||||||
log("Inserting hat for debug purposes");
|
log("Inserting hat for debug purposes");
|
||||||
|
|||||||
3
dist/web/birb.js
vendored
3
dist/web/birb.js
vendored
@@ -2049,6 +2049,7 @@
|
|||||||
// Petting boosts
|
// Petting boosts
|
||||||
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
||||||
const PET_FEATHER_BOOST = 2;
|
const PET_FEATHER_BOOST = 2;
|
||||||
|
const PET_HAT_BOOST = 1.5;
|
||||||
|
|
||||||
// Focus element constraints
|
// Focus element constraints
|
||||||
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
||||||
@@ -2344,7 +2345,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function determineHatUnlock() {
|
function determineHatUnlock() {
|
||||||
if (Math.random() < HAT_CHANCE) {
|
if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) {
|
||||||
insertHat();
|
insertHat();
|
||||||
} else if (location.hostname === "127.0.0.1") {
|
} else if (location.hostname === "127.0.0.1") {
|
||||||
log("Inserting hat for debug purposes");
|
log("Inserting hat for debug purposes");
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ const FEATHER_FALL_SPEED = 1;
|
|||||||
// Petting boosts
|
// Petting boosts
|
||||||
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
const PET_BOOST_DURATION = 1000 * 60 * 5; // 5 minutes
|
||||||
const PET_FEATHER_BOOST = 2;
|
const PET_FEATHER_BOOST = 2;
|
||||||
|
const PET_HAT_BOOST = 1.5;
|
||||||
|
|
||||||
// Focus element constraints
|
// Focus element constraints
|
||||||
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
const MIN_FOCUS_ELEMENT_WIDTH = 100;
|
||||||
@@ -411,7 +412,7 @@ function startApplication(birbPixels, featherPixels, hatsPixels) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function determineHatUnlock() {
|
function determineHatUnlock() {
|
||||||
if (Math.random() < HAT_CHANCE) {
|
if (Math.random() < (HAT_CHANCE * (isPetBoostActive() ? PET_HAT_BOOST : 1))) {
|
||||||
insertHat();
|
insertHat();
|
||||||
} else if (location.hostname === "127.0.0.1") {
|
} else if (location.hostname === "127.0.0.1") {
|
||||||
log("Inserting hat for debug purposes");
|
log("Inserting hat for debug purposes");
|
||||||
|
|||||||
Reference in New Issue
Block a user