Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update currency pages #182

Merged
merged 5 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 13 additions & 34 deletions bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -78546,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) => {
Expand Down Expand Up @@ -78609,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) => {
Expand All @@ -78626,35 +78631,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) => {
Expand Down Expand Up @@ -80019,8 +79998,8 @@ const searchOptions = [
},
//Currency Pages
{
display: 'Pokémon Dollars',
type: 'Pokémon Dollars',
display: 'Pokédollars',
type: 'Pokédollars',
page: '',
},
{
Expand Down Expand Up @@ -80136,4 +80115,4 @@ module.exports = {
searchOptions,
};

},{"./navigation":518}]},{},[511]);
},{"./navigation":518,"./pages/pokemon":528}]},{},[511]);
2 changes: 1 addition & 1 deletion data/Achievements/overview_description.md
Original file line number Diff line number Diff line change
@@ -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 completing [[Dungeons/Victory Road]].
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 completing [[Dungeons/Victory Road]].
8 changes: 4 additions & 4 deletions data/Battle Frontier/overview_description.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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*
6 changes: 3 additions & 3 deletions data/Dungeons/overview_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion data/Hatchery Helpers/Jasmine.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*Purchased in @[[Towns/Mauville City]] for 10,000,000 Poké Dollars*
*Purchased in @[[Towns/Mauville City]] for 10,000,000 Pokédollars*
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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.

---

Expand Down Expand Up @@ -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]].
Expand Down
2 changes: 1 addition & 1 deletion pages/Battle Frontier/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h3>Battle Frontier Statistics</h3>
<td data-bind="text: Math.max(1, Math.round(($data.stage() ** 2) / 100)).toLocaleString()"></td>
</tr>
<tr>
<td>PokéDollars</td>
<td>Pokédollars</td>
<td data-bind="text: Math.max(100, Math.round($data.stage() ** 2)).toLocaleString()"></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion pages/Battle Points/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h4>Shopmon</h4>
<th>Shop</th>
<th>Region</th>
</thead>
<tbody data-bind="foreach: Wiki.battlePoints.getShopMons(5)">
<tbody data-bind="foreach: Wiki.shopMon.getShopMons(Currency.battlePoint)">
<tr>
<td class="align-middle">
<img width="24" class="me-1" data-bind="attr: { src: './pokeclicker/docs/' + $data[1].image }" />
Expand Down
2 changes: 1 addition & 1 deletion pages/Diamonds/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h3>Shopmon</h3>
<th>Shop</th>
<th>Region</th>
</thead>
<tbody data-bind="foreach: Wiki.diamonds.getShopMons(3)">
<tbody data-bind="foreach: Wiki.shopMon.getShopMons(Currency.diamond)">
<tr>
<td class="align-middle">
<img width="24" class="me-1" data-bind="attr: { src: './pokeclicker/docs/' + $data[1].image }" />
Expand Down
46 changes: 13 additions & 33 deletions pages/Dungeon Tokens/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ <h4>By Region</h4>
<tbody data-bind="foreach: GameHelper.enumNumbers(GameConstants.Region).filter((r) => r <= GameConstants.MAX_AVAILABLE_REGION && r != GameConstants.Region.none)">
<tr>
<td data-bind="text: GameConstants.camelCaseToString(GameConstants.Region[$data])"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute($data, 0)[0][0]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute($data, 0)[0][1]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute($data, 0)[0][2]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute($data, 0)[0][3]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute($data, 0)[0][4]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute($data, 0)[0][5]"></td>
<!-- ko foreach: Wiki.dungeonTokens.highestRoute($data, 0)[0] -->
<td data-bind="text: $data"></td>
<!-- /ko -->
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -50,12 +47,9 @@ <h4>Galar's Optimal Routes by Weather</h4>
<img width="18" class="me-1" data-bind="attr: { src: `./images/weather/${GameConstants.camelCaseToString(WeatherType[$data])}.png` }" />
<ko data-bind="text: GameConstants.camelCaseToString(WeatherType[$data])"></ko>
</td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute(7, $data)[0][0]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute(7, $data)[0][1]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute(7, $data)[0][2]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute(7, $data)[0][3]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute(7, $data)[0][4]"></td>
<td data-bind="html: Wiki.dungeonTokens.highestRoute(7, $data)[0][5]"></td>
<!-- ko foreach: Wiki.dungeonTokens.highestRoute(7, $data)[0] -->
<td data-bind="text: $data"></td>
<!-- /ko -->
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -83,16 +77,9 @@ <h4><a data-bind="text: GameConstants.camelCaseToString(GameConstants.Region[$da
</tr>
</thead>
<tbody data-bind="foreach: Wiki.dungeonTokens.highestRoute($data, 0)[1]">
<tr>
<td data-bind="text: $data[0]"></td>
<td data-bind="text: $data[1]"></td>
<td data-bind="text: $data[2]"></td>
<td data-bind="text: $data[3]"></td>
<td data-bind="text: $data[4]"></td>
<td data-bind="text: $data[5]"></td>
<td data-bind="text: $data[6]"></td>
<td data-bind="text: $data[7]"></td>
</tr>
<tr data-bind="foreach: $data">
<td data-bind="text: $data"></td>
</tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -120,16 +107,9 @@ <h4><a data-bind="text: GameConstants.camelCaseToString(GameConstants.Region[$da
</tr>
</thead>
<tbody id="weatherTable" data-bind="foreach: Wiki.dungeonTokens.highestRoute($parent, $data)[1]">
<tr>
<td data-bind="text: $data[0]"></td>
<td data-bind="text: $data[1]"></td>
<td data-bind="text: $data[2]"></td>
<td data-bind="text: $data[3]"></td>
<td data-bind="text: $data[4]"></td>
<td data-bind="text: $data[5]"></td>
<td data-bind="text: $data[6]"></td>
<td data-bind="text: $data[7]"></td>
</tr>
<tr data-bind="foreach: $data">
<td data-bind="text: $data"></td>
</tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -174,7 +154,7 @@ <h4>Shopmon</h4>
<th>Shop</th>
<th>Region</th>
</thead>
<tbody data-bind="foreach: Wiki.dungeonTokens.getShopMons(2)">
<tbody data-bind="foreach: Wiki.shopMon.getShopMons(Currency.dungeonToken)">
<tr>
<td class="align-middle">
<img width="24" class="me-1" data-bind="attr: { src: './pokeclicker/docs/' + $data[1].image }" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h4>Shopmon</h4>
<th>Shop</th>
<th>Region</th>
</thead>
<tbody data-bind="foreach: Wiki.pokemonDollars.getShopMons(0)">
<tbody data-bind="foreach: Wiki.shopMon.getShopMons(Currency.money)">
<tr>
<td class="align-middle">
<img width="24" class="me-1" data-bind="attr: { src: './pokeclicker/docs/' + $data[1].image }" />
Expand All @@ -27,24 +27,24 @@ <h4>Shopmon</h4>
</div>
</div>
<hr>
<h2>Obtaining Pokémon Dollars</h2>
<h2>Obtaining Pokédollars</h2>
<p>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.</p>
<p>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.</p>
<p>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.</p>

<div class="table-responsive">
<table class="table table-hover table-striped table-bordered">
<tbody>
<tr>
<td>Average</td>
<td>Average Pokedollars per defeated Pokémon with no modifiers active</td>
<td>Average Pokédollars per defeated Pokémon with no modifiers active</td>
</tr>
<tr>
<td>(AC/LI) Average</td>
<td>Average Pokedollars per defeated Pokémon with either Amulet Coin or Lucky Incense active</td>
<td>Average Pokédollars per defeated Pokémon with either Amulet Coin or Lucky Incense active</td>
</tr>
<tr>
<td>(AC*LI) Average</td>
<td>Average Pokedollars per defeated Pokémon with both Amulet Coin and Lucky Incense active</td>
<td>Average Pokédollars per defeated Pokémon with both Amulet Coin and Lucky Incense active</td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<br>
<center><h4>Currencies</h4></center>
<div class="d-grid gap-2 d-sm-flex flex-wrap justify-content-sm-center align-items-center pb-2">
<a href="#!Pokémon_Dollars" class="btn btn-primary text-nowrap">Pokémon Dollars</a>
<a href="#!Pokédollars" class="btn btn-primary text-nowrap">Pokédollars</a>
<a href="#!Dungeon_Tokens" class="btn btn-primary text-nowrap">Dungeon Tokens</a>
<a href="#!Quest_Points" class="btn btn-primary text-nowrap">Quest Points</a>
<a href="#!Farm_Points" class="btn btn-primary text-nowrap">Farm Points</a>
Expand Down
4 changes: 1 addition & 3 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Loading
Loading