Skip to content

Commit

Permalink
dungeon guides
Browse files Browse the repository at this point in the history
  • Loading branch information
CypherX committed Jul 1, 2024
1 parent f7a0ad6 commit b8614b0
Show file tree
Hide file tree
Showing 6 changed files with 934 additions and 656 deletions.
1,462 changes: 806 additions & 656 deletions bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Dungeon Guides/overview_description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dungeon Guides provide dungeon automation, at a cost. Guides can be hired after clearing a dungeon 10 times and each have their own dungeon exploring specialty and costs.
81 changes: 81 additions & 0 deletions pages/Dungeon Guides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<div>
<!-- ko ifnot: DungeonGuides.list.find(h => h.name == Wiki.pageName()) -->
<h3>Dungeon Guide not found...</h3>
<!-- /ko -->
<!-- ko if: DungeonGuides.list.find(h => h.name == Wiki.pageName()) -->
<div data-bind="with: DungeonGuides.list.find(h => h.name == Wiki.pageName())">
<div class="float-lg-end col-lg-3 m-2">
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center" colspan="2" data-bind="text: Wiki.pageName()"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center" colspan="2">
<img data-bind="attr: { src: `./pokeclicker/docs/assets/images/profile/trainer-${$data.trainerSprite}.png` }"/>
</td>
</tr>
<tr>
<td class="align-middle">Movement Speed</td>
<td data-bind="text: `${$data.interval / GameConstants.SECOND}s`"></td>
</tr>
<tr>
<td class="align-middle">Unlock Requirement</td>
<td data-bind="text: Wiki.md.renderInline(Wiki.gameHelper.requirementHints(unlockRequirement,).join('<br/>')) || '-'"></td>
</tr>
</tbody>
</table>
</div>

<p data-bind="text: $data.description"></p>

<h3>Cost Calculator</h3>
<div data-bind="let: { dungeon: ko.observable(dungeonList['Viridian Forest']), clears: ko.observable(1) }">
<div class="hstack gap-2 mt-3">
<div class="col-6 col-md-3">
<label class="form-label">Dungeon</label>
<select class="form-select" data-bind="
options: Object.values(dungeonList).filter(d => GameConstants.getDungeonRegion(d.name) <= GameConstants.MAX_AVAILABLE_REGION),
optionsText: 'name',
value: dungeon">
</select>
</div>
<div class="col-6 col-md-3">
<label class="form-label">Clears</label>
<input class="form-control" type="number" data-bind="textInput: clears" min="1" />
</div>
</div>
<h5 class="mt-3">Guide Cost</h5>
<!-- ko foreach: $data.calcCost(clears(), dungeon().tokenCost, GameConstants.getDungeonRegion(dungeon().name)) -->
<div>
<img width="18px" class="me-1" data-bind="attr: { src: `./pokeclicker/docs/assets/images/currency/${GameConstants.Currency[$data.currency]}.svg` }"/>
<knockout data-bind="text: $data.amount.toLocaleString()"></knockout>
</div>
<!-- /ko -->
<h5 class="mt-3">Dungeon Cost</h5>
<div>
<img width="18px" src="./pokeclicker/docs/assets/images/currency/dungeonToken.svg" class="me-1"/>
<knockout data-bind="text: (dungeon().tokenCost * clears()).toLocaleString()"></knockout>
</div>
</div>


<!--<p>
<img data-bind="attr: { src: `./pokeclicker/docs/assets/images/profile/trainer-${$data.trainerSprite}.png` }"/>
</p>
<h2>Cost</h2>
<p>
<img width="18px" data-bind="attr: { src: `./pokeclicker/docs/assets/images/currency/${GameConstants.Currency[$data.cost.currency]}.svg` }"/>
<ko data-bind="text: $data.cost.amount.toLocaleString()"></ko>
</p>
<h2>Attack Efficiency</h2>
<p data-bind="text: `${$data.attackEfficiencyBase}%`"></p>
<h2>Step Efficiency</h2>
<p data-bind="text: `${$data.stepEfficiencyBase}%`"></p>
<h2>Unlock Requirement</h2>
<p data-bind="text: $data.unlockRequirement.hint()"></p>-->
</div>
<!-- /ko -->
</div>
34 changes: 34 additions & 0 deletions pages/Dungeon Guides/overview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<h3>Available Dungeon Guides</h3>
<div class="table-responsive">
<table class="table table-hover table-striped table-bordered">
<thead class="thead-dark">
<tr>
<th>Guide</th>
<th>Description</th>
<th>Hiring Currency</th>
<th>Movement Speed</th>
<th>Unlock Requirement</th>
</tr>
</thead>
<tbody data-bind="foreach: DungeonGuides.list">
<tr>
<td class="text-nowrap">
<img class="me-1" data-bind="attr: { src: `./pokeclicker/docs/assets/images/profile/trainer-${$data.trainerSprite}.png` }"/>
<a href="#!" class="text-decoration-none" data-bind="text: $data.name,
attr: { href: `#!Dungeon Guides/${$data.name}` }"></a>
</td>
<td data-bind="text: $data.description"></td>
<td>
<!-- ko foreach: $data.cost -->
<img width="18px" data-bind="attr: { src: `./pokeclicker/docs/assets/images/currency/${GameConstants.Currency[$data[1]]}.svg` }"/>
<!-- /ko -->
<!-- ko foreach: $data.fixedCost -->
<img width="18px" data-bind="attr: { src: `./pokeclicker/docs/assets/images/currency/${GameConstants.Currency[$data.currency]}.svg` }"/>
<!-- /ko -->
</td>
<td data-bind="text: `${$data.interval / GameConstants.SECOND}s`"></td>
<td data-bind="html: Wiki.md.renderInline(Wiki.gameHelper.requirementHints(unlockRequirement).join('<br/>')) || '-'"></td>
</tr>
</tbody>
</table>
</div>
1 change: 1 addition & 0 deletions pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<a href="#!Quest_Lines" class="btn btn-primary text-nowrap">Quest Lines</a>
<a href="#!Farm_Hands" class="btn btn-primary text-nowrap">Farm Hands</a>
<a href="#!Hatchery_Helpers" class="btn btn-primary text-nowrap">Hatchery Helpers</a>
<a href="#!Dungeon_Guides" class="btn btn-primary text-nowrap">Dungeon Guides</a>
<a href="#!Weather" class="btn btn-primary text-nowrap">Weather</a>
<a href="#!Events" class="btn btn-primary text-nowrap">Events</a>
<a href="#!Achievements" class="btn btn-primary text-nowrap">Achievements</a>
Expand Down
11 changes: 11 additions & 0 deletions scripts/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,17 @@ const searchOptions = [
type: 'Poké Balls',
page: '',
},
// Dungeon Guides
{
display: 'Dungeon Guides',
type: 'Dungeon Guides',
page: '',
},
...DungeonGuides.list.map(g => ({
display: g.name,
type: 'Dungeon Guides',
page: g.name,
})),
];
// Differentiate our different links with the same name
searchOptions.forEach(a => {
Expand Down

0 comments on commit b8614b0

Please sign in to comment.