130 lines
5.6 KiB
TypeScript
130 lines
5.6 KiB
TypeScript
import type { Iwt2BossId } from './bosses'
|
|
|
|
export const IWT2_BOSS_PET_DROP_RATE = 1 / 500
|
|
|
|
export type Iwt2BossCoinReward = {
|
|
id: string
|
|
name: string
|
|
rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary'
|
|
itemLevel: number
|
|
glyph: string
|
|
}
|
|
|
|
export type Iwt2BossPetReward = {
|
|
id: string
|
|
name: string
|
|
}
|
|
|
|
type Iwt2CoinTier = {
|
|
idPrefix: string
|
|
namePrefix: string
|
|
rarity: Iwt2BossCoinReward['rarity']
|
|
itemLevel: number
|
|
glyph: string
|
|
}
|
|
|
|
const IWT2_COIN_TIERS: Record<string, Iwt2CoinTier> = {
|
|
initiate: { idPrefix: 'raw', namePrefix: 'Raw', rarity: 'common', itemLevel: 1, glyph: 'R' },
|
|
veteran: { idPrefix: 'green', namePrefix: 'Green', rarity: 'uncommon', itemLevel: 10, glyph: 'G' },
|
|
champion: { idPrefix: 'blue', namePrefix: 'Blue', rarity: 'rare', itemLevel: 15, glyph: 'B' },
|
|
mythic: { idPrefix: 'purple', namePrefix: 'Purple', rarity: 'epic', itemLevel: 20, glyph: 'P' },
|
|
ascendant: { idPrefix: 'orange', namePrefix: 'Orange', rarity: 'legendary', itemLevel: 25, glyph: 'O' },
|
|
'raid-normal': { idPrefix: 'green', namePrefix: 'Green', rarity: 'uncommon', itemLevel: 10, glyph: 'G' },
|
|
'raid-champion': { idPrefix: 'blue', namePrefix: 'Blue', rarity: 'rare', itemLevel: 15, glyph: 'B' },
|
|
'raid-mythic': { idPrefix: 'purple', namePrefix: 'Purple', rarity: 'epic', itemLevel: 20, glyph: 'P' },
|
|
'raid-ascendant': { idPrefix: 'orange', namePrefix: 'Orange', rarity: 'legendary', itemLevel: 25, glyph: 'O' },
|
|
}
|
|
|
|
const IWT2_BOSS_REWARD_DISPLAY_NAMES: Record<Iwt2BossId, string> = {
|
|
'barroth': 'Mirehorn',
|
|
'bulldrome': 'Bristlemaw',
|
|
'cinderback-ricochet': 'Cinderback Ricochet',
|
|
'crystal-bat-matriarch': 'Crystal Bat Matriarch',
|
|
'ember-mantis-duelist': 'Ember Mantis Duelist',
|
|
'great-jaggi': 'Packfang Alpha',
|
|
'hollowcrown-revenant': 'Hollowcrown Revenant',
|
|
'khezu': 'Palevolt Maw',
|
|
'obsidian-ram-golem': 'Obsidian Ram Golem',
|
|
'rathian': 'Verdant Wyrm',
|
|
'rimebastion': 'Rimebastion',
|
|
'sandglass-scorpion': 'Sandglass Scorpion',
|
|
'stormcoil-wyrm': 'Stormcoil Wyrm',
|
|
'tobi-kadachi': 'Stormtail',
|
|
'venom-orchid-hydra': 'Venom Orchid Hydra',
|
|
'yian-kut-ku': 'Emberquill',
|
|
}
|
|
|
|
export const IWT2_BOSS_COIN_DIFFICULTY_SLUGS = [
|
|
'initiate',
|
|
'veteran',
|
|
'champion',
|
|
'mythic',
|
|
'ascendant',
|
|
] as const
|
|
|
|
export const IWT2_LEGACY_BOSS_MATERIAL_REWARDS: Record<Iwt2BossId, { id: string, name: string }> = {
|
|
'barroth': { id: 'barroth-shell', name: 'Mirehorn Shell' },
|
|
'bulldrome': { id: 'raw-bulldrome-coin', name: 'Raw Bristlemaw Coin' },
|
|
'cinderback-ricochet': { id: 'cinderback-plate', name: 'Cinderback Plate' },
|
|
'crystal-bat-matriarch': { id: 'crystal-bat-fang', name: 'Crystal Bat Fang' },
|
|
'ember-mantis-duelist': { id: 'ember-mantis-blade', name: 'Ember Mantis Blade' },
|
|
'great-jaggi': { id: 'great-jaggi-hide', name: 'Packfang Alpha Hide' },
|
|
'hollowcrown-revenant': { id: 'hollowcrown-antler', name: 'Hollowcrown Antler' },
|
|
'khezu': { id: 'khezu-pearl', name: 'Palevolt Maw Pearl' },
|
|
'obsidian-ram-golem': { id: 'obsidian-ram-core', name: 'Obsidian Ram Core' },
|
|
'rathian': { id: 'rathian-scale', name: 'Verdant Wyrm Scale' },
|
|
'rimebastion': { id: 'rimebastion-core', name: 'Rimebastion Core' },
|
|
'sandglass-scorpion': { id: 'sandglass-stinger', name: 'Sandglass Stinger' },
|
|
'stormcoil-wyrm': { id: 'stormcoil-conductor', name: 'Stormcoil Conductor' },
|
|
'tobi-kadachi': { id: 'tobi-kadachi-pelt', name: 'Stormtail Pelt' },
|
|
'venom-orchid-hydra': { id: 'venom-orchid-pod', name: 'Venom Orchid Pod' },
|
|
'yian-kut-ku': { id: 'yian-kut-ku-scale', name: 'Emberquill Scale' },
|
|
}
|
|
|
|
const IWT2_BOSS_PET_REWARDS: Record<Iwt2BossId, Iwt2BossPetReward> = {
|
|
'barroth': { id: 'barroth-pet', name: 'Mirehorn Pet' },
|
|
'bulldrome': { id: 'bulldrome-pet', name: 'Bristlemaw Pet' },
|
|
'cinderback-ricochet': { id: 'cinderback-ricochet-pet', name: 'Cinderback Ricochet Pet' },
|
|
'crystal-bat-matriarch': { id: 'crystal-bat-matriarch-pet', name: 'Crystal Bat Matriarch Pet' },
|
|
'ember-mantis-duelist': { id: 'ember-mantis-duelist-pet', name: 'Ember Mantis Duelist Pet' },
|
|
'great-jaggi': { id: 'great-jaggi-pet', name: 'Packfang Alpha Pet' },
|
|
'hollowcrown-revenant': { id: 'hollowcrown-revenant-pet', name: 'Hollowcrown Revenant Pet' },
|
|
'khezu': { id: 'khezu-pet', name: 'Palevolt Maw Pet' },
|
|
'obsidian-ram-golem': { id: 'obsidian-ram-golem-pet', name: 'Obsidian Ram Golem Pet' },
|
|
'rathian': { id: 'rathian-pet', name: 'Verdant Wyrm Pet' },
|
|
'rimebastion': { id: 'rimebastion-pet', name: 'Rimebastion Pet' },
|
|
'sandglass-scorpion': { id: 'sandglass-scorpion-pet', name: 'Sandglass Scorpion Pet' },
|
|
'stormcoil-wyrm': { id: 'stormcoil-wyrm-pet', name: 'Stormcoil Wyrm Pet' },
|
|
'tobi-kadachi': { id: 'tobi-kadachi-pet', name: 'Stormtail Pet' },
|
|
'venom-orchid-hydra': { id: 'venom-orchid-hydra-pet', name: 'Venom Orchid Hydra Pet' },
|
|
'yian-kut-ku': { id: 'yian-kut-ku-pet', name: 'Emberquill Pet' },
|
|
}
|
|
|
|
export function iwt2BossCoinRewardFor(
|
|
bossId: Iwt2BossId,
|
|
difficultySlug = 'initiate',
|
|
): Iwt2BossCoinReward {
|
|
const tier = IWT2_COIN_TIERS[difficultySlug] ?? IWT2_COIN_TIERS.initiate
|
|
return {
|
|
id: `${tier.idPrefix}-${bossId}-coin`,
|
|
name: `${tier.namePrefix} ${formatBossNameForCoin(bossId)} Coin`,
|
|
rarity: tier.rarity,
|
|
itemLevel: tier.itemLevel,
|
|
glyph: tier.glyph,
|
|
}
|
|
}
|
|
|
|
export function iwt2BossCoinRewardsFor(bossId: Iwt2BossId): Iwt2BossCoinReward[] {
|
|
return IWT2_BOSS_COIN_DIFFICULTY_SLUGS.map((difficultySlug) => (
|
|
iwt2BossCoinRewardFor(bossId, difficultySlug)
|
|
))
|
|
}
|
|
|
|
export function iwt2BossPetRewardFor(bossId: Iwt2BossId): Iwt2BossPetReward {
|
|
return IWT2_BOSS_PET_REWARDS[bossId]
|
|
}
|
|
|
|
function formatBossNameForCoin(bossId: Iwt2BossId): string {
|
|
return IWT2_BOSS_REWARD_DISPLAY_NAMES[bossId]
|
|
}
|