Skip to content

Commit d89622a

Browse files
committed
v1.179.2
1 parent 1e40962 commit d89622a

13 files changed

+416
-151
lines changed

data/bestiary/bestiary-kftgv.json

+1
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@
695695
"performance": "+7"
696696
},
697697
"reaction": null,
698+
"actionTags": [],
698699
"hasToken": true
699700
},
700701
{

data/changelog.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -2403,6 +2403,11 @@
24032403
{
24042404
"ver": "1.179.1",
24052405
"date": "2023-04-20",
2406-
"txt": "- Added \"As Names\"/\"As Abbreviations\"/\"As Names Plus Abbreviation\" customization option to Source filters\n- Searching for a source abbreviation (e.g. \"DMG\") in filters now shows sources matching that abbreviation \n- Fixed labelled slider filters failing to display matching labels in \"dropdown\" mode\n- (Fixed typos/added tags)\n"
2406+
"txt": "- Added \"As Names\"/\"As Abbreviations\"/\"As Names Plus Abbreviation\" customization option to Source filters\n- Searching for a source abbreviation (e.g. \"DMG\") in filters now shows sources matching that abbreviation \n- Fixed labelled slider filters failing to display matching labels in \"dropdown\" mode\n- (Fixed typos/added tags)"
2407+
},
2408+
{
2409+
"ver": "1.179.2",
2410+
"date": "2023-05-02",
2411+
"txt": "- Added \"Export\"/\"Import\" options to Point Buy Statgen \"Custom Rules\" section\n- (Fixed typos/added tags)"
24072412
}
24082413
]

data/fluff-items.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2787,7 +2787,7 @@
27872787
"type": "image",
27882788
"href": {
27892789
"type": "internal",
2790-
"path": "items/CRCotN/Medal of the Maze.jpg"
2790+
"path": "items/CRCotN/Medal of the Maze.webp"
27912791
}
27922792
}
27932793
]

data/magicvariants.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@
19051905
"namePrefix": "Mithral +1 ",
19061906
"source": "AI",
19071907
"page": 156,
1908-
"rarity": "unknown (magic)",
1908+
"rarity": "rare",
19091909
"strength": null,
19101910
"bonusAc": "+1",
19111911
"stealth": false,

data/renderdemo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{
2222
"type": "list",
2323
"items": [
24-
"Style tags; {@bold some text to be bolded} (alternative {@b shorthand}), {@italic some text to be italicised} (alternative {@i shorthand}), {@underline some text to be underlined} (alternative {@u shorthand}), {@strike some text to strike-through}, (alternative {@s shorthand}), {@color color|e40707}/{@color color variable|--rgb-name} tags, {@code print("hello world")} tags, misc {@style Style|small-caps;small;capitalize;dnd-font} tags",
24+
"Style tags; {@bold some text to be bolded} (alternative {@b shorthand}), {@italic some text to be italicised} (alternative {@i shorthand}), {@underline some text to be underlined} (alternative {@u shorthand}), {@strike some text to strike-through}, (alternative {@s shorthand}), {@color color|e40707}/{@color color variable|--rgb-name} tags, {@highlight highlight} tags, {@code print("hello world")} tags, misc {@style Style|small-caps;small;capitalize;dnd-font} tags",
2525
"Additionally, {@note note tags}, used for adding errata or Twitter \"designer footnotes.\"",
2626
"Dice roller tags; {@dice 1d2-2+2d3+5} for regular dice rolls ({@dice 1d6;2d6} for multiple options; {@dice 1d6 + #$prompt_number:min=1,title=Enter a Number!,default=123$#} for input prompts), with extended {@dice 1d20+2|display text} and {@dice 1d20+2|display text|rolled by name}, and a special 'hit' version which assumes a d20 is to be rolled {@hit +7} (and rolls advantage on shift-click, disadvantage on alt-click). There's also {@damage 1d12+3} which will roll critical hits on shift-click and half damage (rounding down) on alt-click, and {@d20 -4} which will also roll advantage/disadvantage, although @hit tags are preferred where appropriate. Spells can have scaling-dice tags, (damage of 2d6 or 3d6 at level 1, add an extra {@scaledice 2d6;3d6|2-9|1d6} for each level beyond 2nd), for when a spell effect scales at higher levels. {@ability str 20}, {@savingThrow str 5}, and {@skillCheck animal_handling 5} are used as internal shorthand, but may be useful elsewhere.",
2727
"Auto dice tags; as above, but a result is automatically rolled upon rendering: {@autodice 2d10+2}.",

js/filter-items.js

+19
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ class PageFilterEquipment extends PageFilter {
2424
return this._getSortableDamageTerm(a.item) - this._getSortableDamageTerm(b.item);
2525
}
2626

27+
static _getMasteryDisplay (mastery) {
28+
const {name, source} = DataUtil.proxy.unpackUid("itemMastery", mastery, "itemMastery");
29+
if (SourceUtil.isSiteSource(source)) return name.toTitleCase();
30+
return `${name.toTitleCase()} (${Parser.sourceJsonToAbv(source)})`;
31+
}
32+
2733
constructor ({filterOpts = null} = {}) {
2834
super();
2935

@@ -59,6 +65,7 @@ class PageFilterEquipment extends PageFilter {
5965
this._damageDiceFilter = new Filter({header: "Weapon Damage Dice", items: ["1", "1d4", "1d6", "1d8", "1d10", "1d12", "2d6"], itemSortFn: (a, b) => PageFilterEquipment._sortDamageDice(a, b)});
6066
this._miscFilter = new Filter({header: "Miscellaneous", items: ["Item Group", "Bundle", "SRD", "Basic Rules", "Has Images", "Has Info"], isMiscFilter: true});
6167
this._poisonTypeFilter = new Filter({header: "Poison Type", items: ["ingested", "injury", "inhaled", "contact"], displayFn: StrUtil.toTitleCase});
68+
this._masteryFilter = new Filter({header: "Mastery", displayFn: this.constructor._getMasteryDisplay.bind(this)});
6269
}
6370

6471
static mutateForFilters (item) {
@@ -104,6 +111,13 @@ class PageFilterEquipment extends PageFilter {
104111
item._fDamageDice = [];
105112
if (item.dmg1) item._fDamageDice.push(item.dmg1);
106113
if (item.dmg2) item._fDamageDice.push(item.dmg2);
114+
115+
item._fMastery = item.mastery
116+
? item.mastery.map(it => {
117+
const {name, source} = DataUtil.proxy.unpackUid("itemMastery", it, "itemMastery", {isLower: true});
118+
return [name, source].join("|");
119+
})
120+
: null;
107121
}
108122

109123
addToFilters (item, isExcluded) {
@@ -116,6 +130,7 @@ class PageFilterEquipment extends PageFilter {
116130
this._damageDiceFilter.addItem(item._fDamageDice);
117131
this._poisonTypeFilter.addItem(item.poisonTypes);
118132
this._miscFilter.addItem(item._fMisc);
133+
this._masteryFilter.addItem(item._fMastery);
119134
}
120135

121136
async _pPopulateBoxOptions (opts) {
@@ -131,6 +146,7 @@ class PageFilterEquipment extends PageFilter {
131146
this._damageDiceFilter,
132147
this._miscFilter,
133148
this._poisonTypeFilter,
149+
this._masteryFilter,
134150
];
135151
}
136152

@@ -148,6 +164,7 @@ class PageFilterEquipment extends PageFilter {
148164
it._fDamageDice,
149165
it._fMisc,
150166
it.poisonTypes,
167+
it._fMastery,
151168
);
152169
}
153170
}
@@ -355,6 +372,7 @@ class PageFilterItems extends PageFilterEquipment {
355372
this._miscFilter,
356373
this._rechargeTypeFilter,
357374
this._poisonTypeFilter,
375+
this._masteryFilter,
358376
this._lootTableFilter,
359377
this._baseItemFilter,
360378
this._baseSourceFilter,
@@ -382,6 +400,7 @@ class PageFilterItems extends PageFilterEquipment {
382400
it._fMisc,
383401
it.recharge,
384402
it.poisonTypes,
403+
it._fMastery,
385404
it.lootTables,
386405
it._fBaseItemAll,
387406
it._baseSource,

js/filter.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ class FilterBox extends ProxyBase {
704704
${$wrpBtnCombineFilters}
705705
</div>
706706
<div class="ve-flex-v-center mobile__m-1">
707-
<div class="btn-group mr-2">
707+
<div class="btn-group mr-2 ve-flex-h-center">
708708
${$btnShowAllFilters}
709709
${$btnHideAllFilters}
710710
</div>
@@ -2998,9 +2998,12 @@ class SourceFilter extends Filter {
29982998
}
29992999

30003000
static getCompleteFilterSources (ent) {
3001-
return ent.otherSources
3002-
? [ent.source].concat(ent.otherSources.map(src => new SourceFilterItem({item: src.source, isIgnoreRed: true, isOtherSource: true})))
3003-
: ent.source;
3001+
if (!ent.otherSources) return ent.source;
3002+
3003+
const otherSourcesFilt = ent.otherSources.filter(src => !ExcludeUtil.isExcluded("*", "*", src.source, {isNoCount: true}));
3004+
if (!otherSourcesFilt.length) return ent.source;
3005+
3006+
return [ent.source].concat(otherSourcesFilt.map(src => new SourceFilterItem({item: src.source, isIgnoreRed: true, isOtherSource: true})));
30043007
}
30053008

30063009
_doRenderPills_doRenderWrpGroup_getHrDivider (group) {

0 commit comments

Comments
 (0)