remove Watchstones, generalize Invitations

This commit is contained in:
Alexander Drozdov
2022-02-08 14:07:15 +02:00
parent d59443a9aa
commit 5d942e7c4c
9 changed files with 8 additions and 15 deletions
+1 -2
View File
@@ -30,7 +30,6 @@ export enum ItemCategory {
OneHandedSword = 'One-Handed Sword',
TwoHandedSword = 'Two-Handed Sword',
ClusterJewel = 'Cluster Jewel',
Watchstone = 'Watchstone',
HeistBlueprint = 'Heist Blueprint',
HeistContract = 'Heist Contract',
HeistTool = 'Heist Tool',
@@ -38,7 +37,7 @@ export enum ItemCategory {
HeistGear = 'Heist Gear',
HeistCloak = 'Heist Cloak',
Trinket = 'Trinket',
MavenInvitation = 'Maven\'s Invitation',
Invitation = 'Invitation',
Gem = 'Gem',
Currency = 'Currency',
DivinationCard = 'Divination Card'
+2 -2
View File
@@ -82,7 +82,7 @@ function * _statPlaceholderGenerator (stat: string) {
const withPlaceholders = stat
.replace(/(?<value>(?<!\d|\))[+-]?\d+(?:\.\d+)?)(?:\((?<min>.[^)-]*)(?:-(?<max>[^)]+))?\))?/gm, (_, roll: string, min?: string, max?: string) => {
if (min != null && max == null) {
// example: Watchstone "# uses remaining"
// example: Sextant "# uses remaining"
max = min
}
@@ -139,7 +139,7 @@ export function tryParseTranslation (stat: StatString, modType: ModifierType): P
}
}
if (found.stat.ref === '# uses remaining') {
if (found.stat.ref === '# uses remaining' || found.stat.ref === '# use remaining') {
const uses = combination.values[0]
uses.bounds = {
min: 1,
-1
View File
@@ -77,7 +77,6 @@ const priceQueue = (() => {
return [
{ overview: 'currency', type: 'Currency', loaded: 0 },
{ overview: 'currency', type: 'Fragment', loaded: 0 },
{ overview: 'item', type: 'Watchstone', loaded: 0, key: (item: NinjaItemInfo) => `ITEM::${item.name} // ${item.variant}` },
{ overview: 'item', type: 'Oil', loaded: 0 },
{ overview: 'item', type: 'Incubator', loaded: 0 },
{ overview: 'item', type: 'Scarab', loaded: 0 },
+1 -1
View File
@@ -73,7 +73,7 @@ export default defineComponent({
category === ItemCategory.Map ||
category === ItemCategory.HeistContract ||
category === ItemCategory.HeistBlueprint ||
category === ItemCategory.MavenInvitation)
category === ItemCategory.Invitation)
})
return {
+1 -1
View File
@@ -170,7 +170,7 @@ export default defineComponent({
props.item.category !== ItemCategory.CapturedBeast &&
props.item.category !== ItemCategory.HeistContract &&
props.item.category !== ItemCategory.HeistBlueprint &&
props.item.category !== ItemCategory.MavenInvitation &&
props.item.category !== ItemCategory.Invitation &&
!props.item.isUnidentified
})
@@ -44,7 +44,7 @@ export function createFilters (
disabled: !(item.stackSize && item.stackSize.value > 1 && opts.activateStockFilter)
}
}
if (item.category === ItemCategory.MavenInvitation) {
if (item.category === ItemCategory.Invitation) {
filters.searchExact = {
baseType: item.info.name
}
@@ -22,7 +22,7 @@ export function initUiModFilters (
): StatFilter[] {
if (
(item.rarity === ItemRarity.Unique && item.category === ItemCategory.Map) ||
item.category === ItemCategory.MavenInvitation ||
item.category === ItemCategory.Invitation ||
item.category === ItemCategory.HeistContract ||
item.category === ItemCategory.HeistBlueprint
) {
+1 -1
View File
@@ -34,7 +34,7 @@ export function apiToSatisfySearch (item: ParsedItem, stats: StatFilter[], filte
if (filters.stackSize) {
if (
item.category === ItemCategory.DivinationCard ||
item.category === ItemCategory.MavenInvitation ||
item.category === ItemCategory.Invitation ||
item.category === ItemCategory.Map
) {
return filters.stackSize.disabled ? 'trade' : 'bulk'
@@ -95,11 +95,6 @@ function forUniqueItem (item: ParsedItem) {
if (item.sockets?.linked) {
id += ` // ${item.sockets.linked}L`
}
if (item.info.unique.base === 'Ivory Watchstone') {
const uses = item.statsByType.find(m => m.type === 'explicit' && m.stat.ref === '# uses remaining')!
const roll = uses.sources[0].contributes!.value
id += ` // ${roll}`
}
return id
}