···44const abilities: AbilityCardProps[] = [
55 {
66 name: 'Overtone Hum: Chorus after Dark Tones',
77- desc: 'Has a 100% base chance to increase the DMG taken by all enemies by 22%, lasting for 3 turn(s). At the same time, deals physical equal to 154% of Player\'s ATK to all enemies.',
77+ desc: "Has a 100% base chance to increase the DMG taken by all enemies by 22%, lasting for 3 turn(s). At the same time, deals physical equal to 154% of Player's ATK to all enemies.",
88 mechanic: 'aoe',
99 details: {
1010 range: '30 feet',
···1616 },
1717 {
1818 name: 'Caressing Moonlight',
1919- desc: 'Deals lightning equal to 176% of Kafka\'s ATK to a target enemy and lightning equal to 66% of Kafka\'s ATK to enemies adjacent to it.\n\nIf the target enemy is currently receiving DoT, all DoTs currently placed on that enemy immediately produce DMG equal to 78% of their original DMG.',
1919+ desc: "Deals lightning equal to 176% of Kafka's ATK to a target enemy and lightning equal to 66% of Kafka's ATK to enemies adjacent to it.\n\nIf the target enemy is currently receiving DoT, all DoTs currently placed on that enemy immediately produce DMG equal to 78% of their original DMG.",
2020 mechanic: 'aoe',
2121 details: {
2222 range: '30 feet',
···3838 },
3939 {
4040 name: 'Ordial: Aerial Bombardment',
4141- desc: 'Consumes SAM\'s HP equal to 40% of SAM\'s Max HP and regenerates a fixed amount of Energy equal to 60% of SAM\'s Max Energy. Deals fire equal to 200% of SAM\'s ATK to a single target enemy. If the current HP is not sufficient, then SAM\'s HP is reduced to 1 when using this Skill. Enables this unit\'s next Action to be Advanced by 25%.',
4141+ desc: "Consumes SAM's HP equal to 40% of SAM's Max HP and regenerates a fixed amount of Energy equal to 60% of SAM's Max Energy. Deals fire equal to 200% of SAM's ATK to a single target enemy. If the current HP is not sufficient, then SAM's HP is reduced to 1 when using this Skill. Enables this unit's next Action to be Advanced by 25%.",
4242 mechanic: 'blast',
4343 details: {
4444 range: '120 feet',
4545 hit_dc: 'CON 21',
4646 damage: '10d8',
4747 element: 'fire',
4848- }
4949- }
4848+ },
4949+ },
5050]
51515252// oxlint-disable-next-line eslint(no-unused-vars)
5353export const load: PageLoad = ({ params }) => {
5454 return {
5555- abilities: abilities
5555+ abilities: abilities,
5656 }
5757}
···22import { tokenize } from '../src'
3344bench('tokenize()', () => {
55- const text = 'Deals quantum equal to [30,35,40,45,50] of Castorice\'s Max HP to one designated enemy.'
55+ const text =
66+ "Deals quantum equal to [30,35,40,45,50] of Castorice's Max HP to one designated enemy."
67 tokenize(text)
78})
···26262727export type HitDc = `${AbilityMod} ${number}`
28282929-export const AbilityModArray = ['STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA'] as const
2929+export const AbilityModArray = [
3030+ 'STR',
3131+ 'DEX',
3232+ 'CON',
3333+ 'INT',
3434+ 'WIS',
3535+ 'CHA',
3636+] as const
3037export const SpellComponentArray = ['V', 'S', 'M'] as const
3138export const SpellSchoolArray = [
3239 'abjuration',
···4552export const SpellSchoolEnum = z.enum(SpellSchoolArray)
46534754/* compile-time types */
4848-export type AbilityMod = typeof AbilityModArray[number]
4949-export type SpellComponent = typeof SpellComponentArray[number]
5050-export type SpellSchool = typeof SpellSchoolArray[number]
5555+export type AbilityMod = (typeof AbilityModArray)[number]
5656+export type SpellComponent = (typeof SpellComponentArray)[number]
5757+export type SpellSchool = (typeof SpellSchoolArray)[number]
+4-4
packages/types/src/hsr.ts
···4141export const DefenseMechanicEnum = z.enum(DefenseMechanicArray)
42424343/* compile-time types */
4444-export type Element = typeof ElementArray[number]
4545-export type Species = typeof SpeciesArray[number]
4646-export type OffenseMechanic = typeof OffenseMechanicArray[number]
4747-export type DefenseMechanic = typeof DefenseMechanicArray[number]
4444+export type Element = (typeof ElementArray)[number]
4545+export type Species = (typeof SpeciesArray)[number]
4646+export type OffenseMechanic = (typeof OffenseMechanicArray)[number]
4747+export type DefenseMechanic = (typeof DefenseMechanicArray)[number]
4848export type Mechanic = OffenseMechanic | DefenseMechanic