-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add formula-ui generators; add trailblazer generators (#2584)
* Add generators for sr-formula-ui * Add support for Trailblazer in generators; simplify some gender stuff * Generate new trailblazer files * Generate formula-ui sheets * Fix format/types
- Loading branch information
1 parent
805d84d
commit 381469e
Showing
239 changed files
with
15,698 additions
and
2,161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"generators": { | ||
"gen-sheet": { | ||
"factory": "./src/generators/gen-sheet/single-generator", | ||
"schema": "./src/generators/gen-sheet/single-schema.json", | ||
"description": "Generate a single sheet" | ||
}, | ||
"gen-all-sheets": { | ||
"factory": "./src/generators/gen-sheet/all-generator", | ||
"schema": "./src/generators/gen-sheet/all-schema.json", | ||
"description": "Generate all sheets" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@genshin-optimizer/sr/formula-ui", | ||
"version": "0.0.1", | ||
"generators": "./generators.json", | ||
"type": "commonjs" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import type { UISheet } from '@genshin-optimizer/pando/ui-sheet' | ||
import type { CharacterKey } from '@genshin-optimizer/sr/consts' | ||
import { buffs, conditionals, formulas } from '@genshin-optimizer/sr/formula' | ||
import { mappedStats } from '@genshin-optimizer/sr/stats' | ||
import { trans } from '../../util' | ||
import { type TalentSheetElementKey } from '../consts' | ||
import { | ||
bonusAbilitySheet, | ||
bonusStatsSheets, | ||
eidolonSheet, | ||
talentSheet, | ||
} from '../sheetUtil' | ||
|
||
const key: CharacterKey = 'Acheron' | ||
const [chg, _ch] = trans('char', key) | ||
const formula = formulas[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const cond = conditionals[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const buff = buffs[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const dm = mappedStats.char[key] | ||
|
||
const sheet: UISheet<TalentSheetElementKey> = { | ||
basic: talentSheet(key, 'basic', [ | ||
{ | ||
type: 'fields', | ||
fields: [ | ||
{ | ||
title: chg('abilities.basic.0.name'), | ||
fieldRef: formula.basicDmg_0.tag, | ||
}, | ||
], | ||
}, | ||
]), | ||
skill: talentSheet(key, 'skill', []), | ||
ult: talentSheet(key, 'ult', []), | ||
talent: talentSheet(key, 'talent', []), | ||
technique: talentSheet(key, 'technique'), | ||
bonusAbility1: bonusAbilitySheet(key, 'bonusAbility1'), | ||
bonusAbility2: bonusAbilitySheet(key, 'bonusAbility2'), | ||
bonusAbility3: bonusAbilitySheet(key, 'bonusAbility3', []), | ||
|
||
...bonusStatsSheets(key), | ||
eidolon1: eidolonSheet(key, 'eidolon1', []), | ||
eidolon2: eidolonSheet(key, 'eidolon2', []), | ||
eidolon3: eidolonSheet(key, 'eidolon3', [ | ||
// { | ||
// type: 'fields', | ||
// fields: [ | ||
// { | ||
// //TODO: Translate | ||
// title: 'talent', | ||
// fieldRef: buff.eidolon3_talent.tag, | ||
// }, | ||
// { | ||
// //TODO: Translate | ||
// title: 'ult', | ||
// fieldRef: buff.eidolon3_ult.tag, | ||
// }, | ||
// ], | ||
// }, | ||
]), | ||
eidolon4: eidolonSheet(key, 'eidolon4', []), | ||
eidolon5: eidolonSheet(key, 'eidolon5', [ | ||
// { | ||
// type: 'fields', | ||
// fields: [ | ||
// { | ||
// //TODO: Translate | ||
// title: 'basic', | ||
// fieldRef: buff.eidolon5_basic.tag, | ||
// }, | ||
// { | ||
// //TODO: Translate | ||
// title: 'skill', | ||
// fieldRef: buff.eidolon5_skill.tag, | ||
// }, | ||
// ], | ||
// }, | ||
]), | ||
eidolon6: eidolonSheet(key, 'eidolon6'), | ||
} | ||
export default sheet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import type { UISheet } from '@genshin-optimizer/pando/ui-sheet' | ||
import type { CharacterKey } from '@genshin-optimizer/sr/consts' | ||
import { buffs, conditionals, formulas } from '@genshin-optimizer/sr/formula' | ||
import { mappedStats } from '@genshin-optimizer/sr/stats' | ||
import { trans } from '../../util' | ||
import { type TalentSheetElementKey } from '../consts' | ||
import { | ||
bonusAbilitySheet, | ||
bonusStatsSheets, | ||
eidolonSheet, | ||
talentSheet, | ||
} from '../sheetUtil' | ||
|
||
const key: CharacterKey = 'Argenti' | ||
const [chg, _ch] = trans('char', key) | ||
const formula = formulas[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const cond = conditionals[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const buff = buffs[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const dm = mappedStats.char[key] | ||
|
||
const sheet: UISheet<TalentSheetElementKey> = { | ||
basic: talentSheet(key, 'basic', [ | ||
{ | ||
type: 'fields', | ||
fields: [ | ||
{ | ||
title: chg('abilities.basic.0.name'), | ||
fieldRef: formula.basicDmg_0.tag, | ||
}, | ||
], | ||
}, | ||
]), | ||
skill: talentSheet(key, 'skill', []), | ||
ult: talentSheet(key, 'ult', []), | ||
talent: talentSheet(key, 'talent', []), | ||
technique: talentSheet(key, 'technique'), | ||
bonusAbility1: bonusAbilitySheet(key, 'bonusAbility1'), | ||
bonusAbility2: bonusAbilitySheet(key, 'bonusAbility2'), | ||
bonusAbility3: bonusAbilitySheet(key, 'bonusAbility3', []), | ||
|
||
...bonusStatsSheets(key), | ||
eidolon1: eidolonSheet(key, 'eidolon1', []), | ||
eidolon2: eidolonSheet(key, 'eidolon2', []), | ||
eidolon3: eidolonSheet(key, 'eidolon3', [ | ||
// { | ||
// type: 'fields', | ||
// fields: [ | ||
// { | ||
// //TODO: Translate | ||
// title: 'talent', | ||
// fieldRef: buff.eidolon3_talent.tag, | ||
// }, | ||
// { | ||
// //TODO: Translate | ||
// title: 'ult', | ||
// fieldRef: buff.eidolon3_ult.tag, | ||
// }, | ||
// ], | ||
// }, | ||
]), | ||
eidolon4: eidolonSheet(key, 'eidolon4', []), | ||
eidolon5: eidolonSheet(key, 'eidolon5', [ | ||
// { | ||
// type: 'fields', | ||
// fields: [ | ||
// { | ||
// //TODO: Translate | ||
// title: 'basic', | ||
// fieldRef: buff.eidolon5_basic.tag, | ||
// }, | ||
// { | ||
// //TODO: Translate | ||
// title: 'skill', | ||
// fieldRef: buff.eidolon5_skill.tag, | ||
// }, | ||
// ], | ||
// }, | ||
]), | ||
eidolon6: eidolonSheet(key, 'eidolon6'), | ||
} | ||
export default sheet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import type { UISheet } from '@genshin-optimizer/pando/ui-sheet' | ||
import type { CharacterKey } from '@genshin-optimizer/sr/consts' | ||
import { buffs, conditionals, formulas } from '@genshin-optimizer/sr/formula' | ||
import { mappedStats } from '@genshin-optimizer/sr/stats' | ||
import { trans } from '../../util' | ||
import { type TalentSheetElementKey } from '../consts' | ||
import { | ||
bonusAbilitySheet, | ||
bonusStatsSheets, | ||
eidolonSheet, | ||
talentSheet, | ||
} from '../sheetUtil' | ||
|
||
const key: CharacterKey = 'Asta' | ||
const [chg, _ch] = trans('char', key) | ||
const formula = formulas[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const cond = conditionals[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const buff = buffs[key] | ||
// TODO: Cleanup | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const dm = mappedStats.char[key] | ||
|
||
const sheet: UISheet<TalentSheetElementKey> = { | ||
basic: talentSheet(key, 'basic', [ | ||
{ | ||
type: 'fields', | ||
fields: [ | ||
{ | ||
title: chg('abilities.basic.0.name'), | ||
fieldRef: formula.basicDmg_0.tag, | ||
}, | ||
], | ||
}, | ||
]), | ||
skill: talentSheet(key, 'skill', []), | ||
ult: talentSheet(key, 'ult', []), | ||
talent: talentSheet(key, 'talent', []), | ||
technique: talentSheet(key, 'technique'), | ||
bonusAbility1: bonusAbilitySheet(key, 'bonusAbility1'), | ||
bonusAbility2: bonusAbilitySheet(key, 'bonusAbility2'), | ||
bonusAbility3: bonusAbilitySheet(key, 'bonusAbility3', []), | ||
|
||
...bonusStatsSheets(key), | ||
eidolon1: eidolonSheet(key, 'eidolon1', []), | ||
eidolon2: eidolonSheet(key, 'eidolon2', []), | ||
eidolon3: eidolonSheet(key, 'eidolon3', [ | ||
// { | ||
// type: 'fields', | ||
// fields: [ | ||
// { | ||
// //TODO: Translate | ||
// title: 'talent', | ||
// fieldRef: buff.eidolon3_talent.tag, | ||
// }, | ||
// { | ||
// //TODO: Translate | ||
// title: 'ult', | ||
// fieldRef: buff.eidolon3_ult.tag, | ||
// }, | ||
// ], | ||
// }, | ||
]), | ||
eidolon4: eidolonSheet(key, 'eidolon4', []), | ||
eidolon5: eidolonSheet(key, 'eidolon5', [ | ||
// { | ||
// type: 'fields', | ||
// fields: [ | ||
// { | ||
// //TODO: Translate | ||
// title: 'basic', | ||
// fieldRef: buff.eidolon5_basic.tag, | ||
// }, | ||
// { | ||
// //TODO: Translate | ||
// title: 'skill', | ||
// fieldRef: buff.eidolon5_skill.tag, | ||
// }, | ||
// ], | ||
// }, | ||
]), | ||
eidolon6: eidolonSheet(key, 'eidolon6'), | ||
} | ||
export default sheet |
Oops, something went wrong.