This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ******************************************************************* | |
grid | |
******************************************************************** */ | |
.main-container { | |
display: grid; | |
grid-template-columns: repeat(auto-fit, 120px); | |
justify-content: center; | |
--gap: 10px; | |
gap: 0px var(--gap); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ranks = "S+, S+/A-, S, S-, A+, A, A-, B+, B, B-, C+, C, C-, D+, D, D-, E+, E, E-, F+, F, F-".split(", ").reverse(); | |
return app.pokeTypes.map( type => [ | |
type, | |
Object.values(app.moveData) | |
.filter( move => move.type === type && move.power ) | |
.map( move => [move.name, move.tierlistRank] ) | |
.sort( ([,leftRank], [,rightRank]) => ranks.indexOf(rightRank) - ranks.indexOf(leftRank) ) | |
]).map( | |
([type, [[firstName, firstRank], ...otherMoves]]) => [type, firstRank, [firstName, firstRank], ...otherMoves] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...(function* () { | |
for (const pokemon of app.pokeData) { | |
let bestChance = 0; | |
for (const dish in pokemon.recipeWeights) { | |
for (const quality in pokemon.recipeWeights[dish]) { | |
const weight = pokemon.recipeWeights[dish][quality]; | |
const chance = weight / app.recipeWeightSums[dish][quality]; | |
if (!app.recipeTable[dish][quality].length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
stone slots 0b 0-% 1b 1-% 2b 2-% 3b 3-% perm | |
0 1 100% 0 0% 0 0% 0 0% 1 | |
1 9 100% 0 0% 0 0% 0 0% 9 | |
2 36 100% 0 0% 0 0% 0 0% 36 | |
3 78 93% 6 7% 0 0% 0 0% 84 | |
4 90 71% 36 29% 0 0% 0 0% 126 | |
5 45 36% 72 57% 9 7% 0 0% 126 | |
6 6 7% 36 43% 42 50% 0 0% 84 | |
7 0 0% 0 0% 18 50% 18 50% 36 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const f = ({bingos, reactionTime = 0.1, share, stay, whack, waitless}) => { | |
const baseCastTime = 1.5; // estimate | |
const baseCooldown = 8; | |
const baseBuffDuration = 20; | |
const castTime = baseCastTime * (1 + whack); | |
const cooldown = baseCooldown * (1 + bingos + 0.5 * whack - 0.05 * waitless); | |
const buffStrength = share / 10 * (1 + whack); | |
const buffDuration = baseBuffDuration * (1 + 0.25 * stay); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Calculate the chance for a pokemon to fit 9 hp slots, for the 9500 HP challenge in Pokemon Quest | |
use on the browser console at https://hidden50.github.io/pq/ | |
*/ | |
(function () { | |
const impossibleDishes = ["Grass_basic", "Poison_basic", "Bug_basic", "Flying_basic", "Electric_basic", "Ambrosia_basic", "Fighting_basic", "Water_special", "Psychic_special", "Fighting_special"]; | |
const dataCopy = JSON.parse(JSON.stringify(app.pokeData)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Recipe Generator | |
*/ | |
(function() { | |
const recipeData = { | |
ingredients: { | |
r: {name: "Tiny Mushroom", quality: 0, properties: ["red", "soft", "mushroom"]}, | |
b: {name: "Bluk Berry", quality: 0, properties: ["blue", "soft", "sweet"]}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
window.addEventListener('load', () => { | |
if('serviceWorker' in navigator) { | |
navigator.serviceWorker.register( './sw.min.js', { scope: "./" } ) | |
.then( registration => { | |
const newWorker = registration.installing; | |
if (newWorker) { | |
newWorker.onstatechange = function() { | |
if (newWorker.state == 'activated' && !navigator.serviceWorker.controller) { |