add T2 and T3 items
This commit is contained in:
@@ -16,7 +16,7 @@ function loadRrr(): number {
|
|||||||
|
|
||||||
const filters = ref<FilterState>({
|
const filters = ref<FilterState>({
|
||||||
city: loadCity(),
|
city: loadCity(),
|
||||||
tiers: new Set([4, 5, 6, 7, 8]),
|
tiers: new Set([2, 3, 4, 5, 6, 7, 8]),
|
||||||
selectedItemTypes: null,
|
selectedItemTypes: null,
|
||||||
rrr: loadRrr(),
|
rrr: loadRrr(),
|
||||||
nameFilter: '',
|
nameFilter: '',
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ export const QUALITIES: { label: string; value: AlbionQuality }[] = [
|
|||||||
{ label: 'Masterpiece', value: 5 },
|
{ label: 'Masterpiece', value: 5 },
|
||||||
]
|
]
|
||||||
|
|
||||||
export const TIERS: Tier[] = [4, 5, 6, 7, 8]
|
export const TIERS: Tier[] = [2, 3, 4, 5, 6, 7, 8]
|
||||||
export const ENCHANTMENTS: Enchantment[] = [0, 1, 2, 3, 4]
|
export const ENCHANTMENTS: Enchantment[] = [0, 1, 2, 3, 4]
|
||||||
export const CATEGORIES: ItemCategory[] = ['Weapons', 'Armor', 'Gathering']
|
export const CATEGORIES: ItemCategory[] = ['Weapons', 'Armor', 'Gathering']
|
||||||
|
|||||||
@@ -19,7 +19,40 @@ interface RecipeTemplate {
|
|||||||
ingredients: IngredientTemplate[]
|
ingredients: IngredientTemplate[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const ALL_TIERS: Tier[] = [4, 5, 6, 7, 8]
|
const ALL_TIERS: Tier[] = [2, 3, 4, 5, 6, 7, 8]
|
||||||
|
|
||||||
|
// Returns the lowest tier at which a given outputId template exists in-game
|
||||||
|
function minTierFor(outputId: string): Tier {
|
||||||
|
// Artifacts/special variants: T4+
|
||||||
|
if (/_(?:UNDEAD|HELL|MORGANA|KEEPER|FEY|ROYAL|AVALON|CRYSTAL)$|SHAPESHIFTER/.test(outputId)) return 4
|
||||||
|
|
||||||
|
// SET2/SET3 armor: T4+
|
||||||
|
if (/_SET[23]$/.test(outputId)) return 4
|
||||||
|
|
||||||
|
// Gathering tools: fishing rod starts at T3, rest at T2
|
||||||
|
if (outputId.includes('_2H_TOOL_')) return outputId.endsWith('_FISHINGROD') ? 3 : 2
|
||||||
|
|
||||||
|
// Off-hands: torch at T3, shield and book at T2
|
||||||
|
if (outputId.endsWith('_OFF_TORCH')) return 3
|
||||||
|
if (/_OFF_(SHIELD|BOOK)$/.test(outputId)) return 2
|
||||||
|
|
||||||
|
// 2H weapons: bow at T2, crossbow/quarterstaff/knuckles_set1 at T3, rest at T4
|
||||||
|
if (outputId.includes('_2H_')) {
|
||||||
|
if (outputId.endsWith('_2H_BOW')) return 2
|
||||||
|
if (/_2H_(CROSSBOW|QUARTERSTAFF|KNUCKLES_SET1)$/.test(outputId)) return 3
|
||||||
|
return 4
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1H weapons: sword and fire staff at T2, light crossbow at T4, rest at T3
|
||||||
|
if (outputId.includes('_MAIN_')) {
|
||||||
|
if (/_MAIN_(SWORD|FIRESTAFF)$/.test(outputId)) return 2
|
||||||
|
if (outputId.endsWith('_MAIN_1HCROSSBOW')) return 4
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET1 armor (HEAD_, ARMOR_, SHOES_): T2+
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
// ─── Journal type inference ────────────────────────────────────────────────────
|
// ─── Journal type inference ────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -53,9 +86,12 @@ for (const entry of rawRecipes) {
|
|||||||
if (!('outputId' in entry)) continue // skip comment-only entries
|
if (!('outputId' in entry)) continue // skip comment-only entries
|
||||||
const template = entry as unknown as RecipeTemplate
|
const template = entry as unknown as RecipeTemplate
|
||||||
|
|
||||||
const enchants: Enchantment[] = template.enchanted === false ? [0] : ENCHANTMENTS
|
const minTier = minTierFor(template.outputId)
|
||||||
|
|
||||||
for (const tier of ALL_TIERS) {
|
for (const tier of ALL_TIERS) {
|
||||||
|
if (tier < minTier) continue
|
||||||
|
|
||||||
|
const enchants: Enchantment[] = (template.enchanted === false || tier < 4) ? [0] : ENCHANTMENTS
|
||||||
for (const enc of enchants) {
|
for (const enc of enchants) {
|
||||||
const baseOutputId = applyTier(template.outputId, tier)
|
const baseOutputId = applyTier(template.outputId, tier)
|
||||||
const outputItemId = enc === 0 ? baseOutputId : `${baseOutputId}@${enc}`
|
const outputItemId = enc === 0 ? baseOutputId : `${baseOutputId}@${enc}`
|
||||||
|
|||||||
@@ -51,10 +51,10 @@
|
|||||||
<span class="text-xs text-gray-500">{{ activeMaterialDef.name }}</span>
|
<span class="text-xs text-gray-500">{{ activeMaterialDef.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Enchantment columns: .0 .1 .2 .3 .4 -->
|
<!-- Enchantment columns: .0 only for T2/T3, .0–.4 for T4+ -->
|
||||||
<div class="grid grid-cols-5 divide-x divide-gray-700/40">
|
<div class="grid divide-x divide-gray-700/40" :class="tier >= 4 ? 'grid-cols-5' : 'grid-cols-1'">
|
||||||
<div
|
<div
|
||||||
v-for="enc in ENCHANTMENTS"
|
v-for="enc in (tier >= 4 ? ENCHANTMENTS : [0])"
|
||||||
:key="enc"
|
:key="enc"
|
||||||
class="px-4 py-3"
|
class="px-4 py-3"
|
||||||
>
|
>
|
||||||
@@ -92,10 +92,10 @@ interface MaterialDef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MATERIALS: MaterialDef[] = [
|
const MATERIALS: MaterialDef[] = [
|
||||||
{ name: 'Metal Bar', tiers: [4, 5, 6, 7, 8], baseId: t => `T${t}_METALBAR` },
|
{ name: 'Metal Bar', tiers: [2, 3, 4, 5, 6, 7, 8], baseId: t => `T${t}_METALBAR` },
|
||||||
{ name: 'Planks', tiers: [4, 5, 6, 7, 8], baseId: t => `T${t}_PLANKS` },
|
{ name: 'Planks', tiers: [2, 3, 4, 5, 6, 7, 8], baseId: t => `T${t}_PLANKS` },
|
||||||
{ name: 'Leather', tiers: [4, 5, 6, 7, 8], baseId: t => `T${t}_LEATHER` },
|
{ name: 'Leather', tiers: [2, 3, 4, 5, 6, 7, 8], baseId: t => `T${t}_LEATHER` },
|
||||||
{ name: 'Cloth', tiers: [4, 5, 6, 7, 8], baseId: t => `T${t}_CLOTH` },
|
{ name: 'Cloth', tiers: [2, 3, 4, 5, 6, 7, 8], baseId: t => `T${t}_CLOTH` },
|
||||||
]
|
]
|
||||||
|
|
||||||
const activeMaterial = ref<string>(localStorage.getItem('albion-prices-material') ?? 'Metal Bar')
|
const activeMaterial = ref<string>(localStorage.getItem('albion-prices-material') ?? 'Metal Bar')
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export type Tier = 4 | 5 | 6 | 7 | 8
|
export type Tier = 2 | 3 | 4 | 5 | 6 | 7 | 8
|
||||||
export type Enchantment = 0 | 1 | 2 | 3 | 4
|
export type Enchantment = 0 | 1 | 2 | 3 | 4
|
||||||
|
|
||||||
export type ItemCategory = 'Weapons' | 'Armor' | 'Gathering'
|
export type ItemCategory = 'Weapons' | 'Armor' | 'Gathering'
|
||||||
|
|||||||
@@ -231,6 +231,8 @@ export function tierEnchantStyle(tier: number, enchantment: number): object {
|
|||||||
|
|
||||||
export function tierStyle(tier: number): { backgroundColor: string; color: string } {
|
export function tierStyle(tier: number): { backgroundColor: string; color: string } {
|
||||||
const map: Record<number, [string, string]> = {
|
const map: Record<number, [string, string]> = {
|
||||||
|
2: ['#635349', '#ffffff'],
|
||||||
|
3: ['#495E39', '#ffffff'],
|
||||||
4: ['#355f78', '#ffffff'],
|
4: ['#355f78', '#ffffff'],
|
||||||
5: ['#77221a', '#ffffff'],
|
5: ['#77221a', '#ffffff'],
|
||||||
6: ['#c9712c', '#ffffff'],
|
6: ['#c9712c', '#ffffff'],
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.app.json" },
|
{
|
||||||
{ "path": "./tsconfig.node.json" }
|
"path": "./tsconfig.app.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./tsconfig.node.json"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user