Skip to content

Commit 15cc173

Browse files
committed
Add Shenhe materials
1 parent 88a4e13 commit 15cc173

File tree

3 files changed

+45
-11
lines changed

3 files changed

+45
-11
lines changed

src/commands/characters/character.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,20 @@ Note: this command supports fuzzy search.`,
238238
.map(([name, value]) => `**${name}**: ${data.stat(name, value)}`)
239239
.join("\n")
240240
}`, true)
241+
}
241242

243+
const upgradeLines: string[] = []
244+
if (char.ascensionCosts ) {
242245
const ascensionCosts = [
243246
char.ascensionCosts.mapping.Gem4,
244247
char.ascensionCosts.mapping.BossMat,
245248
char.ascensionCosts.mapping.Specialty,
246249
char.ascensionCosts.mapping.EnemyDropTier3,
247250
].filter(x => x)
251+
upgradeLines.push(`Ascensions: ${ascensionCosts.map(i => data.emoji(i)).join("")}`)
252+
}
248253

254+
if (char.skills) {
249255
const talents = char.skills
250256
.flatMap(s => [...(s.talents ?? []), s.ult ])
251257
.filter(x => x)
@@ -268,10 +274,13 @@ Note: this command supports fuzzy search.`,
268274
.map(s => s?.costs?.mapping.EnemyDropTier3)
269275
.filter((x, i, a) => x && a.indexOf(x) == i)
270276

271-
embed.addField("Upgrade material", `Ascensions: ${ascensionCosts.map(i => data.emoji(i)).join("")}
272-
Talents: ${[...books, ...mats, ...drops].map(i => data.emoji(i)).join("")}`)
277+
const all = [...books, ...mats, ...drops]
278+
if (all.length > 0)
279+
upgradeLines.push(`Talents: ${all.map(i => data.emoji(i)).join("")}`)
273280
}
274281

282+
if (upgradeLines.length > 0)
283+
embed.addField("Upgrade material", upgradeLines.join("\n"))
275284

276285
return embed
277286
} else if (relativePage == 1) {

src/data/gamedata/characters.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18206,6 +18206,16 @@
1820618206
"name": "Divine Maiden's Deliverance",
1820718207
"desc": "Unleashes the power of the Talisman Spirit, allowing it to roam free in this plane, dealing **AoE Cryo DMG**.\nThe Talisman Spirit then creates a field that decreases the Cryo RES and Physical RES of opponents within it. It also deals periodic **Cryo DMG** to opponents within the field.",
1820818208
"type": "Cryo",
18209+
"costs": {
18210+
"template": "talentCosts",
18211+
"mapping": {
18212+
"Book": "Prosperity",
18213+
"BossMat": "Hellfire Butterfly",
18214+
"EnemyDropTier1": "Whopperflower Nectar",
18215+
"EnemyDropTier2": "Shimmering Nectar",
18216+
"EnemyDropTier3": "Energy Nectar"
18217+
}
18218+
},
1820918219
"video": "https://cdn.discordapp.com/attachments/924788298810032269/924788592503578664/Shenhe_Q.gif"
1821018220
},
1821118221
"passive": [
@@ -18223,7 +18233,21 @@
1822318233
}
1822418234
]
1822518235
}
18226-
]
18236+
],
18237+
"ascensionCosts": {
18238+
"template": "charAscensionsCosts",
18239+
"mapping": {
18240+
"BossMat": "Unknown",
18241+
"EnemyDropTier1": "Whopperflower Nectar",
18242+
"EnemyDropTier2": "Shimmering Nectar",
18243+
"EnemyDropTier3": "Energy Nectar",
18244+
"Gem1": "Shivada Jade Sliver",
18245+
"Gem2": "Shivada Jade Fragment",
18246+
"Gem3": "Shivada Jade Chunk",
18247+
"Gem4": "Shivada Jade Gemstone",
18248+
"Specialty": "Qingxin"
18249+
}
18250+
}
1822718251
},
1822818252
"Sucrose": {
1822918253
"name": "Sucrose",

src/utils/Types.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,15 @@ export interface MainStatInfo {
287287

288288
export type Character = CharacterFull | CharacterPlaceholder
289289
export interface CharacterPlaceholder {
290-
name: string
291-
desc: string
292-
star?: number
293-
weaponType?: WeaponType
294-
icon?: string
295-
imgs: string[]
296-
meta: Meta
297-
skills?: Skills[]
290+
name: string
291+
desc: string
292+
star?: number
293+
weaponType?: WeaponType
294+
icon?: string
295+
imgs: string[]
296+
meta: Meta
297+
skills?: Skills[]
298+
ascensionCosts?: CostTemplate
298299
}
299300
export interface CharacterFull {
300301
name: string

0 commit comments

Comments
 (0)