From d17e0519054cdd2ee4d53558a098c7dbead43df6 Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Sun, 21 Jan 2024 03:44:03 +0000 Subject: [PATCH 1/4] Clean up shopMon code --- bundle.js | 30 +------------------- pages/Battle Points/overview.html | 2 +- pages/Diamonds/overview.html | 2 +- pages/Dungeon Tokens/overview.html | 2 +- "pages/Pok\303\251mon Dollars/overview.html" | 2 +- scripts/main.js | 4 +-- scripts/pages/dungeonTokens.js | 26 ----------------- 7 files changed, 6 insertions(+), 62 deletions(-) diff --git a/bundle.js b/bundle.js index 6df2ab46c..ab8a0ce40 100644 --- a/bundle.js +++ b/bundle.js @@ -77861,10 +77861,8 @@ window.Wiki = { dreamOrbs: require('./pages/dreamOrbs'), farmSimulator: require('./pages/farmSimulator'), dungeons: require('./pages/dungeons'), - pokemonDollars: require('./pages/shopMon'), + shopMon: require('./pages/shopMon'), dungeonTokens: require('./pages/dungeonTokens'), - battlePoints: require('./pages/shopMon'), - diamonds: require('./pages/shopMon'), oakItems: require('./pages/oakItems'), getDealChains: require('./pages/dealChains').getDealChains, ...require('./navigation'), @@ -78626,35 +78624,9 @@ const setWeather = (evt, weather) => { return; } -const getShopMons = (currency) => { - var towns = Object.values(TownList).filter(t => t.region < GameConstants.Region.final); - var filteredTowns = []; - var filteredShops = []; - - for (var j = 0; j < towns.length; j++){ - var test = towns[j].content.filter((c) => c instanceof Shop && c.items.length > 0); - if (test.length > 0) { - test.forEach(function(i) { - filteredTowns = [...filteredTowns, i]; - }); - } - } - - for (var k = 0; k < filteredTowns.length; k++){ - var test1 = filteredTowns[k].items.filter((c) => c.currency == currency && c instanceof PokemonItem) - if (test1.length > 0) { - test1.forEach(function(s) { - filteredShops = [...filteredShops, [filteredTowns[k], s]]; - }); - } - } - return filteredShops; -} - module.exports = { highestRoute, setWeather, - getShopMons }; },{}],523:[function(require,module,exports){ const getTableClearCounts = (dungeon) => { diff --git a/pages/Battle Points/overview.html b/pages/Battle Points/overview.html index e97ab04b8..d97051d60 100644 --- a/pages/Battle Points/overview.html +++ b/pages/Battle Points/overview.html @@ -43,7 +43,7 @@

Shopmon

Shop Region - + diff --git a/pages/Diamonds/overview.html b/pages/Diamonds/overview.html index 3771e9f12..f0dbb80d8 100644 --- a/pages/Diamonds/overview.html +++ b/pages/Diamonds/overview.html @@ -136,7 +136,7 @@

Shopmon

Shop Region - + diff --git a/pages/Dungeon Tokens/overview.html b/pages/Dungeon Tokens/overview.html index 2c0833c6d..8acdf0cc7 100644 --- a/pages/Dungeon Tokens/overview.html +++ b/pages/Dungeon Tokens/overview.html @@ -174,7 +174,7 @@

Shopmon

Shop Region - + diff --git "a/pages/Pok\303\251mon Dollars/overview.html" "b/pages/Pok\303\251mon Dollars/overview.html" index 39d504133..1fb741d29 100644 --- "a/pages/Pok\303\251mon Dollars/overview.html" +++ "b/pages/Pok\303\251mon Dollars/overview.html" @@ -8,7 +8,7 @@

Shopmon

Shop Region - + diff --git a/scripts/main.js b/scripts/main.js index 901480165..efcbc4dad 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -17,10 +17,8 @@ window.Wiki = { dreamOrbs: require('./pages/dreamOrbs'), farmSimulator: require('./pages/farmSimulator'), dungeons: require('./pages/dungeons'), - pokemonDollars: require('./pages/shopMon'), + shopMon: require('./pages/shopMon'), dungeonTokens: require('./pages/dungeonTokens'), - battlePoints: require('./pages/shopMon'), - diamonds: require('./pages/shopMon'), oakItems: require('./pages/oakItems'), getDealChains: require('./pages/dealChains').getDealChains, ...require('./navigation'), diff --git a/scripts/pages/dungeonTokens.js b/scripts/pages/dungeonTokens.js index debfa0847..efa420e67 100644 --- a/scripts/pages/dungeonTokens.js +++ b/scripts/pages/dungeonTokens.js @@ -85,33 +85,7 @@ const setWeather = (evt, weather) => { return; } -const getShopMons = (currency) => { - var towns = Object.values(TownList).filter(t => t.region < GameConstants.Region.final); - var filteredTowns = []; - var filteredShops = []; - - for (var j = 0; j < towns.length; j++){ - var test = towns[j].content.filter((c) => c instanceof Shop && c.items.length > 0); - if (test.length > 0) { - test.forEach(function(i) { - filteredTowns = [...filteredTowns, i]; - }); - } - } - - for (var k = 0; k < filteredTowns.length; k++){ - var test1 = filteredTowns[k].items.filter((c) => c.currency == currency && c instanceof PokemonItem) - if (test1.length > 0) { - test1.forEach(function(s) { - filteredShops = [...filteredShops, [filteredTowns[k], s]]; - }); - } - } - return filteredShops; -} - module.exports = { highestRoute, setWeather, - getShopMons }; \ No newline at end of file From ca811e7025d93107b7ec59fcddb4c8542edca31c Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Sun, 21 Jan 2024 03:59:38 +0000 Subject: [PATCH 2/4] =?UTF-8?q?Rename=20Pok=C3=A9mon=20Dollars=20to=20Pok?= =?UTF-8?q?=C3=A9dollars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bundle.js | 4 ++-- data/Achievements/overview_description.md | 2 +- data/Battle Frontier/overview_description.md | 8 ++++---- data/Dungeons/overview_description.md | 6 +++--- data/Hatchery Helpers/Jasmine.md | 2 +- .../Pok\303\251dollars/overview.md" | 0 .../Pok\303\251dollars/overview_description.md" | 6 +++--- pages/Battle Frontier/overview.html | 2 +- .../Pok\303\251dollars/overview.html" | 10 +++++----- pages/home.html | 2 +- scripts/typeahead.js | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) rename "data/Pok\303\251mon Dollars/overview.md" => "data/Pok\303\251dollars/overview.md" (100%) rename "data/Pok\303\251mon Dollars/overview_description.md" => "data/Pok\303\251dollars/overview_description.md" (88%) rename "pages/Pok\303\251mon Dollars/overview.html" => "pages/Pok\303\251dollars/overview.html" (93%) diff --git a/bundle.js b/bundle.js index ab8a0ce40..405a20ed0 100644 --- a/bundle.js +++ b/bundle.js @@ -79966,8 +79966,8 @@ const searchOptions = [ }, //Currency Pages { - display: 'Pokémon Dollars', - type: 'Pokémon Dollars', + display: 'Pokédollars', + type: 'Pokédollars', page: '', }, { diff --git a/data/Achievements/overview_description.md b/data/Achievements/overview_description.md index c2a90a7d1..6ad618895 100644 --- a/data/Achievements/overview_description.md +++ b/data/Achievements/overview_description.md @@ -1 +1 @@ -As the player earns achievements they will receive bonuses to [[Pokémon Dollars]], [[Dungeon Tokens]], and Experience from all sources. Click Attack and [[Flutes]] are also boosted by achievement bonus. The **Achievement Tracker** is unlocked after catching 110 unique Pokémon. +As the player earns achievements they will receive bonuses to [[Pokédollars]], [[Dungeon Tokens]], and Experience from all sources. Click Attack and [[Flutes]] are also boosted by achievement bonus. The **Achievement Tracker** is unlocked after catching 110 unique Pokémon. diff --git a/data/Battle Frontier/overview_description.md b/data/Battle Frontier/overview_description.md index ed1612b8c..e010bc866 100644 --- a/data/Battle Frontier/overview_description.md +++ b/data/Battle Frontier/overview_description.md @@ -1,11 +1,11 @@ -The **Battle Frontier** is a location in Hoenn where your Pokémon fight endless teams of three randomly generated Pokémon. There is a 30 second time limit for each stage - if you do not defeat the three Pokémon within the time limit you will be awarded Pokémon Dollars and Battle Points. *(you won't be awarded if you quit)* +The **Battle Frontier** is a location in Hoenn where your Pokémon fight endless teams of three randomly generated Pokémon. There is a 30 second time limit for each stage - if you do not defeat the three Pokémon within the time limit you will be awarded Pokédollars and Battle Points. *(you won't be awarded if you quit)* Items such as XAttack are permitted; however, you **cannot** Click to damage Pokémon in the Battle Frontier and the time flute **does not** have any effect. [//]: # (Here will go BF image from old wiki: [[Battle_Frontier.png]]) ## Details -Attack is calculated as 100% of the total attack of all obtained Pokémon - the Regional Attack debuff is ignored. Attack can be further increased through modifiers such as Gems and XAttack. Battle Points and Pokémon Dollars are awarded upon defeat; the former can be used at the Battle Frontier Shop. The higher the stage cleared, the more Battle Points are awarded. +Attack is calculated as 100% of the total attack of all obtained Pokémon - the Regional Attack debuff is ignored. Attack can be further increased through modifiers such as Gems and XAttack. Battle Points and Pokédollars are awarded upon defeat; the former can be used at the Battle Frontier Shop. The higher the stage cleared, the more Battle Points are awarded. Frontier stages that have already been cleared in previous attempts will be cleared twice as fast in subsequent attempts ### Breeding Strategy @@ -27,11 +27,11 @@ Gems = `Stage Number / 80` ## Rewards ### Currencies -**Note:** Currency Rewards are not awarded if your Battle Frontier run is Quit. You must lose your attempt normally to gain Pokémon Dollars and Battle Points +**Note:** Currency Rewards are not awarded if your Battle Frontier run is Quit. You must lose your attempt normally to gain Pokédollars and Battle Points Currency Reward | Formula :--- | ---: -Pokémon Dollars | `Stage Beaten ^ 2` +Pokédollars | `Stage Beaten ^ 2` Battle Points\* | `(Stage Beaten ^ 2) / 100` \* *Battle Points are rounded to the nearest whole number* diff --git a/data/Dungeons/overview_description.md b/data/Dungeons/overview_description.md index 2d6c301f6..2effec8d0 100644 --- a/data/Dungeons/overview_description.md +++ b/data/Dungeons/overview_description.md @@ -9,10 +9,10 @@ Clearing Dungeons requires active play. To enter a dungeon, select it on the Tow 4. **Ladder** - Allows the player to progress to the next floor and also adds 10 seconds to the timer. You can either click "Go to next floor" or press Spacebar. This tile can only be encountered from Alola onwards. 5. **A chest**- Many Items can be collected from chests by either clicking on them or by pressing the Spacebar. They may also contain Pokémon which are known as **Mimics**. Some of them are even exclusive Pokémon that can only be encountered in this way. 6. **A trainer**- Trainers are found on tiles and have teams of Pokémon that must all be defeated to progress. Wild Pokémon are almost always ~4 times more likely to appear on an enemy tile than a trainer, but in some dungeons this weighting is different. Defeating trainers yields the following rewards: - - Dungeon Trainers reward 4% of the dungeon cost as Dungeon Tokens [[File:dungeonToken.svg|18px]] and 50% of the dungeon cost as Poké Dollars whenever they are defeated. - - Dungeon Trainer Bosses reward 10% of the dungeon cost as Dungeon Tokens [[File:dungeonToken.svg|18px]] and 100% of the dungeon cost as Poké Dollars whenever they are defeated. + - Dungeon Trainers reward 4% of the dungeon cost as Dungeon Tokens [[File:dungeonToken.svg|18px]] and 50% of the dungeon cost as Pokédollars whenever they are defeated. + - Dungeon Trainer Bosses reward 10% of the dungeon cost as Dungeon Tokens [[File:dungeonToken.svg|18px]] and 100% of the dungeon cost as Pokédollars whenever they are defeated. -Note: Amulet coin and other items that grant increased amounts of pokédollars **do not** affect the amount of money that you receive from Dungeon Trainers or Dungeon Trainer Bosses +Note: Amulet coin and other items that grant increased amounts of Pokédollars **do not** affect the amount of money that you receive from Dungeon Trainers or Dungeon Trainer Bosses ## Dungeon Perks and Mechanics diff --git a/data/Hatchery Helpers/Jasmine.md b/data/Hatchery Helpers/Jasmine.md index 0864294e0..5fb17d414 100644 --- a/data/Hatchery Helpers/Jasmine.md +++ b/data/Hatchery Helpers/Jasmine.md @@ -1 +1 @@ -*Purchased in @[[Towns/Mauville City]] for 10,000,000 Poké Dollars* \ No newline at end of file +*Purchased in @[[Towns/Mauville City]] for 10,000,000 Pokédollars* \ No newline at end of file diff --git "a/data/Pok\303\251mon Dollars/overview.md" "b/data/Pok\303\251dollars/overview.md" similarity index 100% rename from "data/Pok\303\251mon Dollars/overview.md" rename to "data/Pok\303\251dollars/overview.md" diff --git "a/data/Pok\303\251mon Dollars/overview_description.md" "b/data/Pok\303\251dollars/overview_description.md" similarity index 88% rename from "data/Pok\303\251mon Dollars/overview_description.md" rename to "data/Pok\303\251dollars/overview_description.md" index 4c9cacf6f..a7c4e251e 100644 --- "a/data/Pok\303\251mon Dollars/overview_description.md" +++ "b/data/Pok\303\251dollars/overview_description.md" @@ -1,6 +1,6 @@ -Pokemon Dollars [[File:money.svg|25px]] are the basic golden currency of PokéClicker, also known as simply Money or Poké. +Pokédollars [[File:money.svg|25px]] are the basic golden currency of PokéClicker, also known as simply Money or Poké. -They are obtained by defeating enemies and are primarily spent on various Items. Poké Dollars can be collected while offline for up to 24 hours. +They are obtained by defeating enemies and are primarily spent on various Items. Pokédollars can be collected while offline for up to 24 hours. --- @@ -37,7 +37,7 @@ Galar | Path to the Peak | Elite Peony ## Uses #### Item Purchasing -A large portion of in-game items are purchasable with Pokémon Dollars, please see the [[Shops]] page for a full listing. +A large portion of in-game items are purchasable with Pokédollars, please see the [[Shops]] page for a full listing. #### Oak Items The upgrades of some [[Oak Items]]. diff --git a/pages/Battle Frontier/overview.html b/pages/Battle Frontier/overview.html index 97bf29361..515894997 100644 --- a/pages/Battle Frontier/overview.html +++ b/pages/Battle Frontier/overview.html @@ -58,7 +58,7 @@

Battle Frontier Statistics

- PokéDollars + Pokédollars diff --git "a/pages/Pok\303\251mon Dollars/overview.html" "b/pages/Pok\303\251dollars/overview.html" similarity index 93% rename from "pages/Pok\303\251mon Dollars/overview.html" rename to "pages/Pok\303\251dollars/overview.html" index 1fb741d29..314a5cc3e 100644 --- "a/pages/Pok\303\251mon Dollars/overview.html" +++ "b/pages/Pok\303\251dollars/overview.html" @@ -27,24 +27,24 @@

Shopmon


-

Obtaining Pokémon Dollars

+

Obtaining Pokédollars

The following table presents the relevant information for gaining Poké. Routes are listed together with gyms of a particular region, and both provide rates of Poké per defeated Pokémon. The most efficient Gym and Route in each region is included in the Optimal Farming Location table.

-

The columns included in each table represent all the various combinations of Lucky Incense and Amulet Coin that apply a bonus to Poke Dollars gained.

+

The columns included in each table represent all the various combinations of Lucky Incense and Amulet Coin that apply a bonus to Pokédollars gained.

- + - + - +
AverageAverage Pokedollars per defeated Pokémon with no modifiers activeAverage Pokédollars per defeated Pokémon with no modifiers active
(AC/LI) AverageAverage Pokedollars per defeated Pokémon with either Amulet Coin or Lucky Incense activeAverage Pokédollars per defeated Pokémon with either Amulet Coin or Lucky Incense active
(AC*LI) AverageAverage Pokedollars per defeated Pokémon with both Amulet Coin and Lucky Incense activeAverage Pokédollars per defeated Pokémon with both Amulet Coin and Lucky Incense active
diff --git a/pages/home.html b/pages/home.html index 6d281333e..f5813880f 100644 --- a/pages/home.html +++ b/pages/home.html @@ -26,7 +26,7 @@

Currencies

- Pokémon Dollars + Pokédollars Dungeon Tokens Quest Points Farm Points diff --git a/scripts/typeahead.js b/scripts/typeahead.js index 6ad2ca65d..5080821c7 100644 --- a/scripts/typeahead.js +++ b/scripts/typeahead.js @@ -311,8 +311,8 @@ const searchOptions = [ }, //Currency Pages { - display: 'Pokémon Dollars', - type: 'Pokémon Dollars', + display: 'Pokédollars', + type: 'Pokédollars', page: '', }, { From 999b833b9adaf0cb1960a66973ccfcc22896ec59 Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Sun, 21 Jan 2024 04:48:35 +0000 Subject: [PATCH 3/4] Optimise Dungeon Token page loading --- bundle.js | 11 ++++++-- pages/Dungeon Tokens/overview.html | 44 ++++++++---------------------- scripts/pages/dungeonTokens.js | 11 ++++++-- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/bundle.js b/bundle.js index 405a20ed0..d7168fe85 100644 --- a/bundle.js +++ b/bundle.js @@ -78544,14 +78544,19 @@ const checkExist = setInterval(function() { } }, 100); +const highestRouteCache = {}; + const highestRoute = (region, weather) => { + const cacheKey = `${region}-${weather}`; + const cachedResult = highestRouteCache[cacheKey]; + if (cachedResult) return cachedResult; + region = region; weather = weather; var routeArr = []; Routes.getRoutesByRegion(region).map(route => { - const routes = Routes.getRoutesByRegion(region).map(r => MapHelper.normalizeRoute(r.number, region, false)); var pkmon1 = []; pkmon1.push(Object.values(route.pokemon).flat()); route.pokemon.special.forEach((element) => { @@ -78607,7 +78612,9 @@ const highestRoute = (region, weather) => { return dt[7] > max[7] ? dt : max; }); - return( [[highestPB[0], highestPBMB[0], highestGB[0], highestGBMB[0], highestUB[0], highestUBMB[0]],routeArr] ); + const result = [[highestPB[0], highestPBMB[0], highestGB[0], highestGBMB[0], highestUB[0], highestUBMB[0]], routeArr]; + highestRouteCache[cacheKey] = result; + return result; } const setWeather = (evt, weather) => { diff --git a/pages/Dungeon Tokens/overview.html b/pages/Dungeon Tokens/overview.html index 8acdf0cc7..c18af19b9 100644 --- a/pages/Dungeon Tokens/overview.html +++ b/pages/Dungeon Tokens/overview.html @@ -17,12 +17,9 @@

By Region

- - - - - - + + + @@ -50,12 +47,9 @@

Galar's Optimal Routes by Weather

- - - - - - + + + @@ -83,16 +77,9 @@

- - - - - - - - - - + + +

@@ -120,16 +107,9 @@

- - - - - - - - - - + + +

diff --git a/scripts/pages/dungeonTokens.js b/scripts/pages/dungeonTokens.js index efa420e67..d974f6924 100644 --- a/scripts/pages/dungeonTokens.js +++ b/scripts/pages/dungeonTokens.js @@ -5,14 +5,19 @@ const checkExist = setInterval(function() { } }, 100); +const highestRouteCache = {}; + const highestRoute = (region, weather) => { + const cacheKey = `${region}-${weather}`; + const cachedResult = highestRouteCache[cacheKey]; + if (cachedResult) return cachedResult; + region = region; weather = weather; var routeArr = []; Routes.getRoutesByRegion(region).map(route => { - const routes = Routes.getRoutesByRegion(region).map(r => MapHelper.normalizeRoute(r.number, region, false)); var pkmon1 = []; pkmon1.push(Object.values(route.pokemon).flat()); route.pokemon.special.forEach((element) => { @@ -68,7 +73,9 @@ const highestRoute = (region, weather) => { return dt[7] > max[7] ? dt : max; }); - return( [[highestPB[0], highestPBMB[0], highestGB[0], highestGBMB[0], highestUB[0], highestUBMB[0]],routeArr] ); + const result = [[highestPB[0], highestPBMB[0], highestGB[0], highestGBMB[0], highestUB[0], highestUBMB[0]], routeArr]; + highestRouteCache[cacheKey] = result; + return result; } const setWeather = (evt, weather) => { From 378ced4f4608c14e5a54e21362cb8bd5d682ffc7 Mon Sep 17 00:00:00 2001 From: CypherX Date: Sun, 4 Feb 2024 22:01:07 -0500 Subject: [PATCH 4/4] cheeky fix that somehow didn't get included with last merged PR --- bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle.js b/bundle.js index 0d71023be..46282bdb1 100644 --- a/bundle.js +++ b/bundle.js @@ -80115,4 +80115,4 @@ module.exports = { searchOptions, }; -},{"./navigation":518}]},{},[511]); +},{"./navigation":518,"./pages/pokemon":528}]},{},[511]);