Skip to content

Commit

Permalink
v0.5.13
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Jun 23, 2022
1 parent 6877176 commit 40859ee
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 2,521 deletions.
4 changes: 3 additions & 1 deletion archetypes.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ <h1 class="page__title">Archetypes</h1>
<button class="btn btn-xs btn-default" title="Reset Selection" id="reset"><span class="glyphicon glyphicon-refresh"></span></button>
</div>
<div id="filtertools" class="input-group input-group--bottom flex no-shrink">
<button class="col-8 sort btn btn-default btn-xs" data-sort="name">Name <span
<button class="col-6 sort btn btn-default btn-xs" data-sort="name">Name <span
class="caret_wrp"></span></button>
<button class="col-2 sort btn btn-default btn-xs" data-sort="level">Level <span
class="caret_wrp"></span></button>
<button class="col-2 sort btn btn-default btn-xs" data-sort="rarity">Rarity <span
class="caret_wrp"></span></button>
<button class="sort btn btn-default btn-xs ve-grow" data-sort="source">Source <span
class="caret_wrp"></span></button>
</div>
Expand Down
77 changes: 75 additions & 2 deletions data/archetypes.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions data/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@
"ver": "0.5.12",
"date": "2022-06-22",
"txt": "- Added 3rd CRB errata\n- (Typos/Tags)"
},
{
"ver": "0.5.13",
"date": "2022-06-23",
"txt": "- Added rarity filters to Archetypes and Classes pages\n- (Typos/Tags)"
}
]
}
8 changes: 4 additions & 4 deletions data/feats/feats-apg.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
"traits": [
"investigator"
],
"prerequisites": "alchemical sciences methodology",
"prerequisites": "{@class Investigator|APG|alchemical sciences|alchemical sciences} methodology",
"entries": [
"You've devoted extra time in the lab to improve your knowledge of alchemy. You learn the formulas for two alchemical items each time you level up instead of one; these must still be elixirs or tools. The number of versatile vials you can create each day increases by 1 if you're an expert in {@skill Crafting}, 2 if you're a master, or 3 if you're legendary."
]
Expand Down Expand Up @@ -12430,14 +12430,14 @@
]
},
{
"name": "Sample Investigator Lie Detector",
"name": "Lie Detector",
"source": "APG",
"page": 62,
"level": 4,
"traits": [
"investigator"
],
"prerequisites": "empiricism or interrogation methodology",
"prerequisites": "{@class Investigator|APG|empiricism|empiricism} or {@class Investigator|APG|interrogation|interrogation} methodology",
"entries": [
"You're adept at noticing the tells of a liar\u2014sweat, flushing, a quavering voice, a quickening pulse. You gain a +1 circumstance bonus to {@skill Perception} checks to {@action Sense Motive} and to {@skill Perception} DCs against attempts to {@action Lie} to you. When you determine someone is lying to you, you can use their deceit to your advantage to gain a +1 circumstance bonus to the next {@skill Deception}, {@skill Diplomacy}, {@skill Intimidation}, or {@skill Performance} check you attempt against that creature within the next minute."
]
Expand Down Expand Up @@ -12468,7 +12468,7 @@
"traits": [
"investigator"
],
"prerequisites": "forensic medicine methodology",
"prerequisites": "{@class Investigator|APG|forensic medicine|forensic medicine} methodology",
"entries": [
"Your stratagems benefit from your precise knowledge of anatomy. When you critically hit with an attack on which you substituted your attack roll due to {@action Devise a Stratagem|APG|Devising a Stratagem}, if your attack dealt piercing or slashing damage, you also deal {@damage 1d6} {@condition persistent damage ||persistent bleed damage} to your target."
]
Expand Down
5 changes: 4 additions & 1 deletion js/archetypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,12 @@ class ArchetypesPage extends BaseComponent {
getListItem (arc, ancI, isExcluded) {
const hash = UrlUtil.autoEncodeHash(arc);
const source = Parser.sourceJsonToAbv(arc.source);
const rarity = arc._fRarity ? arc._fRarity : "\u2014";

const $lnk = $(`<a href="#${hash}" class="lst--border">
<span class="bold col-8 pl-0">${arc.name}</span>
<span class="bold col-6 pl-0">${arc.name}</span>
<span class="col-2 text-center">${arc.dedicationLevel}</span>
<span class="col-2 text-center">${rarity}</span>
<span class="col-2 text-center ${Parser.sourceJsonToColor(arc.source)} pr-0" title="${Parser.sourceJsonToFull(arc.source)}" ${BrewUtil.sourceJsonToStyle(arc.source)}>${source}</span>
</a>`);

Expand All @@ -531,6 +533,7 @@ class ArchetypesPage extends BaseComponent {
{
hash,
source,
rarity,
level: arc.dedicationLevel,
},
{
Expand Down
5 changes: 3 additions & 2 deletions js/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ class ClassesPage extends BaseComponent {
"_state",
"__state",
this.activeClass.subclasses
.filter(sc => !this.filterBox.toDisplay(f, sc.source, Array(5), sc._fMisc, null))
.filter(sc => !this.filterBox.toDisplay(f, sc.source, sc._fRarity, Array(5), sc._fMisc, null))
.map(sc => UrlUtil.getStateKeySubclass(sc))
.filter(stateKey => this._state[stateKey])
.mergeMap(stateKey => ({[stateKey]: false})),
Expand Down Expand Up @@ -1154,7 +1154,7 @@ class ClassesPage extends BaseComponent {
metaTblRow.metasFeatureLinks.forEach(metaFeatureLink => {
if (metaFeatureLink.source) {
// FIXME: length of _filters hardcoded...
const isHidden = !this.filterBox.toDisplay(filterValues, metaFeatureLink.source, Array(5), null);
const isHidden = !this.filterBox.toDisplay(filterValues, metaFeatureLink.source, null, Array(5), null);
metaFeatureLink.isHidden = isHidden;
metaFeatureLink.$wrpLink.toggleClass("hidden", isHidden);
}
Expand Down Expand Up @@ -1388,6 +1388,7 @@ class ClassesPage extends BaseComponent {
return this.filterBox.toDisplay(
f,
li.data.entity.source,
cls._fRarity,
Array(5),
cls._fMisc,
);
Expand Down
5 changes: 5 additions & 0 deletions js/filter-archetypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class PageFilterArchetypes extends PageFilter {
constructor () {
super();
this._rarityFilter = new Filter({header: "Rarity"});
this._benefitsFilter = new Filter({header: "Benefits"});
this._levelFilter = new Filter({
header: "Dedication Level",
Expand All @@ -12,10 +13,12 @@ class PageFilterArchetypes extends PageFilter {

mutateForFilters (archetype, opts) {
archetype._fSources = SourceFilter.getCompleteFilterSources(archetype);
if (archetype.rarity) archetype._fRarity = archetype.rarity.toTitleCase();
}

addToFilters (archetype, isExcluded, opts) {
if (isExcluded) return;
this._rarityFilter.addItem(archetype._fRarity);
this._sourceFilter.addItem(archetype._fSources);
this._levelFilter.addItem(archetype.dedicationLevel);
this._benefitsFilter.addItem(archetype.benefits);
Expand All @@ -25,6 +28,7 @@ class PageFilterArchetypes extends PageFilter {
async _pPopulateBoxOptions (opts) {
opts.filters = [
this._sourceFilter,
this._rarityFilter,
this._levelFilter,
this._benefitsFilter,
this._miscFilter,
Expand All @@ -35,6 +39,7 @@ class PageFilterArchetypes extends PageFilter {
return this._filterBox.toDisplay(
values,
a._fSources,
a._fRarity,
a.dedicationLevel,
a.benefits,
a.miscTags,
Expand Down
7 changes: 7 additions & 0 deletions js/filter-classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class PageFilterClasses extends PageFilter {
constructor () {
super();
this._rarityFilter = new Filter({header: "Rarity"});
this._perceptionFilter = new Filter({header: "Perception"});
this._fortFilter = new Filter({header: "Fortitude"});
this._refFilter = new Filter({header: "Reflex"});
Expand Down Expand Up @@ -50,6 +51,7 @@ class PageFilterClasses extends PageFilter {
get optionsFilter () { return this._optionsFilter; }

mutateForFilters (cls, opts) {
if (cls.rarity) cls._fRarity = cls.rarity.toTitleCase();
cls.subclasses = cls.subclasses || []
cls._fSources = SourceFilter.getCompleteFilterSources(cls);
cls._fSourceSubclass = [...new Set([cls.source, ...cls.subclasses.map(it => it.source)])];
Expand Down Expand Up @@ -101,6 +103,7 @@ class PageFilterClasses extends PageFilter {
sc.subclassFeatures.forEach(lvlFeatures => lvlFeatures.forEach(feature => this._addEntrySourcesToFilter(feature)))
}
});
this._rarityFilter.addItem(cls._fRarity);
this._perceptionFilter.addItem(cls._fPerception);
this._fortFilter.addItem(cls._fFort);
this._refFilter.addItem(cls._fRef);
Expand All @@ -113,6 +116,7 @@ class PageFilterClasses extends PageFilter {
async _pPopulateBoxOptions (opts) {
opts.filters = [
this._sourceFilter,
this._rarityFilter,
this._proficienciesFilter,
this._miscFilter,
this._optionsFilter,
Expand All @@ -123,6 +127,7 @@ class PageFilterClasses extends PageFilter {
return this._filterBox.toDisplay(
values,
cls.source,
cls._fRarity,
Array(this._proficienciesFilter._filters.length),
cls._fMisc,
);
Expand All @@ -133,6 +138,7 @@ class PageFilterClasses extends PageFilter {
return this._filterBox.toDisplay(
values,
sc.source,
cls._fRarity,
Array(this._proficienciesFilter._filters.length),
sc._fMisc,
);
Expand All @@ -149,6 +155,7 @@ class PageFilterClasses extends PageFilter {
return this._filterBox.toDisplay(
values,
this.isAnySubclassDisplayed(values, c) ? c._fSourceSubclass : c._fSources,
c._fRarity,
[
c._fPerception,
c._fFort,
Expand Down
2 changes: 1 addition & 1 deletion js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (typeof module !== "undefined") require("./parser.js");

// in deployment, `IS_DEPLOYED = "<version number>";` should be set below.
IS_DEPLOYED = undefined;
VERSION_NUMBER = /* PF2ETOOLS_VERSION__OPEN */"0.5.12"/* PF2ETOOLS_VERSION__CLOSE */;
VERSION_NUMBER = /* PF2ETOOLS_VERSION__OPEN */"0.5.13"/* PF2ETOOLS_VERSION__CLOSE */;
DEPLOYED_STATIC_ROOT = ""; // ""; // FIXME re-enable this when we have a CDN again
IS_VTT = false;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pf2etools",
"author": "Pf2eTools",
"version": "0.5.12",
"version": "0.5.13",
"license": "MIT",
"description": "A site dedicated to making playing games with your friends as easy as possible.",
"scripts": {
Expand Down
Loading

0 comments on commit 40859ee

Please sign in to comment.