Skip to content

Commit

Permalink
Move Friend Safari information back to Towns page, add Safari informa…
Browse files Browse the repository at this point in the history
…tion to Town Pages, link from Pokémon page to Safari Zones
  • Loading branch information
wormania committed Dec 2, 2023
1 parent db3d86a commit 04859f4
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -79722,7 +79722,7 @@ const searchOptions = [
type: 'Towns',
page: '',
},
...Object.values(TownList).filter(t => !(t instanceof DungeonTown) && !['Safari Zone', 'Friend Safari'].includes(t.name) && t.region <= GameConstants.MAX_AVAILABLE_REGION).map(t => ({
...Object.values(TownList).filter(t => !(t instanceof DungeonTown) && t.region <= GameConstants.MAX_AVAILABLE_REGION).map(t => ({
display: t.name,
type: 'Towns',
page: t.name,
Expand Down
2 changes: 1 addition & 1 deletion data/Safari/overview_description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Safari is an area available in Kanto ([[Towns/Safari Zone]]) and Kalos ([[Friend Safari]]) where the player may spend Quest Points to try and catch unique Pokémon. To unlock this area the player must first have the Safari Ticket.
Safari is an area available in Kanto ([[Towns/Safari Zone]]) and Kalos ([[Towns/Friend Safari]]) where the player may spend Quest Points to try and catch unique Pokémon. To unlock this area the player must first have the Safari Ticket.

The Pokémon can randomly spawn both on water and grass tiles, and also as sprites that can show up in both these environments. In Kanto, some Pokémon, like in the original games, only appear here.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
## Location
[Kalos](#!Towns/Friend_Safari)

## Encounter List
Each day, 5 Pokémon will get randomly chosen, based on the player's trainer ID, which can be checked with the Safari Ranger NPC. Only those Pokémon that **cannot gain EVs in any other place** may show up and only if the player has captured them previously. If the player hasn't, then the Pokémon will show up as a silhouette and cannot be encountered. Even if all daily Pokémon are currently unavailable to the player, Friend Safari has a list of Pokémon that always show up, no matter what. These Pokémon have a lower encounter rate (5 times less likely to appear) in comparison to the 5 daily ones:
Each day, 5 Pokémon will get randomly chosen, based on the player's trainer ID, which can be checked with the Safari Ranger NPC. Only those Pokémon that **cannot gain EVs in any other place** may show up and only if the player has captured them previously. If the player hasn't, then the Pokémon will show up as a silhouette and cannot be encountered. Even if all daily Pokémon are currently unavailable to the player, Friend Safari has a list of Pokémon that always show up, no matter what. These Pokémon have a lower encounter rate (5 times less likely to appear) in comparison to the 5 daily ones:
42 changes: 23 additions & 19 deletions pages/Pokémon/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,17 @@ <h4 class="accordion-header">
<div class="accordion-body" data-bind="foreach: Object.entries($data[PokemonLocationType.Safari])">
<h5 data-bind="text: GameConstants.camelCaseToString(GameConstants.Region[$data[0]])"></h5>
<p data-bind="foreach: Object.entries($data[1])">
<span class="badge text-bg-secondary" data-bind="with: { chance: $data[1], requireCaught: SafariPokemonList.list[$parent[0]]().find(p => p.name == Wiki.pageName())?.requireCaught }">
<knockout data-bind="text: `Chance ${$data.chance}%${$data.requireCaught ? ' 🔒' : ''}`, tooltip: {
title: $data.requireCaught ? `${Wiki.pageName()} will become available in the Safari Zone after being obtained elsewhere.` : '',
html: true,
placement: 'bottom',
trigger: 'hover'
}"></knockout>
</span>
<knockout data-bind="with: { chance: $data[1], requireCaught: SafariPokemonList.list[$parent[0]]().find(p => p.name == Wiki.pageName())?.requireCaught }">
<a class="badge text-bg-secondary" data-bind="text: `Chance ${$data.chance}%${$data.requireCaught ? ' 🔒' : ''}`,
attr: { href: `#!Towns/${Object.values(TownList).find(t => t.region == $parents[1][0] && t.content.filter(c => c instanceof SafariTownContent).length).name}` },
tooltip: {
title: $data.requireCaught ? `${Wiki.pageName()} will become available in the Safari Zone after being obtained elsewhere.` : '',
html: true,
placement: 'bottom',
trigger: 'hover'
}">
</a>
</knockout>
</p>
</div>
</div>
Expand All @@ -362,17 +365,18 @@ <h4 class="accordion-header">
</h4>
<div id="obtain-method-friend-safari" class="accordion-collapse collapse">
<div class="accordion-body">
<h5>Kalos</h5>
<p>
<span class="badge text-bg-secondary" data-bind="using: !(SafariPokemonList.list[GameConstants.Region.kalos]().find(p => p.name == Wiki.pageName())?.requireCaught == false), as: 'requireCaught'">
<knockout data-bind="text: `In ${SafariPokemonList.getEnvironmentByPokemonType(Wiki.pageName()).map(env => SafariEnvironments[env]).join(', ')}${requireCaught ? ' 🔒' : ''}`, tooltip: {
title: requireCaught ? `${Wiki.pageName()} will become available in the Friend Safari after being obtained elsewhere.` : '',
html: true,
placement: 'bottom',
trigger: 'hover'
}"></knockout>
</span>
</p>
<h5 data-bind="">Kalos</h5>
<knockout data-bind="using: !(SafariPokemonList.list[GameConstants.Region.kalos]().find(p => p.name == Wiki.pageName())?.requireCaught == false), as: 'requireCaught'">
<a class="badge text-bg-secondary" data-bind="text: `In ${SafariPokemonList.getEnvironmentByPokemonType(Wiki.pageName()).map(env => SafariEnvironments[env]).join(', ')}${requireCaught ? ' 🔒' : ''}`,
attr: { href: `#!Towns/Friend Safari` },
tooltip: {
title: requireCaught ? `${Wiki.pageName()} will become available in the Friend Safari after being obtained elsewhere.` : '',
html: true,
placement: 'bottom',
trigger: 'hover'
}">
</a>
</knockout>
</div>
</div>
</div>
Expand Down
48 changes: 48 additions & 0 deletions pages/Towns/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,53 @@ <h3 data-bind="text: $data.name"></h3>
</div>
</div>
<!-- /ko -->
<!-- ko if: $data.content.filter(c => c instanceof SafariTownContent )-->
<div class="mt-3">
<h2>Safari Encounters</h2>
<table class="table table-bordered table-striped table-hover text-center">
<thead>
<tr>
<th class="text-center">Pokémon</th>
<th class="text-center">Weight</th>
<th class="text-center">Environment</th>
</tr>
</thead>
<tbody data-bind="foreach: SafariPokemonList.list[$data.region]().filter(p => !p.requireCaught || !p.showUncaught)">
<tr>
<td class="align-middle">
<img width="48px" class="me-1" data-bind="attr: {src: './pokeclicker/docs/assets/images/pokemon/' + pokemonMap[$data.name].id + '.png'}"/>
<a href="#!" class="text-decoration-none" data-bind="text: $data.name, attr: {href: `#!Pokemon/${$data.name}` }"></a>
</td>
<td class="align-middle" data-bind="text: $data.weight">
</td>
<td class="align-middle">
<knockout data-bind="text: $data.environments.map(env => SafariEnvironments[env]).join(', ')"></knockout>
</td>
</tr>
</tbody>
</table>

<h2>Safari Items</h2>
<table class="table table-hover table-striped table-bordered no-data-tables">
<thead class="thead-dark">
<tr>
<th>Item</th>
<th>Chance</th>
<th>Requirement</th>
</tr>
</thead>
<tbody data-bind="foreach: SafariItemController.list[$data.region]">
<tr>
<td class="align-middle">
<img width="32px" class="me-1" data-bind="attr: { src: `pokeclicker/docs/${BagHandler.image($data.item)}` }"/>
<knockout data-bind="text: BagHandler.displayName($data.item)"></knockout>
</td>
<td class="align-middle" data-bind="text: `${Math.round($data.weight*100/SafariItemController.list[$parent.region].reduce((acc, cur) => { return acc + cur.weight }, 0) * 100)/100}%`"></td>
<td class="align-middle" data-bind="html: $data.requirement ? Wiki.gameHelper.requirementHints($data.requirement.requirements).join('<br />') : 'N/A'"></td>
</tr>
</tbody>
</table>
</div>
<!-- /ko -->
<!-- /ko -->
</div>
2 changes: 1 addition & 1 deletion scripts/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const searchOptions = [
type: 'Towns',
page: '',
},
...Object.values(TownList).filter(t => !(t instanceof DungeonTown) && !['Safari Zone', 'Friend Safari'].includes(t.name) && t.region <= GameConstants.MAX_AVAILABLE_REGION).map(t => ({
...Object.values(TownList).filter(t => !(t instanceof DungeonTown) && t.region <= GameConstants.MAX_AVAILABLE_REGION).map(t => ({
display: t.name,
type: 'Towns',
page: t.name,
Expand Down

0 comments on commit 04859f4

Please sign in to comment.